GPIOF and GPIOG not working on STM32MP151
Hi STM-Community,
I'm having problems getting to work the GPIOS of the banks F and G of the STM32MP151DADX with the TFBGA257 Package.
Firstly, I see the following error at boot time:
[ 1.527623] stm32mp157-pinctrl soc:pin-controller-z@54004000: at least one GPIO bank is required
[ 1.527793] stm32mp157-pinctrl: probe of soc:pin-controller-z@54004000 failed with error -22Which seems plausible as the uP I'm using doesn't have a Z-Port. I tried to remove the error by deleting the pinctrl_z of the DTS as follows:
soc {
/delete-node/ pin-controller-z@54004000;
};But then UBoot's dts compiltion fails as pinctrl_z and gpioz are hardcoded in UBoot's sources. My first question is: How can I avoid the pin-controller-z being loaded unnecessarily? I just want to fix this to discard it has an impact on my actual problem.
Regarding to the GPIOF and GPIOG:
The gpioinfo command shows the pins being unused:
gpiochip5 - 6 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
gpiochip6 - 10 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high But I can still not access them. For instance, the GPIOG should have 10 pins with a range between 6 and 15, but I can only access the first 4 pins:
# gpioget gpiochip5 6
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip5 7
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip5 8
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip5 9
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip5 10
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip5 11
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 6
0
# gpioget gpiochip6 7
1
# gpioget gpiochip6 8
0
# gpioget gpiochip6 9
0
# gpioget gpiochip6 10
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 11
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 12
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 13
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 14
gpioget: error reading GPIO values: Invalid argument
# gpioget gpiochip6 15
gpioget: error reading GPIO values: Invalid argumentAny idea why? Is the pinctrl configured correctly in stm32mp15xxad-pinctrl.dtsi?
gpiof: gpio@50007000 {
status = "okay";
ngpios = <6>;
gpio-ranges = <&pinctrl 6 80 6>;
};
gpiog: gpio@50008000 {
status = "okay";
ngpios = <10>;
gpio-ranges = <&pinctrl 6 102 10>;
};Not sure if the gpio-ranges are correctly set.
Thanks in advance!
Bests,
Moises

