From patchwork Tue Dec 13 12:09:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 633712 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 AFBC1C4332F for ; Tue, 13 Dec 2022 12:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234936AbiLMMKC (ORCPT ); Tue, 13 Dec 2022 07:10:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235488AbiLMMJu (ORCPT ); Tue, 13 Dec 2022 07:09:50 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1F5115FED for ; Tue, 13 Dec 2022 04:09:47 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id q6so4527167lfm.10 for ; Tue, 13 Dec 2022 04:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q1CzYtgsJNMDeTo+QvpNgIebzVI6ah5DqX1yikppAWk=; b=gEshvOx5wEZljrnILIEojgKJxxcslI/Xevc1/weA7xprL0xIKvf5H3hNaq7n86O4sW o296rPP3/lsAfNJnf3XAoeG3mKMw/PH+rzURDS6SgnGn31LTk8CfiF/Y03S63CHF4+Rf wA2NQVYJVvQ+nlmCYZd67GKRzTlNoZq35Brfh3r4JmH/73hIRWvR/3niDeV16pfGIk26 fRfln8evoqdP8mlter2zsa2ge3TMtYFyFbzF0961jT9oLVuSj1/0EyeRaJZdGL+fsCNN qdupavmp5p9ZtIXvq/lVYFD1edo7SOtZtgPUnqLHKtMltDU6DFEgaj0SximBbTiIhcu6 SQ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q1CzYtgsJNMDeTo+QvpNgIebzVI6ah5DqX1yikppAWk=; b=2U3OV/6cHDzxMQn73FrrB6z3eXQ00RmUJgkQTKc1/IP7oNkpnNMFG1uL3zKzYo4Ouj YLxDyiXhR+V/vOBiEvtVxWNqPiQisnNeSKoGjTb3fOt8soKiRpBtwZmEbn6+/IbgU4AP F9ooevYNuA0LC8ePr3x5Nj3A4PkmRvEkHms31N/skb67XhGe5gnnKhMCtl67nXLQVYO4 49dnyf5GxbSW/BH0anAGxddaEeU23FVocaNaPU4j0/+LStjXr05l+DIz8q/igAQgYbAR 1UKxwNEyIU8F6VNCHdRxifxboU7u0uoXl/9tx3qDD1lbawylJGQQsHzY5jGnNKAwUY0I K9uw== X-Gm-Message-State: ANoB5pkbO702G6XMwkVU6OynMXyOplOd7zgB3PfiWj3tr1wQ4R5OCV9d I2FldUWIOXa1wAIIC5NxTY/wrg== X-Google-Smtp-Source: AA0mqf4Yvg8WbdzlxqkRpQntyluDFtnAYh96EAhPNtSy4LV3FFMQHJG1Xx8Wbeq6/e5WehdLiide0g== X-Received: by 2002:a05:6512:4022:b0:4a4:68b8:9c1c with SMTP id br34-20020a056512402200b004a468b89c1cmr6251530lfb.4.1670933386052; Tue, 13 Dec 2022 04:09:46 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id g4-20020a056512118400b004b1756a0ae9sm343343lfr.55.2022.12.13.04.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 04:09:45 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] arm64: dts: qcom: sm8350-sagami: Rectify GPIO keys Date: Tue, 13 Dec 2022 13:09:43 +0100 Message-Id: <20221213120943.165452-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org With enough pins set properly, the hardware buttons now also work like a charm. Fixes: c2721b0c23d9 ("arm64: dts: qcom: Add support for Xperia 1 III / 5 III") Tested-by: Marijn Suijten # On Xperia 5 III Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- Changes in v2: - Look at the 1 III again, realize there's a recessed button, add it to the common DT to make it work on both devices.. (Marijn) .../dts/qcom/sm8350-sony-xperia-sagami.dtsi | 64 ++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi index d73e1f3fa501..2f727e4f2e57 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -49,7 +49,35 @@ framebuffer: framebuffer@e1000000 { gpio-keys { compatible = "gpio-keys"; - /* For reasons still unknown, GAssist key and Camera Focus/Shutter don't work.. */ + pinctrl-names = "default"; + pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &g_assist_n>; + + key-camera-focus { + label = "Camera Focus"; + linux,code = ; + gpios = <&pm8350b_gpios 8 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + gpio-key,wakeup; + }; + + key-camera-snapshot { + label = "Camera Snapshot"; + linux,code = ; + gpios = <&pm8350b_gpios 5 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + gpio-key,wakeup; + }; + + key-google-assist { + label = "Google Assistant Key"; + gpios = <&pm8350_gpios 9 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + linux,can-disable; + gpio-key,wakeup; + }; key-vol-down { label = "Volume Down"; @@ -545,6 +573,32 @@ &pm8350_gpios { "NC", "G_ASSIST_N", "PM8350_OPTION"; /* GPIO_10 */ + + g_assist_n: g-assist-n-state { + pins = "gpio9"; + function = "normal"; + power-source = <1>; + bias-pull-up; + input-enable; + }; +}; + +&pm8350b_gpios { + snapshot_n: snapshot-n-state { + pins = "gpio5"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; + + focus_n: focus-n-state { + pins = "gpio8"; + function = "normal"; + power-source = <0>; + input-enable; + bias-pull-up; + }; }; &pmk8350_gpios { @@ -552,6 +606,14 @@ &pmk8350_gpios { "NC", "VOL_DOWN_N", "PMK8350_OPTION"; + + vol_down_n: vol-down-n-state { + pins = "gpio3"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; }; &pmk8350_rtc {