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.

SK-AM64: gpiochip mapping to Main Domain and MCU domain GPIO

Part Number: SK-AM64

Hi,

We took a closer look at this on my AM64xx Starterkit with k3-am642-sk.dtb and SDK8.0 with Linux 5.10.

 

Here is what we see there:

root@am64xx-evm:/sys/class/gpio# uname -a

Linux am64xx-evm 5.10.41-g4c2eade9f7 #1 SMP PREEMPT Tue Aug 10 21:52:40 UTC 2021 aarch64 GNU/Linux

 

root@am64xx-evm:/sys/class/gpio# ls

export       gpiochip321  gpiochip329  gpiochip417  gpiochip504  unexport

 

root@am64xx-evm:/sys/class/gpio# cat gpiochip321/label 

tpic2810

root@am64xx-evm:/sys/class/gpio# cat gpiochip321/ngpio 

8

root@am64xx-evm:/sys/class/gpio# cat gpiochip329/label 

601000.gpio

root@am64xx-evm:/sys/class/gpio# cat gpiochip329/ngpio 

88

root@am64xx-evm:/sys/class/gpio# cat gpiochip417/label 

600000.gpio

root@am64xx-evm:/sys/class/gpio# cat gpiochip417/ngpio 

87

root@am64xx-evm:/sys/class/gpio# cat gpiochip504/label 

1-0070

root@am64xx-evm:/sys/class/gpio# cat gpiochip504/ngpio 

8

 

So highlighted you can see gpiochip329 is the starting Main domain GPIO1_0 ... and there are 88 available, but in actuality there are only 80 available when you look at the AM64xx datasheet. Then gpiochip417 is the starting Main domain GPIO0_0 and there are 87 available.

 

The other two gpiochip nodes point to gpio expanders it seems on the board. 

 

Right now I don't know why the MCU domain GPIO is not mapped to a gpiochip.

 

And in the device tree:

k3-am64-main.dtsi

 

main_gpio0: gpio@600000 {

compatible = "ti,am64-gpio", "ti,keystone-gpio";

reg = <0x0 0x00600000 0x0 0x100>;

gpio-controller;

#gpio-cells = <2>;

interrupt-parent = <&main_gpio_intr>;

interrupts = <190>, <191>, <192>,

     <193>, <194>, <195>;

interrupt-controller;

#interrupt-cells = <2>;

ti,ngpio = <87>;

ti,davinci-gpio-unbanked = <0>;

power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>;

clocks = <&k3_clks 77 0>;

clock-names = "gpio";

};

 

main_gpio1: gpio@601000 {

compatible = "ti,am64-gpio", "ti,keystone-gpio";

reg = <0x0 0x00601000 0x0 0x100>;

gpio-controller;

#gpio-cells = <2>;

interrupt-parent = <&main_gpio_intr>;

interrupts = <180>, <181>, <182>,

     <183>, <184>, <185>;

interrupt-controller;

#interrupt-cells = <2>;

ti,ngpio = <88>;

ti,davinci-gpio-unbanked = <0>;

power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>;

clocks = <&k3_clks 78 0>;

clock-names = "gpio";

};

 

But this does not seem to be mapped:

 

k3-am64-mcu.dtsi

 

mcu_gpio0: gpio@4201000 {

compatible = "ti,am64-gpio", "keystone-gpio";

reg = <0x0 0x4201000 0x0 0x100>;

gpio-controller;

#gpio-cells = <2>;

interrupt-parent = <&mcu_gpio_intr>;

interrupts = <30>, <31>;

interrupt-controller;

#interrupt-cells = <2>;

ti,ngpio = <23>;

ti,davinci-gpio-unbanked = <0>;

power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>;

clocks = <&k3_clks 79 0>;

clock-names = "gpio";

};

};

Can you let us know why the MCU domain GPIO is not mapped to a gpiochip node?

Thanks,

--Gunter