Hi everyone,
I am having trouble figuring out how to set a PIN with the PULL_UP argument via the pin controller.
I assumed that passing the PULL_UP argument to the AM62X_IOPAD() function in the device tree would do the job, but it doesn't seem to be working.
Here are the test steps:
The test LED on SK-AM62B is associated with GPIO1_49. By default, it blinks and works well under the LED subsystem.
I made modifications to the device tree file of am62xx-evm SDK 9.0. (arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi). The changes are as follows
git diff index 07763091a..51e916a69 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -109,14 +109,6 @@ leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&usr_led_pins_default>; - - led-0 { - label = "am62-sk:green:heartbeat"; - gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; - function = LED_FUNCTION_HEARTBEAT; - default-state = "off"; - }; }; tlv320_mclk: clk-0 { @@ -225,7 +217,7 @@ AM62X_IOPAD(0x240, PIN_INPUT, 0) /* (D17/C15) MMC1_SDCD */ usr_led_pins_default: usr-led-pins-default { pinctrl-single,pins = < - AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17/B15) MMC1_SDWP.GPIO1_49 */ + AM62X_IOPAD(0x244, PIN_INPUT_PULLUP, 7) /* (C17/B15) MMC1_SDWP.GPIO1_49 */ >; }; sean:ti-linux-kernel$
However, after replacing the k3-am625-sk.dtb on the EVB, I cannot light up the LED.
Can anyone guide me on how to pull up a PIN via the pin controller (PINMUX)?
Thanks,
Sean