Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp301834lql; Mon, 11 Mar 2024 03:15:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvPt8iyGPa7l/kfClI4bZFjGAu3jfSC3yaPcRZkI/uIEEdqKRsyDRxLU/FqAQ9lSPw2Jlhz9quJIXApBtTcve7QPzWn81/WQ9rPtf9WQ== X-Google-Smtp-Source: AGHT+IEv1ble7xLz8X7IA0tddU9c+BS2Z4bp0osX7yU8wuaxJ0E1pYW7QqMm1dyf62jck5OcbFlX X-Received: by 2002:a05:6830:1087:b0:6e5:f65:8775 with SMTP id y7-20020a056830108700b006e50f658775mr67514oto.24.1710152120534; Mon, 11 Mar 2024 03:15:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710152120; cv=pass; d=google.com; s=arc-20160816; b=Dv1rh20ziy0miY6oP9fyPMN2k4vorcuCcM8n/IipuEp5MldNhllF6N2nSGiv3EeXAB N1gYiJq/ZNHm7OJZ+HgsgNzukc7Njp7dOA9cvhyEo6TROFaooInUlRtEo9reuC6Gsac2 O1L2N16Y87FghEdBjJBQBV03ax4pmKQzSmN+wmaWv1owCUFqFoASy9gSVSInBA69e8T+ CKy1EGbB7oSG0ZnA91lbCKJeXdFjzRaoLCteO4+4ylkt6hgBr3ntBLZO77J0857QSiWK QpJz8tF2WKMViM5c5NuRgRZ3H2RdY/Pez4ufheA5oFhGhGdkiyV8hpgP9ycwsQbz6nTP 9bCQ== 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=htcOl45daAvL0/flVZy2hW7Ngju/wvkWoVklYzX5bkU=; fh=r8i+U82cndHysm46d/piJjLb5GyuGzFZk3haf6SL8Zg=; b=ll3dR/1u+tyDt8uqosYjCqWzNwzyEbCK3r6vDxVx32x1QehSQqekNjYIuFN+z6lPdM hAMhjg8woONwz6pT68LDLh00ffACub6W7VO8bKpbUqIGMm464/YH4E/aq0u6yS/6AaxZ nUE9i8DPDYV6448F5R9RDGq5VVFzldhnOkgDBiPvL2c77ZYHeLisnoOLG3CjKkliwDpT v9dk05mzryRhlgoURUSxk3ULBPJHPndWIH76OC/E4zrhesnrv8XcM0wh+5QlHwbOSixU yDp6jydmlpOD8HetXVr4hRkyk+2eAbhEhp600VAfRAvHiX9pLOP4ECypu7xHbhF0LZzZ 5GAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Se+w522M; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98681-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98681-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b10-20020a63a10a000000b005dbcf612461si4641400pgf.416.2024.03.11.03.15.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 03:15:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98681-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Se+w522M; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98681-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98681-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 91A1BB21E34 for ; Mon, 11 Mar 2024 10:13:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C095933062; Mon, 11 Mar 2024 10:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Se+w522M" 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 CEA74182A1; Mon, 11 Mar 2024 10:11:12 +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=1710151872; cv=none; b=GpYbGSJi2Ynj7sShQjnZalLIjJA7JwpmqX3dABXmAh9uUp6TU0TwpWLolPrirNL9oizGv3PAvc8fqOZlcfSjOboC44PL7K0R9tauMEx1Zn0S0W0ykQIfwpkf0uV5iwBHvziJyCOut/jNMeht9BrqBkep40veTXq4nZGdJt+qVHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710151872; c=relaxed/simple; bh=I6gW/BhVUudvPkte5swzIwXeljQnXcB+mOb7zYQvmFU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=SOEbxeqM/Rc1MobyyWpqZYNcx6FrzAqVFbY9uTXgdOwH+nPTJj0tZU5T6MOR34j7+Ns6/MUSzYu/LZYBzeyt7vUSpgkapxCERs5Usjk6PZWejdWF2KJ15VjKW3nlT6xhB7M0wMvwx5uJi8MJl/ZN1BrAmSch+gg6PDHrjrQqudo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Se+w522M; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 30C3BC433C7; Mon, 11 Mar 2024 10:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710151872; bh=I6gW/BhVUudvPkte5swzIwXeljQnXcB+mOb7zYQvmFU=; h=From:Date:Subject:To:Cc:Reply-To:From; b=Se+w522M2QblUu7GUAiHxGhY54wouba/GQuvUpweNvdlq13UD9VjeCdyUAhgju9nE 5pXkiM/JhO3+cIkY/O4dZ0ZRkiXgUzObblZ1Zi5TgWqKBvrb3N5Zzwr3mwfRiQv/V2 etUXRynOdZSMgO6sR9KvXsf+GVsNFcoBZJ/3dlj7d9j66AOKzWLuvFWr2Orj5SDJ/7 GCTBGJjQtXWhCn+wIBqUNUURjA826UhbeEsx8PFC5SyFz/EDluGrhqGHwTOAGx40Ln DRog57///x/78w5hHq/OzNOY4noB/i5nxIyr8AogrcKj8VafARO1jfxdWLyWFqlerH GtxL3GxwbLRAw== 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 0D268C54E58; Mon, 11 Mar 2024 10:11:12 +0000 (UTC) From: Hui Liu via B4 Relay Date: Mon, 11 Mar 2024 18:09:31 +0800 Subject: [PATCH v5] arm64: dts: qcom: qcm6490-idp: enable PMIC Volume and Power buttons Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240311-gpio-keys-v5-1-08823582f6c9@quicinc.com> X-B4-Tracking: v=1; b=H4sIAGDY7mUC/23MTQ6CMBCG4auQrq3pH+3gynsYF9AWmRgpUiUaw 90tbKzR5TeZ532R6Ef0keyKFxn9hBFDn0a5KYjt6v7kKbq0iWBCMcE0PQ0Y6Nk/I+USmsZByUQ FJP0Po2/xsbYOx7Q7jLcwPtf0xJfrv8rEKadGgzRV5eoW3P56R4u93dpwIUtnEpkVMrciWV61C hrpwGjxa+XHSsZzK5O1tdbKeTCmtL9W5VblViXLpGbKGQMW9Led5/kNMvYqhVgBAAA= 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=1710151870; l=2997; i=quic_huliu@quicinc.com; s=20230823; h=from:subject:message-id; bh=P49AauHmA6KJoQvdRRaGDstedPDavIC2nds8wmnutYE=; b=03Wz5EeAwzrpIdHG6XXQbaisCr4nHg3GdAT6B7ypyIHxfudc4Nx9fJWoORpCeNxkq6pe7htPr hjwB5uUJ1b0AuKECDnFsM4EWhMV1VfMQqhv+CE1woGdo4tqj9t2Y91U 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 v5: - Removed the status setting for pmk8350_pon, because the default status is "okay". - Link to v4: https://lore.kernel.org/r/20240304-gpio-keys-v4-1-03604d778c86@quicinc.com 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 | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts index acf145d1d97c..a4a7d55fb45c 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,15 @@ led@3 { }; }; +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = ; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; }; --- base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b change-id: 20240206-gpio-keys-138bbd850298 Best regards, -- Hui Liu