Re: [PATCH 1/7] dt-bindings: iio: adc: Add support for QCOM PMIC5 Gen4 ADC
Jonathan Cameron <[email protected]> Mon, 3 Aug 2026 00:49:40 +0100
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <20260803004940.0277c0ac@jic23-huawei> |
On Fri, 31 Jul 2026 23:36:14 +0530 Jishnu Prakash <[email protected]> wrote: > PMIC5 Gen4 ADC is similar to PMIC5 Gen3 ADC, with several changes made for > improved performance, mostly at the hardware level. The main differences are > increased ratiometric conversion resolution (from 14 bits to 16 bits) and > increased bit field width for PMIC SID (to allow communication with an > increased number of PMICs, supported on latest SoCs). Hi Jishnu, The mixed case is enough of a surprise (to me least) that I'd expect there to either be more discussion here or for it to be handled first as a dt binding patch to allow for v4 channels on v3 hardware. That would provide a place for a description of why that is necessary and then the following gen4 dt-bindings patch with gen3 channels would seem like a natural extension. Other than that this seems fine to me. Jonathan > > Signed-off-by: Jishnu Prakash <[email protected]> > --- > .../bindings/iio/adc/qcom,spmi-adc5-gen3.yaml | 47 +++++++++++++++++++++- > 1 file changed, 46 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-adc5-gen3.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-adc5-gen3.yaml > index 149f4af8f4b8..e79ddc2acca0 100644 > --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-adc5-gen3.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-adc5-gen3.yaml > @@ -21,9 +21,14 @@ description: | > All boards using a particular (SOC + master PMIC) combination will have the > same number of ADC SDAMs supported on that PMIC. > > + PMIC5 Gen4 ADC is similar to Gen3 ADC, with some differences such as > + improved ratiometric conversion resolution. > + > properties: > compatible: > - const: qcom,spmi-adc5-gen3 > + enum: > + - qcom,spmi-adc5-gen3 > + - qcom,spmi-adc5-gen4 > > reg: > items: > @@ -83,6 +88,46 @@ patternProperties: > This property indicates ADC_TM monitoring is done on this channel. > type: boolean > > + qcom,adc5-gen4: > + description: > + Indicates channel is of type ADC5 Gen4. This may be needed in cases where the > + master PMIC has an ADC peripheral of type Gen3, but some of the other PMICs it > + communicates with have ADC peripherals of type Gen4, so channels of those PMICs > + need to be marked as Gen4 to ensure their conversions are handled correctly. > + type: boolean > + > + qcom,adc5-gen3: > + description: > + Indicates channel is of type ADC5 Gen3. This may be needed in cases where the > + master PMIC has an ADC peripheral of type Gen4, but some of the other PMICs > + under it have ADC peripherals of type Gen3. > + type: boolean > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: qcom,spmi-adc5-gen4 > + > + then: > + patternProperties: > + "^channel@[0-9a-f]+$": > + properties: > + qcom,adc5-gen4: false > + > + - if: > + properties: > + compatible: > + contains: > + const: qcom,spmi-adc5-gen3 > + > + then: > + patternProperties: > + "^channel@[0-9a-f]+$": > + properties: > + qcom,adc5-gen3: false > + > required: > - compatible > - reg >