On 08/07/2023 09:28, Jishnu Prakash 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
going through PBS firmware through a single register interface. This
interface is implemented on an SDAM peripheral on the master PMIC PMK8550
rather than a dedicated ADC peripheral.
Signed-off-by: Jishnu Prakash <quic_jprakash@xxxxxxxxxxx>
---
properties:
compatible:
@@ -27,10 +27,11 @@ properties:
- qcom,spmi-adc5
- qcom,spmi-adc-rev2
- qcom,spmi-adc5-gen2
+ - qcom,spmi-adc5-gen3
This could be ordered...
reg:Why? This does not make any sense. With previous patches it looks like
description: VADC base address in the SPMI PMIC register map
- maxItems: 1
+ minItems: 1
random set of changes.
'#address-cells':Description does not match property name.
const: 1
@@ -38,6 +39,12 @@ properties:
'#size-cells':
const: 0
+ qcom,adc-tm-type:
+ description: |
+ Indicates if ADC_TM monitoring is done on this channel.
+ Defined for compatible property "qcom,spmi-adc5-gen3".Then you need if:then:.
+ type: booleanWhy?
+
required:
- reg
@@ -213,7 +227,9 @@ allOf:
properties:
compatible:
contains:
- const: qcom,spmi-adc5-gen2
+ enum:
+ - qcom,spmi-adc5-gen2
+ - qcom,spmi-adc5-gen3
then:
patternProperties:
@@ -299,7 +315,7 @@ examples:
label = "xo_therm";
};
- channel@47 {
+ channel@147 {
reg = <PM8350_ADC5_GEN2_AMUX_THM4_100K_PU(1)>;Don't add new examples which differ only in compatible.
qcom,ratiometric;
qcom,hw-settle-time = <200>;
@@ -307,3 +323,80 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/iio/qcom,spmi-adc5-gen3-pmk8550.h>
+ #include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h>
+ #include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550b.h>
+ #include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550vx.h>
+
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* VADC node */
+ pmk8550_vadc: vadc@9000 {
+ compatible = "qcom,spmi-adc5-gen3";
diff --git a/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h b/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.hDual license.
new file mode 100644
index 000000000000..74e6e2f6f9ed
--- /dev/null
+++ b/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
Best regards,
Krzysztof