How to patch/change dts for some GPIO pins (linux 5.4)

Hello,

I have a linux 5.4 custom build (by BuildRoot) for BeagleBone Black. There is no device-tree overlay and cape manager…
I need some inputs and outputs so I should create a patch for the am335x-boneblack-common.dtsi file (and probably for am335x-boneblack.dts too) that’s way I have added some lines to am335x-boneblack-commom.dtsi into the “&am33xx_pinmux” section:

`
&am33xx_pinmux {

gpio_pins: pinmux_gpio_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_OUTPUT, MUX_MODE7) /* control pin1 /
AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_OUTPUT, MUX_MODE7) /
control pin2 */

AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_INPUT_PULLUP, MUX_MODE7) /* SW1 /
AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_INPUT_PULLUP, MUX_MODE7) /
SW2 /
AM33XX_PADCONF(AM335X_PIN_GPMC_WEN, PIN_INPUT_PULLUP, MUX_MODE7) /
SW3 /
AM33XX_PADCONF(AM335X_PIN_GPMC_BEN0_CLE, PIN_INPUT_PULLUP, MUX_MODE7) /
SW4 */

AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_INPUT_PULLUP, MUX_MODE7) /* Rev0 /
AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE7) /
Rev1 */

AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_INPUT_PULLUP, MUX_MODE7) /* input1 /
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE7) /
input2 /
AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE7) /
input3 /
AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLUP, MUX_MODE7) /
input4 */

;
};

};

`

It has no effect. The “input pull up” does not work. I have read a lot of articles and projects, but I don’t know how I should do it.I have stucked here.

Please help me with an example or any other way to make those inputs and outputs work .

Thank you in advance.

I have added the following to the am335x-boneblack.dts:

`
&am33xx_pinmux {
pinctrl-names = “default”;
pinctrl-0 = <&gpio_pins>;

status = “okay”;
};
`

Now it works as expected.

  1. június 25., csütörtök 15:26:00 UTC+2 időpontban droland a következőt írta: