Debbio
1
Hi there,
I’m using Linux bsp 2.8.2, i need to get GPIO2_IO15 free from other resources to be used as user GPIO.
I’m starting from an exisiting project, i can reverse DTB to DTS and viceversa but i’m short on yocto original project to check layers and so on.
Through the follow knowledge:
- Colibri_arm_som_imx7_datasheet.pdf
- IMX7DRM
- Various imx7*.dtsi
- Pinout Designer project
I’m expecting to find GPIO2_15 free to user needs, at the opposite when i dig into sysfs debug features i got:
gpio-47 ( | ? ) out Hi
By reverting DTB to DTS i’ve found the pin grouped under gpio6-grp probably due to an Atmel touch screen chip definition found in some imx7*.dtsi.
Now, i moved the gpio into the “main” gpio group (gpio1-grp) but i can’t get to free the gpio.
I’m looking for an hint how to check who is using this GPIO.
Thanks in advance.
Matteo.
Debbio
2
Further infos from my reversed DTS :
iomuxc@30330000 {
compatible = "fsl,imx7d-iomuxc";
reg = <0x30330000 0x10000>;
pinctrl-names = "default";
pinctrl-0 = <0x18 0x19 0x1a 0x1b 0x1c>;
linux,phandle = <0x15>;
phandle = <0x15>;
gpio1-grp {..}
gpio2-grp {..}
gpio3-grp {..}
gpio4-grp {..}
spigpios {..}
gpio6-grp {
MX7D_PAD_EPDC_DATA15__GPIO2_IO15 (the gpio i'm looking for [gpio2.io[15]) ,
MX7D_PAD_EPDC_BDR0__GPIO2_IO28
}
.....
}
There are no other references to this PAD along my DTS.
Should i assume it is used as GPIO but maybe is taken by some kernel modules for example?
Debbio
3
Another step forward:
iomuxc@30330000 {
compatible = "fsl,imx7d-iomuxc";
reg = <0x30330000 0x10000>;
pinctrl-names = "default";
pinctrl-0 = <0x18 0x19 0x1a 0x1b 0x1c>; this was missing the hoggroup 6 handle
But nonetheless gpio-47 is not shown in exported gpios, but with ( ? ) question mark on sysfs debug
Debbio
4
I ended up in rebuilding the whole image, now i moved to bsp 3.0.4, i got my free gpio.
Perfect that you found a solution. Thanks for the feedback.