summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-07-09 10:53:37 +0300
committerPatrick Delaunay <patrick.delaunay@foss.st.com>2021-07-27 10:47:40 +0300
commit2a7034c77d628627c9462e27865e2d9258aeadd0 (patch)
treebd25a731bce90adcc5a204213616cdc67202255b /arch
parent8b71b20e0e5431f0243a5a8078ac62be0af2189e (diff)
downloadu-boot-2a7034c77d628627c9462e27865e2d9258aeadd0.tar.xz
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi4
-rw-r--r--arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
index 7dcc96c19c..4b37797f21 100644
--- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
@@ -17,8 +17,8 @@
u-boot,error-led = "error";
u-boot,mmc-env-partition = "ssbl";
st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
- st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
- st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
+ st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
firmware {
diff --git a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
index 46a43371bd..fc6066aab2 100644
--- a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
@@ -16,8 +16,8 @@
u-boot,boot-led = "heartbeat";
u-boot,error-led = "error";
u-boot,mmc-env-partition = "ssbl";
- st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
- st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
+ st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
firmware {