aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-18 18:04:33 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-18 23:42:32 +0100
commitf07e572f6447465d8938679533d604e402b0f066 (patch)
treecb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch
parent5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff)
downloadupstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz
upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2
upstream-f07e572f6447465d8938679533d604e402b0f066.zip
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch b/target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch
new file mode 100644
index 0000000000..5bb6ee23ab
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.4/950-0755-overlays-gpio-shutdown-Add-information-for-Raspberry.patch
@@ -0,0 +1,62 @@
+From 5f9fcc99c517a517e8d74ce001fc5bc2648f0e59 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
+Date: Thu, 30 Apr 2020 19:41:10 +0200
+Subject: [PATCH] overlays: gpio-shutdown: Add information for
+ Raspberry Pi 1 Model B rev 1
+
+Raspberry Pi 1 Model B rev 1 uses GPIO1 for power-up instead of GPIO3.
+---
+ arch/arm/boot/dts/overlays/README | 10 ++++++++--
+ arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts | 6 ++++--
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -883,9 +883,14 @@ Info: Initiates a shutdown when GPIO p
+ can be powered up again by driving GPIO3 low. The default
+ configuration uses GPIO3 with a pullup, so if you connect a
+ button between GPIO3 and GND (pin 5 and 6 on the 40-pin header),
+- you get a shutdown and power-up button.
++ you get a shutdown and power-up button. Please note that
++ Raspberry Pi 1 Model B rev 1 uses GPIO1 instead of GPIO3.
+ Load: dtoverlay=gpio-shutdown,<param>=<val>
+ Params: gpio_pin GPIO pin to trigger on (default 3)
++ For Raspberry Pi 1 Model B rev 1 set this
++ explicitly to value 1, e.g.:
++
++ dtoverlay=gpio-shutdown,gpio_pin=1
+
+ active_low When this is 1 (active low), a falling
+ edge generates a key down event and a
+@@ -897,7 +902,8 @@ Params: gpio_pin GPIO pin
+ Default is "up".
+
+ Note that the default pin (GPIO3) has an
+- external pullup.
++ external pullup. Same applies for GPIO1
++ on Raspberry Pi 1 Model B rev 1.
+
+ debounce Specify the debounce interval in milliseconds
+ (default 100)
+--- a/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts
++++ b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts
+@@ -4,7 +4,9 @@
+
+ // This overlay sets up an input device that generates KEY_POWER events
+ // when a given GPIO pin changes. It defaults to using GPIO3, which can
+-// also be used to wake up (start) the Rpi again after shutdown. Since
++// also be used to wake up (start) the Rpi again after shutdown.
++// Raspberry Pi 1 Model B rev 1 can be wake up only by GPIO1 pin, so for
++// these boards change default GPIO pin to 1 via gpio_pin parameter. Since
+ // wakeup is active-low, this defaults to active-low with a pullup
+ // enabled, but all of this can be changed using overlay parameters (but
+ // note that GPIO3 has an external pullup on at least some boards).
+@@ -71,7 +73,7 @@
+
+ // Allow changing the internal pullup/down state. 0 = none, 1 = pulldown, 2 = pullup
+ // Note that GPIO3 and GPIO2 are the I2c pins and have an external pullup (at least
+- // on some boards).
++ // on some boards). Same applies for GPIO1 on Raspberry Pi 1 Model B rev 1.
+ gpio_pull = <&pin_state>,"brcm,pull:0";
+
+ // Allow setting the active_low flag. 0 = active high, 1 = active low