#include "bcm2711.dtsi"
#include "bcm2711-rpi.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
+#include <dt-bindings/input/input.h>
/ {
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
ethernet0 = &genet;
pcie0 = &pcie_0;
};
+
+ 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>;
+ };
+ };
};
&mmcnr {
brcm,pins = <40 41>;
brcm,function = <4>;
};
+
+ /* 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>;
+ };
};
&i2c0 {
# Defines the HDMI output group DMT, set defualt mode 720p
hdmi_group=2
hdmi_mode=85
+
+# Set gpio pins to Input, Pullup mode.
+gpio=6,12,13,16,25=ip,pu