diff --git a/qcom/Makefile b/qcom/Makefile index 6ee3d039..49129b97 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -59,6 +59,7 @@ NOAPQ_TUNA_BOARDS += \ tuna-mtp-kiwi-overlay.dtbo \ tuna-mtp-overlay.dtbo \ tuna-mtp-qmp1000-overlay.dtbo \ + tuna-mtp-kiwi-pmd802x-overlay.dtbo \ tuna-qrd-overlay.dtbo \ tuna-rcm-kiwi-overlay.dtbo \ tuna-rcm-overlay.dtbo \ diff --git a/qcom/pm7550ba.dtsi b/qcom/pm7550ba.dtsi index bd9d9220..953da75d 100644 --- a/qcom/pm7550ba.dtsi +++ b/qcom/pm7550ba.dtsi @@ -74,7 +74,7 @@ #size-cells = <0>; status = "disabled"; - oledb_vreg: oledb@fa00 { + pm7550ba_oledb_vreg: oledb@fa00 { reg = <0xfa00>; reg-names = "oledb_base"; regulator-name = "oledb"; @@ -83,7 +83,7 @@ qcom,swire-control; }; - ab_vreg: ab@f900 { + pm7550ba_ab_vreg: ab@f900 { reg = <0xf900>; reg-names = "ab_base"; regulator-name = "ab"; @@ -92,7 +92,7 @@ qcom,swire-control; }; - ibb_vreg: ibb@f800 { + pm7550ba_ibb_vreg: ibb@f800 { reg = <0xf800>; reg-names = "ibb_base"; regulator-name = "ibb"; diff --git a/qcom/tuna-mtp-kiwi-overlay.dts b/qcom/tuna-mtp-kiwi-overlay.dts index 9f8e2b72..bb6fefd8 100644 --- a/qcom/tuna-mtp-kiwi-overlay.dts +++ b/qcom/tuna-mtp-kiwi-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-mtp-kiwi.dtsi" +#include "tuna-pm7550ba.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna MTP + kiwi WLAN"; diff --git a/qcom/tuna-mtp-kiwi-pmd802x-overlay.dts b/qcom/tuna-mtp-kiwi-pmd802x-overlay.dts new file mode 100644 index 00000000..a08d35a8 --- /dev/null +++ b/qcom/tuna-mtp-kiwi-pmd802x-overlay.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "tuna-mtp-kiwi.dtsi" +#include "tuna-pm7550ba-pmd802x.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Tuna MTP + kiwi WLAN + pmd802x"; + compatible = "qcom,tuna-mtp", "qcom,tuna", "qcom,tunap-mtp", "qcom,tunap", + "qcom,mtp"; + qcom,msm-id = <681 0x10000>, <655 0x10000>; + qcom,board-id = <8 2>; +}; diff --git a/qcom/tuna-mtp-overlay.dts b/qcom/tuna-mtp-overlay.dts index a9ea196b..006e66f8 100644 --- a/qcom/tuna-mtp-overlay.dts +++ b/qcom/tuna-mtp-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-mtp.dtsi" +#include "tuna-pm7550ba-pmd802x.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna MTP"; diff --git a/qcom/tuna-mtp-qmp1000-overlay.dts b/qcom/tuna-mtp-qmp1000-overlay.dts index f366cb86..85d26b68 100644 --- a/qcom/tuna-mtp-qmp1000-overlay.dts +++ b/qcom/tuna-mtp-qmp1000-overlay.dts @@ -7,6 +7,7 @@ /plugin/; #include "tuna-mtp-qmp1000.dtsi" +#include "tuna-pm7550ba-pmd802x.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna MTP QMP1000"; diff --git a/qcom/tuna-pm7550ba-pmd802x.dtsi b/qcom/tuna-pm7550ba-pmd802x.dtsi new file mode 100644 index 00000000..f338c006 --- /dev/null +++ b/qcom/tuna-pm7550ba-pmd802x.dtsi @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include "tuna-pm7550ba.dtsi" +#include "pmd802x.dtsi" + +/ { + qcom,pmic-id-size = <8>; + qcom,pmic-id = <0x0 0x0 0x0 0x0 0x57 0x0 0x0 0x4C>; +}; + +&pm7550ba_amoled { + status = "disabled"; +}; + +&pm7550ba_amoled_ecm { + status = "disabled"; +}; + +&pmic_glink_debug { + /delete-node/ i2c@104; + /delete-node/ spmi@200; + + i2c@104 { + reg = <0x104>; /* I2C instance 4 in ADSP for SE5 */ + #address-cells = <1>; + #size-cells = <0>; + qcom,bus-type = "i2c"; + + qcom,smb1500@69 { + compatible = "qcom,i2c-pmic"; + reg = <0x69>; + qcom,can-sleep; + }; + + qcom,smb1500@68 { + compatible = "qcom,i2c-pmic"; + reg = <0x68>; + qcom,can-sleep; + }; + }; +}; + +&pmic_glink_adc { + status = "ok"; + /delete-node/ smb1398_1_iin; + /delete-node/ smb1398_1_ichg; + /delete-node/ smb1398_1_die_temp; + + smb1500_1_iin { + reg = <0x1046901>; + label = "smb1393_1_iin"; + }; + + smb1500_1_ichg { + reg = <0x1046902>; + label = "smb1393_1_ichg"; + }; + + smb1500_1_die_temp { + reg = <0x1046903>; + label = "smb1393_1_die_temp"; + }; + + smb1500_2_iin { + reg = <0x1046801>; + label = "smb1393_2_iin"; + }; + + smb1500_2_ichg { + reg = <0x1046802>; + label = "smb1393_2_ichg"; + }; + + smb1500_2_die_temp { + reg = <0x1046803>; + label = "smb1393_2_die_temp"; + }; +}; diff --git a/qcom/tuna-pm7550ba.dtsi b/qcom/tuna-pm7550ba.dtsi index 67e544ad..e0d2e5c3 100644 --- a/qcom/tuna-pm7550ba.dtsi +++ b/qcom/tuna-pm7550ba.dtsi @@ -5,6 +5,8 @@ #include "pm7550ba.dtsi" #include +#include +#include / { qcom,pmic-id-size = <8>; @@ -34,6 +36,126 @@ qcom,can-sleep; }; }; + + i2c@104 { + reg = <0x104>; /* I2C instance 4 in ADSP for SE5 */ + #address-cells = <1>; + #size-cells = <0>; + qcom,bus-type = "i2c"; + + qcom,smb1398@34 { + compatible = "qcom,i2c-pmic"; + reg = <0x34>; + qcom,can-sleep; + }; + }; + + /* SPMI bridge bus 1 with SMB1510 device */ + spmi@200 { + reg = <0x200>; + #address-cells = <2>; + #size-cells = <0>; + qcom,bus-type = "spmi"; + + qcom,smb1510@d { + compatible = "qcom,spmi-pmic"; + reg = <13 SPMI_USID>; + qcom,can-sleep; + }; + }; +}; + +&pmic_glink_adc { + status = "ok"; + + smb1398_1_iin { + reg = <0x1043401>; + label = "smb1393_1_iin"; + }; + + smb1398_1_ichg { + reg = <0x1043402>; + label = "smb1393_1_ichg"; + }; + + smb1398_1_die_temp { + reg = <0x1043403>; + label = "smb1393_1_die_temp"; + }; +}; + +&pmk8550_vadc { + pinctrl-0 = <&sys_therm_7_gpio6_default &sys_therm_6_gpio7_default>; + pinctrl-names = "default"; + + /* PM7550BA Channel nodes */ + pm7550ba_offset_ref { + reg = ; + label = "pm7550ba_offset_ref"; + qcom,pre-scaling = <1 1>; + }; + + pm7550ba_vref_1p25 { + reg = ; + label = "pm7550ba_vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + pm7550ba_die_temp { + reg = ; + label = "pm7550ba_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm7550ba_vph_pwr { + reg = ; + label = "pm7550ba_vph_pwr"; + qcom,pre-scaling = <1 3>; + }; + + pm7550ba_chg_temp { + reg = ; + label = "pm7550ba_chg_temp"; + }; + + pm7550ba_iin_fb { + reg = ; + label = "pm7550ba_iin_fb"; + }; + + pm7550ba_ichg_fb { + reg = ; + label = "pm7550ba_ichg_fb"; + }; + + pm7550ba_sys_therm_7 { + reg = ; + label = "pm7550ba_sys_therm_7"; + qcom,adc-tm-type = <1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm7550ba_sys_therm_8 { + reg = ; + label = "pm7550ba_sys_therm_8"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + + }; + + pm7550ba_batt_therm { + reg = ; + label = "pm7550ba_batt_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,scale-fn-type = ; + }; + }; &pm7550ba_vib { @@ -44,3 +166,61 @@ status = "okay"; }; +&pm7550ba_tz { + io-channels = <&pmk8550_vadc PM7550BA_ADC5_GEN3_DIE_TEMP>; + io-channel-names = "thermal"; +}; + +&battery_charger { + qcom,thermal-mitigation-step = <500000>; + #cooling-cells = <2>; +}; + +&pm7550ba_gpios { + sys_therm_7_gpio6 { + sys_therm_7_gpio6_default: sys_therm_7_gpio6_default { + pins = "gpio6"; + bias-high-impedance; + }; + }; +}; + +&thermal_zones { + sys-therm-7 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM7550BA_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 PM7550BA_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"; + }; + }; + }; +};