[RESEND,v2] arm64: dts: qcom: qcm6490-idp: enable pwrkey and volume-up/down function
Message ID | 20240228-gpio-keys-v2-1-3beb60225abe@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3243370dyb; Wed, 28 Feb 2024 01:57:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgthvaiXH0/HgrWScMpI1ubcnlWAAlmbUnG8hd3oreiRp+UNgEaLhgJMNxgrX3tV4aPiILhvXVdW2AWP1YStdGQP5GNw== X-Google-Smtp-Source: AGHT+IGQ4/BD6BzJFsP0nzLY6B24wLbcZ3DXnNSFsVtV9NJtHKwOyJ9VqMiKmjsDsxk4J4Ylr2ba X-Received: by 2002:a17:906:38c2:b0:a43:217b:ffa7 with SMTP id r2-20020a17090638c200b00a43217bffa7mr6352195ejd.50.1709114275590; Wed, 28 Feb 2024 01:57:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709114275; cv=pass; d=google.com; s=arc-20160816; b=wBfuY+WI7VlWsaYVb9rFQ5wAaVG/zRSf9+A4DXvzqicutJHJi78ObXxup0Sd3FjIku eZc3jUd5MUCzUKQ9933qk1pPNQdWxnuECAVBG/l8bqYPDUzksQgZ5cUWlduMxMHK0+vJ nhsqNM6Xbnju8OGUyucvKze6xcY6rk8S2NwANStGsBxpN4bJOjkeE1M30gHictA6qgVz 5vNINxhVrkBvXx1MLrVda8np89PPMPbaS9vzw6KxsuhYlGXCodEhMJHeWG6RMJEHYap4 yqt8qxnFq64La0BPOugTdYXzH5nuUvbVQOiuA7ZRe7PPXpNlqP01n/j52vjDo7pOKvbl AkwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=Bd8+pa9Y8fMaEsfU5vXWWJcoLl3YVu8PWxuCvGzENkY=; fh=r8i+U82cndHysm46d/piJjLb5GyuGzFZk3haf6SL8Zg=; b=pBCByM+v+hBhg9HHoaWAf1jVeG6CAmGUWPPK3I0v8ajRtGd91TOmGpcVOPFkBqKQ7w rbKF2xpRU3JtuILCEoWhlRdHSQjKX+U8Zq/wpQxR5SzdKXG6FEWCeJ/V5EjsxxpY58FK rezJINYajrNCzLskjOCmzwlH9KfpDObMI8S/52iJ8WBVgwTsuDJlbhmTXH6nDIaygqQA lY0BWYwrNeP6CSU//zjJEEtvn5X86gt7hEwl/S6hJ/jfz9ZQKaDKnQtykYO+jHPaOxGw diO8D8OV9rwooOjtuoxbMMmq0dEEdiJnMY/7a/lPKr1xG7sIMHP8sw/xCj801KxTLw13 2pJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nq6H48DA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f16-20020a1709067f9000b00a412e3b6368si1656808ejr.576.2024.02.28.01.57.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 01:57:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nq6H48DA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84799-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E79BD1F23741 for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 09:57:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8ECA374FE; Wed, 28 Feb 2024 09:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nq6H48DA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28590364A1; Wed, 28 Feb 2024 09:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709114243; cv=none; b=sTPYva+Ux7VYIZ+Vzf4MZa0BvGBH/rqGyIJyAZYLGihvSGkaidupe0FrTFYlElytp0LerScjtinFqFQx19puX3fpr7Ihjtbgb2CrvDduTz1GwwEvDrwAyOYlCRKHEVs6rFqHvSY4wcwapVFRxJz0JXJr1n0FFs9XjUbwrpt8qQY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709114243; c=relaxed/simple; bh=WqWwgEoSuM/1pfV16dEakkeAH3YcAqhmmNupq9ppA1Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=lOAqWDKX/AulS9ojI43sCXvBHxZI9k9adQrs93B7w0h8nLgYg78Jk0/pHP8Ixqr5OWzQhNEQDYlf+fwCX14vx0mEmsRESjnSVZO9lVU2JjZUKQhpBdS0OC7oVBJKxxOEcPgunju7LV+cA2Q8/GRxCNRFuGeBlD1joeGQ9tt5Ij8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nq6H48DA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 8431AC43601; Wed, 28 Feb 2024 09:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709114242; bh=WqWwgEoSuM/1pfV16dEakkeAH3YcAqhmmNupq9ppA1Y=; h=From:Date:Subject:To:Cc:Reply-To:From; b=nq6H48DAVrY/8pkNU5QxJrcv1K3r+3ksrL4PMifDSq+lBu7dReIToJ+O81d0mBho/ uJiTik7wFCTrgkS0ApAd0viVsj99JrEpyv309vpGS0iEqob2Yx+OSg3JEfAtaWeqlV kz1jiteAXzVwjY7JN/zZ/ZSmCln8VNTRFMv2LjUm0yB/4RHCQ7pVdzW2rW6M1oUlN8 i01xWO9u8sluyVrUo+CQn9IDoKy0lu1UCyO+RCBhW7lO9SsTc0wkngcQX3qoFWzDMv 4YesggC4eyEHKWFs2auF6Kuwk+bmlRrRcy2tFglRdF8I69vECLc6BTdoi1LugJ6S5Z +OsnKGo1r4mxg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C317C54E41; Wed, 28 Feb 2024 09:57:22 +0000 (UTC) From: Hui Liu via B4 Relay <devnull+quic_huliu.quicinc.com@kernel.org> Date: Wed, 28 Feb 2024 17:56:42 +0800 Subject: [PATCH RESEND v2] arm64: dts: qcom: qcm6490-idp: enable pwrkey and volume-up/down function Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240228-gpio-keys-v2-1-3beb60225abe@quicinc.com> To: Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hui Liu <quic_huliu@quicinc.com> X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709114240; l=2151; i=quic_huliu@quicinc.com; s=20230823; h=from:subject:message-id; bh=uxn7urf55wldvs+MTDmzxYHE9lWSCWgorQZPNSBSB4Q=; b=7Da8as+oy3m1yGMGfVVIbVkvXvAEUqwESMBAZ8FKdwg/rPLTR/zEubfFlBhbBEQzVD9qyJOG/ iXN3z9sCd3pCNpSg8xSlHYEKKIDKWxw+nfeL1I6MbryL/HosjE0gpGp X-Developer-Key: i=quic_huliu@quicinc.com; a=ed25519; pk=1z+A50UnTuKe/FdQv2c0W3ajDsJOYddwIHo2iivhTTA= X-Endpoint-Received: by B4 Relay for quic_huliu@quicinc.com/20230823 with auth_id=80 X-Original-From: Hui Liu <quic_huliu@quicinc.com> Reply-To: <quic_huliu@quicinc.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792136210710053394 X-GMAIL-MSGID: 1792136210710053394 |
Series |
[RESEND,v2] arm64: dts: qcom: qcm6490-idp: enable pwrkey and volume-up/down function
|
|
Commit Message
Hui Liu via B4 Relay
Feb. 28, 2024, 9:56 a.m. UTC
From: Hui Liu <quic_huliu@quicinc.com> Add configurations to enable pwrkey, volume-up and volume-down function. Signed-off-by: Hui Liu <quic_huliu@quicinc.com> --- Changes in v2: - Update the commit description. - Link to v1: https://lore.kernel.org/r/20240206-gpio-keys-v1-1-7683799daf8d@quicinc.com --- arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) --- base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b change-id: 20240206-gpio-keys-138bbd850298 Best regards,
Comments
On Wed, 28 Feb 2024 at 11:57, Hui Liu via B4 Relay <devnull+quic_huliu.quicinc.com@kernel.org> wrote: > > From: Hui Liu <quic_huliu@quicinc.com> > > Add configurations to enable pwrkey, volume-up and volume-down function. Please take a look at how similar patches describe the changes. E.g. commit bb47bfbd5aa8 ("arm64: dts: qcom: sm8550-qrd: enable PMIC Volume and Power buttons") > > Signed-off-by: Hui Liu <quic_huliu@quicinc.com> > --- > Changes in v2: > - Update the commit description. > - Link to v1: https://lore.kernel.org/r/20240206-gpio-keys-v1-1-7683799daf8d@quicinc.com > --- > arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts > index acf145d1d97c..4199ebf667af 100644 > --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts > +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts > @@ -9,6 +9,7 @@ > #define PM7250B_SID 8 > #define PM7250B_SID1 9 > > +#include <dt-bindings/input/linux-event-codes.h> > #include <dt-bindings/leds/common.h> > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > #include "sc7280.dtsi" > @@ -39,6 +40,24 @@ chosen { > stdout-path = "serial0:115200n8"; > }; > > + gpio-keys { > + compatible = "gpio-keys"; > + label = "gpio-keys"; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&key_vol_up_default>; > + > + key-volume-up { > + label = "volume_up"; > + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; > + linux,input-type = <1>; > + linux,code = <KEY_VOLUMEUP>; > + wakeup-source; > + debounce-interval = <15>; > + linux,can-disable; > + }; > + }; > + > reserved-memory { > xbl_mem: xbl@80700000 { > reg = <0x0 0x80700000 0x0 0x100000>; > @@ -421,6 +440,17 @@ vreg_bob_3p296: bob { > }; > }; > > +&pm7325_gpios { > + key_vol_up_default: key-vol-up-state { > + pins = "gpio6"; > + function = "normal"; > + input-enable; > + bias-pull-up; > + power-source = <0>; > + qcom,drive-strength = <3>; Why is this property required? Anyway, it should use the defined name rather than just numeric value. > + }; > +}; > + > &pm8350c_pwm { > status = "okay"; > > @@ -448,6 +478,19 @@ led@3 { > }; > }; > > +&pmk8350_pon { > + status = "okay"; > +}; > + > +&pon_pwrkey { > + status = "okay"; > +}; > + > +&pon_resin { > + linux,code = <KEY_VOLUMEDOWN>; > + status = "okay"; > +}; > + > &qupv3_id_0 { > status = "okay"; > }; > > --- > base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b > change-id: 20240206-gpio-keys-138bbd850298 > > Best regards, > -- > Hui Liu <quic_huliu@quicinc.com> > >
On 2/29/2024 9:21 AM, Dmitry Baryshkov wrote: > On Wed, 28 Feb 2024 at 11:57, Hui Liu via B4 Relay > <devnull+quic_huliu.quicinc.com@kernel.org> wrote: >> >> From: Hui Liu <quic_huliu@quicinc.com> >> >> Add configurations to enable pwrkey, volume-up and volume-down function. > > Please take a look at how similar patches describe the changes. E.g. > commit bb47bfbd5aa8 ("arm64: dts: qcom: sm8550-qrd: enable PMIC Volume > and Power buttons") Sure, I will refer to this description to update it. > > > >> >> Signed-off-by: Hui Liu <quic_huliu@quicinc.com> >> --- >> Changes in v2: >> - Update the commit description. >> - Link to v1: https://lore.kernel.org/r/20240206-gpio-keys-v1-1-7683799daf8d@quicinc.com >> --- >> arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ >> 1 file changed, 43 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts >> index acf145d1d97c..4199ebf667af 100644 >> --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts >> +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts >> @@ -9,6 +9,7 @@ >> #define PM7250B_SID 8 >> #define PM7250B_SID1 9 >> >> +#include <dt-bindings/input/linux-event-codes.h> >> #include <dt-bindings/leds/common.h> >> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> >> #include "sc7280.dtsi" >> @@ -39,6 +40,24 @@ chosen { >> stdout-path = "serial0:115200n8"; >> }; >> >> + gpio-keys { >> + compatible = "gpio-keys"; >> + label = "gpio-keys"; >> + >> + pinctrl-names = "default"; >> + pinctrl-0 = <&key_vol_up_default>; >> + >> + key-volume-up { >> + label = "volume_up"; >> + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; >> + linux,input-type = <1>; >> + linux,code = <KEY_VOLUMEUP>; >> + wakeup-source; >> + debounce-interval = <15>; >> + linux,can-disable; >> + }; >> + }; >> + >> reserved-memory { >> xbl_mem: xbl@80700000 { >> reg = <0x0 0x80700000 0x0 0x100000>; >> @@ -421,6 +440,17 @@ vreg_bob_3p296: bob { >> }; >> }; >> >> +&pm7325_gpios { >> + key_vol_up_default: key-vol-up-state { >> + pins = "gpio6"; >> + function = "normal"; >> + input-enable; >> + bias-pull-up; >> + power-source = <0>; >> + qcom,drive-strength = <3>; > > Why is this property required? Anyway, it should use the defined name > rather than just numeric value. I will remove power-source defination, because the default value is 0. And "qcom, driver-strength" will update to "PMIC_GPIO_STRENGTH_LOW", it's a special value for pm7325. > >> + }; >> +}; >> + >> &pm8350c_pwm { >> status = "okay"; >> >> @@ -448,6 +478,19 @@ led@3 { >> }; >> }; >> >> +&pmk8350_pon { >> + status = "okay"; >> +}; >> + >> +&pon_pwrkey { >> + status = "okay"; >> +}; >> + >> +&pon_resin { >> + linux,code = <KEY_VOLUMEDOWN>; >> + status = "okay"; >> +}; >> + >> &qupv3_id_0 { >> status = "okay"; >> }; >> >> --- >> base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b >> change-id: 20240206-gpio-keys-138bbd850298 >> >> Best regards, >> -- >> Hui Liu <quic_huliu@quicinc.com> >> >> > >
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts index acf145d1d97c..4199ebf667af 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts @@ -9,6 +9,7 @@ #define PM7250B_SID 8 #define PM7250B_SID1 9 +#include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "sc7280.dtsi" @@ -39,6 +40,24 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + key-volume-up { + label = "volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEUP>; + wakeup-source; + debounce-interval = <15>; + linux,can-disable; + }; + }; + reserved-memory { xbl_mem: xbl@80700000 { reg = <0x0 0x80700000 0x0 0x100000>; @@ -421,6 +440,17 @@ vreg_bob_3p296: bob { }; }; +&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + qcom,drive-strength = <3>; + }; +}; + &pm8350c_pwm { status = "okay"; @@ -448,6 +478,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; };