[Letux-kernel] X1600 / LX16 support - here: adding MMC

Andreas Kemnade andreas at kemnade.info
Sat Feb 10 23:47:56 CET 2024


On Sat, 10 Feb 2024 23:20:56 +0100
Andreas Kemnade <andreas at kemnade.info> wrote:

> On Sat, 10 Feb 2024 21:23:21 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
> > > Am 10.02.2024 um 17:58 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > > 
> > > On Sat, 10 Feb 2024 14:53:47 +0100
> > > "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > >     
> > >> 
> > >> If pinctrl is broken, this can explain other problems. Like no clock at msc1.
> > >> Or why we have to disable the UART DTS nodes. In that case the U-Boot defaults likely survive.
> > >> 
> > >> Despite the pinctrl driver being part of the working 5.10.y it has got some (un)tested
> > >> upstream work and adaptations for v6.8.
> > >> 
> > >> Some ideas:
> > >> * check /sys/kernel/debug/gpio (if the gpio is configured as output)    
> > > 
> > > # cat /sys/kernel/debug/gpio 
> > > gpiochip0: GPIOs 0-31, parent: platform/10010000.pinctrl, GPIOA:
> > > 
> > > gpiochip1: GPIOs 32-63, parent: platform/10010000.pinctrl, GPIOB:
> > > 
> > > gpiochip2: GPIOs 64-95, parent: platform/10010000.pinctrl, GPIOC:
> > > gpio-64  (                    |led-0               ) in  lo 
> > > gpio-92  (                    |bootsel1            ) in  lo IRQ 
> > > gpio-95  (                    |WAKEUP              ) in  hi IRQ ACTIVE LOW
> > > 
> > > gpiochip3: GPIOs 96-127, parent: platform/10010000.pinctrl, GPIOD:
> > > 
> > > after unbinding led-gpio:
> > > 
> > > /sys/devices/platform/apb/10010000.pinctrl/gpiochip2/gpio/gpio64 # echo out >dir
> > > ection 
> > > /sys/devices/platform/apb/10010000.pinctrl/gpiochip2/gpio/gpio64 # cat direction
> > > in    
> > 
> > Maybe an explanation is the attached hex dump of CGU, MSC0/1 and PC/PD pincrl
> > (where the red LEDs and MMC0/1 are connected to). The dump starts right after
> > entering jz4740_mmc_probe where I thing the pinctrl is already set up (and
> > rewound if probe fails):
> >   
> busybox devmem 0x10010238 32 0x2
> did the trick for the led, it clears the direction bit. Maybe there is some
> issue with set/clear registers in the pinctrl driver.
> 
ok,
devmem 0x10010238 32 0x3 then enables the second led.

and I can enable heartbeat.

So the pinctrl/gpio driver really needs some boiling.

Regards,
Andreas


More information about the Letux-kernel mailing list