From patchwork Sun Jul 16 22:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13315046 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DB9DC04A94 for ; Sun, 16 Jul 2023 22:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjGPWIR (ORCPT ); Sun, 16 Jul 2023 18:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231236AbjGPWIF (ORCPT ); Sun, 16 Jul 2023 18:08:05 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94D74DD; Sun, 16 Jul 2023 15:08:04 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9338e4695so16638801fa.2; Sun, 16 Jul 2023 15:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689545283; x=1692137283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iHngaqCrQ0FneY3+XbEOWJuLApZy3bmRMZLz2KpBf1c=; b=L4GI92GU6vM/1ZQXffG1IjEVmcWipHn8WGI40hwXgxkf8kvrWinRd2GroRzEj2qN0c xBuxSiY1Fo8mrcc3Ter7T7tSiuqxQHX5YX3GklL3bCI6z8eN29/rOvtw/0oSzv+XHg5h kcHxTN/flFBRJAM/w0HDVncdHSz7snH42641QDKTt3fAW77sQxIFWU9z0jsaBPwflaQU 2l4lZT7TSpTBq2QWh6Zj2FOSTP3jJl+Q+tR0j1XizpLMSgk6Y55leg4xEcO3dx5sfvcx XzmTGx6+U/BmAfqSYorOSPLZVF1NNt5peOAZ7OGi84VK3SyNVSNgV2UXynPSsvnpEGc/ 5Rrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689545283; x=1692137283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iHngaqCrQ0FneY3+XbEOWJuLApZy3bmRMZLz2KpBf1c=; b=OFsiVsZ8REL7LtpYRRvs/N97cz4Jx8vWrLS4drSj1z+6whtOhH4aCkg8yZfCxt4ATX AhSb2Rw5WFZwtBDV2/r08bnt1GsTKX023kQDYnYjYIS2OLxjeDXh+TZp9zX+H+FLAvmY AyMRI6aps6s1RKhIm8JyZ5demhycwCXekJZDKnWGy0V+oBBo2qznaem4lAAfXlZigisD bedbpDcBIHTfxCJUWcuQMAUGA8/srCPJOeDtMW5bDoLRSOQU1I57M8z5+Y6XDTU0+1G9 BomSVwOK5x0e8FoZcLZu90HjtMwFebYl3VEc2+PVqGnFsV4pkqS9/aewuKxexNJBBL/H SR3Q== X-Gm-Message-State: ABy/qLbX9b7BICOOdisSFMWh01tCM3HejIP60QIhzfWCsf9B9ZhZVEt2 ecNKY+aRBedutbL8jW+NwcI= X-Google-Smtp-Source: APBJJlGWtrMFmsvq6yAnusvLwDBJwvhynCdN12nafWVo6Zc0QEnz1uUV5LT5R0XhkZ/t+4yNJpF/Sg== X-Received: by 2002:a05:6512:340b:b0:4fb:9f24:bba9 with SMTP id i11-20020a056512340b00b004fb9f24bba9mr8627430lfr.5.1689545282702; Sun, 16 Jul 2023 15:08:02 -0700 (PDT) Received: from localhost.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id h24-20020a197018000000b004fb9c625b4asm2464091lfc.210.2023.07.16.15.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 15:08:02 -0700 (PDT) From: Markuss Broks 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 Subject: [PATCH 2/7] ARM: dts: exynos: k3g: Add GPIO keys support Date: Mon, 17 Jul 2023 01:05:04 +0300 Message-ID: <20230716220644.22158-4-markuss.broks@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 = ;