cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP257FAI3 – Some GPIO pins (e.g., PZ7, PZ8) still consumed by kernel even after removing from pinctrl in TF-A, U-Boot, and Linux

_Krishna
Associate III

 

Hello ST Community,

I am currently working on a custom board based on STM32MP257FAI3, derived from the STM32MP257F-EV1 evaluation board.
We initially built our own custom image and successfully enabled several peripherals (SPI, USART, Timers, ADCs, and Interrupts) and tested on evaluation board as well.

Now, while adapting the configuration for our custom hardware, I have modified all pin assignments according to the alternate functions listed in the datasheet and reference manual.
Most of the pins are configured correctly and appear as expected in the system.

However, I’ve noticed that certain pins (for example, PZ7 and PZ8, which were used for LPUART1 on the EV1) and some other pins in list are still shown as “consumer = kernel” in the output of:

 

 
gpioinfo -c /dev/gpiochip11

even though I have:

  • Removed their references from TF-A, U-Boot, and Linux kernel device trees

  • Deleted their entries from the corresponding pinctrl and pinmux configurations

Despite these removals, the pins are still being consumed by the kernel and not appearing as free GPIOs.

Could you please help clarify:

  1. Why these pins are still marked as consumed by the kernel?

  2. Which subsystem (kernel, IIO, or SCMI) could be retaining control over these pins even after removal from all pinctrl nodes?

  3. Is there an additional step needed to fully release these pins for GPIO use on STM32MP25x devices?

Thank you for your time and support!

Best regards,
Preetham

3 REPLIES 3
PatrickF
ST Employee

Hi @_Krishna 

likely something around LPUART1 RX/TX used for Cortex-M0+ demo inside Starter Package on EV1 board.
https://wiki.st.com/stm32mpu/wiki/How_to_use_the_Cortex-M0%2B#STM32MP257x-EV1_Evaluation_board

https://github.com/STMicroelectronics/linux/blob/v6.6-stm32mp/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts#L490

https://github.com/STMicroelectronics/linux/blob/v6.6-stm32mp/arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi#L967

 

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
_Krishna
Associate III

Hey @PatrickF , 
     Thanks for replying. My issue is that I have removed those from lpuart1 and I am assigning the same pins for some other purpose. When access those I am facing issue and when checked with 

                                       gpioinfo -c /dev/gpiochip11


I am getting consumer = kernel now how to remove them designated functions so that I can use them as normal gpios.

PatrickF
ST Employee

Hi,

 

did you check using 
cat /sys/kernel/debug/pinctrl/soc@0\:pin*\@46200000/pinconf-pins

?

 

Maybe some RIF config to be changed

https://wiki.st.com/stm32mpu/wiki/How_to_use_the_Cortex-M0%2B#Peripherals_RIF_configuration_example

 

Regards.

 

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.