diff options
Diffstat (limited to 'qcom/pm8937.dtsi')
-rw-r--r-- | qcom/pm8937.dtsi | 267 |
1 files changed, 141 insertions, 126 deletions
diff --git a/qcom/pm8937.dtsi b/qcom/pm8937.dtsi index 2a9ed193..701ad1c5 100644 --- a/qcom/pm8937.dtsi +++ b/qcom/pm8937.dtsi @@ -1,3 +1,7 @@ +#include <dt-bindings/iio/qcom,spmi-vadc.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h> + &spmi_bus { qcom,pm8937@0 { @@ -37,14 +41,12 @@ }; }; - pm8937_temp_alarm: qcom,temp-alarm@2400 { + pm8937_tz: qcom,temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400 0x100>; interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; - label = "pm8937_tz"; - qcom,channel-num = <8>; - qcom,threshold-set = <0>; - qcom,temp_alarm-vadc = <&pm8937_vadc>; + io-channels = <&pm8937_vadc VADC_DIE_TEMP>; + io-channel-names = "thermal"; #thermal-sensor-cells = <0>; }; @@ -104,185 +106,197 @@ pm8937_vadc: vadc@3100 { compatible = "qcom,spmi-vadc"; reg = <0x3100 0x100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; #address-cells = <1>; #size-cells = <0>; - interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "eoc-int-en-set"; - qcom,adc-bit-resolution = <15>; - qcom,adc-vdd-reference = <1800>; - qcom,vadc-poll-eoc; - #thermal-sensor-cells = <1>; + #io-channel-cells = <1>; + io-channel-ranges; pinctrl-names = "default"; pinctrl-0 = <&pa_therm1_default &cas_therm_default>; - chan@5 { + /* Channel nodes */ + vcoin { + reg = <VADC_VCOIN>; label = "vcoin"; - reg = <5>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <1>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 3>; }; - chan@7 { + vph_pwr { + reg = <VADC_VSYS>; label = "vph_pwr"; - reg = <7>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <1>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 3>; }; - chan@8 { + die_temp { + reg = <VADC_DIE_TEMP>; label = "die_temp"; - reg = <8>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <3>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 1>; }; - chan@9 { + ref_625mv { + reg = <VADC_REF_625MV>; label = "ref_625mv"; - reg = <9>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 1>; }; - chan@a { + ref_1250v { + reg = <VADC_REF_1250MV>; label = "ref_1250v"; - reg = <0xa>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 1>; }; - chan@c { + ref_buf_625mv { + reg = <VADC_SPARE1>; label = "ref_buf_625mv"; - reg = <0xc>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,fast-avg-setup = <0>; + qcom,pre-scaling = <1 1>; + }; + + ref_vdd { + reg = <VADC_VDD_VADC>; + label = "ref_vdd"; + qcom,pre-scaling = <1 1>; + }; + + ref_gnd { + reg = <VADC_GND_REF>; + label = "ref_gnd"; + qcom,pre-scaling = <1 1>; }; - chan@36 { + pa_therm0 { + reg = <VADC_LR_MUX7_HW_ID>; label = "pa_therm0"; - reg = <0x36>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; - qcom,hw-settle-time = <2>; - qcom,fast-avg-setup = <0>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; - chan@11 { + pa_therm1 { + reg = <VADC_P_MUX2_1_1>; label = "pa_therm1"; - reg = <0x11>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; - qcom,hw-settle-time = <2>; - qcom,fast-avg-setup = <0>; - qcom,vadc-thermal-node; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; - chan@32 { + xo_therm { + reg = <VADC_LR_MUX3_XO_THERM>; label = "xo_therm"; - reg = <0x32>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <4>; - qcom,hw-settle-time = <2>; - qcom,fast-avg-setup = <0>; - qcom,vadc-thermal-node; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; - chan@3c { + xo_therm_buf { + reg = <VADC_LR_MUX3_BUF_XO_THERM>; label = "xo_therm_buf"; - reg = <0x3c>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <4>; - qcom,hw-settle-time = <2>; - qcom,fast-avg-setup = <0>; - qcom,vadc-thermal-node; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; - chan@13 { + case_therm { + reg = <VADC_P_MUX4_1_1>; label = "case_therm"; - reg = <0x13>; - qcom,decimation = <0>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; - qcom,hw-settle-time = <2>; - qcom,fast-avg-setup = <0>; - qcom,vadc-thermal-node; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + }; + + pm8937_adc_tm_iio: adc_tm_iio { + compatible = "qcom,adc-tm5-iio"; + reg = <0x3500 0x100>; + #address-cells = <1>; + #size-cells = <0>; + #thermal-sensor-cells = <1>; + io-channels = <&pm8937_vadc VADC_P_MUX2_1_1>, + <&pm8937_vadc VADC_LR_MUX3_XO_THERM>, + <&pm8937_vadc + VADC_LR_MUX3_BUF_XO_THERM>, + <&pm8937_vadc VADC_P_MUX4_1_1>; + + pa_therm1 { + reg = <VADC_P_MUX2_1_1>; + label = "pa_therm1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + xo_therm { + reg = <VADC_LR_MUX3_XO_THERM>; + label = "xo_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + xo_therm_buf { + reg = <VADC_LR_MUX3_BUF_XO_THERM>; + label = "xo_therm_buf"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + case_therm { + reg = <VADC_P_MUX4_1_1>; + label = "case_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; }; pm8937_adc_tm: vadc@3400 { - compatible = "qcom,adc-tm-rev2"; + compatible = "qcom,qpnp-adc-tm"; reg = <0x3400 0x100>; #address-cells = <1>; #size-cells = <0>; - interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>, + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>, <0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>, <0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "eoc-int-en-set", + interrupt-names = "eoc-int-en-set", "high-thr-en-set", "low-thr-en-set"; - qcom,adc-bit-resolution = <15>; - qcom,adc-vdd-reference = <1800>; - qcom,adc_tm-vadc = <&pm8937_vadc>; #thermal-sensor-cells = <1>; - - chan@36 { + qcom,adc-vdd-reference = <1800>; + io-channels = <&pm8937_vadc VADC_REF_625MV>, + <&pm8937_vadc VADC_REF_1250MV>, + <&pm8937_vadc VADC_VDD_VADC>, + <&pm8937_vadc VADC_GND_REF>; + io-channel-names = "ref_625mv", "ref_1250v", "ref_vdd", + "ref_gnd"; + + pa_therm0 { label = "pa_therm0"; - reg = <0x36>; + reg = <VADC_LR_MUX7_HW_ID>; + io-channels = <&pm8937_vadc VADC_LR_MUX7_HW_ID>; + io-channel-names = "pa_therm0"; qcom,decimation = <0>; qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; + qcom,ratiometric; + qcom,scale-fn-type = <2>; qcom,hw-settle-time = <2>; qcom,fast-avg-setup = <0>; qcom,btm-channel-number = <0x48>; qcom,thermal-node; }; - chan@7 { + vph_pwr { label = "vph_pwr"; - reg = <0x7>; + reg = <VADC_VSYS>; + io-channels = <&pm8937_vadc VADC_VSYS>; + io-channel-names = "vph_pwr"; qcom,decimation = <0>; qcom,pre-div-channel-scaling = <1>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; + qcom,scale-fn-type = <0>; qcom,hw-settle-time = <0>; qcom,fast-avg-setup = <0>; qcom,btm-channel-number = <0x68>; }; }; - }; pm8937_1: qcom,pm8937@1 { @@ -307,7 +321,7 @@ pa-therm1-adc { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8937_vadc 0x11>; + thermal-sensors = <&pm8937_adc_tm_iio VADC_P_MUX2_1_1>; thermal-governor = "user_space"; wake-capable-sensor; @@ -323,7 +337,7 @@ xo-therm-adc { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8937_vadc 0x32>; + thermal-sensors = <&pm8937_adc_tm_iio VADC_LR_MUX3_XO_THERM>; thermal-governor = "user_space"; wake-capable-sensor; @@ -339,7 +353,8 @@ xo-therm-buf-adc { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8937_vadc 0x3c>; + thermal-sensors = <&pm8937_adc_tm_iio + VADC_LR_MUX3_BUF_XO_THERM>; thermal-governor = "user_space"; wake-capable-sensor; @@ -355,7 +370,7 @@ case-therm-adc { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8937_vadc 0x13>; + thermal-sensors = <&pm8937_adc_tm_iio VADC_P_MUX4_1_1>; thermal-governor = "user_space"; wake-capable-sensor; @@ -371,7 +386,7 @@ pa-therm0-adc { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&pm8937_adc_tm 0x36>; + thermal-sensors = <&pm8937_adc_tm VADC_LR_MUX7_HW_ID>; thermal-governor = "user_space"; wake-capable-sensor; @@ -385,10 +400,10 @@ }; pm8937_tz { - polling-delay-passive = <0>; + polling-delay-passive = <100>; polling-delay = <0>; thermal-governor = "step_wise"; - thermal-sensors = <&pm8937_temp_alarm>; + thermal-sensors = <&pm8937_tz>; wake-capable-sensor; trips { |