[PATCH] stm32mp1: add pull-up for gpio button PA13 and PA14

Patrick DELAUNAY patrick.delaunay at foss.st.com
Tue Jul 27 11:10:27 CEST 2021


Hi,

On 7/9/21 9:53 AM, Patrick Delaunay wrote:
> When a push-button is released and PA13/PA14 are defined as input (high-Z)
> the LED should not be active as the circuit is open but a small current
> leak through PCB or push-button close the circuit and allows a small LED
> bias giving erroneous level voltage.
>
> So it is recommended to activate an internal pull-up in order to clearly
> fix the voltage at PA13/PA14 when button is released and to wait
> a short delay before to read the GPIO value only when the pull-up is
> correctly configured.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
>   arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 4 ++--
>   arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 4 ++--
>   board/st/stm32mp1/stm32mp1.c             | 2 ++
>   3 files changed, 6 insertions(+), 4 deletions(-)
>

Applied to u-boot-stm/master, thanks!

Regards
Patrick




More information about the U-Boot mailing list