From f24830cded9ca6d17ac4faf10ea5b826e1680878 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Wed, 2 Jun 2021 15:26:14 +0530 Subject: [PATCH] ARM: dts: msm: Add nopmi support for holi-pm6125 and blair Add nopmi support for holi-pm6125 and blair platforms. In addition, correct the name of usb phy used for blair. Change-Id: I06b3e2ea69562d22ec9c01014e37fbfb6019e629 --- qcom/Makefile | 7 +- qcom/blair-atp.dtsi | 4 +- qcom/blair-cdp.dtsi | 3 +- qcom/blair-mtp-nopmi-overlay.dts | 2 + qcom/blair-mtp-nopmi.dts | 2 + qcom/blair-mtp-nopmi.dtsi | 4 +- qcom/blair-mtp-overlay.dts | 6 + qcom/blair-mtp.dts | 6 + qcom/blair-mtp.dtsi | 233 ---------------------- qcom/blair-qrd-nopmi-overlay.dts | 2 + qcom/blair-qrd-nopmi.dts | 2 + qcom/blair-qrd-nopmi.dtsi | 4 +- qcom/blair-qrd-overlay.dts | 6 + qcom/blair-qrd.dts | 6 + qcom/blair-qrd.dtsi | 258 ------------------------ qcom/blair-usb.dtsi | 6 +- qcom/holi-cdp-pm6125.dtsi | 1 + qcom/holi-mtp-pm6125-nopmi-overlay.dts | 14 ++ qcom/holi-mtp-pm6125-nopmi.dts | 6 +- qcom/holi-mtp-pm6125-overlay.dts | 1 + qcom/holi-mtp-pm6125.dts | 1 + qcom/holi-mtp-pm6125.dtsi | 232 ---------------------- qcom/holi-mtp-pm7250b.dtsi | 232 ++++++++++++++++++++++ qcom/holi-mtp-usbc-pm6125.dtsi | 1 + qcom/holi-pm6125-overlay.dtsi | 12 ++ qcom/holi-pm7250b.dtsi | 151 +++++++++++++- qcom/holi-pmic-overlay-pm6125.dtsi | 79 -------- qcom/holi-qrd-pm6125-nopmi-overlay.dts | 15 ++ qcom/holi-qrd-pm6125-nopmi.dts | 14 ++ qcom/holi-qrd-pm6125-overlay.dts | 1 + qcom/holi-qrd-pm6125.dts | 1 + qcom/holi-qrd-pm6125.dtsi | 258 ------------------------ qcom/holi-qrd-pm7250b.dtsi | 264 +++++++++++++++++++++++++ qcom/holi-thermal-overlay-pm6125.dtsi | 78 -------- 34 files changed, 759 insertions(+), 1153 deletions(-) create mode 100644 qcom/holi-mtp-pm7250b.dtsi create mode 100644 qcom/holi-qrd-pm6125-nopmi-overlay.dts create mode 100644 qcom/holi-qrd-pm6125-nopmi.dts create mode 100644 qcom/holi-qrd-pm7250b.dtsi diff --git a/qcom/Makefile b/qcom/Makefile index d2843e1e640f..45654538a8d4 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -106,7 +106,8 @@ dtbo-$(CONFIG_ARCH_HOLI) += holi-rumi-overlay.dtbo \ holi-cdp-lcd-pm6125-overlay.dtbo \ holi-mtp-usbc-pm6125-overlay.dtbo \ holi-mtp-pm6125-nopmi-overlay.dtbo \ - holi-qrd-pm6125-overlay.dtbo + holi-qrd-pm6125-overlay.dtbo \ + holi-qrd-pm6125-nopmi-overlay.dtbo holi-rumi-overlay.dtbo-base := holi.dtb holi-mtp-overlay.dtbo-base := holi.dtb @@ -121,6 +122,7 @@ holi-cdp-lcd-pm6125-overlay.dtbo-base := holi.dtb holi-mtp-usbc-pm6125-overlay.dtbo-base := holi.dtb holi-mtp-pm6125-nopmi-overlay.dtbo-base := holi.dtb holi-qrd-pm6125-overlay.dtbo-base := holi.dtb +holi-qrd-pm6125-nopmi-overlay.dtbo-base := holi.dtb else dtb-$(CONFIG_ARCH_HOLI) += holi-rumi.dtb \ @@ -135,7 +137,8 @@ dtb-$(CONFIG_ARCH_HOLI) += holi-rumi.dtb \ holi-cdp-lcd-pm6125.dtb \ holi-mtp-usbc-pm6125.dtb \ holi-mtp-pm6125-nopmi.dtb \ - holi-qrd-pm6125.dtb + holi-qrd-pm6125.dtb \ + holi-qrd-pm6125-nopmi.dtb endif diff --git a/qcom/blair-atp.dtsi b/qcom/blair-atp.dtsi index 0626eec24cc3..7b8d509b9815 100644 --- a/qcom/blair-atp.dtsi +++ b/qcom/blair-atp.dtsi @@ -622,7 +622,7 @@ }; &pm7250b_charger { - dpdm-supply = <&qusb_phy0>; + dpdm-supply = <&usb2_phy0>; smb5_vbus: qcom,smb5-vbus { regulator-name = "smb5-vbus"; @@ -677,7 +677,7 @@ io-channel-names = "chg_type"; }; -&qusb_phy0 { +&usb2_phy0 { vdd-supply = <&L18A>; vdda18-supply = <&L2A>; vdda33-supply = <&L3A>; diff --git a/qcom/blair-cdp.dtsi b/qcom/blair-cdp.dtsi index c5b6fe5a2a76..a4432d2ea265 100644 --- a/qcom/blair-cdp.dtsi +++ b/qcom/blair-cdp.dtsi @@ -1,6 +1,7 @@ #include "holi-audio-overlay.dtsi" #include #include +#include "holi-pm7250b.dtsi" #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-cdp-pm6125.dtsi" @@ -336,7 +337,7 @@ #include "camera/blair-camera-sensor-cdp.dtsi" &pm7250b_charger { - dpdm-supply = <&qusb_phy0>; + dpdm-supply = <&usb2_phy0>; smb5_vbus: qcom,smb5-vbus { regulator-name = "smb5-vbus"; diff --git a/qcom/blair-mtp-nopmi-overlay.dts b/qcom/blair-mtp-nopmi-overlay.dts index 45f5b62a29a8..a879373f8d08 100644 --- a/qcom/blair-mtp-nopmi-overlay.dts +++ b/qcom/blair-mtp-nopmi-overlay.dts @@ -8,5 +8,7 @@ compatible = "qcom,blair-mtp", "qcom,blair", "qcom,mtp"; qcom,msm-id = <507 0x10000>; qcom,board-id = <8 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; }; diff --git a/qcom/blair-mtp-nopmi.dts b/qcom/blair-mtp-nopmi.dts index aa80d9f34851..d6bc812200b8 100644 --- a/qcom/blair-mtp-nopmi.dts +++ b/qcom/blair-mtp-nopmi.dts @@ -7,5 +7,7 @@ model = "Qualcomm Technologies, Inc. Blair MTP NOPMI"; compatible = "qcom,blair-mtp", "qcom,blair", "qcom,mtp"; qcom,board-id = <8 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; }; diff --git a/qcom/blair-mtp-nopmi.dtsi b/qcom/blair-mtp-nopmi.dtsi index 336d7a250678..a00189357ba1 100644 --- a/qcom/blair-mtp-nopmi.dtsi +++ b/qcom/blair-mtp-nopmi.dtsi @@ -1,2 +1,2 @@ -/ { -}; +#include "blair-mtp.dtsi" + diff --git a/qcom/blair-mtp-overlay.dts b/qcom/blair-mtp-overlay.dts index 7f1464083f57..624cb3f025ec 100644 --- a/qcom/blair-mtp-overlay.dts +++ b/qcom/blair-mtp-overlay.dts @@ -2,11 +2,17 @@ /plugin/; #include "blair-mtp.dtsi" +#include "holi-mtp-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blair MTP"; compatible = "qcom,blair-mtp", "qcom,blair", "qcom,mtp"; qcom,msm-id = <507 0x10000>; qcom,board-id = <8 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-mtp.dts b/qcom/blair-mtp.dts index b02097f25f9d..6806d92ab64b 100644 --- a/qcom/blair-mtp.dts +++ b/qcom/blair-mtp.dts @@ -2,10 +2,16 @@ #include "blair.dtsi" #include "blair-mtp.dtsi" +#include "holi-mtp-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blair MTP"; compatible = "qcom,blair-mtp", "qcom,blair", "qcom,mtp"; qcom,board-id = <8 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-mtp.dtsi b/qcom/blair-mtp.dtsi index 6285b1ce213e..72c09ebd187a 100644 --- a/qcom/blair-mtp.dtsi +++ b/qcom/blair-mtp.dtsi @@ -4,7 +4,6 @@ #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-mtp-pm6125.dtsi" -#include #include "display/blair-sde-display-mtp.dtsi" @@ -150,13 +149,6 @@ linux,can-disable; }; }; - - mtp_batterydata: qcom,battery-data { - qcom,batt-id-range-pct = <15>; - #include "qg-batterydata-alium-3600mah.dtsi" - #include "qg-batterydata-atl466271_3300mAh.dtsi" - #include "qg-batterydata-atl436186020H_3780mAh.dtsi" - }; }; &soc { @@ -207,230 +199,5 @@ }; }; -&pm7250b_charger { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, - <&pm7250b_vadc ADC5_USB_IN_I>, - <&pm7250b_vadc ADC5_CHG_TEMP>, - <&pm7250b_vadc ADC5_DIE_TEMP>, - <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, - <&pm7250b_vadc ADC5_SBUx>, - <&pm7250b_vadc ADC5_VPH_PWR>, - <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, - <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, - <&pm7250b_qg PSY_IIO_TEMP>, - <&pm7250b_qg PSY_IIO_CAPACITY>, - <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, - <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, - <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, - <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, - <&pm7250b_qg PSY_IIO_CC_SOC>, - <&pm7250b_qg PSY_IIO_CURRENT_NOW>, - <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL>, - <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, - <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, - <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, - <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, - <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; - io-channel-names = "usb_in_voltage", - "usb_in_current", - "chg_temp", - "die_temp", - "conn_temp", - "sbux_res", - "vph_voltage", - "skin_temp", - "resistance_id", - "voltage_now", - "temp", - "capacity", - "voltage_ocv", - "voltage_avg", - "debug_battery", - "real_capacity", - "cc_soc", - "current_now", - "voltage_max", - "charge_full", - "charge_counter", - "cycle_count", - "charge_full_design", - "time_to_full_now", - "cp_parallel_mode", - "cp_parallel_output_mode", - "cp_min_icl", - "cp_switcher_en", - "cp_enable", - "cp_ilim", - "cp_die_temp"; - qcom,battery-data = <&mtp_batterydata>; - qcom,sec-charger-config = <1>; - qcom,auto-recharge-soc = <98>; - qcom,step-charging-enable; - qcom,sw-jeita-enable; - qcom,charger-temp-max = <800>; - qcom,smb-temp-max = <800>; - qcom,suspend-input-on-debug-batt; - qcom,fcc-stepping-enable; - qcom,fcc-step-delay-ms = <100>; - qcom,fcc-step-size-ua = <100000>; - qcom,smb-internal-pull-kohm = <0>; - qcom,en-skin-therm-mitigation; - qcom,hvdcp3-standalone-config; -}; - -&pm7250b_qg { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, - <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, - <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, - <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, - <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, - <&pm7250b_charger PSY_IIO_CHARGE_DONE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; - io-channel-names = "batt-therm", - "batt-id", - "input_current_limited", - "recharge_soc", - "force_recharge", - "charge_done", - "cp_charging_enabled"; - qcom,battery-data = <&mtp_batterydata>; - qcom,qg-iterm-ma = <150>; - qcom,hold-soc-while-full; - qcom,linearize-soc; - qcom,cl-feedback-on; - qcom,tcss-enable; - qcom,fvss-enable; - qcom,bass-enable; - qcom,use-cp-iin-sns; - qcom,vbatt-cutoff-mv = <3400>; - qcom,vbatt-empty-mv = <3200>; - qcom,vbatt-empty-cold-mv = <3100>; - qcom,vbatt-low-mv = <3500>; - qcom,fvss-vbatt-mv = <3500>; -}; - -&pm7250b_vadc { - smb1390_therm@e { - qcom,scale-fn-type = ; - }; -}; - -&pm7250b_gpios { - smb_stat { - smb_stat_default: smb_stat_default { - pins = "gpio6"; - function = "normal"; - input-enable; - bias-pull-up; - qcom,pull-up-strength = ; - power-source = <0>; - }; - }; -}; - -&qupv3_se10_i2c { - status = "ok"; - #include "smb1394.dtsi" -}; - -&smb1394 { - interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; - interrupt-parent = <&spmi_bus>; - interrupt-names = "smb1394"; - pinctrl-names = "default"; - qcom,enable-toggle-stat; - pinctrl-0 = <&smb_stat_default>; - status = "ok"; -}; - -&smb1394_div2_cp_primary { - io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, - <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, - <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; - io-channel-names = "die_temp", - "real_type", - "adapter_cc_mode", - "pd_current_max", - "input_current_settled", - "smb_en_mode", - "smb_en_reason"; - qcom,parallel-input-mode = <1>; /* USBIN */ - qcom,parallel-output-mode = <2>; /* VBAT */ - status = "ok"; -}; - #include "camera/blair-camera-sensor-mtp.dtsi" -&pm7250b_charger { - dpdm-supply = <&qusb_phy0>; - - smb5_vbus: qcom,smb5-vbus { - regulator-name = "smb5-vbus"; - }; - - smb5_vconn: qcom,smb5-vconn { - regulator-name = "smb5-vconn"; - }; -}; - -&pm7250b_pdphy { - vdd-pdphy-supply = <&L3A>; - vbus-supply = <&smb5_vbus>; - vconn-supply = <&smb5_vconn>; - - #io-channel-cells = <1>; - io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, - <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, - <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, - <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, - <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, - <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_PR_SWAP>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_MODE>, - <&pm7250b_charger PSY_IIO_PE_START>; - io-channel-names = "pd_active", - "typec_cc_orientation", - "connector_type", - "typec_power_role", - "pd_usb_suspend_supported", - "typec_src_rp", - "pd_in_hard_reset", - "pr_current_max", - "pr_swap", - "pd_voltage_min", - "pd_voltage_max", - "real_type", - "typec_mode", - "pe_start"; -}; - -&usb0 { - extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; - - #io-channel-cells = <1>; - io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; - io-channel-names = "chg_type"; -}; - - diff --git a/qcom/blair-qrd-nopmi-overlay.dts b/qcom/blair-qrd-nopmi-overlay.dts index 744a11f3e773..242b301e2408 100644 --- a/qcom/blair-qrd-nopmi-overlay.dts +++ b/qcom/blair-qrd-nopmi-overlay.dts @@ -8,5 +8,7 @@ compatible = "qcom,blair-qrd", "qcom,blair", "qcom,qrd"; qcom,msm-id = <507 0x10000>; qcom,board-id = <0x1000B 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; }; diff --git a/qcom/blair-qrd-nopmi.dts b/qcom/blair-qrd-nopmi.dts index f09f4f93d5de..b4cf4fdeb04c 100644 --- a/qcom/blair-qrd-nopmi.dts +++ b/qcom/blair-qrd-nopmi.dts @@ -7,5 +7,7 @@ model = "Qualcomm Technologies, Inc. Blair QRD NOPMI"; compatible = "qcom,blair-qrd", "qcom,blair", "qcom,qrd"; qcom,board-id = <0x1000B 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; }; diff --git a/qcom/blair-qrd-nopmi.dtsi b/qcom/blair-qrd-nopmi.dtsi index 336d7a250678..23729e5a518c 100644 --- a/qcom/blair-qrd-nopmi.dtsi +++ b/qcom/blair-qrd-nopmi.dtsi @@ -1,2 +1,2 @@ -/ { -}; +#include "blair-qrd.dtsi" + diff --git a/qcom/blair-qrd-overlay.dts b/qcom/blair-qrd-overlay.dts index 04955e482053..57c75c1c53cd 100644 --- a/qcom/blair-qrd-overlay.dts +++ b/qcom/blair-qrd-overlay.dts @@ -2,11 +2,17 @@ /plugin/; #include "blair-qrd.dtsi" +#include "holi-qrd-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blair QRD"; compatible = "qcom,blair-qrd", "qcom,blair", "qcom,qrd"; qcom,msm-id = <507 0x10000>; qcom,board-id = <0x1000B 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-qrd.dts b/qcom/blair-qrd.dts index b0bc35a9f0bb..3e1602501c4b 100644 --- a/qcom/blair-qrd.dts +++ b/qcom/blair-qrd.dts @@ -2,10 +2,16 @@ #include "blair.dtsi" #include "blair-qrd.dtsi" +#include "holi-qrd-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blair QRD"; compatible = "qcom,blair-qrd", "qcom,blair", "qcom,qrd"; qcom,board-id = <0x1000B 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-qrd.dtsi b/qcom/blair-qrd.dtsi index fe3a584509fb..3927faa3efee 100644 --- a/qcom/blair-qrd.dtsi +++ b/qcom/blair-qrd.dtsi @@ -5,7 +5,6 @@ #include "display/holi-sde-display-qrd-pm6125.dtsi" #include "display/blair-sde-display-qrd.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" -#include &wcd938x_codec { cdc-vdd-rxtx-supply = <&L9A>; @@ -224,238 +223,6 @@ linux,can-disable; }; }; - - qrd_batterydata: qcom,battery-data { - qcom,batt-id-range-pct = <15>; - #include "qg-batterydata-atl436186020H_3780mAh.dtsi" - #include "qg-batterydata-atl466271_3300mAh.dtsi" - }; -}; - -&pm7250b_charger { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, - <&pm7250b_vadc ADC5_USB_IN_I>, - <&pm7250b_vadc ADC5_CHG_TEMP>, - <&pm7250b_vadc ADC5_DIE_TEMP>, - <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, - <&pm7250b_vadc ADC5_SBUx>, - <&pm7250b_vadc ADC5_VPH_PWR>, - <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, - <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, - <&pm7250b_qg PSY_IIO_TEMP>, - <&pm7250b_qg PSY_IIO_CAPACITY>, - <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, - <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, - <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, - <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, - <&pm7250b_qg PSY_IIO_CC_SOC>, - <&pm7250b_qg PSY_IIO_CURRENT_NOW>, - <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL>, - <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, - <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, - <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, - <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, - <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; - io-channel-names = "usb_in_voltage", - "usb_in_current", - "chg_temp", - "die_temp", - "conn_temp", - "sbux_res", - "vph_voltage", - "skin_temp", - "resistance_id", - "voltage_now", - "temp", - "capacity", - "voltage_ocv", - "voltage_avg", - "debug_battery", - "real_capacity", - "cc_soc", - "current_now", - "voltage_max", - "charge_full", - "charge_counter", - "cycle_count", - "charge_full_design", - "time_to_full_now", - "cp_parallel_mode", - "cp_parallel_output_mode", - "cp_min_icl", - "cp_switcher_en", - "cp_enable", - "cp_ilim", - "cp_die_temp"; - qcom,battery-data = <&qrd_batterydata>; - qcom,sec-charger-config = <1>; - qcom,auto-recharge-soc = <98>; - qcom,step-charging-enable; - qcom,sw-jeita-enable; - qcom,charger-temp-max = <800>; - qcom,smb-temp-max = <800>; - qcom,suspend-input-on-debug-batt; - qcom,fcc-stepping-enable; - qcom,fcc-step-delay-ms = <100>; - qcom,fcc-step-size-ua = <100000>; - qcom,smb-internal-pull-kohm = <0>; - qcom,en-skin-therm-mitigation; - qcom,thermal-mitigation = <10000000 9500000 9000000 8500000 8000000 - 7500000 7000000 6500000 6000000 5500000 5000000 4500000 - 4000000 3500000 3000000 2500000 2000000 1500000 1000000 - 500000>; -}; - -&pm7250b_qg { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, - <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, - <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, - <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, - <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, - <&pm7250b_charger PSY_IIO_CHARGE_DONE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; - io-channel-names = "batt-therm", - "batt-id", - "input_current_limited", - "recharge_soc", - "force_recharge", - "charge_done", - "cp_charging_enabled"; - qcom,qg-iterm-ma = <150>; - qcom,hold-soc-while-full; - qcom,linearize-soc; - qcom,cl-feedback-on; - qcom,tcss-enable; - qcom,fvss-enable; - qcom,bass-enable; - qcom,use-cp-iin-sns; - qcom,vbatt-cutoff-mv = <3400>; - qcom,vbatt-empty-mv = <3200>; - qcom,vbatt-empty-cold-mv = <3100>; - qcom,vbatt-low-mv = <3500>; - qcom,fvss-vbatt-mv = <3500>; -}; - -&pm7250b_charger { - dpdm-supply = <&qusb_phy0>; - - smb5_vbus: qcom,smb5-vbus { - regulator-name = "smb5-vbus"; - }; - - smb5_vconn: qcom,smb5-vconn { - regulator-name = "smb5-vconn"; - }; -}; - -&pm7250b_pdphy { - vdd-pdphy-supply = <&L3A>; - vbus-supply = <&smb5_vbus>; - vconn-supply = <&smb5_vconn>; - - #io-channel-cells = <1>; - io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, - <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, - <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, - <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, - <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, - <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_PR_SWAP>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_MODE>, - <&pm7250b_charger PSY_IIO_PE_START>; - io-channel-names = "pd_active", - "typec_cc_orientation", - "connector_type", - "typec_power_role", - "pd_usb_suspend_supported", - "typec_src_rp", - "pd_in_hard_reset", - "pr_current_max", - "pr_swap", - "pd_voltage_min", - "pd_voltage_max", - "real_type", - "typec_mode", - "pe_start"; -}; - -&usb0 { - extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; - - #io-channel-cells = <1>; - io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; - io-channel-names = "chg_type"; -}; - -&pm7250b_vadc { - smb1390_therm@e { - qcom,scale-fn-type = ; - }; -}; - -&pm7250b_gpios { - smb_stat { - smb_stat_default: smb_stat_default { - pins = "gpio6"; - function = "normal"; - input-enable; - bias-pull-up; - qcom,pull-up-strength = ; - power-source = <0>; - }; - }; -}; - -&qupv3_se10_i2c { - status = "ok"; - #include "smb1394.dtsi" -}; - -&smb1394 { - interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; - interrupt-parent = <&spmi_bus>; - interrupt-names = "smb1394"; - pinctrl-names = "default"; - qcom,enable-toggle-stat; - pinctrl-0 = <&smb_stat_default>; - status = "ok"; -}; - -&smb1394_div2_cp_primary { - io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, - <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, - <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; - io-channel-names = "die_temp", - "real_type", - "adapter_cc_mode", - "pd_current_max", - "input_current_settled", - "smb_en_mode", - "smb_en_reason"; - qcom,parallel-input-mode = <1>; /* USBIN */ - qcom,parallel-output-mode = <2>; /* VBAT */ - status = "ok"; }; &thermal_zones { @@ -574,31 +341,6 @@ trip = <&cx_trip>; cooling-device = <&modem_skin 3 3>; }; - - battery-cdev0 { - trip = <&battery_trip0>; - cooling-device = <&pm7250b_charger 6 6>; - }; - - battery-cdev1 { - trip = <&battery_trip1>; - cooling-device = <&pm7250b_charger 10 10>; - }; - - battery-cdev2 { - trip = <&battery_trip2>; - cooling-device = <&pm7250b_charger 14 14>; - }; - - battery-cdev3 { - trip = <&battery_trip3>; - cooling-device = <&pm7250b_charger 16 16>; - }; - - battery-cdev4 { - trip = <&battery_trip4>; - cooling-device = <&pm7250b_charger 18 18>; - }; }; }; diff --git a/qcom/blair-usb.dtsi b/qcom/blair-usb.dtsi index 7c707b10f214..4b36ba02fd8c 100644 --- a/qcom/blair-usb.dtsi +++ b/qcom/blair-usb.dtsi @@ -33,7 +33,7 @@ reset-names = "core_reset"; USB3_GDSC-supply = <&gcc_usb30_prim_gdsc>; - dpdm-supply = <&qusb_phy0>; + dpdm-supply = <&usb2_phy0>; qcom,usb-charger; qcom,core-clk-rate = <133333333>; @@ -54,7 +54,7 @@ reg = <0x4e00000 0xcd00>; interrupt-parent = <&intc>; interrupts = ; - usb-phy = <&qusb_phy0>, <&usb_qmp_dp_phy>; + usb-phy = <&usb2_phy0>, <&usb_qmp_dp_phy>; tx-fifo-resize; linux,sysdev_is_parent; snps,disable-clk-gating; @@ -69,7 +69,7 @@ }; /* Primary USB port related QUSB2 PHY */ - qusb_phy0: qusb@162b000 { + usb2_phy0: hsphy@162b000 { compatible = "qcom,usb-hsphy-snps-femto"; reg = <0x162B000 0x114>, <0x0162A000 0x1000>; diff --git a/qcom/holi-cdp-pm6125.dtsi b/qcom/holi-cdp-pm6125.dtsi index 28c2db11d99c..7106307562cd 100644 --- a/qcom/holi-cdp-pm6125.dtsi +++ b/qcom/holi-cdp-pm6125.dtsi @@ -1,6 +1,7 @@ #include "holi-audio-overlay.dtsi" #include #include +#include "holi-pm7250b.dtsi" #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-cdp-pm6125.dtsi" diff --git a/qcom/holi-mtp-pm6125-nopmi-overlay.dts b/qcom/holi-mtp-pm6125-nopmi-overlay.dts index 71fe2b7f1a8a..2a8758d4c7fe 100644 --- a/qcom/holi-mtp-pm6125-nopmi-overlay.dts +++ b/qcom/holi-mtp-pm6125-nopmi-overlay.dts @@ -1 +1,15 @@ /dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "holi-regulators-pm6125.dtsi" +#include "holi-mtp-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi MTP PM6125 NOPMI"; + compatible = "qcom,holi-mtp", "qcom,holi", "qcom,mtp"; + qcom,msm-id = <454 0x10000>, <472 0x10000>; + qcom,board-id = <8 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; +}; diff --git a/qcom/holi-mtp-pm6125-nopmi.dts b/qcom/holi-mtp-pm6125-nopmi.dts index ceaba4bf503e..8a247f3d5aaf 100644 --- a/qcom/holi-mtp-pm6125-nopmi.dts +++ b/qcom/holi-mtp-pm6125-nopmi.dts @@ -1,13 +1,15 @@ /dts-v1/; #include "holi.dtsi" -#include "holi-mtp-pm6125-nopmi.dtsi" +#include "holi-pm6125-overlay.dtsi" +#include "holi-regulators-pm6125.dtsi" +#include "holi-mtp-pm6125.dtsi" / { model = "Qualcomm Technologies, Inc. Holi MTP PM6125 NOPMI"; compatible = "qcom,holi-mtp", "qcom,holi", "qcom,mtp"; qcom,board-id = <8 0>; qcom,pmic-id-size = <4>; - qcom,pmic-id = <0x2D 0x0 0x00 0x0>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; }; diff --git a/qcom/holi-mtp-pm6125-overlay.dts b/qcom/holi-mtp-pm6125-overlay.dts index 4bd5809d06ac..d87ee2930b5d 100644 --- a/qcom/holi-mtp-pm6125-overlay.dts +++ b/qcom/holi-mtp-pm6125-overlay.dts @@ -3,6 +3,7 @@ #include "holi-pm6125-overlay.dtsi" #include "holi-regulators-pm6125.dtsi" +#include "holi-mtp-pm7250b.dtsi" #include "holi-mtp-pm6125.dtsi" / { diff --git a/qcom/holi-mtp-pm6125.dts b/qcom/holi-mtp-pm6125.dts index 80145038a5ec..1cd2ecb4b406 100644 --- a/qcom/holi-mtp-pm6125.dts +++ b/qcom/holi-mtp-pm6125.dts @@ -3,6 +3,7 @@ #include "holi.dtsi" #include "holi-pm6125-overlay.dtsi" #include "holi-regulators-pm6125.dtsi" +#include "holi-mtp-pm7250b.dtsi" #include "holi-mtp-pm6125.dtsi" / { diff --git a/qcom/holi-mtp-pm6125.dtsi b/qcom/holi-mtp-pm6125.dtsi index f83f70ec3187..8dbc3454e44b 100644 --- a/qcom/holi-mtp-pm6125.dtsi +++ b/qcom/holi-mtp-pm6125.dtsi @@ -4,7 +4,6 @@ #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-mtp-pm6125.dtsi" -#include #include "camera/holi-camera-pm6125-overlay.dtsi" &wcd938x_codec { @@ -149,13 +148,6 @@ }; }; - mtp_batterydata: qcom,battery-data { - qcom,batt-id-range-pct = <15>; - #include "qg-batterydata-alium-3600mah.dtsi" - #include "qg-batterydata-atl466271_3300mAh.dtsi" - #include "qg-batterydata-atl436186020H_3780mAh.dtsi" - }; - cx_ipeak_lm: cx_ipeak@3ed000 { #size-cells = <1>; compatible = "qcom,cx-ipeak-v2"; @@ -212,228 +204,4 @@ }; }; -&pm7250b_charger { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, - <&pm7250b_vadc ADC5_USB_IN_I>, - <&pm7250b_vadc ADC5_CHG_TEMP>, - <&pm7250b_vadc ADC5_DIE_TEMP>, - <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, - <&pm7250b_vadc ADC5_SBUx>, - <&pm7250b_vadc ADC5_VPH_PWR>, - <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, - <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, - <&pm7250b_qg PSY_IIO_TEMP>, - <&pm7250b_qg PSY_IIO_CAPACITY>, - <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, - <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, - <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, - <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, - <&pm7250b_qg PSY_IIO_CC_SOC>, - <&pm7250b_qg PSY_IIO_CURRENT_NOW>, - <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL>, - <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, - <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, - <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, - <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, - <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; - io-channel-names = "usb_in_voltage", - "usb_in_current", - "chg_temp", - "die_temp", - "conn_temp", - "sbux_res", - "vph_voltage", - "skin_temp", - "resistance_id", - "voltage_now", - "temp", - "capacity", - "voltage_ocv", - "voltage_avg", - "debug_battery", - "real_capacity", - "cc_soc", - "current_now", - "voltage_max", - "charge_full", - "charge_counter", - "cycle_count", - "charge_full_design", - "time_to_full_now", - "cp_parallel_mode", - "cp_parallel_output_mode", - "cp_min_icl", - "cp_switcher_en", - "cp_enable", - "cp_ilim", - "cp_die_temp"; - qcom,battery-data = <&mtp_batterydata>; - qcom,sec-charger-config = <1>; - qcom,auto-recharge-soc = <98>; - qcom,step-charging-enable; - qcom,sw-jeita-enable; - qcom,charger-temp-max = <800>; - qcom,smb-temp-max = <800>; - qcom,suspend-input-on-debug-batt; - qcom,fcc-stepping-enable; - qcom,fcc-step-delay-ms = <100>; - qcom,fcc-step-size-ua = <100000>; - qcom,smb-internal-pull-kohm = <0>; - qcom,en-skin-therm-mitigation; - qcom,hvdcp3-standalone-config; -}; - -&pm7250b_qg { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, - <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, - <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, - <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, - <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, - <&pm7250b_charger PSY_IIO_CHARGE_DONE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; - io-channel-names = "batt-therm", - "batt-id", - "input_current_limited", - "recharge_soc", - "force_recharge", - "charge_done", - "cp_charging_enabled"; - qcom,battery-data = <&mtp_batterydata>; - qcom,qg-iterm-ma = <150>; - qcom,hold-soc-while-full; - qcom,linearize-soc; - qcom,cl-feedback-on; - qcom,tcss-enable; - qcom,fvss-enable; - qcom,bass-enable; - qcom,use-cp-iin-sns; - qcom,vbatt-cutoff-mv = <3400>; - qcom,vbatt-empty-mv = <3200>; - qcom,vbatt-empty-cold-mv = <3100>; - qcom,vbatt-low-mv = <3500>; - qcom,fvss-vbatt-mv = <3500>; -}; - -&pm7250b_vadc { - smb1390_therm@e { - qcom,scale-fn-type = ; - }; -}; - -&pm7250b_gpios { - smb_stat { - smb_stat_default: smb_stat_default { - pins = "gpio6"; - function = "normal"; - input-enable; - bias-pull-up; - qcom,pull-up-strength = ; - power-source = <0>; - }; - }; -}; - -&qupv3_se10_i2c { - status = "ok"; - #include "smb1394.dtsi" -}; - -&smb1394 { - interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; - interrupt-parent = <&spmi_bus>; - interrupt-names = "smb1394"; - pinctrl-names = "default"; - qcom,enable-toggle-stat; - pinctrl-0 = <&smb_stat_default>; - status = "ok"; -}; - -&smb1394_div2_cp_primary { - io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, - <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, - <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; - io-channel-names = "die_temp", - "real_type", - "adapter_cc_mode", - "pd_current_max", - "input_current_settled", - "smb_en_mode", - "smb_en_reason"; - qcom,parallel-input-mode = <1>; /* USBIN */ - qcom,parallel-output-mode = <2>; /* VBAT */ - status = "ok"; -}; - #include "camera/holi-camera-sensor-pm6125-mtp.dtsi" - -&pm7250b_charger { - dpdm-supply = <&qusb_phy0>; - - smb5_vbus: qcom,smb5-vbus { - regulator-name = "smb5-vbus"; - }; - - smb5_vconn: qcom,smb5-vconn { - regulator-name = "smb5-vconn"; - }; -}; - -&pm7250b_pdphy { - vdd-pdphy-supply = <&L3A>; - vbus-supply = <&smb5_vbus>; - vconn-supply = <&smb5_vconn>; - - #io-channel-cells = <1>; - io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, - <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, - <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, - <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, - <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, - <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_PR_SWAP>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_MODE>, - <&pm7250b_charger PSY_IIO_PE_START>; - io-channel-names = "pd_active", - "typec_cc_orientation", - "connector_type", - "typec_power_role", - "pd_usb_suspend_supported", - "typec_src_rp", - "pd_in_hard_reset", - "pr_current_max", - "pr_swap", - "pd_voltage_min", - "pd_voltage_max", - "real_type", - "typec_mode", - "pe_start"; -}; - -&usb0 { - extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; - - #io-channel-cells = <1>; - io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; - io-channel-names = "chg_type"; -}; diff --git a/qcom/holi-mtp-pm7250b.dtsi b/qcom/holi-mtp-pm7250b.dtsi new file mode 100644 index 000000000000..e93422af635e --- /dev/null +++ b/qcom/holi-mtp-pm7250b.dtsi @@ -0,0 +1,232 @@ +#include +#include +#include "holi-pm7250b.dtsi" + +&soc { + mtp_batterydata: qcom,battery-data { + qcom,batt-id-range-pct = <15>; + #include "qg-batterydata-alium-3600mah.dtsi" + #include "qg-batterydata-atl466271_3300mAh.dtsi" + #include "qg-batterydata-atl436186020H_3780mAh.dtsi" + }; +}; + +&pm7250b_charger { + status = "ok"; + #io-channel-cells = <1>; + io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, + <&pm7250b_vadc ADC5_USB_IN_I>, + <&pm7250b_vadc ADC5_CHG_TEMP>, + <&pm7250b_vadc ADC5_DIE_TEMP>, + <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, + <&pm7250b_vadc ADC5_SBUx>, + <&pm7250b_vadc ADC5_VPH_PWR>, + <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, + <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, + <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, + <&pm7250b_qg PSY_IIO_TEMP>, + <&pm7250b_qg PSY_IIO_CAPACITY>, + <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, + <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, + <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, + <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, + <&pm7250b_qg PSY_IIO_CC_SOC>, + <&pm7250b_qg PSY_IIO_CURRENT_NOW>, + <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, + <&pm7250b_qg PSY_IIO_CHARGE_FULL>, + <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, + <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, + <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, + <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, + <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, + <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, + <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, + <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, + <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; + io-channel-names = "usb_in_voltage", + "usb_in_current", + "chg_temp", + "die_temp", + "conn_temp", + "sbux_res", + "vph_voltage", + "skin_temp", + "resistance_id", + "voltage_now", + "temp", + "capacity", + "voltage_ocv", + "voltage_avg", + "debug_battery", + "real_capacity", + "cc_soc", + "current_now", + "voltage_max", + "charge_full", + "charge_counter", + "cycle_count", + "charge_full_design", + "time_to_full_now", + "cp_parallel_mode", + "cp_parallel_output_mode", + "cp_min_icl", + "cp_switcher_en", + "cp_enable", + "cp_ilim", + "cp_die_temp"; + qcom,battery-data = <&mtp_batterydata>; + qcom,sec-charger-config = <1>; + qcom,auto-recharge-soc = <98>; + qcom,step-charging-enable; + qcom,sw-jeita-enable; + qcom,charger-temp-max = <800>; + qcom,smb-temp-max = <800>; + qcom,suspend-input-on-debug-batt; + qcom,fcc-stepping-enable; + qcom,fcc-step-delay-ms = <100>; + qcom,fcc-step-size-ua = <100000>; + qcom,smb-internal-pull-kohm = <0>; + qcom,en-skin-therm-mitigation; + qcom,hvdcp3-standalone-config; +}; + +&pm7250b_qg { + status = "ok"; + #io-channel-cells = <1>; + io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, + <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, + <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, + <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, + <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, + <&pm7250b_charger PSY_IIO_CHARGE_DONE>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; + io-channel-names = "batt-therm", + "batt-id", + "input_current_limited", + "recharge_soc", + "force_recharge", + "charge_done", + "cp_charging_enabled"; + qcom,battery-data = <&mtp_batterydata>; + qcom,qg-iterm-ma = <150>; + qcom,hold-soc-while-full; + qcom,linearize-soc; + qcom,cl-feedback-on; + qcom,tcss-enable; + qcom,fvss-enable; + qcom,fvss-vbatt-mv = <3300>; + qcom,bass-enable; + qcom,use-cp-iin-sns; +}; + +&pm7250b_vadc { + smb1390_therm@e { + qcom,scale-fn-type = ; + }; +}; + +&pm7250b_gpios { + smb_stat { + smb_stat_default: smb_stat_default { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + qcom,pull-up-strength = ; + power-source = <0>; + }; + }; +}; + +&qupv3_se10_i2c { + status = "ok"; + #include "smb1394.dtsi" +}; + +&smb1394 { + interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&spmi_bus>; + interrupt-names = "smb1394"; + pinctrl-names = "default"; + qcom,enable-toggle-stat; + pinctrl-0 = <&smb_stat_default>; + status = "ok"; +}; + +&smb1394_div2_cp_primary { + io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, + <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, + <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, + <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, + <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, + <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, + <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; + io-channel-names = "die_temp", + "real_type", + "adapter_cc_mode", + "pd_current_max", + "input_current_settled", + "smb_en_mode", + "smb_en_reason"; + qcom,parallel-input-mode = <1>; /* USBIN */ + qcom,parallel-output-mode = <2>; /* VBAT */ + status = "ok"; +}; + +&pm7250b_charger { + dpdm-supply = <&qusb_phy0>; + + smb5_vbus: qcom,smb5-vbus { + regulator-name = "smb5-vbus"; + }; + + smb5_vconn: qcom,smb5-vconn { + regulator-name = "smb5-vconn"; + }; +}; + +&pm7250b_pdphy { + vdd-pdphy-supply = <&L3A>; + vbus-supply = <&smb5_vbus>; + vconn-supply = <&smb5_vconn>; + + #io-channel-cells = <1>; + io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, + <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, + <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, + <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, + <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, + <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, + <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, + <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, + <&pm7250b_charger PSY_IIO_PR_SWAP>, + <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, + <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, + <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, + <&pm7250b_charger PSY_IIO_TYPEC_MODE>, + <&pm7250b_charger PSY_IIO_PE_START>; + io-channel-names = "pd_active", + "typec_cc_orientation", + "connector_type", + "typec_power_role", + "pd_usb_suspend_supported", + "typec_src_rp", + "pd_in_hard_reset", + "pr_current_max", + "pr_swap", + "pd_voltage_min", + "pd_voltage_max", + "real_type", + "typec_mode", + "pe_start"; +}; + +&usb0 { + extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; + + #io-channel-cells = <1>; + io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; + io-channel-names = "chg_type"; +}; diff --git a/qcom/holi-mtp-usbc-pm6125.dtsi b/qcom/holi-mtp-usbc-pm6125.dtsi index f63bbc3aab21..78268f0c4837 100644 --- a/qcom/holi-mtp-usbc-pm6125.dtsi +++ b/qcom/holi-mtp-usbc-pm6125.dtsi @@ -1,6 +1,7 @@ #include "holi-audio-overlay.dtsi" #include #include +#include "holi-pm7250b.dtsi" #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-mtp-pm6125.dtsi" diff --git a/qcom/holi-pm6125-overlay.dtsi b/qcom/holi-pm6125-overlay.dtsi index 23fabe466f75..c16a7a01358d 100644 --- a/qcom/holi-pm6125-overlay.dtsi +++ b/qcom/holi-pm6125-overlay.dtsi @@ -67,3 +67,15 @@ vdd_lpi_cx-supply = <&L1A_LEVEL>; vdd_lpi_mx-supply = <&L17A_LEVEL>; }; + +&qusb_phy0 { + vdd-supply = <&L7A>; + vdda18-supply = <&L10A>; + vdda33-supply = <&L7E>; + refgen-supply = <&L4A>; +}; + +&usb_qmp_dp_phy { + vdd-supply = <&L18A>; + core-supply = <&L4A>; +}; diff --git a/qcom/holi-pm7250b.dtsi b/qcom/holi-pm7250b.dtsi index 71fe2b7f1a8a..0ac745bb9032 100644 --- a/qcom/holi-pm7250b.dtsi +++ b/qcom/holi-pm7250b.dtsi @@ -1 +1,150 @@ -/dts-v1/; +#include +#include "pm7250b.dtsi" + +&pm7250b_vadc { + charger_skin_therm { + reg = ; + label = "charger_skin_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + conn_therm { + reg = ; + label = "conn_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pm7250b_adc_tm { + io-channels = <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, + <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>; + + /* Channel nodes */ + charger_skin_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + conn_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&thermal_zones { + chg-skin-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + conn-therm-usr { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM3_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + +&pm7250b_charger { + #cooling-cells = <2>; +}; + +&thermal_zones { + socd { + cooling-maps { + socd_cpu6 { + trip = <&socd_trip>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + socd_cpu7 { + trip = <&socd_trip>; + cooling-device = <&cpu7_isolate 1 1>; + }; + }; + }; + + pm7250b_tz { + cooling-maps { + battery_cdev0 { + trip = <&pm7250b_trip0>; + cooling-device = + <&pm7250b_charger (THERMAL_MAX_LIMIT-1) + (THERMAL_MAX_LIMIT-1)>; + }; + + battery_cdev1 { + trip = <&pm7250b_trip1>; + cooling-device = + <&pm7250b_charger THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + }; + }; + + pm7250b-bcl-lvl0 { + cooling-maps { + lbat0_cpu6 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + lbat0_cpu7 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cpu7_isolate 1 1>; + }; + }; + }; + + pm7250b-bcl-lvl1 { + cooling-maps { + lbat1_cpu6 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + lbat1_cpu7 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cpu7_isolate 1 1>; + }; + }; + }; + + pm7250b-bcl-lvl2 { + cooling-maps { + lbat2_cpu6 { + trip = <&b_bcl_lvl2>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + lbat2_cpu7 { + trip = <&b_bcl_lvl2>; + cooling-device = <&cpu7_isolate 1 1>; + }; + }; + }; +}; diff --git a/qcom/holi-pmic-overlay-pm6125.dtsi b/qcom/holi-pmic-overlay-pm6125.dtsi index e9999ade5618..78a61af2db8f 100644 --- a/qcom/holi-pmic-overlay-pm6125.dtsi +++ b/qcom/holi-pmic-overlay-pm6125.dtsi @@ -1,8 +1,6 @@ #include #include -#include -#include "pm7250b.dtsi" #include "pm6125.dtsi" #include "pmr735a.dtsi" @@ -22,42 +20,6 @@ }; }; -&pm7250b_vadc { - charger_skin_therm { - reg = ; - label = "charger_skin_therm"; - qcom,ratiometric; - qcom,hw-settle-time = <200>; - qcom,pre-scaling = <1 1>; - }; - - conn_therm { - reg = ; - label = "conn_therm"; - qcom,ratiometric; - qcom,hw-settle-time = <200>; - qcom,pre-scaling = <1 1>; - }; -}; - -&pm7250b_adc_tm { - io-channels = <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>; - - /* Channel nodes */ - charger_skin_therm { - reg = ; - qcom,ratiometric; - qcom,hw-settle-time = <200>; - }; - - conn_therm { - reg = ; - qcom,ratiometric; - qcom,hw-settle-time = <200>; - }; -}; - &pm6125_vadc { pinctrl-names = "default"; pinctrl-0 = < @@ -256,36 +218,6 @@ }; &thermal_zones { - chg-skin-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM1_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - conn-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM3_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>; @@ -507,14 +439,3 @@ }; }; -&qusb_phy0 { - vdd-supply = <&L7A>; - vdda18-supply = <&L10A>; - vdda33-supply = <&L7E>; - refgen-supply = <&L4A>; -}; - -&usb_qmp_dp_phy { - vdd-supply = <&L18A>; - core-supply = <&L4A>; -}; diff --git a/qcom/holi-qrd-pm6125-nopmi-overlay.dts b/qcom/holi-qrd-pm6125-nopmi-overlay.dts new file mode 100644 index 000000000000..dbe9c8157115 --- /dev/null +++ b/qcom/holi-qrd-pm6125-nopmi-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "holi-regulators-pm6125.dtsi" +#include "holi-qrd-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi QRD PM6125 NOPMI"; + compatible = "qcom,holi-qrd", "qcom,holi", "qcom,qrd"; + qcom,msm-id = <454 0x10000>, <472 0x10000>; + qcom,board-id = <0xb 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; +}; diff --git a/qcom/holi-qrd-pm6125-nopmi.dts b/qcom/holi-qrd-pm6125-nopmi.dts new file mode 100644 index 000000000000..1a5cfb08078a --- /dev/null +++ b/qcom/holi-qrd-pm6125-nopmi.dts @@ -0,0 +1,14 @@ +/dts-v1/; + +#include "holi.dtsi" +#include "holi-pm6125-overlay.dtsi" +#include "holi-regulators-pm6125.dtsi" +#include "holi-qrd-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi QRD PM6125 NOPMI"; + compatible = "qcom,holi-qrd", "qcom,holi", "qcom,qrd"; + qcom,board-id = <0xb 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x0 0x0>; +}; diff --git a/qcom/holi-qrd-pm6125-overlay.dts b/qcom/holi-qrd-pm6125-overlay.dts index afdb8ec9f9f0..892b4b9cd0f3 100644 --- a/qcom/holi-qrd-pm6125-overlay.dts +++ b/qcom/holi-qrd-pm6125-overlay.dts @@ -3,6 +3,7 @@ #include "holi-pm6125-overlay.dtsi" #include "holi-regulators-pm6125.dtsi" +#include "holi-qrd-pm7250b.dtsi" #include "holi-qrd-pm6125.dtsi" / { diff --git a/qcom/holi-qrd-pm6125.dts b/qcom/holi-qrd-pm6125.dts index 35a00d66eb1c..35b34e7636fa 100644 --- a/qcom/holi-qrd-pm6125.dts +++ b/qcom/holi-qrd-pm6125.dts @@ -3,6 +3,7 @@ #include "holi.dtsi" #include "holi-pm6125-overlay.dtsi" #include "holi-regulators-pm6125.dtsi" +#include "holi-qrd-pm7250b.dtsi" #include "holi-qrd-pm6125.dtsi" / { diff --git a/qcom/holi-qrd-pm6125.dtsi b/qcom/holi-qrd-pm6125.dtsi index d53f5f26f3a2..0bd1d18cc474 100644 --- a/qcom/holi-qrd-pm6125.dtsi +++ b/qcom/holi-qrd-pm6125.dtsi @@ -4,7 +4,6 @@ #include "holi-pmic-overlay-pm6125.dtsi" #include "holi-thermal-overlay-pm6125.dtsi" #include "display/holi-sde-display-qrd-pm6125.dtsi" -#include #include "camera/holi-camera-pm6125-overlay.dtsi" &wcd938x_codec { @@ -217,12 +216,6 @@ }; }; - qrd_batterydata: qcom,battery-data { - qcom,batt-id-range-pct = <15>; - #include "qg-batterydata-atl436186020H_3780mAh.dtsi" - #include "qg-batterydata-atl466271_3300mAh.dtsi" - }; - cx_ipeak_lm: cx_ipeak@3ed000 { #size-cells = <1>; compatible = "qcom,cx-ipeak-v2"; @@ -233,232 +226,6 @@ #include "camera/holi-camera-sensor-pm6125-mtp.dtsi" -&pm7250b_charger { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, - <&pm7250b_vadc ADC5_USB_IN_I>, - <&pm7250b_vadc ADC5_CHG_TEMP>, - <&pm7250b_vadc ADC5_DIE_TEMP>, - <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, - <&pm7250b_vadc ADC5_SBUx>, - <&pm7250b_vadc ADC5_VPH_PWR>, - <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, - <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, - <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, - <&pm7250b_qg PSY_IIO_TEMP>, - <&pm7250b_qg PSY_IIO_CAPACITY>, - <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, - <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, - <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, - <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, - <&pm7250b_qg PSY_IIO_CC_SOC>, - <&pm7250b_qg PSY_IIO_CURRENT_NOW>, - <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL>, - <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, - <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, - <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, - <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, - <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, - <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, - <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; - io-channel-names = "usb_in_voltage", - "usb_in_current", - "chg_temp", - "die_temp", - "conn_temp", - "sbux_res", - "vph_voltage", - "skin_temp", - "resistance_id", - "voltage_now", - "temp", - "capacity", - "voltage_ocv", - "voltage_avg", - "debug_battery", - "real_capacity", - "cc_soc", - "current_now", - "voltage_max", - "charge_full", - "charge_counter", - "cycle_count", - "charge_full_design", - "time_to_full_now", - "cp_parallel_mode", - "cp_parallel_output_mode", - "cp_min_icl", - "cp_switcher_en", - "cp_enable", - "cp_ilim", - "cp_die_temp"; - qcom,battery-data = <&qrd_batterydata>; - qcom,sec-charger-config = <1>; - qcom,auto-recharge-soc = <98>; - qcom,step-charging-enable; - qcom,sw-jeita-enable; - qcom,charger-temp-max = <800>; - qcom,smb-temp-max = <800>; - qcom,suspend-input-on-debug-batt; - qcom,fcc-stepping-enable; - qcom,fcc-step-delay-ms = <100>; - qcom,fcc-step-size-ua = <100000>; - qcom,smb-internal-pull-kohm = <0>; - qcom,en-skin-therm-mitigation; - qcom,thermal-mitigation = <10000000 9500000 9000000 8500000 8000000 - 7500000 7000000 6500000 6000000 5500000 5000000 4500000 - 4000000 3500000 3000000 2500000 2000000 1500000 1000000 - 500000>; -}; - -&pm7250b_qg { - status = "ok"; - #io-channel-cells = <1>; - io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, - <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, - <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, - <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, - <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, - <&pm7250b_charger PSY_IIO_CHARGE_DONE>, - <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; - io-channel-names = "batt-therm", - "batt-id", - "input_current_limited", - "recharge_soc", - "force_recharge", - "charge_done", - "cp_charging_enabled"; - qcom,qg-iterm-ma = <150>; - qcom,hold-soc-while-full; - qcom,linearize-soc; - qcom,cl-feedback-on; - qcom,tcss-enable; - qcom,fvss-enable; - qcom,bass-enable; - qcom,use-cp-iin-sns; - qcom,vbatt-cutoff-mv = <3400>; - qcom,vbatt-empty-mv = <3200>; - qcom,vbatt-empty-cold-mv = <3100>; - qcom,vbatt-low-mv = <3500>; - qcom,fvss-vbatt-mv = <3500>; -}; - -&pm7250b_charger { - dpdm-supply = <&qusb_phy0>; - - smb5_vbus: qcom,smb5-vbus { - regulator-name = "smb5-vbus"; - }; - - smb5_vconn: qcom,smb5-vconn { - regulator-name = "smb5-vconn"; - }; -}; - -&pm7250b_pdphy { - vdd-pdphy-supply = <&L3A>; - vbus-supply = <&smb5_vbus>; - vconn-supply = <&smb5_vconn>; - - #io-channel-cells = <1>; - io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, - <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, - <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, - <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, - <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, - <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_PR_SWAP>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, - <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_TYPEC_MODE>, - <&pm7250b_charger PSY_IIO_PE_START>; - io-channel-names = "pd_active", - "typec_cc_orientation", - "connector_type", - "typec_power_role", - "pd_usb_suspend_supported", - "typec_src_rp", - "pd_in_hard_reset", - "pr_current_max", - "pr_swap", - "pd_voltage_min", - "pd_voltage_max", - "real_type", - "typec_mode", - "pe_start"; -}; - -&usb0 { - extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; - - #io-channel-cells = <1>; - io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; - io-channel-names = "chg_type"; -}; - -&pm7250b_vadc { - smb1390_therm@e { - qcom,scale-fn-type = ; - }; -}; - -&pm7250b_gpios { - smb_stat { - smb_stat_default: smb_stat_default { - pins = "gpio6"; - function = "normal"; - input-enable; - bias-pull-up; - qcom,pull-up-strength = ; - power-source = <0>; - }; - }; -}; - -&qupv3_se10_i2c { - status = "ok"; - #include "smb1394.dtsi" -}; - -&smb1394 { - interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; - interrupt-parent = <&spmi_bus>; - interrupt-names = "smb1394"; - pinctrl-names = "default"; - qcom,enable-toggle-stat; - pinctrl-0 = <&smb_stat_default>; - status = "ok"; -}; - -&smb1394_div2_cp_primary { - io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, - <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, - <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, - <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, - <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, - <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, - <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; - io-channel-names = "die_temp", - "real_type", - "adapter_cc_mode", - "pd_current_max", - "input_current_settled", - "smb_en_mode", - "smb_en_reason"; - qcom,parallel-input-mode = <1>; /* USBIN */ - qcom,parallel-output-mode = <2>; /* VBAT */ - status = "ok"; -}; - &thermal_zones { quiet-therm-step { polling-delay-passive = <2000>; @@ -575,31 +342,6 @@ trip = <&cx_trip>; cooling-device = <&modem_skin 3 3>; }; - - battery-cdev0 { - trip = <&battery_trip0>; - cooling-device = <&pm7250b_charger 6 6>; - }; - - battery-cdev1 { - trip = <&battery_trip1>; - cooling-device = <&pm7250b_charger 10 10>; - }; - - battery-cdev2 { - trip = <&battery_trip2>; - cooling-device = <&pm7250b_charger 14 14>; - }; - - battery-cdev3 { - trip = <&battery_trip3>; - cooling-device = <&pm7250b_charger 16 16>; - }; - - battery-cdev4 { - trip = <&battery_trip4>; - cooling-device = <&pm7250b_charger 18 18>; - }; }; }; diff --git a/qcom/holi-qrd-pm7250b.dtsi b/qcom/holi-qrd-pm7250b.dtsi new file mode 100644 index 000000000000..7c1b6c9e66e5 --- /dev/null +++ b/qcom/holi-qrd-pm7250b.dtsi @@ -0,0 +1,264 @@ +#include +#include +#include "holi-pm7250b.dtsi" + +&soc { + qrd_batterydata: qcom,battery-data { + qcom,batt-id-range-pct = <15>; + #include "qg-batterydata-atl436186020H_3780mAh.dtsi" + #include "qg-batterydata-atl466271_3300mAh.dtsi" + }; +}; + +&pm7250b_charger { + status = "ok"; + #io-channel-cells = <1>; + io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>, + <&pm7250b_vadc ADC5_USB_IN_I>, + <&pm7250b_vadc ADC5_CHG_TEMP>, + <&pm7250b_vadc ADC5_DIE_TEMP>, + <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>, + <&pm7250b_vadc ADC5_SBUx>, + <&pm7250b_vadc ADC5_VPH_PWR>, + <&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>, + <&pm7250b_qg PSY_IIO_RESISTANCE_ID>, + <&pm7250b_qg PSY_IIO_VOLTAGE_NOW>, + <&pm7250b_qg PSY_IIO_TEMP>, + <&pm7250b_qg PSY_IIO_CAPACITY>, + <&pm7250b_qg PSY_IIO_VOLTAGE_OCV>, + <&pm7250b_qg PSY_IIO_VOLTAGE_AVG>, + <&pm7250b_qg PSY_IIO_DEBUG_BATTERY>, + <&pm7250b_qg PSY_IIO_REAL_CAPACITY>, + <&pm7250b_qg PSY_IIO_CC_SOC>, + <&pm7250b_qg PSY_IIO_CURRENT_NOW>, + <&pm7250b_qg PSY_IIO_VOLTAGE_MAX>, + <&pm7250b_qg PSY_IIO_CHARGE_FULL>, + <&pm7250b_qg PSY_IIO_CHARGE_COUNTER>, + <&pm7250b_qg PSY_IIO_CYCLE_COUNT>, + <&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>, + <&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>, + <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_MODE>, + <&smb1394_div2_cp_primary PSY_IIO_PARALLEL_OUTPUT_MODE>, + <&smb1394_div2_cp_primary PSY_IIO_MIN_ICL>, + <&smb1394_div2_cp_primary PSY_IIO_CP_SWITCHER_EN>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ILIM>, + <&smb1394_div2_cp_primary PSY_IIO_CP_DIE_TEMP>; + io-channel-names = "usb_in_voltage", + "usb_in_current", + "chg_temp", + "die_temp", + "conn_temp", + "sbux_res", + "vph_voltage", + "skin_temp", + "resistance_id", + "voltage_now", + "temp", + "capacity", + "voltage_ocv", + "voltage_avg", + "debug_battery", + "real_capacity", + "cc_soc", + "current_now", + "voltage_max", + "charge_full", + "charge_counter", + "cycle_count", + "charge_full_design", + "time_to_full_now", + "cp_parallel_mode", + "cp_parallel_output_mode", + "cp_min_icl", + "cp_switcher_en", + "cp_enable", + "cp_ilim", + "cp_die_temp"; + qcom,battery-data = <&qrd_batterydata>; + qcom,sec-charger-config = <1>; + qcom,auto-recharge-soc = <98>; + qcom,step-charging-enable; + qcom,sw-jeita-enable; + qcom,charger-temp-max = <800>; + qcom,smb-temp-max = <800>; + qcom,suspend-input-on-debug-batt; + qcom,fcc-stepping-enable; + qcom,fcc-step-delay-ms = <100>; + qcom,fcc-step-size-ua = <100000>; + qcom,smb-internal-pull-kohm = <0>; + qcom,en-skin-therm-mitigation; + qcom,thermal-mitigation = <10000000 9500000 9000000 8500000 8000000 + 7500000 7000000 6500000 6000000 5500000 5000000 4500000 + 4000000 3500000 3000000 2500000 2000000 1500000 1000000 + 500000>; +}; + +&pm7250b_qg { + status = "ok"; + #io-channel-cells = <1>; + io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>, + <&pm7250b_vadc ADC5_BAT_ID_100K_PU>, + <&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>, + <&pm7250b_charger PSY_IIO_RECHARGE_SOC>, + <&pm7250b_charger PSY_IIO_FORCE_RECHARGE>, + <&pm7250b_charger PSY_IIO_CHARGE_DONE>, + <&smb1394_div2_cp_primary PSY_IIO_CP_ENABLE>; + io-channel-names = "batt-therm", + "batt-id", + "input_current_limited", + "recharge_soc", + "force_recharge", + "charge_done", + "cp_charging_enabled"; + qcom,qg-iterm-ma = <150>; + qcom,hold-soc-while-full; + qcom,linearize-soc; + qcom,cl-feedback-on; + qcom,tcss-enable; + qcom,fvss-enable; + qcom,fvss-vbatt-mv = <3300>; + qcom,bass-enable; + qcom,use-cp-iin-sns; +}; + +&pm7250b_charger { + dpdm-supply = <&qusb_phy0>; + + smb5_vbus: qcom,smb5-vbus { + regulator-name = "smb5-vbus"; + }; + + smb5_vconn: qcom,smb5-vconn { + regulator-name = "smb5-vconn"; + }; +}; + +&pm7250b_pdphy { + vdd-pdphy-supply = <&L3A>; + vbus-supply = <&smb5_vbus>; + vconn-supply = <&smb5_vconn>; + + #io-channel-cells = <1>; + io-channels = <&pm7250b_charger PSY_IIO_PD_ACTIVE>, + <&pm7250b_charger PSY_IIO_TYPEC_CC_ORIENTATION>, + <&pm7250b_charger PSY_IIO_CONNECTOR_TYPE>, + <&pm7250b_charger PSY_IIO_TYPEC_POWER_ROLE>, + <&pm7250b_charger PSY_IIO_PD_USB_SUSPEND_SUPPORTED>, + <&pm7250b_charger PSY_IIO_TYPEC_SRC_RP>, + <&pm7250b_charger PSY_IIO_PD_IN_HARD_RESET>, + <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, + <&pm7250b_charger PSY_IIO_PR_SWAP>, + <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MIN>, + <&pm7250b_charger PSY_IIO_PD_VOLTAGE_MAX>, + <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, + <&pm7250b_charger PSY_IIO_TYPEC_MODE>, + <&pm7250b_charger PSY_IIO_PE_START>; + io-channel-names = "pd_active", + "typec_cc_orientation", + "connector_type", + "typec_power_role", + "pd_usb_suspend_supported", + "typec_src_rp", + "pd_in_hard_reset", + "pr_current_max", + "pr_swap", + "pd_voltage_min", + "pd_voltage_max", + "real_type", + "typec_mode", + "pe_start"; +}; + +&usb0 { + extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; + + #io-channel-cells = <1>; + io-channels= <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>; + io-channel-names = "chg_type"; +}; + +&pm7250b_vadc { + smb1390_therm@e { + qcom,scale-fn-type = ; + }; +}; + +&pm7250b_gpios { + smb_stat { + smb_stat_default: smb_stat_default { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + qcom,pull-up-strength = ; + power-source = <0>; + }; + }; +}; + +&qupv3_se10_i2c { + status = "ok"; + #include "smb1394.dtsi" +}; + +&smb1394 { + interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&spmi_bus>; + interrupt-names = "smb1394"; + pinctrl-names = "default"; + qcom,enable-toggle-stat; + pinctrl-0 = <&smb_stat_default>; + status = "ok"; +}; + +&smb1394_div2_cp_primary { + io-channels = <&pm7250b_vadc ADC5_AMUX_THM2>, + <&pm7250b_charger PSY_IIO_USB_REAL_TYPE>, + <&pm7250b_charger PSY_IIO_ADAPTER_CC_MODE>, + <&pm7250b_charger PSY_IIO_PD_CURRENT_MAX>, + <&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>, + <&pm7250b_charger PSY_IIO_SMB_EN_MODE>, + <&pm7250b_charger PSY_IIO_SMB_EN_REASON>; + io-channel-names = "die_temp", + "real_type", + "adapter_cc_mode", + "pd_current_max", + "input_current_settled", + "smb_en_mode", + "smb_en_reason"; + qcom,parallel-input-mode = <1>; /* USBIN */ + qcom,parallel-output-mode = <2>; /* VBAT */ + status = "ok"; +}; + +&thermal_zones { + quiet-therm-step { + cooling-maps { + battery-cdev0 { + trip = <&battery_trip0>; + cooling-device = <&pm7250b_charger 6 6>; + }; + + battery-cdev1 { + trip = <&battery_trip1>; + cooling-device = <&pm7250b_charger 10 10>; + }; + + battery-cdev2 { + trip = <&battery_trip2>; + cooling-device = <&pm7250b_charger 14 14>; + }; + + battery-cdev3 { + trip = <&battery_trip3>; + cooling-device = <&pm7250b_charger 16 16>; + }; + + battery-cdev4 { + trip = <&battery_trip4>; + cooling-device = <&pm7250b_charger 18 18>; + }; + }; + }; +}; diff --git a/qcom/holi-thermal-overlay-pm6125.dtsi b/qcom/holi-thermal-overlay-pm6125.dtsi index 7dd3277d4899..d69e8756cd0e 100644 --- a/qcom/holi-thermal-overlay-pm6125.dtsi +++ b/qcom/holi-thermal-overlay-pm6125.dtsi @@ -4,43 +4,7 @@ #cooling-cells = <2>; }; -&pm7250b_charger { - #cooling-cells = <2>; -}; - &thermal_zones { - socd { - cooling-maps { - socd_cpu6 { - trip = <&socd_trip>; - cooling-device = <&cpu6_isolate 1 1>; - }; - - socd_cpu7 { - trip = <&socd_trip>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; - - pm7250b_tz { - cooling-maps { - battery_cdev0 { - trip = <&pm7250b_trip0>; - cooling-device = - <&pm7250b_charger (THERMAL_MAX_LIMIT-1) - (THERMAL_MAX_LIMIT-1)>; - }; - - battery_cdev1 { - trip = <&pm7250b_trip1>; - cooling-device = - <&pm7250b_charger THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - }; - }; - pm6125_tz { cooling-maps { trip0_cpu6 { @@ -89,46 +53,4 @@ }; }; }; - - pm7250b-bcl-lvl0 { - cooling-maps { - lbat0_cpu6 { - trip = <&b_bcl_lvl0>; - cooling-device = <&cpu6_isolate 1 1>; - }; - - lbat0_cpu7 { - trip = <&b_bcl_lvl0>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; - - pm7250b-bcl-lvl1 { - cooling-maps { - lbat1_cpu6 { - trip = <&b_bcl_lvl1>; - cooling-device = <&cpu6_isolate 1 1>; - }; - - lbat1_cpu7 { - trip = <&b_bcl_lvl1>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; - - pm7250b-bcl-lvl2 { - cooling-maps { - lbat2_cpu6 { - trip = <&b_bcl_lvl2>; - cooling-device = <&cpu6_isolate 1 1>; - }; - - lbat2_cpu7 { - trip = <&b_bcl_lvl2>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; };