Hi,
I would like to test GPIO chain test on AM62x EVK.
I have already configured the pins necessary but the input and output does not seem to change.
The voltage also does not change.
I saw that a few other people had the same problem but I couldn't find the solution to it.
I am using physical pin 16 and 18 of J3.
This is the dts file in patch format.
10a11
> serial5 = &main_uart5;
23c24
< bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
---
> bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02850000";
231a233,246
> led1 {
> compatible = "gpio-leds";
> pinctrl-names = "default";
> pinctrl-0 = <&usr_led_pins_test>;
>
> led-0 {
> label = "gpio_single_led";
> gpios = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "heartbeat";
> function = LED_FUNCTION_HEARTBEAT;
> default-state = "on";
> };
> };
>
250a266,272
> mygpio1_pins_default: mygpio1-pins-default {
> pinctrl-single,pins = <
> AM62X_IOPAD(0x009c, PIN_OUTPUT_PULLUP, 7) /* (V25) GPMC0_WAIT1.GPIO0_38 */
> AM62X_IOPAD(0x00a0, PIN_INPUT_PULLDOWN, 7) /* (K25) GPMC0_WPn.GPIO0_39 */
> >;
> };
>
257a280,287
> main_uart5_pins_default: main-uart5-pins-default {
> pinctrl-single,pins = <
> AM62X_IOPAD(0x1d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.UART5_RXD */
> AM62X_IOPAD(0x1dc, PIN_OUTPUT, 1) /* (E15) MCAN0_RX.UART5_TXD */
> >;
> };
>
> // this is connected to EEPROM
335a366,371
> usr_led_pins_test: usr-led-pins-test {
> pinctrl-single,pins = <
> AM62X_IOPAD(0x00ac, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
> >;
> };
>
453a490,505
> &mcu_pmx0 {
> mymcui2c1_pins_default: mymcui2c1-pins-default {
> pinctrl-single,pins = <
> AM62X_MCU_IOPAD(0x0044, PIN_INPUT, 0) /* (A8) MCU_I2C0_SCL */
> AM62X_MCU_IOPAD(0x0048, PIN_INPUT, 0) /* (D10) MCU_I2C0_SDA */
> >;
> };
>
> mymcugpio1_pins_default: mymcugpio1-pins-default {
> pinctrl-single,pins = <
> AM62X_MCU_IOPAD(0x003c, PIN_INPUT, 7) /* (E5) MCU_MCAN1_TX.MCU_GPIO0_15 */
> AM62X_MCU_IOPAD(0x0040, PIN_OUTPUT, 7) /* (D4) MCU_MCAN1_RX.MCU_GPIO0_16 */
> >;
> };
> };
>
486c538,539
< status = "disabled";
---
> pinctrl-names = "default";
> pinctrl-0 = <&main_uart5_pins_default>;
494c547
< status = "disabled";
---
> status = "okay";
524a578,584
>
> at24@50 {
> compatible = "atmel,24c02";
> reg = <0x50>;
> pagesize = <8>;
> size = <256>;
> };
after this, i did the following commands.
echo 439 > /sys/class/gpio/export
echo 440 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio440/direction
cat /sys/class/gpio/gpio440/direction
in
echo out > /sys/class/gpio/gpio439/direction
cat /sys/class/gpio/gpio439/direction
out
cat /sys/class/gpio/gpio439/value
0
echo 1 > /sys/class/gpio/gpio439/value
cat /sys/class/gpio/gpio439/value
0