Commit d4c986b7 authored by Amelie Delaunay's avatar Amelie Delaunay Committed by Alexandre Torgue

ARM: dts: stm32: add joystick support on stm32746g-eval

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 stmfx_pinctrl node.
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarAlexandre Torgue <alexandre.torgue@st.com>
parent a1975755
...@@ -87,6 +87,43 @@ button@0 { ...@@ -87,6 +87,43 @@ button@0 {
}; };
}; };
joystick {
compatible = "gpio-keys";
#size-cells = <0>;
pinctrl-0 = <&joystick_pins>;
pinctrl-names = "default";
button-0 {
label = "JoySel";
linux,code = <KEY_ENTER>;
interrupt-parent = <&stmfx_pinctrl>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
};
button-1 {
label = "JoyDown";
linux,code = <KEY_DOWN>;
interrupt-parent = <&stmfx_pinctrl>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
};
button-2 {
label = "JoyLeft";
linux,code = <KEY_LEFT>;
interrupt-parent = <&stmfx_pinctrl>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
};
button-3 {
label = "JoyRight";
linux,code = <KEY_RIGHT>;
interrupt-parent = <&stmfx_pinctrl>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
};
button-4 {
label = "JoyUp";
linux,code = <KEY_UP>;
interrupt-parent = <&stmfx_pinctrl>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
};
};
usbotg_hs_phy: usb-phy { usbotg_hs_phy: usb-phy {
#phy-cells = <0>; #phy-cells = <0>;
compatible = "usb-nop-xceiv"; compatible = "usb-nop-xceiv";
...@@ -130,6 +167,12 @@ stmfx_pinctrl: stmfx-pin-controller { ...@@ -130,6 +167,12 @@ stmfx_pinctrl: stmfx-pin-controller {
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
gpio-ranges = <&stmfx_pinctrl 0 0 24>; gpio-ranges = <&stmfx_pinctrl 0 0 24>;
joystick_pins: joystick {
pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
drive-push-pull;
bias-pull-up;
};
}; };
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment