| /* |
| * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 and |
| * only version 2 as published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| */ |
| |
| /* delete PMIC specific nodes */ |
| &soc { |
| /* delete rpm-smd base node to delete all regulator in one shot */ |
| /delete-node/ qcom,rpm-smd; |
| |
| /* add rpm-smd node again */ |
| rpm_bus: qcom,rpm-smd { |
| compatible = "qcom,rpm-smd"; |
| rpm-channel-name = "rpm_requests"; |
| rpm-channel-type = <15>; /* SMD_APPS_RPM */ |
| }; |
| |
| /* delete all pmic nodes */ |
| qcom,spmi@200f000 { |
| /delete-node/ qcom,pm8937@0; |
| /delete-node/ qcom,pm8937@1; |
| }; |
| }; |
| |
| /* delete all node referring PM8937 */ |
| &soc { |
| thermal-zones { |
| /delete-node/ pa-therm1-adc; |
| /delete-node/ xo-therm-adc; |
| /delete-node/ xo-therm-buf-adc; |
| /delete-node/ case-therm-adc; |
| /delete-node/ pa-therm0-adc; |
| /delete-node/ pm8937_tz; |
| |
| aoss0-lowf { |
| cooling-maps { |
| cx_vdd_cdev { |
| /delete-property/ cooling-device; |
| }; |
| }; |
| }; |
| }; |
| |
| qcom,cpu-clock-8939@b111050 { |
| /delete-property/ vdd-c1-supply; |
| }; |
| |
| qcom,gcc@1800000 { |
| /delete-property/ vdd_dig-supply; |
| /delete-property/ vdd_hf_dig-supply; |
| /delete-property/ vdd_hf_pll-supply; |
| }; |
| |
| usb@78db000 { |
| /delete-property/ hsusb_vdd_dig-supply; |
| /delete-property/ HSUSB_1p8-supply; |
| /delete-property/ HSUSB_3p3-supply; |
| /delete-property/ vbus_otg-supply; |
| }; |
| |
| qcom,mss@4080000 { |
| /delete-property/ vdd_mss-supply; |
| /delete-property/ vdd_cx-supply; |
| /delete-property/ vdd_mx-supply; |
| /delete-property/ vdd_pll-supply; |
| vdd_mss-supply = <&pm8916_s1_level>; |
| vdd_cx-supply = <&pm8916_s1_level>; |
| vdd_mx-supply = <&pm8916_l2_level_ao>; |
| vdd_pll-supply = <&pm8916_l7>; |
| }; |
| |
| qcom,lpass@c200000 { |
| /delete-property/ vdd_cx-supply; |
| vdd_cx-supply = <&pm8916_s1_level>; |
| }; |
| |
| qcom,pronto@a21b000 { |
| /delete-property/ vdd_pronto_pll-supply; |
| vdd_pronto_pll-supply = <&pm8916_l7>; |
| }; |
| |
| qcom,wcnss-wlan@a000000 { |
| /delete-property/ qcom,has-vsys-adc-channel; |
| qcom,wcnss-adc_tm = <&pm8916_adc_tm>; |
| qcom,pronto-vddmx-supply = <&pm8916_l2_level_ao>; |
| qcom,pronto-vddcx-supply = <&pm8916_s1_level>; |
| qcom,pronto-vddpx-supply = <&pm8916_l7>; |
| qcom,iris-vddxo-supply = <&pm8916_l7>; |
| qcom,iris-vddrfa-supply = <&pm8916_l3>; |
| qcom,iris-vddpa-supply = <&pm8916_l9>; |
| qcom,iris-vdddig-supply = <&pm8916_l7>; |
| |
| qcom,iris-vddxo-voltage-level = <1800000 0 1800000>; |
| qcom,iris-vddrfa-voltage-level = <1325000 0 1325000>; |
| qcom,iris-vddpa-voltage-level = <3300000 0 3300000>; |
| qcom,iris-vdddig-voltage-level = <1800000 0 1800000>; |
| |
| qcom,vddmx-voltage-level = <RPM_SMD_REGULATOR_LEVEL_NOM |
| RPM_SMD_REGULATOR_LEVEL_NONE |
| RPM_SMD_REGULATOR_LEVEL_TURBO>; |
| qcom,vddcx-voltage-level = <RPM_SMD_REGULATOR_LEVEL_NOM |
| RPM_SMD_REGULATOR_LEVEL_NONE |
| RPM_SMD_REGULATOR_LEVEL_TURBO>; |
| qcom,vddpx-voltage-level = <1800000 0 1800000>; |
| |
| qcom,iris-vddxo-current = <10000>; |
| qcom,iris-vddrfa-current = <100000>; |
| qcom,iris-vddpa-current = <515000>; |
| qcom,iris-vdddig-current = <10000>; |
| |
| qcom,pronto-vddmx-current = <0>; |
| qcom,pronto-vddcx-current = <0>; |
| qcom,pronto-vddpx-current = <0>; |
| }; |
| |
| /* mem_acc */ |
| /delete-node/ regulator@01946004; |
| /* apc vreg */ |
| /delete-node/ regulator@b018000; |
| /delete-node/ eldo2; |
| /delete-node/ adv_vreg; |
| }; |
| |
| #include "pm8916-rpm-regulator.dtsi" |
| #include "pm8916.dtsi" |
| #include "qm215-regulator.dtsi" |
| |
| &spmi_bus { |
| pm8916@1 { |
| /delete-node/ msm8x16_wcd_codec@f000; |
| }; |
| }; |
| |
| &pm8916_gpios { |
| disp_vdda_en_default: disp_vdda_en_default { |
| pins = "gpio3"; |
| function = "normal"; |
| power-source = <0>; |
| drive-strength = <8>; |
| output-high; |
| }; |
| }; |
| |
| &soc { |
| disp_vdda_eldo1: gpio-regulator@0 { |
| compatible = "regulator-fixed"; |
| reg = <0x00 0x00>; |
| regulator-name = "disp_vdda_eldo1"; |
| regulator-min-microvolt = <1200000>; |
| regulator-max-microvolt = <1200000>; |
| regulator-enable-ramp-delay = <135>; |
| enable-active-high; |
| gpio = <&pm8916_gpios 3 0>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&disp_vdda_en_default>; |
| vin-supply = <&pm8916_s3>; |
| }; |
| }; |
| |
| &mdss_dsi0_pll { |
| vddio-supply = <&pm8916_l6>; |
| }; |
| |
| &mdss_dsi0 { |
| /delete-property/ vdd-supply; |
| vddio-supply = <&pm8916_l6>; |
| }; |
| |
| &mdss_dsi { |
| vdda-supply = <&pm8916_l6>; |
| vddio-supply = <&pm8916_l6>; |
| |
| qcom,phy-supply-entries { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| qcom,phy-supply-entry@0 { |
| reg = <0>; |
| qcom,supply-name = "vddio"; |
| qcom,supply-min-voltage = <1744000>; |
| qcom,supply-max-voltage = <1904000>; |
| qcom,supply-enable-load = <100000>; |
| qcom,supply-disable-load = <100>; |
| }; |
| }; |
| |
| qcom,ctrl-supply-entries { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| qcom,ctrl-supply-entry@0 { |
| reg = <0>; |
| qcom,supply-name = "vdda"; |
| qcom,supply-min-voltage = <1744000>; |
| qcom,supply-max-voltage = <1904000>; |
| qcom,supply-enable-load = <100000>; |
| qcom,supply-disable-load = <100>; |
| }; |
| }; |
| }; |
| |
| &clock_cpu { |
| vdd-c1-supply = <&apc_vreg_corner>; |
| }; |
| |
| &clock_gcc { |
| vdd_dig-supply = <&pm8916_s1_level>; |
| vdd_hf_dig-supply = <&pm8916_s1_level_ao>; |
| vdd_hf_pll-supply = <&pm8916_l7_ao>; |
| }; |
| |
| &pm8916_vadc { |
| chan@0 { |
| label = "usb_in"; |
| reg = <0>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <7>; |
| qcom,calibration-type = "absolute"; |
| qcom,scale-function = <0>; |
| qcom,hw-settle-time = <0>; |
| qcom,fast-avg-setup = <0>; |
| }; |
| |
| chan@2 { |
| label = "ireg_fb"; |
| reg = <2>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <6>; |
| qcom,calibration-type = "absolute"; |
| qcom,scale-function = <0>; |
| qcom,hw-settle-time = <0>; |
| qcom,fast-avg-setup = <0>; |
| }; |
| |
| chan@5 { |
| 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>; |
| }; |
| |
| chan@6 { |
| label = "vbat_sns"; |
| reg = <6>; |
| 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>; |
| }; |
| |
| chan@7 { |
| 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>; |
| }; |
| |
| chan@b { |
| label = "chg_temp"; |
| reg = <0xb>; |
| 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>; |
| }; |
| |
| chan@11 { |
| label = "skin_therm"; |
| 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; |
| }; |
| |
| chan@30 { |
| label = "batt_therm"; |
| reg = <0x30>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <0>; |
| qcom,calibration-type = "ratiometric"; |
| qcom,scale-function = <26>; |
| qcom,hw-settle-time = <0xb>; |
| qcom,fast-avg-setup = <0>; |
| }; |
| |
| chan@31 { |
| label = "batt_id"; |
| reg = <0x31>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <0>; |
| qcom,calibration-type = "ratiometric"; |
| qcom,scale-function = <0>; |
| qcom,hw-settle-time = <0xb>; |
| qcom,fast-avg-setup = <0>; |
| }; |
| |
| chan@36 { |
| 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,vadc-thermal-node; |
| }; |
| |
| chan@32 { |
| 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; |
| }; |
| |
| chan@3c { |
| 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; |
| }; |
| }; |
| |
| &pm8916_adc_tm { |
| /* Channel Node */ |
| chan@30 { |
| label = "batt_therm"; |
| reg = <0x30>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <0>; |
| qcom,calibration-type = "ratiometric"; |
| qcom,scale-function = <8>; |
| qcom,hw-settle-time = <0xb>; |
| qcom,fast-avg-setup = <0x2>; |
| qcom,btm-channel-number = <0x48>; |
| }; |
| |
| chan@6 { |
| label = "vbat_sns"; |
| reg = <0x6>; |
| qcom,decimation = <0>; |
| qcom,pre-div-channel-scaling = <1>; |
| qcom,calibration-type = "absolute"; |
| qcom,scale-function = <0>; |
| qcom,hw-settle-time = <0xb>; |
| qcom,fast-avg-setup = <0x2>; |
| qcom,btm-channel-number = <0x68>; |
| }; |
| }; |
| |
| &soc { |
| thermal-zones { |
| xo-therm-buf-adc { |
| polling-delay-passive = <0>; |
| polling-delay = <5000>; |
| thermal-sensors = <&pm8916_vadc 0x3c>; |
| thermal-governor = "user_space"; |
| |
| trips { |
| active-config0 { |
| temperature = <65000>; |
| hysteresis = <1000>; |
| type = "passive"; |
| }; |
| }; |
| }; |
| |
| xo-therm-adc { |
| polling-delay-passive = <0>; |
| polling-delay = <5000>; |
| thermal-sensors = <&pm8916_vadc 0x32>; |
| thermal-governor = "user_space"; |
| |
| trips { |
| active-config0 { |
| temperature = <65000>; |
| hysteresis = <1000>; |
| type = "passive"; |
| }; |
| }; |
| }; |
| |
| pa-therm0-adc { |
| polling-delay-passive = <0>; |
| polling-delay = <5000>; |
| thermal-sensors = <&pm8916_vadc 0x36>; |
| thermal-governor = "user_space"; |
| |
| trips { |
| active-config0 { |
| temperature = <65000>; |
| hysteresis = <1000>; |
| type = "passive"; |
| }; |
| }; |
| }; |
| |
| skin-therm-adc { |
| polling-delay-passive = <0>; |
| polling-delay = <5000>; |
| thermal-sensors = <&pm8916_vadc 0x11>; |
| thermal-governor = "user_space"; |
| |
| trips { |
| active-config0 { |
| temperature = <65000>; |
| hysteresis = <1000>; |
| type = "passive"; |
| }; |
| }; |
| }; |
| |
| aoss0-lowf { |
| cooling-maps { |
| cx_vdd_cdev { |
| cooling-device = <&pm8916_cx_cdev 0 0>; |
| }; |
| }; |
| }; |
| |
| pm8916_tz { |
| polling-delay-passive = <0>; |
| polling-delay = <0>; |
| thermal-governor = "step_wise"; |
| thermal-sensors = <&pm8916_tz>; |
| |
| trips { |
| pm8916_trip0: pm8916-trip0 { |
| temperature = <105000>; |
| hysteresis = <0>; |
| type = "passive"; |
| }; |
| pm8916_trip1: pm8916-trip1 { |
| temperature = <125000>; |
| hysteresis = <0>; |
| type = "passive"; |
| }; |
| pm8916_trip2: pm8916-trip2 { |
| temperature = <145000>; |
| hysteresis = <0>; |
| type = "passive"; |
| }; |
| }; |
| }; |
| |
| xo-therm-step { |
| polling-delay-passive = <1000>; |
| polling-delay = <5000>; |
| thermal-sensors = <&pm8916_vadc 0x32>; |
| thermal-governor = "step_wise"; |
| |
| trips { |
| qm215_batt_trip0: qm215-batt-trip0 { |
| temperature = <41000>; |
| hysteresis = <2000>; |
| type = "passive"; |
| }; |
| qm215_modem_trip0: qm215-modem-trip0 { |
| temperature = <44000>; |
| hysteresis = <4000>; |
| type = "passive"; |
| }; |
| qm215_batt_trip1: qm215-batt-trip1 { |
| temperature = <45000>; |
| hysteresis = <4000>; |
| type = "passive"; |
| }; |
| qm215_modem_trip1: qm215-modem-trip1 { |
| temperature = <46000>; |
| hysteresis = <2000>; |
| type = "passive"; |
| }; |
| qm215_cpu_trip: qm215-cpu-trip { |
| temperature = <48000>; |
| hysteresis = <0>; |
| type = "passive"; |
| }; |
| qm215_gpu_trip: qm215-gpu-trip { |
| temperature = <50000>; |
| hysteresis = <0>; |
| type = "passive"; |
| }; |
| qm215_modem_trip2: qm215-modem-trip2 { |
| temperature = <60000>; |
| hysteresis = <5000>; |
| type = "passive"; |
| }; |
| }; |
| |
| cooling-maps { |
| skin_cpu0 { |
| trip = <&qm215_cpu_trip>; |
| /* throttle from fmax to 1094400KHz */ |
| cooling-device = <&CPU0 THERMAL_NO_LIMIT |
| (THERMAL_MAX_LIMIT-2)>; |
| }; |
| skin_cpu1 { |
| trip = <&qm215_cpu_trip>; |
| cooling-device = <&CPU1 THERMAL_NO_LIMIT |
| (THERMAL_MAX_LIMIT-2)>; |
| }; |
| skin_cpu2 { |
| trip = <&qm215_cpu_trip>; |
| cooling-device = <&CPU2 THERMAL_NO_LIMIT |
| (THERMAL_MAX_LIMIT-2)>; |
| }; |
| skin_cpu3 { |
| trip = <&qm215_cpu_trip>; |
| cooling-device = <&CPU3 THERMAL_NO_LIMIT |
| (THERMAL_MAX_LIMIT-2)>; |
| }; |
| skin_gpu { |
| trip = <&qm215_gpu_trip>; |
| /* throttle from fmax to 400000000Hz */ |
| cooling-device = <&msm_gpu |
| THERMAL_NO_LIMIT |
| (THERMAL_MAX_LIMIT-1)>; |
| }; |
| modem_lvl1 { |
| trip = <&qm215_modem_trip0>; |
| cooling-device = <&modem_pa 1 1>; |
| }; |
| modem_lvl2 { |
| trip = <&qm215_modem_trip1>; |
| cooling-device = <&modem_pa 2 2>; |
| }; |
| modem_lvl3 { |
| trip = <&qm215_modem_trip2>; |
| cooling-device = <&modem_pa 3 3>; |
| }; |
| battery_lvl1 { |
| trip = <&qm215_batt_trip0>; |
| cooling-device = <&pm8916_chg 1 1>; |
| }; |
| battery_lvl2 { |
| trip = <&qm215_batt_trip1>; |
| cooling-device = <&pm8916_chg 2 2>; |
| }; |
| }; |
| }; |
| }; |
| }; |
| |
| &soc { |
| usb_vdig_supply: usb_vdig_supply { |
| compatible = "regulator-fixed"; |
| regulator-name = "usb_vdig_supply"; |
| regulator-min-microvolt = <1200000>; |
| regulator-max-microvolt = <1200000>; |
| }; |
| }; |
| |
| &usb_otg { |
| hsusb_vdd_dig-supply = <&usb_vdig_supply>; |
| HSUSB_1p8-supply = <&pm8916_l7>; |
| HSUSB_3p3-supply = <&pm8916_l13>; |
| extcon = <&pm8916_chg>; |
| }; |