On Sat, 8 Jul 2023 12:58:30 +0530
Jishnu Prakash <quic_jprakash@xxxxxxxxxxx> wrote:
For the PMIC5-Gen3 type PMICs, ADC peripheral is present in HW for the?
following PMICs: PMK8550, PM8550, PM8550B and PM8550VX PMICs.
It is similar to PMIC5-Gen2, with SW communication to ADCs on all PMICs
reg:
description: VADC base address in the SPMI PMIC register map
- maxItems: 1
+ minItems: 1
'#address-cells':Defined only for the new gen3? If so make make it false for the other devices.
const: 1
@@ -38,6 +39,12 @@ properties:
'#size-cells':
const: 0
+ "#thermal-sensor-cells":
+ const: 1
+ description:
+ Number of cells required to uniquely identify the thermal sensors. Since
+ we have multiple sensors this is set to 1.
+
'#io-channel-cells':Enforce that in the binding, not via a comment. Once the binding
const: 1
@@ -71,8 +78,8 @@ patternProperties:
description: |
ADC channel number.
+ qcom,adc-tm-type:
+ description: |
+ Indicates if ADC_TM monitoring is done on this channel.
+ Defined for compatible property "qcom,spmi-adc5-gen3".
+ type: boolean
performs that check (set it to false for non matching compatibles) then
there is no need to also mention it in text.
+Side note - it's fine to have a single element enum, so you could
required:
- reg
@@ -213,7 +227,9 @@ allOf:
properties:
compatible:
contains:
- const: qcom,spmi-adc5-gen2
+ enum:
+ - qcom,spmi-adc5-gen2
+ - qcom,spmi-adc5-gen3
use that option to reduce churn in this set...
then:? If that's a valid change, then it looks like a separate fix.
patternProperties:
@@ -299,7 +315,7 @@ examples:
label = "xo_therm";
};
- channel@47 {
+ channel@147 {
reg = <PM8350_ADC5_GEN2_AMUX_THM4_100K_PU(1)>;can we do the naming for the 0x00 as per Dmitry's set? That is get them from
qcom,ratiometric;
qcom,hw-settle-time = <200>;
@@ -307,3 +323,80 @@ examples:
};
};
};
+
+#ifndef PM8550_SID
+#define PM8550_SID 1
+#endif
+
+/* ADC channels for PM8550_ADC for PMIC5 Gen3 */
+#define PM8550_ADC5_GEN3_OFFSET_REF (PM8550_SID << 8 | 0x00)
qcom,spmi-vadc.h
https://patchwork.kernel.org/project/linux-iio/patch/20230707123027.1510723-2-dmitry.baryshkov@xxxxxxxxxx/