From af7ac1d7c185d19204bbec8d0c411fa4f35ce8ce Mon Sep 17 00:00:00 2001 From: Kavya Nunna Date: Wed, 24 Jul 2024 18:29:01 +0530 Subject: [PATCH] ARM: dts: msm: Add pmiv0108 support for tuna Add pmiv0108 support for tuna. Change-Id: Ib3be05c00cfa1e0eeb5305ba42e196f3eaa7b8fc Signed-off-by: Kavya Nunna --- qcom/pmiv010x.dtsi | 129 +++++++++++++++++++++++ qcom/tuna-cdp-overlay.dts | 1 + qcom/tuna-pmiv0108.dtsi | 186 +++++++++++++++++++++++++++++++++ qcom/tuna-rcm-kiwi-overlay.dts | 1 + qcom/tuna-rcm-overlay.dts | 1 + 5 files changed, 318 insertions(+) create mode 100644 qcom/pmiv010x.dtsi create mode 100644 qcom/tuna-pmiv0108.dtsi diff --git a/qcom/pmiv010x.dtsi b/qcom/pmiv010x.dtsi new file mode 100644 index 00000000..d53c0606 --- /dev/null +++ b/qcom/pmiv010x.dtsi @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include + +&spmi_bus { + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + + pmiv010x_7: qcom,pmiv0108@7 { + compatible = "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmiv010x_tz: qcom,temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x7 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pmiv010x_gpios: pinctrl@8800 { + compatible = "qcom,pmiv0108-gpio"; + reg = <0x8800>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pmiv010x_eusb2_repeater: eusb2-repeater@fd00 { + compatible = "qcom,pmic-eusb2-repeater"; + reg = <0xfd00>; + }; + + pmiv010x_vib: qcom,vibrator@df00 { + compatible = "qcom,qpnp-vibrator-ldo"; + reg = <0xdf00>; + qcom,vib-ldo-volt-uv = <3000000>; + qcom,disable-overdrive; + }; + + pmiv010x_amoled: qcom,amoled { + compatible = "qcom,amoled-regulator"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + oledb_vreg: oledb@fa00 { + reg = <0xfa00>; + reg-names = "oledb_base"; + regulator-name = "oledb"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <8000000>; + qcom,swire-control; + }; + + ab_vreg: ab@f900 { + reg = <0xf900>; + reg-names = "ab_base"; + regulator-name = "ab"; + regulator-min-microvolt = <4600000>; + regulator-max-microvolt = <5200000>; + qcom,swire-control; + }; + + ibb_vreg: ibb@f800 { + reg = <0xf800>; + reg-names = "ibb_base"; + regulator-name = "ibb"; + regulator-min-microvolt = <1400000>; + regulator-max-microvolt = <6600000>; + qcom,swire-control; + regulator-allow-set-load; + }; + }; + + pmiv010x_amoled_ecm: qcom,amoled-ecm@f900 { + compatible = "qcom,amoled-ecm"; + reg = <0xf900>; + status = "disabled"; + + nvmem-names = "amoled-ecm-sdam0", "amoled-ecm-sdam1", + "amoled-ecm-sdam2"; + nvmem = <&pmk8550_sdam_13>, <&pmk8550_sdam_14>, + <&pmk8550_sdam_41>; + interrupt-names = "ecm-sdam0", "ecm-sdam1", + "ecm-sdam2"; + interrupts = <0x7 0x7c 0x1 IRQ_TYPE_EDGE_RISING>, + <0x7 0x7d 0x1 IRQ_TYPE_EDGE_RISING>, + <0x7 0x98 0x1 IRQ_TYPE_EDGE_RISING>; + }; + }; +}; + +&thermal_zones { + pmiv010x_temp_alarm: pmiv010x_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pmiv010x_tz>; + trips { + pmiv010x_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pmiv010x_trip1: trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "passive"; + }; + + pmiv010x_trip2: trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/tuna-cdp-overlay.dts b/qcom/tuna-cdp-overlay.dts index 82f00661..04abc04c 100644 --- a/qcom/tuna-cdp-overlay.dts +++ b/qcom/tuna-cdp-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-cdp.dtsi" +#include "tuna-pmiv0108.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna CDP"; diff --git a/qcom/tuna-pmiv0108.dtsi b/qcom/tuna-pmiv0108.dtsi new file mode 100644 index 00000000..95be68f8 --- /dev/null +++ b/qcom/tuna-pmiv0108.dtsi @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include "pmiv010x.dtsi" + +&pmiv010x_gpios { + charger_skin_therm { + charger_skin_therm_default: charger_skin_therm_default { + pins = "gpio6"; + bias-high-impedence; + }; + }; +}; + +&pmiv010x_amoled { + status= "disabled"; +}; + +&pmiv010x_amoled_ecm { + status = "disabled"; +}; + +&pmiv010x_tz { + io-channels = <&pmk8550_vadc PMIV0104_ADC5_GEN3_DIE_TEMP>; + io-channel-names = "thermal"; + +}; + +&battery_charger { + #cooling-cells = <2>; + qcom,thermal-mitigation-step = <500000>; +}; + +&pmk8550_vadc { + pinctrl-names = "default"; + pinctrl-0 = <&charger_skin_therm_default &sys_therm_6_gpio7_default>; + + pmiv010x_ref_gnd { + reg = ; + label = "pmiv010x_ref_gnd"; + qcom,pre-scaling = <1 1>; + }; + + pmiv010x_vref_1p25 { + reg = ; + label = "pmiv010x_vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + pmiv010x_die_temp { + reg = ; + label = "pmiv010x_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pmiv010x_vph_pwr { + reg = ; + label = "pmiv010x_vph_pwr"; + qcom,pre-scaling = <1 3>; + }; + + pmiv010x_vbat_sns_qbg { + reg = ; + label = "pmiv010x_vbat_sns"; + qcom,pre-scaling = <1 3>; + }; + + pmiv010x_chg_temp { + reg = ; + label = "pmiv010x_chg_temp"; + qcom,pre-scaling = <1 1>; + }; + + pmiv010x_bat_therm { + reg = ; + label = "pmiv010x_bat_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,scale-fn-type = ; + }; + + pmiv010x_bat_id { + reg = ; + label = "pmiv010x_bat_id"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,scale-fn-type = ; + }; + + pmiv010x_iin_fb { + reg = ; + label = "pmiv010x_iin_fb"; + }; + + pmiv010x_ichg_fb { + reg = ; + label = "pmiv010x_ichg_fb"; + }; + + pmiv010x_sys_therm_7 { + reg = ; + label = "pmiv010x_charger_skin_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmiv010x_sys_therm_8 { + reg = ; + label = "pmiv010x_conn_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; +}; + +&pmic_glink_debug { + spmi@0 { + reg = <0>; + #address-cells = <2>; + #size-cells = <0>; + qcom,pmiv010x-debug@7 { + compatible = "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + qcom,can-sleep; + }; + }; +}; + +&spmi0_debug_bus { + qcom,pmiv010x-debug@7 { + compatible = "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; +}; + +&thermal_zones { + sys-therm-7 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIV0104_ADC5_GEN3_AMUX_THM6_GPIO6_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-8 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIV0104_ADC5_GEN3_AMUX_THM4_USB_THERM_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; diff --git a/qcom/tuna-rcm-kiwi-overlay.dts b/qcom/tuna-rcm-kiwi-overlay.dts index 878afb01..10c4409c 100644 --- a/qcom/tuna-rcm-kiwi-overlay.dts +++ b/qcom/tuna-rcm-kiwi-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-rcm-kiwi.dtsi" +#include "tuna-pmiv0108.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna RCM + kiwi WLAN"; diff --git a/qcom/tuna-rcm-overlay.dts b/qcom/tuna-rcm-overlay.dts index 8ca3a067..c47d003b 100644 --- a/qcom/tuna-rcm-overlay.dts +++ b/qcom/tuna-rcm-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-rcm.dtsi" +#include "tuna-pmiv0108.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna RCM";