From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amelie Delaunay Subject: [PATCH 5/6] ARM: dts: stm32: add joystick support on stm32746g-eval Date: Thu, 8 Feb 2018 15:27:36 +0100 Message-ID: <1518100057-23234-6-git-send-email-amelie.delaunay@st.com> References: <1518100057-23234-1-git-send-email-amelie.delaunay@st.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1518100057-23234-1-git-send-email-amelie.delaunay@st.com> Sender: linux-gpio-owner@vger.kernel.org To: Lee Jones , Linus Walleij , Rob Herring , Mark Rutland , Russell King , Alexandre Torgue , Maxime Coquelin Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Amelie Delaunay List-Id: devicetree@vger.kernel.org The joystick on stm32746g-eval uses gpios on MFX gpio expander. Signed-off-by: Amelie Delaunay --- arch/arm/boot/dts/stm32746g-eval.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/stm32746g-eval.dts b/arch/arm/boot/dts/stm32746g-eval.dts index 99739f7..eb5f43b 100644 --- a/arch/arm/boot/dts/stm32746g-eval.dts +++ b/arch/arm/boot/dts/stm32746g-eval.dts @@ -43,6 +43,7 @@ /dts-v1/; #include "stm32f746.dtsi" #include +#include / { model = "STMicroelectronics STM32746g-EVAL board"; @@ -98,6 +99,36 @@ }; }; + joystick { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + button@1 { + label = "JoySel"; + linux,code = ; + gpios = <&mfxgpio 0 (GPIO_ACTIVE_LOW | GPIO_IN_PUSH_PULL | GPIO_PULL_UP)>; + }; + button@2 { + label = "JoyDown"; + linux,code = ; + gpios = <&mfxgpio 1 (GPIO_ACTIVE_LOW | GPIO_IN_PUSH_PULL | GPIO_PULL_UP)>; + }; + button@3 { + label = "JoyLeft"; + linux,code = ; + gpios = <&mfxgpio 2 (GPIO_ACTIVE_LOW | GPIO_IN_PUSH_PULL | GPIO_PULL_UP)>; + }; + button@4 { + label = "JoyRight"; + linux,code = ; + gpios = <&mfxgpio 3 (GPIO_ACTIVE_LOW | GPIO_IN_PUSH_PULL | GPIO_PULL_UP)>; + }; + button@5 { + label = "JoyUp"; + linux,code = ; + gpios = <&mfxgpio 4 (GPIO_ACTIVE_LOW | GPIO_IN_PUSH_PULL | GPIO_PULL_UP)>; + }; + }; mmc_vcard: mmc_vcard { compatible = "regulator-fixed"; -- 2.7.4