From nobody Mon Dec 1 22:36:26 2025 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 5B939286D7E for ; Thu, 27 Nov 2025 13:41:35 +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=1764250897; cv=none; b=Wj5cUYI82XhOhEz7TRBgX4m8Sr8SCUAau7IfZ5h/Ty0gFuqhENcfBsptxPB6J3+3w4R7ktg28Ipiv2nEp0FwLXHuJHVdCAypLRC6CaZUJJg1OR5Zndk32EXJ8QD4597cbJ6Q1NJ6DHf+DSVDVTeBT8pvpxXK0QiuVknFZHgyEis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764250897; c=relaxed/simple; bh=DbLPeovYiwjXpn5dbWMK4U8Irz//NWlC2tACaOAzwNI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=htKx04Oobjjg1sdrFNPErkok2p2MJ8nmfwMEGWDOLGr5CQH0bjYFBbwZpu/A3+lAsa1FDfffCJ5bm377ROlOq/8Hu4sDT7lqM0ilw/GftFY8cKbPZMlwcAlcqEoDb1h5NEuWzRmgRBItFhryvsighWSkj5kw5+E5jfZed9i6r3k= 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=NUQY88dS; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Kw70znXC; 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="NUQY88dS"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Kw70znXC" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AR8tnjP1667865 for ; Thu, 27 Nov 2025 13:41:34 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=NUQY88dSOSrs4NlCgiGDzcEeVfn n2h72zsres5/X/H5neZQxH3wKB1yTgkHhow0gNRXjQ26oDxuT15e06rBx6hJ+Ug7 jprKcYLfr5glXM60qYPnVoixml2nmL7EiIWJvj5aoKEW2QL9JqDoG6eUsTTXKxPi cPqKhYEmgIzk0Kv9itpqBrVPFEoeCM7Grxq3sR5Z/b2e7Z8cFn5TCAblml9GFBz0 VwkWQYPcQFJIAYFPrHhBbNKAOQfxM6eoPDaJBf+LY9cnu7B0ibZOGDTeBVOsYIHb mJGDmZKRwYO51X4oIPhIcbWvP/uvZu8SkcRNMFs9qV8J4jNCZWwqHBrMYgA== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ap0bmux9y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 27 Nov 2025 13:41:34 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-297e5a18652so10036135ad.1 for ; Thu, 27 Nov 2025 05:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764250894; x=1764855694; 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=Kw70znXC8ns303CVAt+NjVjNZap8y8VarcNgVv7s8lKvPTzCPWY9syZ1YnYmbrWncn bJ1boDCYZbZLuD0Ol8f0SHUKjVtpS59PU5tTm7UZAFbGE0YN/8kBZQp983Z9/IOO3MwA dUjXJAqs32n/qx62S2qtcTcOOpzz6yRdv8iIaCjBFvCc/G3Xu54EvDT0Yw0bezpnws1P bIv2n2nwbJcut2o+SKajLCPc+7wihJnpv5JiMkyFFN5LCGC+nuR9EbF0XrTPyRp22+ke n97uG3ck1mHi3hOHFSSba6PbeGadur5JvgmT1YvycXdyFgQcbQLIAwugx/78kUrMJQza Yyhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764250894; x=1764855694; 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=kLOETvw8AOhTpPI2idwhRmFSCZv+5cVYKmtdxkRp1c+0Z5aY2SHhzqJD0iieIZsDdn 1kJCfO6obo3SGHlA6ZJV6cSc5e50HO7MBCikm6gTHyeJRD8ADub/bgclJOiEb6KYf0Yn 7gb0iV7fzaazybWp4uRMsk1V59WIMUq45low1GXYxiwJIWtudJC0wRl48L/odlxSomHW IAWniAkyddSMpeMs0jmlGDJaVTNfKuA62sCadzJDfr+EC+bVELn6I6i2l4EooObHXdLb d0PQmjcG67yjPZlIm2q4Y3ZqoKnGZEThCOd9+vrrsN6iudCOw2XE7XSRDKYTxNdmvdvv O3bw== X-Forwarded-Encrypted: i=1; AJvYcCUmTFXYQDVyxbA0Hj2zAtGd6Yk2UdWcrG6FQ2UBUDEsWDx7wjVB+LA20O2/M63V/cHm13IKP1/o1zyj+lg=@vger.kernel.org X-Gm-Message-State: AOJu0YwhAX4HRNoJXcWVnOqnPt3wDux97FCNaPTM4ZKL8mb6cIbFeziW IiHfSlbFdSvkoGWbXm50aGsvTcwZ8+Wmy9yRfMNaZYpKpEMmVgVr+18LXwk2F7cOPR9MeTjKBXe E7OgIpU8RJltmqErZncavPQb4F8qPFu/oq1+UgaTh5ltMJ3jE2AWDivGsyGLwHjHDPqI= X-Gm-Gg: ASbGncuGZbeMYUfz3a6MNVQ5DvjSikxWl2lekYrcCv4trvtbxgcY2LmQ8TIHTSLKeTs HQLYmSjSLQQr1P0IHvrv2YPH9h+EwLxXO4XQ8Nqe61h45Nd/Lc9Icl9Bjeyun4gzLoP8BPFIJYT g3ZK0sVDt6XnF4X//Ujhj8S3O7zy4cIiYtVQfWQ/mpuSqcUqUunusEfgQGA6X/0vS0APCy8Oj/z gMpbX3/HNmgL05zpHVZu6076EAFCf5FmXooWoLXUToePVPhDjkjkeQbZ1LuwuJc+EDkmYHo09o7 NFbDMtCSMlSakZNNvxR3QSqfF8iKIcaM2r7q2fUqs7tWgkGrTc6rdpTBWknSNooebToUwWpRkpI KpT+iF+re12pglNImWQ/v4lr12EeD3bytPgGXm50b4R73 X-Received: by 2002:a17:903:11c7:b0:295:bedb:8d7 with SMTP id d9443c01a7336-29b6c694376mr234858825ad.48.1764250893438; Thu, 27 Nov 2025 05:41:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPhmvBkBmsJ8UVnonP5nHwjXbicsJaiJU8ELnVOuJ12H7Nh5u0QV8zYa6ircyAF5VnKjsnig== X-Received: by 2002:a17:903:11c7:b0:295:bedb:8d7 with SMTP id d9443c01a7336-29b6c694376mr234858275ad.48.1764250892845; Thu, 27 Nov 2025 05:41:32 -0800 (PST) Received: from hu-jprakash-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29bce441600sm18934875ad.29.2025.11.27.05.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 05:41:32 -0800 (PST) From: Jishnu Prakash To: jic23@kernel.org, robh@kernel.org, krzysztof.kozlowski@linaro.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, Jonathan Cameron Subject: [PATCH V8 1/4] dt-bindings: iio: adc: Split out QCOM VADC channel properties Date: Thu, 27 Nov 2025 19:10:33 +0530 Message-Id: <20251127134036.209905-2-jishnu.prakash@oss.qualcomm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251127134036.209905-1-jishnu.prakash@oss.qualcomm.com> References: <20251127134036.209905-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-Authority-Analysis: v=2.4 cv=AKyLkLWT c=1 sm=1 tr=0 ts=6928550e cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=6UeiqGixMTsA: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=324X-CrmTo6CU4MGRt3R:22 a=sptkURWiP4Gy88Gu7hUp:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI3MDEwMSBTYWx0ZWRfXzV10LWtas9XS 7Pn8jLkLsKfOfVnp1W16RgaEz+gyvlxzC0+AV9nHUKUjV7u1SrNWcWMUAEh6QD06EZuIu0mP6o0 wG97LupN8rGJrNWVxcRB+4LJiuCc8BwMuxZL6sKFqCBrL0HJ1nPgKTpGEs9ue+QfpsUw6qLC8Iw RzhHQMQEwHwI6Ok6W4VztfNIGTfo6+I7dAYYcssPChabj+aLoMC+jtltmXLWiWOQBQabAmmuvYN YvYSincmsv6oXK2GiotEs51IpThX9GD2ieQmEe6F+Bq2a9X0AuUae0wDXn9Dmch2xlIBX7GpW6t nEtQ2NuyAEkDvupxBBwrfRkxunLF4XZ1b9nVdNex8VXqJ5VOl2TNcYCyl5sVsXh4Qs/blu7NOb+ p4zYfLotvmWdLkiJUc65QfVQgLo62w== X-Proofpoint-GUID: WGnnKZCMLYJLKJrIxz5SuRYN6MC2S2KM X-Proofpoint-ORIG-GUID: WGnnKZCMLYJLKJrIxz5SuRYN6MC2S2KM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-27_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 malwarescore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511270101 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