]> git.baikalelectronics.ru Git - uboot.git/commit
stm32mp1: add pull-up for gpio button PA13 and PA14
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 9 Jul 2021 07:53:37 +0000 (09:53 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 27 Jul 2021 07:47:40 +0000 (09:47 +0200)
commit1c634e15a3ca3b9426429de0534a3c6292f22f40
treebd25a731bce90adcc5a204213616cdc67202255b
parent4f288f2d126c4f2b05bc0fb4a949fe422ae8387d
stm32mp1: add pull-up for gpio button PA13 and PA14

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@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
board/st/stm32mp1/stm32mp1.c