From patchwork Sun Jul 16 22:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uN-00G1rr-2S for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:05 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4fba03becc6so6324767e87.0 for ; Sun, 16 Jul 2023 15:08:02 -0700 (PDT) From: Markuss Broks Subject: [PATCH 2/7] ARM: dts: exynos: Add GPIO keys support for k3g Date: Mon, 17 Jul 2023 01:05:03 +0300 Message-ID: <20230716220644.22158-3-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Add the four physical buttons support, volume buttons have external pull-up resistors. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 1a11a6993ba7..c3e006dc34ea 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -8,6 +8,7 @@ /dts-v1/; #include #include +#include #include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" @@ -21,6 +22,45 @@ / { aliases { mmc0 = &mmc_0; + mmc1 = &mmc_1; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&power_gpio &volume_up_gpio &volume_down_gpio &home_gpio>; + + key-volume-up { + label = "Volume Up"; + gpios = <&gpx0 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + debounce-interval = <15>; + }; + + key-volume-down { + label = "Volume Down"; + gpios = <&gpx0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + + key-home { + label = "Home"; + gpios = <&gpx0 5 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; + + key-power { + label = "Power"; + gpios = <&gpx2 2 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; }; memory@20000000 { @@ -641,6 +681,21 @@ &mmc_1 { }; &pinctrl_0 { + volume_up_gpio: volume-up-pins { + samsung,pins = "gpx0-2"; + samsung,pin-pud = ; /* External pull up */ + }; + + volume_down_gpio: volume-down-pins { + samsung,pins = "gpx0-3"; + samsung,pin-pud = ; /* External pull up */ + }; + + home_gpio: home-key-pins { + samsung,pins = "gpx0-5"; + samsung,pin-pud = ; + }; + s2mps11_irq: s2mps11-irq-pins { samsung,pins = "gpx0-7"; samsung,pin-function = ; @@ -653,6 +708,11 @@ touch_irq: touch-irq-pins { samsung,pin-pud = ; }; + power_gpio: power-key-pins { + samsung,pins = "gpx2-2"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ;