From patchwork Mon Mar 4 07:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Liu via B4 Relay X-Patchwork-Id: 778619 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 D84D412E4F; Mon, 4 Mar 2024 07:09:47 +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=1709536188; cv=none; b=MjoD0uPcr4rR6Var5iCTgZTgq7gfwFzLiJOJZzbcLG5R37I/9s3o+L/HZZTk+rFBWTiQJqElvvOUe+HyrrFIAyBEXtOWQkf0zSJ6Qz1WvvQc9/0cJYKFew6p6s2coGb1Rvxs2N6d1gX0iTCv/Rzp/7EaAhjOp35gIbK82eh+L0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709536188; c=relaxed/simple; bh=2ijnbHwObwY7khqqO6e422ywpHeLzyDhZfDGrq2Kusc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=PYJ0WRRqp8B0bdCD7GJXJ7SWuFGZ+M31CD8QtcnWptFuZEnqvFod7U/FP/IA1SoyVtdwJt+Plq/y9pNHj3RwwKubry8kURCPFqhPrVS/yqhc/PurPrAlXBgnYaIlZkZ3Iskz9BiqcevGv4AcLrjU2046eqPaAvOz4FOptfIvfec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NsID04GF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NsID04GF" Received: by smtp.kernel.org (Postfix) with ESMTPS id 7AA16C433C7; Mon, 4 Mar 2024 07:09:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709536187; bh=2ijnbHwObwY7khqqO6e422ywpHeLzyDhZfDGrq2Kusc=; h=From:Date:Subject:To:Cc:Reply-To:From; b=NsID04GFBrFEq2mhYG9GLBxTGuGQzGzgljIvINybpXBcuIdQt6cjjPtGoqSpKAscz mF1foLiiqHrkoRlxRfj2olGQdL2aXk97qrx0PiyvNTeg9+yUE4u6Z0fSbR8CylCpuv 5S7A2Gu7HJ2n0bxd/64xyn2iB2Aiza8NHoqkRUPqRWB6f6pQSPynRCs4mLiNxXZt6t 24q3AwHf0Fe9bnvey17Kjf4ClDb1HoVroNQRclzWXtPQfmxCxrVScfXjeWi/7iWt7S hXR43HSDfKU3tdmKAVIixf0rDPkyywJekSPH4w9KlfQR3nanE4jiTM3pAUMRDZWZfs awL5kDllj5NCw== 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 619E4C48BF6; Mon, 4 Mar 2024 07:09:47 +0000 (UTC) From: Hui Liu via B4 Relay Date: Mon, 04 Mar 2024 15:09:34 +0800 Subject: [PATCH v4] arm64: dts: qcom: qcm6490-idp: enable PMIC Volume and Power buttons Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240304-gpio-keys-v4-1-03604d778c86@quicinc.com> X-B4-Tracking: v=1; b=H4sIAK9z5WUC/23MTQ6CMBCG4auYrq3pH21x5T2MC2gLTIwUW20kh Ltb2IjR5TeZ551QdAFcRMfdhIJLEMH3eYj9Dpmu6luHweaNGGGCMCJxO4DHVzdGTLmua6sLwkq N8v8QXAOvtXW+5N1BfPgwrulEl+u/SqKYYiU1V2Vpq0bb0/0JBnpzMP6Glk5iG8v41rJsadkIX XOrlWS/ln8sJ3RrebamklJYp5UqzLed5/kNFxAXDxwBAAA= To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hui Liu X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709536186; l=2848; i=quic_huliu@quicinc.com; s=20230823; h=from:subject:message-id; bh=DmuCpd4eRqEEUGUcUCiLEb7DRgH2P8prW7W/cQOxkwE=; b=ihk9653yGVvrrofzSCIhnexlgDvC2L7KUxE6BEDvt1b0oR6rWZCL9f2uoOElF52DUDwDZEz+8 0i6TwHzZVrTAIe4GKO6UKcwrnD7+T3uB/Km6BZtjs/pio/KVpbPRkl4 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 Reply-To: From: Hui Liu The Volume Down & Power buttons are controlled by the PMIC via the PON hardware, and the Volume Up is connected to a PMIC gpio. Enable the necessary hardware and setup the GPIO state for the Volume Up gpio key. Signed-off-by: Hui Liu --- Changes in v4: - Switch the order of "pinctrl-0" and "pinctrl-names". - Update "volume_up" to "Volume_up". - Remove "linux,input-type", because the default value is 1(EV_KEY). - Link to v3: https://lore.kernel.org/r/20240301-gpio-keys-v3-1-ca664de8775c@quicinc.com Changes in v3: - Update the commit more concise and explicit. - remove "power-source" property and update the numeric value to defined name for "qcom,drive-strength". - Link to v2: https://lore.kernel.org/r/20240223-gpio-keys-v2-1-19f48b3d8762@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 | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) --- base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b change-id: 20240206-gpio-keys-138bbd850298 Best regards, diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts index acf145d1d97c..12e162613ed0 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts @@ -9,7 +9,9 @@ #define PM7250B_SID 8 #define PM7250B_SID1 9 +#include #include +#include #include #include "sc7280.dtsi" #include "pm7250b.dtsi" @@ -39,6 +41,22 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&key_vol_up_default>; + pinctrl-names = "default"; + + key-volume-up { + label = "Volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + linux,can-disable; + }; + }; + reserved-memory { xbl_mem: xbl@80700000 { reg = <0x0 0x80700000 0x0 0x100000>; @@ -421,6 +439,16 @@ vreg_bob_3p296: bob { }; }; +&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + qcom,drive-strength = ; + }; +}; + &pm8350c_pwm { status = "okay"; @@ -448,6 +476,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = ; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; };