Files
operating-system/buildroot-external/board/raspberrypi/yellow/patches/linux/0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch
Stefan Agner 9bdd810e76 Yellow: Bump Raspberry Pi kernel to 1.20220308 (#1817)
Update kernel to Raspberry Pi kernel 1.20220308 and rebase Yellow
specific patches.
2022-03-29 01:06:23 +02:00

72 lines
1.9 KiB
Diff

From cc494d2e43c40c2673abc8a4fd6599ec1796eafb Mon Sep 17 00:00:00 2001
Message-Id: <cc494d2e43c40c2673abc8a4fd6599ec1796eafb.1648505253.git.stefan@agner.ch>
In-Reply-To: <017d6caf5d4e0b0963109633e191f49d7814165e.1648505253.git.stefan@agner.ch>
References: <017d6caf5d4e0b0963109633e191f49d7814165e.1648505253.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 9 Mar 2021 15:02:53 +0100
Subject: [PATCH 6/9] ARM: dts: bcm2711: yellow: enable GPIO keys
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
index 67c7d86ecca2..5dc5f0c81e62 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
@@ -2,6 +2,7 @@
/dts-v1/;
#include "bcm2711.dtsi"
#include "bcm2835-rpi.dtsi"
+#include <dt-bindings/input/input.h>
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
@@ -29,6 +30,29 @@ aliases {
blconfig = &blconfig;
};
+ keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_button_pins>;
+
+ status = "okay";
+
+ power {
+ label = "Power Button";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ debounce-interval = <100>; // ms
+ };
+
+ user {
+ label = "User Button";
+ linux,code = <KEY_MACRO>;
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ debounce-interval = <100>; // ms
+ };
+ };
+
leds {
led-act {
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
@@ -438,6 +462,12 @@ spidev1: spidev@1{
};
&gpio {
+ gpio_button_pins: gpio_button_pins {
+ brcm,pins = <26 27>;
+ brcm,function = <BCM2835_FSEL_GPIO_IN>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
spi0_pins: spi0_pins {
brcm,pins = <9 10 11>;
brcm,function = <BCM2835_FSEL_ALT0>;
--
2.35.1