Hello!
I got the TI Debian release for SK-AM62 booted up. I installed gpiod (via apt-get install) which came with a few programs to set gpio pin outputs etc. I looked at the schematics and the manual for the SK-AM62 to understand the pin numbers connected etc. For eg: user expansion pin 13 is connected to EXP_GPIO0_42. Pin 29 is connected to EXP_GPIO0_36. Now, I list the pins via gpioinfo, and it only shows 22 pins for GPIO0.
If I do,
# gpioset gpiochip0 13=1
or
# gpioset gpiochip0 13=0
I do not see any change in the gpio pin voltage.
For pins like 42, since gpioinfo only lists 22 pins, it gives an error if I try to set them.
root@am62xx:~# gpioset gpiochip0 42=1
gpioset: error setting the GPIO line values: Invalid argument
Do I need to make any changes in the dtsi file to toggle GPIO pins? I tried doing this change, but that didn't change anything.
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
index 665c05101e757..e9960212ec11f 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
@@ -268,6 +268,13 @@ AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17/B15) MMC1_SDWP.GPIO1_49 */
>;
};
+ usr_exp_gpio_pins_default: usr-exp-gpio-pins-default {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x01b0, PIN_OUTPUT_PULLUP, 7) /* (A20) MCASP0_ACLKR.GPIO1_14 */
+ AM62X_IOPAD(0x01d0, PIN_OUTPUT_PULLUP, 7) /* (A15) UART0_CTSn.GPIO1_22 */
+ >;
+ };
+
I guess I have to call this fragment from somewhere for this to be effective? Also, I just wanted to add that the earlier examples in this forum that I could find used the older interface in /sys/class/gpio which no longer seem to exist in newer kernels and instead have /sys/bus/gpio/ directory.
Thanks
Ram