cancel
Showing results for 
Search instead for 
Did you mean: 

stm32mp1 unused pins configure as gpio

Ara.1
Senior

Hi I have list of unused pins need to configure as a GPIO, and some as a AF's, do we have any driver which shall facilated unused pins by default set pins state., we have in imx6 IOMUX which does that job in kernel., in mp1 i didnt find that.

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

there is no need to declare 'unused' GPIOs, they are all by default assigned by the HW as Analog mode (See GPIOx_MODER in product Reference Manual), which is best for power consumption and noise.

Then, using Device Tree you could map required IOs to peripheral functions or GPIO function (e.g. LEDs).

Initialization of GPIO IP is done either on uBoot/Linux side (for IOs devoted to uBoot/Linux) or Cortex-M4 side (for IOs handled by m4_rproc).

See https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins

https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration

https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

Regards.

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.

View solution in original post

1 REPLY 1
PatrickF
ST Employee

Hi,

there is no need to declare 'unused' GPIOs, they are all by default assigned by the HW as Analog mode (See GPIOx_MODER in product Reference Manual), which is best for power consumption and noise.

Then, using Device Tree you could map required IOs to peripheral functions or GPIO function (e.g. LEDs).

Initialization of GPIO IP is done either on uBoot/Linux side (for IOs devoted to uBoot/Linux) or Cortex-M4 side (for IOs handled by m4_rproc).

See https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins

https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration

https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

Regards.

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.