In the past (Kernel 4.9, 5.10, 5.15) I’ve “hijacked” pinmux definitions in the kernel device tree to set them into gpio state. Since my latest upgrade to kernel 6.1 this approach is not working anymore. The pins witch are not used by any driver will stay in there inital mode by means of pinmuxing. So I was driven to use led-gpio and gpio-key for getting out- and inputs. That feels somehow uncomfortable. As the led-gpio for an user-space driven OLED display or an custom led board hooked up to spi should not have an led-gpio pin named led / display-reset.
As an example in the past I’ve used the led-definition on my am335x-beagle-common.dtsi to extend it to configure the pinmux for additional gpio-pins.
user_leds_s0: user_leds_s0 {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a6.gpio1_22 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a8.gpio1_24 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a11.gpio1_27 DISP_RST*/
>;
};
So it would be configured and visible in the sysfs-pinmux node too.
But now it is not applied at all.
So I’ve tried in addition:
&am33xx_pinmux {
pinctrl-names = "default";
pinctrl-0 = <&display_rst_pin>;
display_rst_pin: pinmux_display_rst_pin{
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_csn3.gpio2_0 DISP_RST*/
>;
};
But then I’ve got only a message in the kernel boot log.
[ 0.278106] pinctrl core: initialized pinctrl subsystem
[ 2.800524] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_test_pin
[ 2.816415] pinctrl-single 44e10800.pinmux: 142 pins, size 568
And the pinctrl:
cat /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins | grep "pin 64"
pin 64 (PIN64) 30:gpio-32-63 44e10900 00000030 pinctrl-single
Can someone help?
Sombohan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.