#include "bcm2710.dtsi"
#include "bcm283x-rpi-lan7515.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
+#include <dt-bindings/input/input.h>
/ {
compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837";
firmware = <&firmware>;
status = "okay";
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-up {
+ lable = "up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ key-down {
+ lable = "down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ key-left {
+ lable = "left";
+ linux,code = <KEY_FASTFORWARD>;
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ key-right {
+ lable = "right";
+ linux,code = <KEY_REWIND>;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+
+ key-center {
+ lable = "center";
+ linux,code = <KEY_PLAYPAUSE>;
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&gpio {
brcm,pins = <40 41>;
brcm,function = <4>;
};
+
+ /* Needs to describe gpio settings at config.txt */
+ key_up: key_up {
+ brcm,pins = <16>;
+ brcm,function = <1>; /* BCM2835_FSEL_GPIO_IN */
+ brcm,pull = <2>; /* BCM2835_PUD_UP */
+ };
+
+ key_down: key_down {
+ brcm,pins = <13>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_left: key_left {
+ brcm,pins = <6>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_right: key_right {
+ brcm,pins = <12>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_center: key_center {
+ brcm,pins = <26>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
};
&mmcnr {
#include "bcm2710.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
+#include <dt-bindings/input/input.h>
/ {
compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
firmware = <&firmware>;
status = "okay";
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-up {
+ lable = "up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ key-down {
+ lable = "down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ key-left {
+ lable = "left";
+ linux,code = <KEY_FASTFORWARD>;
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ key-right {
+ lable = "right";
+ linux,code = <KEY_REWIND>;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+
+ key-center {
+ lable = "center";
+ linux,code = <KEY_PLAYPAUSE>;
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&gpio {
brcm,pins = <40 41>;
brcm,function = <4>;
};
+
+ /* Needs to describe gpio settings at config.txt */
+ key_up: key_up {
+ brcm,pins = <16>;
+ brcm,function = <1>; /* BCM2835_FSEL_GPIO_IN */
+ brcm,pull = <2>; /* BCM2835_PUD_UP */
+ };
+
+ key_down: key_down {
+ brcm,pins = <13>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_left: key_left {
+ brcm,pins = <6>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_right: key_right {
+ brcm,pins = <12>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
+
+ key_center: key_center {
+ brcm,pins = <26>;
+ brcm,function = <1>;
+ brcm,pull = <2>;
+ };
};
&mmcnr {
# Minimum GPU memory for camera use
gpu_mem=128
+
+# Set gpio pins to Input, Pullup mode.
+gpio=6,12,13,16,26=ip,pu
# Minimum GPU memory for camera use
gpu_mem=128
+
+# Set gpio pins to Input, Pullup mode.
+gpio=6,12,13,16,26=ip,pu