From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 88DBF3546D1 for ; Fri, 29 May 2026 01:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780016750; cv=none; b=jJNF2owAUbBMznEjx/TKV0c815FoULlI7QYXas54ZxH4tfoFaj6yTtd64/FA/JC2ZqUlnKiqh78kFPJrtzV4O2Hz0HQy+F+ppV/eARJr1L2v2zg3LposvCMc2bGuhJHwT2qYu5lNN+TYNefmfLQgyaFjAskG6bm4JPPqj+XrhDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780016750; c=relaxed/simple; bh=lXy4t/t9OCmAgFepSL86P9vwWEgmZ7kUmPb0JJyweV0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aV7R6pOeYe0BhtMN4R2NZ+wq3ooZOzvdboFa4ZNwzHQX3VLPSe8dquDYGUr5y7YkSG6DQahkE3TJoSy63b3ZarjvYal5kiqoFFN23BdEogMvDOkY26d/fVR6K2bikNpkAO7194h8KplKXbwZzkKSFji8QPk18iPanZXf1o1d9Xs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=BY8/Sy7Y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=i1j63/JO; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="BY8/Sy7Y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="i1j63/JO" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64T0A00O1495135 for ; Fri, 29 May 2026 01:05:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= u1PyjGjvKsU44wuqA0Tto9I3prCpdK/S5nLQhgommlI=; b=BY8/Sy7YEVtBa8O+ G1Qi7JpGGF9vxDTfK+oC+9hpCUJqtYV7rH9iKoIAO+HdXmyiPlwLUcGShpa+BbrN sx2BDujI++nRJDvyBorIp+1rayp1Jnnc7iztWLfkztSQwYD7ZoyuUP2SXoeO0nfK wv8qIcYOgwfD0/EVnUL9889TppeY5+Rhrc2sqK2kLkmYhfzQ5NlwpxgAhzaFzguy l9H2uoLN/dQ4l7PtB/f5FyTMq+wpz2pZCcCy4Kcfqgu5IC/n6KeEb1VGJBv4SoW5 S2ihaOSprCxpEVGy1+ZtfDKeGKMZUmFTlyGiEXLZIsY3XNhPyvUfP6YmyH7NBBLk kMN5vg== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ef01585kj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 29 May 2026 01:05:46 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-304df51ff3eso1035433eec.0 for ; Thu, 28 May 2026 18:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780016746; x=1780621546; darn=vger.kernel.org; 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=u1PyjGjvKsU44wuqA0Tto9I3prCpdK/S5nLQhgommlI=; b=i1j63/JOQTXMh+ENzMnCwfY/fFnvl/JY+3US9r4g6wXJBS+/gBwAKN1ZRWDKISKtLI drv/NzbhXVDFp6U/FFxSUhgEKCySV1aoB6KOP7F2xkDB97+0BMcq5XGppk9sogCWl31A XnX7RILAD5o5g7l37uTkzFDzsnBnNmedWByQpVZfkbxrAj/jm8sBxzQZp5sv/a4UUbDh jkiFzFFx8lXP9nXiLfTeA8CjzsrzEGVR0nxXZohMgNMK2mtqm8hTFuIBHJQPZW5PgicG vwd9xACvXZgsNyrKo0y9s4JxHyAnIhFlm2PUaoiuvy1hZUf9bR13M5Jcirb/f+lcQME7 ylIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780016746; x=1780621546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=u1PyjGjvKsU44wuqA0Tto9I3prCpdK/S5nLQhgommlI=; b=KPSssicNAwj0W1WDlUSEjmKadhLacNw3EiSR8FfQlgMPJGqMMNWx3o1L3gZv0KB5oT sd9pVSiNsfdEsB980HBSfHhm53YxzdSa0aHLVqecYpdqD7C7U/xXUhwDa0Tvqx40yj3I 35q4+HX4p0K/fiUJrdRdhSKDsZdj0ZX9f5OvZLytaVcvC3IiqAT2SZvp74IvD+LzYSWY zRPEF669hASpS6/S3VAIwRxTKy4EKa0qdh4hZuILsnUQtGOL1yWp6T1gmGuzBLgH7NSe jqbP5leRugxa/IjrSe/g3NGSxe5KJjZ/xYC2VR5wXVQ7k0FbXYjv41X5iwFtuvCODQD6 E2Bg== X-Forwarded-Encrypted: i=1; AFNElJ9/V1fb3dXo/X+MkApEv7x03nCKwPglVgniG2uRNAJKaOhrHN6tWuxP1kzmqdKXbHx1ag2ldkitITZqS8w=@vger.kernel.org X-Gm-Message-State: AOJu0YxDb24QL9rwZzqOgX/ho2zqwxoJyL+CzO88yF0s3xq9oeq5YZNf Jl5LxTu32cymfmiBfm8Rqp3tNmHQDgdaTBr8QFlB/WUCKeIUSMqbyLKpnfueSvoNgtetFhNOsx7 uSXtEfP9jQxbQq1nHo8oCwTcrzjvvT8IKJBPtZ2xCN5aPIeVIIrhEeBSc7jrWRDRlTtT1vFk1WL GaWA== X-Gm-Gg: Acq92OE4qW8o885GpR8Xx0BWSDCoAcTcONK5QNKnOJ5+iaaL+kRaCJsypJF3fHG7UVT TR2TPPMPKl/H1lvhtOXHeM9zd7afOjWYU1qd0yIo60ReTC3axEeJRic1YsEx9UHVzfkNO0tm9W8 Vt8HEVvvLKWp64dhTwW3wnBAZLLGSKzw9Ilcmon/KGvnga/uqnQrJusRQ8X3fnJOGnP72Omy45o keUvcXFIbUghKjwiROYRli/brXoEtGTa3MmdE59g9jZHVyYmAsRStfzphLdGNDfm0KMuEGj+xkO 5D0aD88xB+RR2z3SB2aIccjvkULAEeZXydcW956+J5XS34DliKZt9OtfDZqGwUYHFPJQf9GhOQ0 L+mrycrpOPIaPpEI1XHfXkmJLAmlaNc1y+eILP19pE+gyp0jO30IX3+GiSgg6LT092FqQ63/Pun rfkFuLcmET X-Received: by 2002:a05:7300:a484:b0:2d0:239a:23cb with SMTP id 5a478bee46e88-304eb0d866dmr475133eec.16.1780016746071; Thu, 28 May 2026 18:05:46 -0700 (PDT) X-Received: by 2002:a05:7300:a484:b0:2d0:239a:23cb with SMTP id 5a478bee46e88-304eb0d866dmr475101eec.16.1780016745528; Thu, 28 May 2026 18:05:45 -0700 (PDT) Received: from hu-fenglinw-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-304ed2c3121sm179812eec.5.2026.05.28.18.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 18:05:44 -0700 (PDT) From: Fenglin Wu Date: Thu, 28 May 2026 18:05:36 -0700 Subject: [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add level-shifter function 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: <20260528-pinctrl-level-shifter-v2-2-3a6a025392bf@oss.qualcomm.com> References: <20260528-pinctrl-level-shifter-v2-0-3a6a025392bf@oss.qualcomm.com> In-Reply-To: <20260528-pinctrl-level-shifter-v2-0-3a6a025392bf@oss.qualcomm.com> To: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartosz Golaszewski Cc: David Collins , Subbaraman Narayanamurthy , Kamal Wadhwa , Maulik Shah , kernel@oss.qualcomm.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, Fenglin Wu X-Mailer: b4 0.16-dev-17187 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780016741; l=4665; i=fenglin.wu@oss.qualcomm.com; s=20260324; h=from:subject:message-id; bh=lXy4t/t9OCmAgFepSL86P9vwWEgmZ7kUmPb0JJyweV0=; b=VmA/SAjy7f4I991yfIMjzvCQdrqCb0zwssphblgXNFImVZft9fr4KM4C4Bbnw1S2jJoli3KNF T0DrFWOqOKVBJ/uIBeGaYuTzgbuN0oW3YihDJQP7kPejTVAD2TDoV4m X-Developer-Key: i=fenglin.wu@oss.qualcomm.com; a=ed25519; pk=hJdt3E7o54lql+miD2GaxwF74cDyhgNwMbmFOZ46bRU= X-Proofpoint-ORIG-GUID: yEIBp2YknKq8H6412WzbyablItGofbo2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTI5MDAwNyBTYWx0ZWRfX3EwhoqhhXIxm 6zEI4B+xs6puu6pTHusyaHFSTn7NNEoXPNkLGpPAVncyUq0gM2p6YgPJKkCEzlQNRQPcpY02qs0 iQ9peyjwcQisqFJLfs3xM1IrqPyX5I5A4GEEtR+jRgJfpOqvQhpgRrJirKWRiuvXWuESOhkWp44 ke9Zmib35x+NjK3rBUsZ4e9RmROiWe9LMcrBX388pRDTxPS/5T1hNd25L2faKuxlsgQM4drANq+ mQYqQIMnjvm/QXJDsaXcYB1nA8mOt6onnqxscDu9sIhlBPRW7QF5w7Kx0+xMVFWVmtFg9jRcRIC gICNwpetgsMRq3J5ojileNN1kFMPfcqhz4rRVzkr+f8GN28P0+4uxqA58p4tQaOtdxW5I7P8Jiv iv6gC5viVFl6Il6xxYl/B/KpudNdZ97n3wYFC00Dzd4oUMHIL8sOPsGn28Todt22Q1bbC6Q38bn i1eZ3xvO8S+0EGFQ++g== X-Authority-Analysis: v=2.4 cv=DIG/JSNb c=1 sm=1 tr=0 ts=6a18e66a cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=oPYuZtxd-o3nixQqOr8A:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: yEIBp2YknKq8H6412WzbyablItGofbo2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-05-28_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 spamscore=0 impostorscore=0 adultscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2605290007 Add the "level-shifter" function and add the required DT properties to allow RPMh firmware to control the level-shifter. Introduce a custom pinconf parameter "qcom,1p2v-1p8v-ls-en" for enabling or disabling the level-shifter function. Additionally, add the "groups" property with the allowed group names that can be used to control the level-shifter function on pmh0101. Signed-off-by: Fenglin Wu --- .../bindings/pinctrl/qcom,pmic-gpio.yaml | 66 +++++++++++++++++++++- include/dt-bindings/pinctrl/qcom,pmic-gpio.h | 1 + 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml index b8109e6c2a10..19dc61ddff2d 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml @@ -119,6 +119,21 @@ properties: The first cell will be used to define gpio number and the second denotes the flags for this gpio + qcom,rpmh: + description: + Phandle to the RPMh controller device. Required for PMICs when the + bidirectional level shifters is used (e.g., pmh0101), to enable + communication with RPMh firmware for level shifter control. + $ref: /schemas/types.yaml#/definitions/phandle + + qcom,pmic-id: + description: + The ID of the PMIC which supports bidirectional level shifter function. + It is used as the RPMh resource name suffix to request control of the + level shifter to the RPMh firmware. + $ref: /schemas/types.yaml#/definitions/string + pattern: "^[A-N]_E[0-3]+$" + additionalProperties: false required: @@ -330,6 +345,22 @@ allOf: contains: enum: - qcom,pmh0101-gpio + then: + properties: + gpio-line-names: + minItems: 18 + maxItems: 18 + gpio-reserved-ranges: + minItems: 1 + maxItems: 9 + qcom,rpmh: true + qcom,pmic-id: true + + - if: + properties: + compatible: + contains: + enum: - qcom,pmih0108-gpio then: properties: @@ -523,6 +554,19 @@ $defs: items: pattern: '^gpio([0-9]+)$' + groups: + $ref: /schemas/types.yaml#/definitions/string-array + description: + List of GPIO groups to apply properties to. Only valid for + function "level-shifter" on pmh0101. Valid groups are + gpio11, gpio12; gpio13, gpio14; gpio15, gpio16; gpio17, gpio18. + items: + enum: + - gpio11, gpio12 + - gpio13, gpio14 + - gpio15, gpio16 + - gpio17, gpio18 + function: items: - enum: @@ -536,6 +580,7 @@ $defs: - dtest4 - func3 # supported by LV/MV GPIO subtypes - func4 # supported by LV/MV GPIO subtypes + - level-shifter # supported only by pmh0101 bias-disable: true bias-pull-down: true @@ -592,9 +637,24 @@ $defs: configured as digital input. enum: [1, 2, 3, 4] - required: - - pins - - function + qcom,1p2v-1p8v-ls-en: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Enable or disable the bidirectional 1.2V/1.8V level shifter + associated with the specified GPIO group. When set to 1, an RPMh + vote is sent to AOP to enable the level shifter. When set to 0, + the vote is withdrawn. Only valid when function is "level-shifter" + and groups is a level-shifter GPIO pair (e.g., "gpio11, gpio12" + on pmh0101). + enum: [0, 1] + + oneOf: + - required: + - pins + - function + - required: + - groups + - function additionalProperties: false diff --git a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h index e5df5ce45a0f..b0824d5eb056 100644 --- a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h +++ b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h @@ -105,6 +105,7 @@ #define PMIC_GPIO_FUNC_DTEST2 "dtest2" #define PMIC_GPIO_FUNC_DTEST3 "dtest3" #define PMIC_GPIO_FUNC_DTEST4 "dtest4" +#define PMIC_GPIO_FUNC_LEVEL_SHIFTER "level-shifter" #define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1 #define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1 -- 2.43.0