Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 998fe64d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dt-bindings: thermal: Add ADC_TM documentation for PMIC7"

parents 86218486 5d2f66f8
Loading
Loading
Loading
Loading
+46 −7
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Qualcomm Technologies, Inc. PMIC thermal monitor ADC driver (ADC_TM)

PMIC thermal monitoring (TM) provides interface to thermal clients
to set temperature thresholds and receive notification when the thresholds
are crossed. A 15 bit ADC is used for measurements. The driver is part
are crossed. A 16 bit ADC is used for measurements. The driver is part
of the sysfs thermal framework that provides support to read the trip
points, set threshold for the trip points and enable the trip points.

@@ -11,13 +11,13 @@ ADC_TM node
- compatible:
    Usage: required
    Value type: <string>
    Definition: Should contain "qcom,adc-tm5" or "qcom,adc-tm5-iio"
                for PMIC5 ADC TM driver.
    Definition: Should contain "qcom,adc-tm5" or "qcom,adc-tm5-iio" for PMIC5 ADC TM device.
            Should contain "qcom,adc-tm7" or "qcom,adc-tm5-iio" for PMIC7 ADC TM device.

- reg:
    Usage: required
    Value type: <prop-encoded-array>
    Definition: ADC_TM base address and length in the SPMI PMIC register map.
    Value type: <u32>
    Definition: ADC_TM base address in the SPMI PMIC register map.

- #address-cells:
    Usage: required
@@ -33,7 +33,7 @@ ADC_TM node
- interrupts:
    Usage: required
    Value type: <prop-encoded-array>
    Definition: End of conversion interrupt.
    Definition: Threshold violation interrupt.

- interrupt-names:
    Usage: required
@@ -73,8 +73,11 @@ Channel node properties:
- reg:
    Usage: required
    Value type: <u32>
    Definition: ADC channel number.
    Definition: For PMIC5, ADC channel number.
            See include/dt-bindings/iio/qcom,spmi-vadc.h
            For PMIC7, ADC virtual channel number, made by combining SID of
            PMIC having the channel and actual ADC channel number.
            See files in include/dt-bindings/iio/.

- qcom,pre-scaling:
    Usage: optional
@@ -86,6 +89,40 @@ Channel node properties:
            <1 1>, <1 3>, <1 4>, <1 6>, <1 20>, <1 8>, <10 81>, <1 10>
            If property is not found default value depending on chip will be used.

- qcom,decimation:
    Usage: optional, used as channel property only for PMIC7
    Value type: <u32>
    Definition: This parameter is used to decrease ADC sampling rate.
            Quicker measurements can be made by reducing decimation ratio.
            For PMIC7 ADC, combined two step decimation values are 85, 340 and 1360.
            If property is not found, default value of 1360 will be used.

- qcom,avg-samples:
    Usage: optional, used as channel property only for PMIC7
    Value type: <u32>
    Definition: 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.
            Valid values are: 1, 2, 4, 8, 16
            If property is not found, 1 sample will be used.

- qcom,kernel-client:
    Usage: optional
    Value type: <empty>
    Definition: Used to indicate if the client for this channel is not the
            thermal framework. Non-thermal clients use a different set of
            APIs to configure their channels. In addition, the reverse scaling function
            needs to be specified for them. If property is not found, channel will be
            considered as thermal by default.

- qcom,scale-type:
    Usage: optional
    Value type: <u32>
    Definition: Reverse scaling function used to convert raw ADC code to units
            specific to a given channel.
            Select from the following unsigned int.
            0 : Scaling to convert voltage in uV to raw adc code.

- qcom,ratiometric:
    Usage: optional
    Value type: <empty>
@@ -105,6 +142,8 @@ Channel node properties:
                        2ms * (value - 10) otherwise.
            Valid values are: 15, 100, 200, 300, 400, 500, 600, 700, 1,
            2, 4, 8, 16, 32, 64, 128 ms
            For PMIC7, valid values are: 15, 100, 200, 300, 400, 500, 600,
            700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000 us.
            If property is not found, channel will use 15us.

Example: