* Enable additional LED triggers * Improve Yellow device tree Fix soundcard name and use BTN_1 as key code. * Add input-event-daemon configuration Add minimal input-event-daemon configuration to avoid the default configuration taking effect. This minimal configuration triggers the USB configuration import on button press.
73 lines
2.0 KiB
Diff
73 lines
2.0 KiB
Diff
From 41127a02d66d07d0a17e904557899b15a067a692 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <41127a02d66d07d0a17e904557899b15a067a692.1651085802.git.stefan@agner.ch>
|
|
In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1651085802.git.stefan@agner.ch>
|
|
References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1651085802.git.stefan@agner.ch>
|
|
From: Stefan Agner <stefan@agner.ch>
|
|
Date: Tue, 9 Mar 2021 15:02:53 +0100
|
|
Subject: [PATCH 06/10] ARM: dts: bcm2711: yellow: enable GPIO keys
|
|
|
|
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
|
---
|
|
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 31 +++++++++++++++++++
|
|
1 file changed, 31 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 f6f42bf45c92..e2fa42a11cc9 100644
|
|
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
|
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
|
@@ -4,6 +4,8 @@
|
|
#include "bcm2711-rpi.dtsi"
|
|
//#include "bcm283x-rpi-usb-peripheral.dtsi"
|
|
|
|
+#include <dt-bindings/input/input.h>
|
|
+
|
|
/ {
|
|
compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
|
model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
|
@@ -18,6 +20,29 @@ chosen {
|
|
stdout-path = "serial1:115200n8";
|
|
};
|
|
|
|
+ keys: gpio-keys {
|
|
+ compatible = "gpio-keys";
|
|
+
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&gpio_button_pins>;
|
|
+
|
|
+ status = "okay";
|
|
+
|
|
+ power {
|
|
+ label = "Blue Button";
|
|
+ linux,code = <KEY_POWER>;
|
|
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
|
+ debounce-interval = <100>; // ms
|
|
+ };
|
|
+
|
|
+ user {
|
|
+ label = "Red Button";
|
|
+ linux,code = <BTN_1>;
|
|
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
|
+ debounce-interval = <100>; // ms
|
|
+ };
|
|
+ };
|
|
+
|
|
leds {
|
|
led-act {
|
|
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
|
@@ -380,6 +405,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.36.0
|
|
|