@@ -90,6 +90,44 @@
};
};
+ joystick {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&joystick_pins>;
+ pinctrl-names = "default";
+ button@0 {
+ label = "JoySel";
+ linux,code = <KEY_ENTER>;
+ interrupt-parent = <&stmfxgpio>;
+ interrupts = <0 2>;
+ };
+ button@1 {
+ label = "JoyDown";
+ linux,code = <KEY_DOWN>;
+ interrupt-parent = <&stmfxgpio>;
+ interrupts = <1 2>;
+ };
+ button@2 {
+ label = "JoyLeft";
+ linux,code = <KEY_LEFT>;
+ interrupt-parent = <&stmfxgpio>;
+ interrupts = <2 2>;
+ };
+ button@3 {
+ label = "JoyRight";
+ linux,code = <KEY_RIGHT>;
+ interrupt-parent = <&stmfxgpio>;
+ interrupts = <3 2>;
+ };
+ button@4 {
+ label = "JoyUp";
+ linux,code = <KEY_UP>;
+ interrupt-parent = <&stmfxgpio>;
+ interrupts = <4 2>;
+ };
+ };
+
usbotg_hs_phy: usb-phy {
#phy-cells = <0>;
compatible = "usb-nop-xceiv";
@@ -127,6 +165,12 @@
interrupt-controller;
status = "okay";
};
+
+ joystick_pins: joystick@0 {
+ pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
+ drive-push-pull;
+ bias-pull-up;
+ };
};
};
The joystick (B3) on stm32746g-eval uses gpios on STMFX gpio expander. These gpios need a pin configuration (push-pull and bias-pull-up), described under stmfxpinctrl node. Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com> --- arch/arm/boot/dts/stm32746g-eval.dts | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)