arm: dts: bcm2711-rpi-4-b: Adds buttons for speaker profile
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / bcm2711-rpi-4-b.dts
index f290925..f51050b 100644 (file)
@@ -3,6 +3,7 @@
 #include "bcm2711.dtsi"
 #include "bcm2711-rpi.dtsi"
 //#include "bcm283x-rpi-usb-peripheral.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
        compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
                stdout-path = "serial1:115200n8";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               key-volume-up {
+                       lable = "volume-up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+               };
+
+               key-volume-down {
+                       lable = "volume-down";
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+               };
+
+               key-fastforward {
+                       lable = "fastforward";
+                       linux,code = <KEY_FASTFORWARD>;
+                       gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+               };
+
+               key-rewind {
+                       lable = "rewind";
+                       linux,code = <KEY_REWIND>;
+                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+               };
+
+               key-playpause {
+                       lable = "playpause";
+                       linux,code = <KEY_PLAYPAUSE>;
+                       gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+               };
+       };
+
        leds {
                led-act {
                        gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
                brcm,function = <BCM2835_FSEL_ALT4>;
                brcm,pull = <0 2>;
        };
+
+       /* Needs to describe gpio settings at config.txt */
+       key_volume_up: key_volume_up {
+               brcm,pins = <16>;
+               brcm,function = <1>; /* BCM2835_FSEL_GPIO_IN */
+               brcm,pull = <2>; /* BCM2835_PUD_UP */
+       };
+
+       key_volume_down: key_volume_down {
+               brcm,pins = <13>;
+               brcm,function = <1>;
+               brcm,pull = <2>;
+       };
+
+       key_fastforward: key_fastforward {
+               brcm,pins = <6>;
+               brcm,function = <1>;
+               brcm,pull = <2>;
+       };
+
+       key_rewind: key_rewind {
+               brcm,pins = <12>;
+               brcm,function = <1>;
+               brcm,pull = <2>;
+       };
+
+       key_playpause: key_playpause {
+               brcm,pins = <25>;
+               brcm,function = <1>;
+               brcm,pull = <2>;
+       };
 };
 
 &i2c0if {