Part Number: PROCESSOR-SDK-AM62X
Hi,
Related to my past question, how do i export for MCU_GPIO instead of GPIO0_38?
For example: MCU_GPIO0_16
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: PROCESSOR-SDK-AM62X
Hi,
Related to my past question, how do i export for MCU_GPIO instead of GPIO0_38?
For example: MCU_GPIO0_16
Hi Cyra,
It is the same process as using MAIN domain GPIO.
- enable mcu_gpio0 DT node and MCU GPIO pinmux in kernel device tree;
- once Linux is booted, check '/sys/class/gpio' to see which gpiochipXXX entry corresponds to the MCU_GPIO0 module, then number XXX will be the base index for mcu_gpio0_0 pin, XXX+16 will be the number for MCU_GPIO0_16.
How do i know the base index?
I know 401 is for GPIO 0 and 313 is for GPIO 1.
lrwxrwxrwx 1 root root 0 Nov 7 08:29 gpiochip289 -> ../../devices/platform/bus@f0000/20010000.i2c/i2c-1/1-0022/gpio/gpiochip289
lrwxrwxrwx 1 root root 0 Nov 7 08:29 gpiochip313 -> ../../devices/platform/bus@f0000/601000.gpio/gpio/gpiochip313
lrwxrwxrwx 1 root root 0 Nov 7 08:29 gpiochip401 -> ../../devices/platform/bus@f0000/600000.gpio/gpio/gpiochip401
lrwxrwxrwx 1 root root 0 Nov 7 08:29 gpiochip488 -> ../../devices/platform/bus@f0000/bus@f0000:bus@4000000/4201000.gpio/gpio/gpiochip488
Hi Cyra,
In kernel source code arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi line 114, you will see mcu_gpio0 node has name "gpio@4201000". Look for 4201000 in the output above, you will see the last line gpiochip488 points to mcu_gpio0 device 4201000.gpio, so 488 is the first pin of mcu_gpio0 bank, then mcu_gpio0_16 would be 488+16 = 504.