From patchwork Tue Jun 20 11:05:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13285647 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 BE376EB64D7 for ; Tue, 20 Jun 2023 11:05:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232505AbjFTLFx (ORCPT ); Tue, 20 Jun 2023 07:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232518AbjFTLFs (ORCPT ); Tue, 20 Jun 2023 07:05:48 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BCD110DB for ; Tue, 20 Jun 2023 04:05:45 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b46773e427so45761431fa.3 for ; Tue, 20 Jun 2023 04:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259141; x=1689851141; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VnfEhtDDR79cB+JFtObt/sWNnZM5L1YdVH546wXBYs8=; b=wU/8UQ6nXqxYFGp68FTCKcSnWpb/gYUxxrIcc9aDr0TNcWJ77k8M0UvXKKLLAYHxEP 3+c7TZaiHOynszRfHfpALcvykypFvwaWo7ycXt9/Uy4G6xH54leb/97SsImTBfG60dXl QC9f89iF4xo4zfECxO9lOmdeIAHXG6cTJZvyOHQNe9hv/Q0We+RVWmigN9TU5r5J064g KzpOZzj0QuPwkLZzfwuHz3IXsLJerYg4kYlykkR22dkIYmZeFT0RSD0xB6Wo3arQLPTI R9AaGI9sqELUsOtF8F/zBneiPZqz9l4P0GTzZGXmIDaocBGCt4Z0GtxnUjK3yMdSO14L QOKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259141; x=1689851141; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VnfEhtDDR79cB+JFtObt/sWNnZM5L1YdVH546wXBYs8=; b=ds9PlQdmRS4pI9tf3GZ9jHDbPOTWcntcwnlA5//uaythf2DdP1Od8+uExH0p97lvGE SJHElfyCl5DC7+nHdoomzPWRGulUY0ahG53DujWmX4nW2sgoCJ4hncsU/GTkj0QmLApv rYBmrKDiuKb4KxkRFh56YU0Kk5mJajdtUITRTonpkjl6Aqm5QwkxQC1j535z759DeOSI UZWaj7wy09KQ/vACShR3EMdJuX1xG90cjentlAcU4I81V2t/altMKmhIGqEy0Aa7JL1l t8wSgMG7yVH+H1LsEVOZkgC0Trv8Yf1cM1UYEAqOCR2ou2fDWDrOHPDaSiCuCfi+In+n 3QyQ== X-Gm-Message-State: AC+VfDzGxCF/ezBbkUAhYqAqVefYnQiLN7cuc9+oARPsrg6Rnny2T30X 9JEjiZ1rWTneWnI94FITKAyslA== X-Google-Smtp-Source: ACHHUZ5z0plB70c5G+uV6as3l0ESzn6YBCngAMY2mllmoSMD9KtsOE7+Low5QUJYp2bDbucXoMEmZA== X-Received: by 2002:a2e:b1c7:0:b0:2af:c9d8:87b4 with SMTP id e7-20020a2eb1c7000000b002afc9d887b4mr7761776lja.29.1687259141664; Tue, 20 Jun 2023 04:05:41 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id 11-20020a05651c008b00b002ac7b0fc473sm369047ljq.38.2023.06.20.04.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:05:41 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:05:37 +0200 Subject: [PATCH v2 4/4] arm64: dts: qcom: sm8250-edo: Rectify gpio-keys MIME-Version: 1.0 Message-Id: <20230614-topic-edo_pinsgpiopmic-v2-4-6f90bba54c53@linaro.org> References: <20230614-topic-edo_pinsgpiopmic-v2-0-6f90bba54c53@linaro.org> In-Reply-To: <20230614-topic-edo_pinsgpiopmic-v2-0-6f90bba54c53@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259134; l=3233; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=0Nd+IdxLUHksSzQLBMfzn4JECl7I9SIpO0+ZAvt3EYc=; b=bc2ot/iKUegdQZ8gQDU/jocKCigfCb/6ZURQiAG07ACxdMU4T15qYmbOuuNKWjmy/XIFsODcA WcfqRF27u7BCtu9Rhtu6rAvMEfD7VIxpBUkWObGlF/QBdR888aZWlFr X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Set up the corresponding GPIOs properly and add the leftover hardware buttons to mark this piece of the puzzle complete. Fixes: 46e14907c716 ("arm64: dts: qcom: sm8250-edo: Add hardware keys") Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio --- .../dts/qcom/sm8250-sony-xperia-edo-pdx206.dts | 10 ++++ .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 54 +++++++++++++++++++--- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts index ea4571bf4fbf..58a521046f5f 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts @@ -20,6 +20,8 @@ &framebuffer { }; &gpio_keys { + pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &g_assist_n>; + g-assist-key { label = "Google Assistant Key"; linux,code = ; @@ -48,6 +50,14 @@ &pm8150_gpios { "SP_ARI_PWR_ALARM", "NC", "NC"; /* GPIO_10 */ + + g_assist_n: g-assist-n-state { + pins = "gpio6"; + function = "normal"; + power-source = <1>; + bias-pull-up; + input-enable; + }; }; &pm8150b_gpios { diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi index 70da10fb9d9d..897b97db819e 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi @@ -51,12 +51,26 @@ framebuffer: framebuffer@9c000000 { gpio_keys: gpio-keys { compatible = "gpio-keys"; - /* - * Camera focus (light press) and camera snapshot (full press) - * seem not to work properly.. Adding the former one stalls the CPU - * and the latter kills the volume down key for whatever reason. In any - * case, they are both on &pm8150b_gpios: camera focus(2), camera snapshot(1). - */ + pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>; + pinctrl-names = "default"; + + key-camera-focus { + label = "Camera Focus"; + linux,code = ; + gpios = <&pm8150b_gpios 2 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + gpio-key,wakeup; + }; + + key-camera-snapshot { + label = "Camera Snapshot"; + linux,code = ; + gpios = <&pm8150b_gpios 1 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + gpio-key,wakeup; + }; key-vol-down { label = "Volume Down"; @@ -544,6 +558,34 @@ &pcie2_phy { vdda-pll-supply = <&vreg_l9a_1p2>; }; +&pm8150_gpios { + vol_down_n: vol-down-n-state { + pins = "gpio1"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; +}; + +&pm8150b_gpios { + snapshot_n: snapshot-n-state { + pins = "gpio1"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; + + focus_n: focus-n-state { + pins = "gpio2"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; +}; + &pon_pwrkey { status = "okay"; };