diff --git a/arch/arm64/boot/dts/qcom/msm-pm660.dtsi b/arch/arm64/boot/dts/qcom/pm660.dtsi similarity index 61% rename from arch/arm64/boot/dts/qcom/msm-pm660.dtsi rename to arch/arm64/boot/dts/qcom/pm660.dtsi index 1766bbdb1889..6f2f2fc6e59c 100644 --- a/arch/arm64/boot/dts/qcom/msm-pm660.dtsi +++ b/arch/arm64/boot/dts/qcom/pm660.dtsi @@ -11,6 +11,7 @@ */ #include +#include #include &spmi_bus { @@ -59,105 +60,39 @@ }; }; - qcom,temp-alarm@2400 { - compatible = "qcom,qpnp-temp-alarm"; + pm660_tz: qcom,temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; reg = <0x2400 0x100>; interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; - label = "pm660_tz"; - qcom,channel-num = <6>; - qcom,temp_alarm-vadc = <&pm660_vadc>; + #thermal-sensor-cells = <0>; + qcom,temperature-threshold-set = <1>; }; - pm660_gpios: gpios { - compatible = "qcom,qpnp-pin"; + pm660_gpios: pinctrl@c000 { + compatible = "qcom,spmi-gpio"; + reg = <0xc000 0xd00>; + interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>, + <0x0 0xc1 0 IRQ_TYPE_NONE>, + <0x0 0xc2 0 IRQ_TYPE_NONE>, + <0x0 0xc3 0 IRQ_TYPE_NONE>, + <0x0 0xc4 0 IRQ_TYPE_NONE>, + <0x0 0xc5 0 IRQ_TYPE_NONE>, + <0x0 0xc6 0 IRQ_TYPE_NONE>, + <0x0 0xc7 0 IRQ_TYPE_NONE>, + <0x0 0xc8 0 IRQ_TYPE_NONE>, + <0x0 0xc9 0 IRQ_TYPE_NONE>, + <0x0 0xca 0 IRQ_TYPE_NONE>, + <0x0 0xcb 0 IRQ_TYPE_NONE>, + <0x0 0xcc 0 IRQ_TYPE_NONE>; + interrupt-names = "pm660_gpio1", "pm660_gpio2", + "pm660_gpio3", "pm660_gpio4", + "pm660_gpio5", "pm660_gpio6", + "pm660_gpio7", "pm660_gpio8", + "pm660_gpio9", "pm660_gpio10", + "pm660_gpio11", "pm660_gpio12", + "pm660_gpio13"; gpio-controller; #gpio-cells = <2>; - #address-cells = <1>; - #size-cells = <1>; - label = "pm660-gpio"; - - gpio@c000 { - reg = <0xc000 0x100>; - qcom,pin-num = <1>; - status = "disabled"; - }; - - gpio@c100 { - reg = <0xc100 0x100>; - qcom,pin-num = <2>; - status = "disabled"; - }; - - gpio@c200 { - reg = <0xc200 0x100>; - qcom,pin-num = <3>; - status = "disabled"; - }; - - gpio@c300 { - reg = <0xc300 0x100>; - qcom,pin-num = <4>; - status = "disabled"; - }; - - gpio@c400 { - reg = <0xc400 0x100>; - qcom,pin-num = <5>; - status = "disabled"; - }; - - gpio@c500 { - reg = <0xc500 0x100>; - qcom,pin-num = <6>; - status = "disabled"; - }; - - gpio@c600 { - reg = <0xc600 0x100>; - qcom,pin-num = <7>; - status = "disabled"; - }; - - gpio@c700 { - reg = <0xc700 0x100>; - qcom,pin-num = <8>; - status = "disabled"; - }; - - gpio@c800 { - reg = <0xc800 0x100>; - qcom,pin-num = <9>; - status = "disabled"; - }; - - gpio@c900 { - reg = <0xc900 0x100>; - qcom,pin-num = <10>; - status = "disabled"; - }; - - gpio@ca00 { - reg = <0xca00 0x100>; - qcom,pin-num = <11>; - status = "disabled"; - }; - - gpio@cb00 { - reg = <0xcb00 0x100>; - qcom,pin-num = <12>; - status = "disabled"; - }; - - gpio@cc00 { - reg = <0xcc00 0x100>; - qcom,pin-num = <13>; - status = "disabled"; - }; - }; - - pm660_coincell: qcom,coincell@2800 { - compatible = "qcom,qpnp-coincell"; - reg = <0x2800 0x100>; }; pm660_rtc: qcom,pm660_rtc { @@ -177,140 +112,91 @@ }; pm660_vadc: vadc@3100 { - compatible = "qcom,qpnp-vadc-hc"; + compatible = "qcom,spmi-adc-rev2"; reg = <0x3100 0x100>; #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 = <1875>; + #io-channel-cells = <1>; + io-channel-ranges; - chan@6 { + /* Channel nodes */ + die_temp { + reg = ; label = "die_temp"; - reg = <6>; - qcom,decimation = <2>; - 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,cal-val = <0>; + qcom,pre-scaling = <1 1>; }; - chan@0 { + ref_gnd { + reg = ; label = "ref_gnd"; - reg = <0>; - qcom,decimation = <2>; - 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,cal-val = <0>; - }; - - chan@1 { - label = "ref_1250v"; - reg = <1>; - qcom,decimation = <2>; - 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,cal-val = <0>; - }; - - chan@83 { + qcom,pre-scaling = <1 1>; + }; + + vref_1p25 { + reg = ; + label = "vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + + vph_pwr { + reg = ; label = "vph_pwr"; - reg = <0x83>; - qcom,decimation = <2>; - 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@85 { + vcoin { + reg = ; label = "vcoin"; - reg = <0x85>; - qcom,decimation = <2>; - 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@4c { + xo_therm { + reg = ; label = "xo_therm"; - reg = <0x4c>; - qcom,decimation = <2>; - 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,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; }; - chan@4d { + msm_therm{ + reg = ; label = "msm_therm"; - reg = <0x4d>; - qcom,decimation = <2>; - 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@51 { + quiet_therm{ + reg = ; label = "quiet_therm"; - reg = <0x51>; - qcom,decimation = <2>; - 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@4e { + emmc_therm{ + reg = ; label = "emmc_therm"; - reg = <0x4e>; - qcom,decimation = <2>; - 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@4f { + pa_therm0{ + reg = ; label = "pa_therm0"; - reg = <0x4f>; - qcom,decimation = <2>; - 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@1d { + drax_temp{ + reg = ; label = "drax_temp"; - reg = <0x1d>; - qcom,decimation = <2>; - 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,cal-val = <0>; + qcom,pre-scaling = <1 1>; }; }; @@ -476,60 +362,14 @@ }; pm660_adc_tm: vadc@3400 { - compatible = "qcom,qpnp-adc-tm-hc"; + compatible = "qcom,adc-tm5"; reg = <0x3400 0x100>; + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "thr-int-en"; #address-cells = <1>; #size-cells = <0>; - interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "eoc-int-en-set"; - qcom,adc-bit-resolution = <15>; - qcom,adc-vdd-reference = <1875>; - qcom,adc_tm-vadc = <&pm660_vadc>; - qcom,decimation = <0>; - qcom,fast-avg-setup = <0>; - - chan@83 { - label = "vph_pwr"; - reg = <0x83>; - qcom,pre-div-channel-scaling = <1>; - qcom,calibration-type = "absolute"; - qcom,scale-function = <0>; - qcom,hw-settle-time = <0>; - qcom,btm-channel-number = <0x60>; - }; - - chan@4d { - label = "msm_therm"; - reg = <0x4d>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; - qcom,hw-settle-time = <2>; - qcom,btm-channel-number = <0x68>; - qcom,thermal-node; - }; - - chan@51 { - label = "quiet_therm"; - reg = <0x51>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <2>; - qcom,hw-settle-time = <2>; - qcom,btm-channel-number = <0x70>; - qcom,thermal-node; - }; - - chan@4c { - label = "xo_therm"; - reg = <0x4c>; - qcom,pre-div-channel-scaling = <0>; - qcom,calibration-type = "ratiometric"; - qcom,scale-function = <4>; - qcom,hw-settle-time = <2>; - qcom,btm-channel-number = <0x78>; - qcom,thermal-node; - }; + #thermal-sensor-cells = <1>; + qcom,pmic-revid = <&pm660_revid>; }; pm660_rradc: rradc@4500 { @@ -630,28 +470,98 @@ #size-cells = <0>; pm660_haptics: qcom,haptic@c000 { - compatible = "qcom,qpnp-haptic"; + compatible = "qcom,pm660-haptics"; reg = <0xc000 0x100>; interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>, <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>; - interrupt-names = "sc-irq", "play-irq"; - qcom,pmic-revid = <&pm660_revid>; - qcom,pmic-misc = <&pm660_misc>; - qcom,misc-clk-trim-error-reg = <0xf3>; + interrupt-names = "hap-sc-irq", "hap-play-irq"; qcom,actuator-type = "lra"; - qcom,play-mode = "direct"; qcom,vmax-mv = <3200>; - qcom,ilim-ma = <800>; - qcom,wave-shape = "square"; - qcom,wave-play-rate-us = <6667>; - qcom,int-pwm-freq-khz = <505>; - qcom,sc-debounce-cycles = <8>; - qcom,en-brake; - qcom,brake-pattern = [03 03 00 00]; - qcom,lra-high-z = "opt0"; - qcom,lra-auto-res-mode = "qwd"; - qcom,lra-calibrate-at-eop = <0>; - qcom,correct-lra-drive-freq; + qcom,play-rate-us = <6667>; + qcom,lra-resonance-sig-shape = "sine"; + qcom,lra-auto-resonance-mode = "qwd"; + qcom,lra-allow-variable-play-rate; + + wf_0 { + /* CLICK */ + qcom,effect-id = <0>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e 3e]; + qcom,wf-play-rate-us = <6667>; + qcom,wf-brake-pattern = [01 00 00 00]; + qcom,lra-auto-resonance-disable; + }; + wf_1 { + /* DOUBLE CLICK */ + qcom,effect-id = <1>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e 02 02 02 02 02 02]; + qcom,wf-play-rate-us = <7143>; + qcom,wf-repeat-count = <2>; + qcom,wf-s-repeat-count = <1>; + qcom,lra-auto-resonance-disable; + }; + wf_2 { + /* TICK */ + qcom,effect-id = <2>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e]; + qcom,wf-play-rate-us = <4000>; + qcom,lra-auto-resonance-disable; + }; + wf_3 { + /* THUD */ + qcom,effect-id = <3>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e 7e]; + qcom,wf-play-rate-us = <6667>; + qcom,lra-auto-resonance-disable; + }; + wf_4 { + /* POP */ + qcom,effect-id = <4>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e]; + qcom,wf-play-rate-us = <5000>; + qcom,lra-auto-resonance-disable; + }; + wf_5 { + /* HEAVY CLICK */ + qcom,effect-id = <5>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e 7e]; + qcom,wf-play-rate-us = <6667>; + qcom,wf-brake-pattern = [03 00 00 00]; + qcom,lra-auto-resonance-disable; + }; + }; + }; +}; + +&thermal_zones { + pm660_temp_alarm: pm660-tz { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm660_tz>; + wake-capable-sensor; + + trips { + pm660_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + pm660_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm-pm660l.dtsi b/arch/arm64/boot/dts/qcom/pm660l.dtsi similarity index 61% rename from arch/arm64/boot/dts/qcom/msm-pm660l.dtsi rename to arch/arm64/boot/dts/qcom/pm660l.dtsi index fd910721fbcc..89329d271ca7 100644 --- a/arch/arm64/boot/dts/qcom/msm-pm660l.dtsi +++ b/arch/arm64/boot/dts/qcom/pm660l.dtsi @@ -39,93 +39,37 @@ ; }; - qcom,temp-alarm@2400 { - compatible = "qcom,qpnp-temp-alarm"; + pm660l_tz: qcom,temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; reg = <0x2400 0x100>; interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>; - label = "pm660l_tz"; + #thermal-sensor-cells = <0>; + qcom,temperature-threshold-set = <1>; }; - pm660l_gpios: gpios { - compatible = "qcom,qpnp-pin"; + pm660l_gpios: pinctrl@c000 { + compatible = "qcom,spmi-gpio"; + reg = <0xc000 0xc00>; + interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>, + <0x0 0xc1 0 IRQ_TYPE_NONE>, + <0x0 0xc2 0 IRQ_TYPE_NONE>, + <0x0 0xc3 0 IRQ_TYPE_NONE>, + <0x0 0xc4 0 IRQ_TYPE_NONE>, + <0x0 0xc5 0 IRQ_TYPE_NONE>, + <0x0 0xc6 0 IRQ_TYPE_NONE>, + <0x0 0xc7 0 IRQ_TYPE_NONE>, + <0x0 0xc8 0 IRQ_TYPE_NONE>, + <0x0 0xc9 0 IRQ_TYPE_NONE>, + <0x0 0xca 0 IRQ_TYPE_NONE>, + <0x0 0xcb 0 IRQ_TYPE_NONE>; + interrupt-names = "pm660l_gpio1", "pm660l_gpio2", + "pm660l_gpio3", "pm660l_gpio4", + "pm660l_gpio5", "pm660l_gpio6", + "pm660l_gpio7", "pm660l_gpio8", + "pm660l_gpio9", "pm660l_gpio10", + "pm660l_gpio11", "pm660l_gpio12"; gpio-controller; #gpio-cells = <2>; - #address-cells = <1>; - #size-cells = <1>; - label = "pm660l-gpio"; - - gpio@c000 { - reg = <0xc000 0x100>; - qcom,pin-num = <1>; - status = "disabled"; - }; - - gpio@c100 { - reg = <0xc100 0x100>; - qcom,pin-num = <2>; - status = "disabled"; - }; - - gpio@c200 { - reg = <0xc200 0x100>; - qcom,pin-num = <3>; - status = "disabled"; - }; - - gpio@c300 { - reg = <0xc300 0x100>; - qcom,pin-num = <4>; - status = "disabled"; - }; - - gpio@c400 { - reg = <0xc400 0x100>; - qcom,pin-num = <5>; - status = "disabled"; - }; - - gpio@c500 { - reg = <0xc500 0x100>; - qcom,pin-num = <6>; - status = "disabled"; - }; - - gpio@c600 { - reg = <0xc600 0x100>; - qcom,pin-num = <7>; - status = "disabled"; - }; - - gpio@c700 { - reg = <0xc700 0x100>; - qcom,pin-num = <8>; - status = "disabled"; - }; - - gpio@c800 { - reg = <0xc800 0x100>; - qcom,pin-num = <9>; - status = "disabled"; - }; - - gpio@c900 { - reg = <0xc900 0x100>; - qcom,pin-num = <10>; - status = "disabled"; - }; - - gpio@ca00 { - reg = <0xca00 0x100>; - qcom,pin-num = <11>; - status = "disabled"; - }; - - gpio@cb00 { - reg = <0xcb00 0x100>; - qcom,pin-num = <12>; - status = "disabled"; - }; - }; }; @@ -135,141 +79,90 @@ #address-cells = <2>; #size-cells = <0>; - pm660l_pwm_1: pwm@b100 { - compatible = "qcom,qpnp-pwm"; - reg = <0xb100 0x100>, - <0xb042 0x7e>; - reg-names = "qpnp-lpg-channel-base", - "qpnp-lpg-lut-base"; - qcom,channel-id = <1>; - qcom,lpg-lut-size = <0x7e>; - qcom,supported-sizes = <6>, <9>; - qcom,ramp-index = <0>; + pm660l_lpg: qcom,pwms@b100 { + compatible = "qcom,pwm-lpg"; + reg = <0xb100 0x300>, <0xb000 0x100>; + reg-names = "lpg-base", "lut-base"; #pwm-cells = <2>; - }; - - pm660l_pwm_2: pwm@b200 { - compatible = "qcom,qpnp-pwm"; - reg = <0xb200 0x100>, - <0xb042 0x7e>; - reg-names = "qpnp-lpg-channel-base", - "qpnp-lpg-lut-base"; - qcom,channel-id = <2>; - qcom,lpg-lut-size = <0x7e>; - qcom,supported-sizes = <6>, <9>; - qcom,ramp-index = <1>; - #pwm-cells = <2>; - }; + qcom,num-lpg-channels = <3>; + qcom,lut-patterns = <0 10 20 30 40 50 60 70 80 90 100 + 90 80 70 60 50 40 30 20 10 0>; + + lpg1 { + qcom,lpg-chan-id = <1>; + qcom,ramp-step-ms = <100>; + qcom,ramp-pause-hi-count = <2>; + qcom,ramp-pause-lo-count = <2>; + qcom,ramp-low-index = <0>; + qcom,ramp-high-index = <20>; + qcom,ramp-from-low-to-high; + qcom,ramp-pattern-repeat; + }; + lpg2 { + qcom,lpg-chan-id = <2>; + qcom,ramp-step-ms = <100>; + qcom,ramp-pause-hi-count = <2>; + qcom,ramp-pause-lo-count = <2>; + qcom,ramp-low-index = <0>; + qcom,ramp-high-index = <20>; + qcom,ramp-from-low-to-high; + qcom,ramp-pattern-repeat; + }; - pm660l_pwm_3: pwm@b300 { - compatible = "qcom,qpnp-pwm"; - reg = <0xb300 0x100>, - <0xb042 0x7e>; - reg-names = "qpnp-lpg-channel-base", - "qpnp-lpg-lut-base"; - qcom,channel-id = <3>; - qcom,lpg-lut-size = <0x7e>; - qcom,supported-sizes = <6>, <9>; - qcom,ramp-index = <2>; - #pwm-cells = <2>; - qcom,period = <6000000>; - - qcom,lpg { - label = "lpg"; - cell-index = <0>; - qcom,duty-percents = - <0x01 0x0a 0x14 0x1e 0x28 0x32 0x3c - 0x46 0x50 0x5a 0x64 - 0x64 0x5a 0x50 0x46 0x3c 0x32 0x28 0x1e - 0x14 0x0a 0x01>; + lpg3 { + qcom,lpg-chan-id = <3>; + qcom,ramp-step-ms = <100>; + qcom,ramp-pause-hi-count = <2>; + qcom,ramp-pause-lo-count = <2>; + qcom,ramp-low-index = <0>; + qcom,ramp-high-index = <20>; + qcom,ramp-from-low-to-high; + qcom,ramp-pattern-repeat; }; }; - pm660l_pwm_4: pwm@b400 { - compatible = "qcom,qpnp-pwm"; - reg = <0xb400 0x100>, - <0xb042 0x7e>; - reg-names = "qpnp-lpg-channel-base", - "qpnp-lpg-lut-base"; - qcom,channel-id = <4>; - qcom,lpg-lut-size = <0x7e>; - qcom,supported-sizes = <6>, <9>; - qcom,ramp-index = <3>; + pm660l_pwm: qcom,pwms@b400 { + compatible = "qcom,pwm-lpg"; + reg = <0xb400 0x100>; + reg-names = "lpg-base"; #pwm-cells = <2>; - status = "disabled"; + qcom,num-lpg-channels = <1>; }; - qcom,leds@d000 { - compatible = "qcom,leds-qpnp"; + pm660l_rgb_led: qcom,leds@d000 { + compatible = "qcom,tri-led"; reg = <0xd000 0x100>; - label = "rgb"; - - red_led: qcom,rgb_0 { - label = "rgb"; - qcom,id = <3>; - qcom,mode = "pwm"; - pwms = <&pm660l_pwm_3 0 0>; - qcom,pwm-us = <1000>; - qcom,max-current = <12>; - qcom,default-state = "off"; - linux,name = "red"; - qcom,start-idx = <0>; - qcom,idx-len = <22>; - qcom,duty-pcts = - [01 0a 14 1e 28 32 3c 46 50 5a 64 - 64 5a 50 46 3c 32 28 1e 14 0a 01]; - qcom,use-blink; + red { + label = "red"; + pwms = <&pm660l_lpg 2 1000000>; + led-sources = <0>; + linux,default-trigger = "timer"; }; - - green_led: qcom,rgb_1 { - label = "rgb"; - qcom,id = <4>; - qcom,mode = "pwm"; - pwms = <&pm660l_pwm_2 0 0>; - qcom,pwm-us = <1000>; - qcom,max-current = <12>; - qcom,default-state = "off"; - linux,name = "green"; + green { + label = "green"; + pwms = <&pm660l_lpg 1 1000000>; + led-sources = <1>; + linux,default-trigger = "timer"; }; - - blue_led: qcom,rgb_2 { - label = "rgb"; - qcom,id = <5>; - qcom,mode = "pwm"; - pwms = <&pm660l_pwm_1 0 0>; - qcom,pwm-us = <1000>; - qcom,max-current = <12>; - qcom,default-state = "off"; - linux,name = "blue"; + blue { + label = "blue"; + pwms = <&pm660l_lpg 0 1000000>; + led-sources = <2>; + linux,default-trigger = "timer"; }; }; pm660l_wled: qcom,leds@d800 { - compatible = "qcom,qpnp-wled"; + compatible = "qcom,pm660l-spmi-wled"; reg = <0xd800 0x100>, <0xd900 0x100>; - reg-names = "qpnp-wled-ctrl-base", - "qpnp-wled-sink-base"; + reg-names = "wled-ctrl-base", + "wled-sink-base"; interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>; interrupt-names = "ovp-irq"; - linux,name = "wled"; - linux,default-trigger = "bkl-trigger"; - qcom,fdbk-output = "auto"; - qcom,vref-uv = <127500>; - qcom,switch-freq-khz = <800>; - qcom,ovp-mv = <29600>; - qcom,ilim-ma = <970>; - qcom,boost-duty-ns = <26>; - qcom,mod-freq-khz = <9600>; - qcom,dim-mode = "hybrid"; - qcom,hyb-thres = <625>; - qcom,sync-dly-us = <800>; - qcom,fs-curr-ua = <25000>; - qcom,cons-sync-write-delay-us = <1000>; - qcom,led-strings-list = [00 01 02]; - qcom,loop-auto-gm-en; + label = "backlight"; qcom,pmic-revid = <&pm660l_revid>; - qcom,auto-calibration-enable; + qcom,auto-calibration; status = "ok"; }; @@ -467,3 +360,31 @@ }; }; }; + +&thermal_zones { + pm660l_temp_alarm: pm660l-tz { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm660l_tz>; + wake-capable-sensor; + + trips { + pm660l_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + pm660l_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi b/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi index 3d848413ba3e..a0d0e32e8e09 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi @@ -126,7 +126,12 @@ }; &pm660l_wled { - qcom,led-strings-list = [01 02]; + qcom,string-cfg= <3>; + status = "ok"; +}; + +&pm660l_lcdb { + status = "ok"; }; &dsi_dual_nt35597_truly_video { diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi b/arch/arm64/boot/dts/qcom/sdm660.dtsi index 7d44eec9fe97..cc8252a2a8fe 100644 --- a/arch/arm64/boot/dts/qcom/sdm660.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi @@ -685,6 +685,8 @@ 3200 3200 3200 3200 3200 3200>; }; + thermal_zones: thermal-zones { }; + uartblsp1dm1: serial@0c170000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xc170000 0x1000>; @@ -2761,8 +2763,8 @@ #include "sdm660-ion.dtsi" #include "sdm660-bus.dtsi" -#include "msm-pm660.dtsi" -#include "msm-pm660l.dtsi" +#include "pm660.dtsi" +#include "pm660l.dtsi" #include "pm660-rpm-regulator.dtsi" #include "pm660l-rpm-regulator.dtsi" #include "sdm660-regulator.dtsi" @@ -2924,5 +2926,76 @@ status = "ok"; }; +&pm660_adc_tm { + io-channels = <&pm660_vadc ADC_XO_THERM_PU2>, + <&pm660_vadc ADC_AMUX_THM1_PU2>, + <&pm660_vadc ADC_AMUX_THM5_PU2>; + + /* Channel nodes */ + xo_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + msm_therm{ + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + quiet_therm{ + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&thermal_zones { + xo-therm-adc { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm660_adc_tm ADC_XO_THERM_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + msm-therm-adc { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm660_adc_tm ADC_AMUX_THM1_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + quiet-therm-adc { + polling-delay-passive = <0>; + polling-delay = <5000>; + thermal-governor = "user_space"; + thermal-sensors = <&pm660_adc_tm ADC_AMUX_THM5_PU2>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; #include "sdm660-mdss.dtsi" #include "sdm660-mdss-pll.dtsi"