ocp:Px_yy_pinmux has no "state" and "driver"

Original BBB image, when I get into

/sys/devices/platform/ocp/ocp:Px_yy_pinmux, each folder has state and driver.
when I customize our image, added “am335x-bone-common-univ.dtsi”, /sys/devices/platform/ocp/ocp:Px_yy_pinmux shown up but we don’t have state and driver that we can’t change gpio alternate pin function.

Any one know what we are missing or what driver / dtb to show “state” up?

Many thanks,

load bone-pinmux-helper.ko worked.

But P9_22_pinmux still has no state while P9_21, P9_17, P9_18 has “state” as well. I am trying to config SPI0.

Not sure why!

Ive been trying to config SPI1 for use. I found that pinmux can get “disabled” during boot-up when the device tree blob files get read.
do a search of the source tree for “P9_22_pinmux”. My copy of bone-4.19.232.bone75 has KERNEL/arch/arm/boot/dts/am335x-bone-pinmux-spi0.dtsi disabling the pinmux on line 23. I don’t know your setup, or if that file is actually getting called, but it tripped me up a week or three ago.

Not sure why bone-pinmux-helper doesn’t work on some pins including P9_22.

In my setup, I haven’t done anything with spi0 yet.

I just build am335x-bone-common-univ.dtsi and load “bone-pinmux-helper”.

Because the config-pin looking for the state file in the path: /sys/devices/platform/ocp/ocp:Px_yy_pinmux

Most of the pins have the path correctly now, except for P9_22
So config-pin work with most of pins, except for P9_22 (and few more) because no state file where the alterate mode will be written to.

I need P9_22 because this is spi0 clock pin.

Go check out arch/arm/boot/dts/overlays/BB-SPIDEV0-00A0.dts
It not only disables pinmux but also sets the pin configuration(s) for you.
I have yet to try adding overlays to uEnv.txt, so you’ll have to let me know if adding it worked.

Hi, that will be next step.
For now, just not sure why config-pin work on P9_21 but not on P9_22

Hi, I found the issue why P9_22 doesn’t but other ones work!

Reason is, in SPI overlays we use:

0x150 0x30
0x154 0x30
0x158 0x10
0x15C 0x10

0x150 is P9_22 that hold by the overlay.
if I move 0x154 (P9_21) then P9_22 work but P9_21.

It make sense if all pin don’t work because hold for SPI0 once SPI0 active but only the top is hold, that doesn’t make sense to me.

Release to this issue: BB-SPIDEV0-00A0.dts take first pin only? - General Discussion - BeagleBoard