I'm trying to multiplex the gpmc_ad9 pin in PWM mode through the device tree.
&am33xx_pinmux {
hw_pins: hw_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE4) /* gpmc_ad9.ehrpwm2B */
>;
};
};
/ {
soc {
pinctrl-names = "default";
pinctrl-0 = <&hw_pins>;
};
};
However, the debugfs still shows mode 7 for the pin:
cd /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single
cat pins | grep 824
Output:
pin 9 (PIN9) 44e10824 00000027 pinctrl-single
I don't see in the device tree that this pin gets redefined.
What am I doing wrong here?
I've found the solution; I had to put the pinctrl properties inside another node.
I guess that's because the 'soc' node already has pinctrl properties defined.
&am33xx_pinmux {
hw_pins: hw_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE4) /* gpmc_ad9.ehrpwm2B */
>;
};
};
/ {
soc {
mydriver {
compatible = "mydriver";
pinctrl-names = "default";
pinctrl-0 = <&hw_pins>;
};
};
};