[BBB] pinmux changes in DT overlays for kernels >=5.9

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

[BBB] pinmux changes in DT overlays for kernels >=5.9

Postby Zeno » Wed May 19, 2021 11:59 am

Hello,
I stumbled over a change that occured in transition from kernel 5.8 to 5.9, which is relative to all of you who have custom device tree overlays with pinmux definitions or use any other built-in overlays with pinmuxing. It is relative to #pinctrl-cells, closer description of this parameter is here:
https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
simply put, the #pinctrl-cells value changed from 1 to 2, therefore there is now slightly different form of writing pin-pad configurations. This can be seen here, in the AM33XX_PADCONF macro used in devicetree synthesis, which originally generated tuples ("physical address" "direction | mode") but now generates triplets ("physical address" " direction" "mode"). See here:
https://elixir.bootlin.com/linux/v5.8/source/include/dt-bindings/pinctrl/omap.h#L68
https://elixir.bootlin.com/linux/v5.9/source/include/dt-bindings/pinctrl/omap.h#L68
Looking on it other way around, if you decompile regular am335x-boneblack.dtb on recent kernels, you can see that am33xx_pinmux node has #pinctrl-cells = 2; starting from kernels 5.9 . Effects of this may be really uncomprehensible, for example in my case SPI1 pin definitions in order in which they were typed in my overlay caused the pinmux change of onboard mmc pins to different mode and I was not able to boot at all. You might say, just use overlays packed in /lib/firmware such as BB-SPIDEV1-00A0.dtbo, I was curious and decompiled them, these overlays do not match either, they are still designed in old #pinctrl-cells = 1; form. This is because the source from which overlays are generated still uses old omap pinctrl header definition, see here:
https://github.com/RobertCNelson/bb.org-overlays/blob/master/include/dt-bindings/pinctrl/omap.h#L68
Hope this helps and have a nice day.
Zeno
Zeno
 
Posts: 14
Joined: Wed May 03, 2017 5:00 pm

Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 8 guests