diff --git a/qcom/pm7325.dtsi b/qcom/pm7325.dtsi new file mode 100644 index 000000000000..ddfdde1f358e --- /dev/null +++ b/qcom/pm7325.dtsi @@ -0,0 +1,61 @@ +#include +#include + +&spmi_bus { + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + + qcom,pm7325@1 { + compatible = "qcom,spmi-pmic"; + reg = <1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm7325_tz: qcom,temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pm7325_gpios: pinctrl@8800 { + compatible = "qcom,pm7325-gpio"; + reg = <0x8800>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; +}; + +&thermal_zones { + pm7325_temp_alarm: pm7325_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm7325_tz>; + + trips { + pm7325_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm7325_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + + pm7325_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/pm7325b.dtsi b/qcom/pm7325b.dtsi new file mode 100644 index 000000000000..0ca5f7732a39 --- /dev/null +++ b/qcom/pm7325b.dtsi @@ -0,0 +1,68 @@ +#include +#include + +&spmi_bus { + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + + qcom,pm7325b@3 { + compatible = "qcom,spmi-pmic"; + reg = <3 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm7325b_tz: qcom,temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pm7325b_gpios: pinctrl@8800 { + compatible = "qcom,pm7325b-gpio"; + reg = <0x8800>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pm7250b_vib: qcom,vibrator@df00 { + compatible = "qcom,qpnp-vibrator-ldo"; + reg = <0xdf00>; + qcom,vib-ldo-volt-uv = <3000000>; + qcom,disable-overdrive; + }; + }; +}; + +&thermal_zones { + pm7325b_temp_alarm: pm7325b_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm7325b_tz>; + + trips { + pm7325b_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm7325b_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + + pm7325b_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/yupik-pmic-overlay.dtsi b/qcom/yupik-pmic-overlay.dtsi new file mode 100644 index 000000000000..e15564e25061 --- /dev/null +++ b/qcom/yupik-pmic-overlay.dtsi @@ -0,0 +1,450 @@ +#include +#include + +#include "pmk8350.dtsi" +#include "pm7325.dtsi" +#include "pm8350c.dtsi" +#include "pmr735a.dtsi" + +&pm7325_gpios { + key_vol_up { + key_vol_up_default: key_vol_up_default { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <1>; + }; + }; +}; + +&pm8350c_gpios { + pm8008i_reset { + pm8008i_active: pm8008i_active { + pins = "gpio3"; + function = "normal"; + bias-disable; + output-high; + power-source = <1>; + }; + }; + + pm8008j_reset { + pm8008j_active: pm8008j_active { + pins = "gpio4"; + function = "normal"; + bias-disable; + output-high; + power-source = <1>; + }; + }; +}; + +&pmk8350_vadc { + /delete-node/ pm8350_ref_gnd; + /delete-node/ pm8350_vref_1p25; + /delete-node/ pm8350_die_temp; + /delete-node/ pm8350_vph_pwr; + + /delete-node/ pm8350b_ref_gnd; + /delete-node/ pm8350b_vref_1p25; + /delete-node/ pm8350b_die_temp; + /delete-node/ pm8350b_vph_pwr; + /delete-node/ pm8350b_vbat_sns; + + /delete-node/ pmr735b_ref_gnd; + /delete-node/ pmr735b_vref_1p25; + /delete-node/ pmr735b_die_temp; + + /* PM7325 Channel nodes */ + pm7325_ref_gnd { + reg = ; + label = "pm7325_ref_gnd"; + qcom,pre-scaling = <1 1>; + }; + + pm7325_vref_1p25 { + reg = ; + label = "pm7325_vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + pm7325_die_temp { + reg = ; + label = "pm7325_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm7325_vph_pwr { + reg = ; + label = "pm7325_vph_pwr"; + qcom,pre-scaling = <1 3>; + }; + + pm7325_quiet_therm { + reg = ; + label = "pm7325_quiet_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm7325_cam_flash_therm { + reg = ; + label = "pm7325_cam_flash_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm7325_sdm_skin_therm { + reg = ; + label = "pm7325_sdm_skin_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm7325_wide_rfc_therm { + reg = ; + label = "pm7325_wide_rfc_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pmk8350_adc_tm { + io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>, + <&pmk8350_vadc PM7325_ADC7_AMUX_THM2_100K_PU>, + <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>, + <&pmk8350_vadc PM7325_ADC7_AMUX_THM4_100K_PU>, + <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; + + pm7325_quiet_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm7325_cam_flash_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm7325_sdm_skin_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm7325_wide_rfc_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pmk8350_xo_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&thermal_zones { + quiet-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PM7325_ADC7_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + camera-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PM7325_ADC7_AMUX_THM2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sdm-skin-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PM7325_ADC7_AMUX_THM3_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + rear-cam-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PM7325_ADC7_AMUX_THM4_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + xo-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + +&qupv3_se1_i2c { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + + pm8008i_chip: pm8008i@8 { + compatible = "qcom,i2c-pmic"; + reg = <0x8>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008i_active>; + + pm8008-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8008I_EN: qcom,pm8008-chip-en { + regulator-name = "pm8008i-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8008i_ldo: pm8008i@9 { + compatible = "qcom,i2c-pmic"; + reg = <0x9>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8008i-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8008I_EN>; + vdd_l1_l2-supply = <&S8B>; + vdd_l3_l4-supply = <&BOB>; + vdd_l5-supply = <&S1B>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1I: pm8008i_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8008i_l1"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + qcom,min-dropout-voltage = <160000>; + qcom,hpm-min-load = <30000>; + }; + + L2I: pm8008i_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8008i_l2"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1150000>; + qcom,min-dropout-voltage = <128000>; + qcom,hpm-min-load = <30000>; + }; + + L3I: pm8008i_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8008i_l3"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3000000>; + qcom,min-dropout-voltage = <144000>; + }; + + L4I: pm8008i_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8008i_l4"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2900000>; + qcom,min-dropout-voltage = <128000>; + }; + + L5I: pm8008i_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8008i_l5"; + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <1900000>; + qcom,min-dropout-voltage = <136000>; + }; + + L6I: pm8008i_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8008i_l6"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2900000>; + qcom,min-dropout-voltage = <128000>; + }; + + L7I: pm8008i_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8008i_l7"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3000000>; + qcom,min-dropout-voltage = <312000>; + }; + }; + }; + + pm8008j_chip: pm8008j@c { + compatible = "qcom,i2c-pmic"; + reg = <0xc>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008j_active>; + + pm8008-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8008J_EN: qcom,pm8008-chip-en { + regulator-name = "pm8008j-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8008j_ldo: pm8008j@d { + compatible = "qcom,i2c-pmic"; + reg = <0xd>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8008j-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8008J_EN>; + vdd_l1_l2-supply = <&S8B>; + vdd_l3_l4-supply = <&S1B>; + vdd_l5-supply = <&BOB>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1J: pm8008j_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8008j_l1"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1150000>; + qcom,min-dropout-voltage = <96000>; + qcom,hpm-min-load = <30000>; + }; + + L2J: pm8008j_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8008j_l2"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1250000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L3J: pm8008j_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8008j_l3"; + regulator-min-microvolt = <1460000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <224000>; + }; + + L4J: pm8008j_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8008j_l4"; + regulator-min-microvolt = <1504000>; + regulator-max-microvolt = <1600000>; + qcom,min-dropout-voltage = <0>; + }; + + L5J: pm8008j_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8008j_l5"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2900000>; + qcom,min-dropout-voltage = <104000>; + }; + + L6J: pm8008j_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8008j_l6"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <112000>; + }; + + L7J: pm8008j_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8008j_l7"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3544000>; + qcom,min-dropout-voltage = <96000>; + }; + }; + }; +}; + +&pm7325_tz { + io-channels = <&pmk8350_vadc PM7325_ADC7_DIE_TEMP>; + io-channel-names = "thermal"; +}; + +&pmr735a_tz { + io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>; + io-channel-names = "thermal"; +}; diff --git a/qcom/yupik.dtsi b/qcom/yupik.dtsi index 738d97329cc2..94589e4166b0 100644 --- a/qcom/yupik.dtsi +++ b/qcom/yupik.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -938,6 +939,149 @@ ; }; + spmi_bus: qcom,spmi@c440000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0xc440000 0x1100>, + <0xc600000 0x2000000>, + <0xe600000 0x100000>, + <0xe700000 0xa0000>, + <0xc40a000 0x26000>; + reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; + interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "periph_irq"; + interrupt-controller; + #interrupt-cells = <4>; + #address-cells = <2>; + #size-cells = <0>; + cell-index = <0>; + qcom,channel = <0>; + qcom,ee = <0>; + }; + + spmi_debug_bus: qcom,spmi-debug@6b12000 { + compatible = "qcom,spmi-pmic-arb-debug"; + reg = <0x6b12000 0x60>, <0x7820b0 0x4>; + reg-names = "core", "fuse"; + clocks = <&aopcc QDSS_CLK>; + clock-names = "core_clk"; + qcom,fuse-disable-bit = <24>; + #address-cells = <2>; + #size-cells = <0>; + status = "disabled"; + + qcom,pmk8350-debug@0 { + compatible = "qcom,spmi-pmic"; + reg = <0 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; + + qcom,pm7325-debug@1 { + compatible = "qcom,spmi-pmic"; + reg = <1 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; + + qcom,pm8350c-debug@2 { + compatible = "qcom,spmi-pmic"; + reg = <2 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; + + qcom,pm8350b-debug@3 { + compatible = "qcom,spmi-pmic"; + reg = <3 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; + + qcom,pmr735a-debug@5 { + compatible = "qcom,spmi-pmic"; + reg = <4 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; + }; + + qcom,pmic_glink { + compatible = "qcom,pmic-glink"; + qcom,pmic-glink-channel = "PMIC_RTR_ADSP_APPS"; + qcom,subsys-name = "adsp"; + qcom,protection-domain = "tms/servreg", "msm/adsp/charger_pd"; + + battery_charger: qcom,battery_charger { + compatible = "qcom,battery-charger"; + }; + + qcom,ucsi { + compatible = "qcom,ucsi-glink"; + }; + + altmode: qcom,altmode { + compatible = "qcom,altmode-glink"; + #altmode-cells = <1>; + }; + }; + + qcom,pmic_glink_log { + compatible = "qcom,pmic-glink"; + qcom,pmic-glink-channel = "PMIC_LOGS_ADSP_APPS"; + + qcom,battery_debug { + compatible = "qcom,battery-debug"; + }; + + spmi_glink_debug: qcom,spmi_glink_debug { + compatible = "qcom,spmi-glink-debug"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + /* Primary SPMI bus */ + spmi@0 { + reg = <0>; + #address-cells = <2>; + #size-cells = <0>; + + qcom,pm8350b-debug@3 { + compatible = "qcom,spmi-pmic"; + reg = <3 SPMI_USID>; + qcom,can-sleep; + }; + }; + + /* Secondary (QUP) SPMI bus */ + spmi@1 { + reg = <1>; + #address-cells = <2>; + #size-cells = <0>; + + qcom,smb1394-debug@b { + compatible = "qcom,spmi-pmic"; + reg = <11 SPMI_USID>; + qcom,can-sleep; + }; + + qcom,smb1394-debug@c { + compatible = "qcom,spmi-pmic"; + reg = <12 SPMI_USID>; + qcom,can-sleep; + }; + + }; + }; + }; + + thermal_zones: thermal-zones { + }; + tcsr_mutex_block: syscon@1f40000 { compatible = "syscon"; reg = <0x1f40000 0x20000>; @@ -1116,6 +1260,16 @@ <&glink_cdsp>, <&glink_wpss>; }; + + qcom,pmic_glink_rpmsg { + qcom,glink-channels = "PMIC_RTR_ADSP_APPS"; + }; + + qcom,pmic_glink_log_rpmsg { + qcom,glink-channels = "PMIC_LOGS_ADSP_APPS"; + qcom,intents = <0x800 5 + 0xc00 3>; + }; }; glink_cdsp: cdsp {