Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RPI zero 2 w PL011 pinctrl states not observed by bcmgpio during boot




> Am 30.11.2026 um 04:38 schrieb Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>:
> 
> Kia ora Maximo,
> My FDT knowledge is a bit rusty, but I had a quick look at the source code and I think the pl011 driver assumes that the pinctrl has already been configured by U-Boot (or similar boot code) while some other drivers (such as I2C) do not make that assumption.

on a simple-bus, pinctrl is automatically configured before the device attaches. See https://nxr.netbsd.org/xref/src/sys/dev/fdt/fdtbus.c#470

> 
> The pl011 device is normally used for the serial console and so the pinctrl would be configured correctly very early in the boot process.

This could be worth checking: Does the pinctrl device attach before the gpio? Can you share a dmesg?

> 
> It really shouldn't be too hard to add a call to set_config in the plcom driver if the FDT contains a pinctrl configuration for the pl011 device. Maybe we could even add a flag to the device so that FDT pinctrl can be ignored if we find cases where it is a problem.

See above for the preferred solution.

> 
> It might also be possible to convince U-Boot to configure the pinctrl correctly.
> 
> This all presupposes that the pl011 pinctrl configuration that the RPI is actually running with is wrong and needs to be correctly configured.
> 

- yuri



Home | Main Index | Thread Index | Old Index