From nobody Sat Feb 7 06:39:18 2026 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 41101371069 for ; Fri, 30 Jan 2026 11:54:46 +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=1769774090; cv=none; b=muy2UoYGRJdWa/zXPJGxwRE6qsIYAXNHbragy/uOp7mRyRLcpDt5SvYpxyPqwnb/3phBgv2u4eY3MOWW0Ldfq14NAlXFr0gz/JT9cWLXcZnobSjXKysCCPo8BCJ3lUjKQWWs4JyP5wgy80KoQowzmZbxoNsXROFuiaZiTvG6MkE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769774090; c=relaxed/simple; bh=DbLPeovYiwjXpn5dbWMK4U8Irz//NWlC2tACaOAzwNI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DjiVrKDQi42oTWwUlapyus7inShYP/qvhT7GpEjskJXrpyWt+WLbdFGeGZtq15if7Em0iGV24n+8vmsxlVVjl5TUQkWImgA9ibjrfu56dEZnOnjnsKAQyLQdMR/1r/P9evuAmp5ctJZgRVTp8qzr3NRLB8DsnDqfeJNuGfOB+T0= 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=RwXPi20m; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=I2X0kxGq; 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="RwXPi20m"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="I2X0kxGq" 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 60UAei0Q891604 for ; Fri, 30 Jan 2026 11:54:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=+Sy9zUDZs56 f6JnqKzFkwx6XwPXTc9MqxOFBhYwgs2A=; b=RwXPi20mZcnXJvmHbn85Q5p3J4o fNfxwJ3urE1VgK/IzEKQDOM35vYwOYZxW2L9imLK/rvez0ilGEjlABOZopFljqAq sUbnhUMrMvPM6Bj72VItRM1ju7IM8DlpPPvpe+d9Ff+RB1/iKKxZYC0RLsugFCot KzA3WdEb3CYnFX35FXZs+W9mZLwm/wenHK0vWJcdM8jlpTDwqJhH69Bl1xRI0ii8 5JBSS76M1fj519BJjd07yU2tZNyYYp+450PUU3SoxaO9XHcKtKjsViuI8nMs3oEN qC4xV87XBg381sPkJlD4G8rQlAxH2X//I1bw1JQ6cpA6Hfn4MdbcdKTLhTQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c0gs7t1cj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Jan 2026 11:54:45 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-34ab8693a2cso4239719a91.0 for ; Fri, 30 Jan 2026 03:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769774085; x=1770378885; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Sy9zUDZs56f6JnqKzFkwx6XwPXTc9MqxOFBhYwgs2A=; b=I2X0kxGqkrbar+KdvpjRe2mZt41xJ9on2lJoDc7zyUrvMz9GFlsDfpwKX7hy+PJXXK hApDbV1q77jaBRjXWF4joA2obe0xWd/EUCOo68lV0z8qedrmwD/gB9zxlD200GkhMxvm SVZ8DefyLeaxkoQi2nj0NlNldN6OyApIGNdWVU1g3vaEXDZDOJu46PWoKQ+FM5ZL0jdy VDwObdsAO9vmZX+BjKcuV/czwV+ffY882Kp1fNBH3cGE6q9ZJQZ1C5fjSCPfPuNOm5op 1Fjg/IaqdpStRwWMUESNxyfovxEmrZItzUnW9vlNOf/aEdXVDdqsl0SmtLqR+RMv41gE oP6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769774085; x=1770378885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+Sy9zUDZs56f6JnqKzFkwx6XwPXTc9MqxOFBhYwgs2A=; b=OsssNea8Dh3BVfa0P3Dh7shT0dvD80hY3gl+S9/kN0GE0sPo+edc6yD1hH15vxN7hF jnoEa3B64EWVJFUT2SNelfnMgR86CVNn9qLaDtXrjM3sZ7DqjRKUajcIFc5vxNswHeMZ /bvrkMZKPcbqOC0h8IfSnTxCr4vqSu1ioi5YpxA7WGxMUK5Xj/3tMKfb4VLKC6Tt29Bw eTGhpHy4dGeTT/q1FfbzrLNypTqzFAi0cA2ZkIgpZEYkRcWBj3bUvmXdJ3/iJQWPrBfo KolKcr+Fd21ZHQSdu8Yhwdwqj+MNX5metljWzsBX86JV47/FByPylrnPHCBB+w/FzbU4 ognQ== X-Forwarded-Encrypted: i=1; AJvYcCVKS1zOVkYb65t7cMoB0MyS3X4k441cJ7Mgb/Yc6G3f6gy7TWKMTQWJsFBeaaIHCHWaISdez46WV38nmjE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywj9G56EBueXgAMtxUrlL5eDq5gRkWjNN16wfcZ8b1YWtmC2FB9 4/bCssHwTjzHx9KGzdmvQu+fnB/dDwLV0Xlv61oUzeC88wXsAzcYGkzuAIh1JTdumXvvM3PPYXN ZJytU2p+z/kG8iXbxARMFAV6wahKJ7yE5SyP5t47e0C7X47tlGktXq3ScG8qErxGpVB0= X-Gm-Gg: AZuq6aIP4pr2Ij8TjqbvJ5IR8RAZi+AUlEaawMdt5SG7Sda1cOshc+u6fGH76El+eX4 t+0U4bulDJ0Nihgi5CrFYfxrCVTVQ+bJ+KXnMkj8h0j9KhjzDRGpHFjgibl0o2cjyPZooJ/scJU C15eHVy8vXHQok/fkgAdCrsf3Opxasm6dJxHbQGdCSIAN2YJCA3TG4AW1aQzH/hX9jY9xwtBjVR JCN68p5S96eNyX13za1gW15sK4HfAFxprYXD2cZpb5UWJZ871EZUFb230TRzymU1zn3Dax+FLs2 B2+kzgwJHOu/CVYo8YCp1bP1cvOiXZ5zeY7w5SiqX10I+oBB7cjydOplS5hogVepKyexAWZ1pZF k5WnpJTxrGWFLxY9VQVUSF1HOAN5Wm5wu+QWw5pGYleZa X-Received: by 2002:a17:90b:6c3:b0:341:8601:d77a with SMTP id 98e67ed59e1d1-3543b3b54b3mr2889539a91.29.1769774084730; Fri, 30 Jan 2026 03:54:44 -0800 (PST) X-Received: by 2002:a17:90b:6c3:b0:341:8601:d77a with SMTP id 98e67ed59e1d1-3543b3b54b3mr2889517a91.29.1769774084217; Fri, 30 Jan 2026 03:54:44 -0800 (PST) Received: from hu-jprakash-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3540f2f24ccsm10431278a91.8.2026.01.30.03.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 03:54:43 -0800 (PST) From: Jishnu Prakash To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org, lumag@kernel.org, dmitry.baryshkov@oss.qualcomm.com, konradybcio@kernel.org, daniel.lezcano@linaro.org, sboyd@kernel.org, amitk@kernel.org, thara.gopinath@gmail.com, lee@kernel.org, rafael@kernel.org, subbaraman.narayanamurthy@oss.qualcomm.com, david.collins@oss.qualcomm.com, anjelique.melendez@oss.qualcomm.com, kamal.wadhwa@oss.qualcomm.com Cc: rui.zhang@intel.com, lukasz.luba@arm.com, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, cros-qcom-dts-watchers@chromium.org, jishnu.prakash@oss.qualcomm.com, quic_kotarake@quicinc.com, neil.armstrong@linaro.org, stephan.gerhold@linaro.org, Krzysztof Kozlowski , Jonathan Cameron Subject: [PATCH V10 1/4] dt-bindings: iio: adc: Split out QCOM VADC channel properties Date: Fri, 30 Jan 2026 17:24:18 +0530 Message-Id: <20260130115421.2197892-2-jishnu.prakash@oss.qualcomm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260130115421.2197892-1-jishnu.prakash@oss.qualcomm.com> References: <20260130115421.2197892-1-jishnu.prakash@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTMwMDA5NyBTYWx0ZWRfX/uGbXQRpJBYC 8al0b2+VbbKK330Zpn6HAQIkpXD2DZ+QuHr5OmKid7rjcR97kcMwNwDbQLctYSCoWJnucudQUEd UNh2WYqzyPIEfJzqtC1VogaRISlz9dnGArn4ilBTIi6nd2O7nO0nq5Qs2mxg9MjLiNJY1QTREaB DXhIUdQPigTsDNNhMqad7nj6K61kJgBhbRoqSZEk0B1mrUBZb7LpcCUbFErMGWYgbADq9alWrwU IJrtpr2Js58YbVABMtIMZEwFTpzCGVXmxCTvvYPQUwydh2MroWRJIX/6LQpH5CI6afIrLPVq1JM wT6AWuTyTGxcz7G54d0euIKAMaht1bwkZUZ0QA0GlZTRDIs06Rh68IQsgId3q0aj+M+Wwe0rThD d2aq15AtGWiEinnWgY7wRF1/ub1ATlJY1/oyk1io89w18E1OAcagB86mJad0omv32AKU7w34o4w Bro2EHW0gOVMgHUTD0g== X-Proofpoint-ORIG-GUID: zYmEx_1nnDLTsxrfPPntjz1vos0RUz9t X-Proofpoint-GUID: zYmEx_1nnDLTsxrfPPntjz1vos0RUz9t X-Authority-Analysis: v=2.4 cv=UPLQ3Sfy c=1 sm=1 tr=0 ts=697c9c05 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gEfo2CItAAAA:8 a=KKAkSRfTAAAA:8 a=i0EeH86SAAAA:8 a=EUspDBNiAAAA:8 a=4vDKtjJwf6yegxfEYBcA:9 a=uKXjsCUrEbL0IQVhDsJ9:22 a=sptkURWiP4Gy88Gu7hUp:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-30_01,2026-01-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 spamscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601300097 Content-Type: text/plain; charset="utf-8" Split out the common channel properties for QCOM VADC devices into a separate file so that it can be included as a reference for devices using them. This will be needed for the upcoming ADC5 Gen3 binding support patch, as ADC5 Gen3 also uses all of these common properties. Reviewed-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Jishnu Prakash --- Changes since v7: - Removed binding file paths mentioned under `reg` property description in Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc-common.yaml, and updated the description slightly, to simplify it and avoid any dependenci= es on patch 1 from the earlier series. - Removed an extra blank line present in Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml in previous versions. Changes since v6: - Collected Acked-by tag from Jonathan. Changes since v5: - Collected Reviewed-by tag from Krzysztof. .../iio/adc/qcom,spmi-vadc-common.yaml | 84 +++++++++++++++++++ .../bindings/iio/adc/qcom,spmi-vadc.yaml | 76 +---------------- 2 files changed, 86 insertions(+), 74 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vad= c-common.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc-commo= n.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc-common.ya= ml new file mode 100644 index 000000000000..3ae252c17b91 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc-common.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/qcom,spmi-vadc-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. SPMI PMIC ADC channels + +maintainers: + - Jishnu Prakash + +description: + This defines the common properties used to define Qualcomm VADC channels. + +properties: + reg: + description: + ADC channel number (PMIC-specific for versions after PMIC5 ADC). + maxItems: 1 + + label: + description: + ADC input of the platform as seen in the schematics. + For thermistor inputs connected to generic AMUX or GPIO inputs + these can vary across platform for the same pins. Hence select + the platform schematics name for this channel. + + qcom,decimation: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This parameter is used to decrease ADC sampling rate. + Quicker measurements can be made by reducing decimation ratio. + + qcom,pre-scaling: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Used for scaling the channel input signal before the signal is + fed to VADC. The configuration for this node is to know the + pre-determined ratio and use it for post scaling. It is a pair of + integers, denoting the numerator and denominator of the fraction by = which + input signal is multiplied. For example, <1 3> indicates the signal = is scaled + down to 1/3 of its value before ADC measurement. + If property is not found default value depending on chip will be use= d. + oneOf: + - items: + - const: 1 + - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] + - items: + - const: 10 + - const: 81 + + qcom,ratiometric: + type: boolean + description: | + Channel calibration type. + - For compatible property "qcom,spmi-vadc", if this property is + specified VADC will use the VDD reference (1.8V) and GND for + channel calibration. If property is not found, channel will be + calibrated with 0.625V and 1.25V reference channels, also + known as absolute calibration. + - For other compatible properties, if this property is specified + VADC will use the VDD reference (1.875V) and GND for channel + calibration. If property is not found, channel will be calibrated + with 0V and 1.25V reference channels, also known as absolute calib= ration. + + qcom,hw-settle-time: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Time between AMUX getting configured and the ADC starting + conversion. The 'hw_settle_time' is an index used from valid values + and programmed in hardware to achieve the hardware settling delay. + + qcom,avg-samples: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Number of samples to be used for measurement. + Averaging provides the option to obtain a single measurement + from the ADC that is an average of multiple samples. The value + selected is 2^(value). + +required: + - reg + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml = b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml index b9dc04b0d307..16c80709a3ee 100644 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -56,7 +56,7 @@ required: patternProperties: "^channel@[0-9a-f]+$": type: object - additionalProperties: false + unevaluatedProperties: false description: | Represents the external channels which are connected to the ADC. For compatible property "qcom,spmi-vadc" following channels, also kn= own as @@ -64,79 +64,7 @@ patternProperties: configuration nodes should be defined: VADC_REF_625MV and/or VADC_SPARE1(based on PMIC version) VADC_REF_12= 50MV, VADC_GND_REF and VADC_VDD_VADC. - - properties: - reg: - maxItems: 1 - description: | - ADC channel number. - See include/dt-bindings/iio/qcom,spmi-vadc.h - For PMIC7 ADC, the channel numbers are specified separately per = PMIC - in the PMIC-specific files in include/dt-bindings/iio/. - - label: - description: | - ADC input of the platform as seen in the schematics. - For thermistor inputs connected to generic AMUX or GPIO inputs - these can vary across platform for the same pins. Hence select - the platform schematics name for this channel. - - qcom,decimation: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - This parameter is used to decrease ADC sampling rate. - Quicker measurements can be made by reducing decimation ratio. - - qcom,pre-scaling: - description: | - Used for scaling the channel input signal before the signal is - fed to VADC. The configuration for this node is to know the - pre-determined ratio and use it for post scaling. It is a pair= of - integers, denoting the numerator and denominator of the fracti= on by which - input signal is multiplied. For example, <1 3> indicates the s= ignal is scaled - down to 1/3 of its value before ADC measurement. - If property is not found default value depending on chip will = be used. - $ref: /schemas/types.yaml#/definitions/uint32-array - oneOf: - - items: - - const: 1 - - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] - - items: - - const: 10 - - const: 81 - - qcom,ratiometric: - description: | - Channel calibration type. - - For compatible property "qcom,spmi-vadc", if this property is - specified VADC will use the VDD reference (1.8V) and GND for - channel calibration. If property is not found, channel will = be - calibrated with 0.625V and 1.25V reference channels, also - known as absolute calibration. - - For compatible property "qcom,spmi-adc5", "qcom,spmi-adc7" a= nd - "qcom,spmi-adc-rev2", if this property is specified VADC wil= l use - the VDD reference (1.875V) and GND for channel calibration. = If - property is not found, channel will be calibrated with 0V an= d 1.25V - reference channels, also known as absolute calibration. - type: boolean - - qcom,hw-settle-time: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Time between AMUX getting configured and the ADC starting - conversion. The 'hw_settle_time' is an index used from valid v= alues - and programmed in hardware to achieve the hardware settling de= lay. - - qcom,avg-samples: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Number of samples to be used for measurement. - Averaging provides the option to obtain a single measurement - from the ADC that is an average of multiple samples. The value - selected is 2^(value). - - required: - - reg + $ref: /schemas/iio/adc/qcom,spmi-vadc-common.yaml =20 allOf: - if: --=20 2.25.1