Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Amelie Delaunay <amelie.delaunay@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>

authored by

Amelie Delaunay and committed by
Alexandre Torgue
d4c986b7 a1975755

+43
+43
arch/arm/boot/dts/stm32746g-eval.dts
··· 87 87 }; 88 88 }; 89 89 90 + joystick { 91 + compatible = "gpio-keys"; 92 + #size-cells = <0>; 93 + pinctrl-0 = <&joystick_pins>; 94 + pinctrl-names = "default"; 95 + button-0 { 96 + label = "JoySel"; 97 + linux,code = <KEY_ENTER>; 98 + interrupt-parent = <&stmfx_pinctrl>; 99 + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 100 + }; 101 + button-1 { 102 + label = "JoyDown"; 103 + linux,code = <KEY_DOWN>; 104 + interrupt-parent = <&stmfx_pinctrl>; 105 + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 106 + }; 107 + button-2 { 108 + label = "JoyLeft"; 109 + linux,code = <KEY_LEFT>; 110 + interrupt-parent = <&stmfx_pinctrl>; 111 + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; 112 + }; 113 + button-3 { 114 + label = "JoyRight"; 115 + linux,code = <KEY_RIGHT>; 116 + interrupt-parent = <&stmfx_pinctrl>; 117 + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; 118 + }; 119 + button-4 { 120 + label = "JoyUp"; 121 + linux,code = <KEY_UP>; 122 + interrupt-parent = <&stmfx_pinctrl>; 123 + interrupts = <4 IRQ_TYPE_EDGE_FALLING>; 124 + }; 125 + }; 126 + 90 127 usbotg_hs_phy: usb-phy { 91 128 #phy-cells = <0>; 92 129 compatible = "usb-nop-xceiv"; ··· 167 130 interrupt-controller; 168 131 #interrupt-cells = <2>; 169 132 gpio-ranges = <&stmfx_pinctrl 0 0 24>; 133 + 134 + joystick_pins: joystick { 135 + pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; 136 + drive-push-pull; 137 + bias-pull-up; 138 + }; 170 139 }; 171 140 }; 172 141 };