diff --git a/qcom/Makefile b/qcom/Makefile index 93c4dd1b..d7af06c4 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -120,7 +120,14 @@ HOLI_BOARDS += \ holi-cdp-overlay.dtbo \ holi-cdp-lcd-overlay.dtbo \ holi-atp-overlay.dtbo \ - holi-mtp-usbc-overlay.dtbo + holi-mtp-usbc-overlay.dtbo \ + holi-mtp-pm6125-overlay.dtbo \ + holi-cdp-pm6125-overlay.dtbo \ + holi-mtp-usbc-pm6125-overlay.dtbo \ + holi-mtp-pm6125-nopmi-overlay.dtbo \ + holi-qrd-pm6125-overlay.dtbo \ + holi-cdp-lcd-pm6125-overlay.dtbo \ + holi-qrd-pm6125-nopmi-overlay.dtbo holi-dtb-$(CONFIG_ARCH_HOLI) += \ $(call add-overlays, $(HOLI_BOARDS),$(HOLI_BASE_DTB)) diff --git a/qcom/blair-atp.dtsi b/qcom/blair-atp.dtsi index 9a58f342..8a70e4cf 100644 --- a/qcom/blair-atp.dtsi +++ b/qcom/blair-atp.dtsi @@ -515,6 +515,10 @@ }; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; + &usb0 { extcon = <&pm7250b_pdphy>, <&pm7250b_charger>, <&eud>; #io-channel-cells = <1>; @@ -526,3 +530,35 @@ }; }; + +&dispcc { + vdd_cx-supply = <&S1E_LEVEL>; /* VDD_CX_LEVEL */ +}; + +&gpucc { + vdd_cx-supply = <&S1E_LEVEL>; /* VDD_CX_LEVEL */ + vdd_mx-supply = <&S5A_LEVEL>; /* VDD_MX_LEVEL */ + vdd_gx-supply = <&S3A_LEVEL>; /* VDD_GFX_LEVEL */ +}; + +&gpu_cx_gdsc { + parent-supply = <&S1E_LEVEL>; /* VDD_CX_LEVEL */ +}; + +&gpu_gx_gdsc { + parent-supply = <&S3A_LEVEL>; /* VDD_GFX_LEVEL */ +}; + +&gcc { + vdd_cx-supply = <&S1E_LEVEL>; /* VDD_CX_LEVEL */ + vdd_mx-supply = <&S5A_LEVEL>; /* VDD_MX_LEVEL */ +}; + +&msm_gpu { + vdd-parent-supply = <&S3A_LEVEL>; /* VDD_GFX_LEVEL */ +}; + +&refgen { + compatible = "qcom,refgen-kona-regulator"; + reg = <0x162F000 0x84>; +}; diff --git a/qcom/blair-mtp-overlay.dts b/qcom/blair-mtp-overlay.dts index 14f356b5..4dbe0d8a 100644 --- a/qcom/blair-mtp-overlay.dts +++ b/qcom/blair-mtp-overlay.dts @@ -13,3 +13,6 @@ qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-mtp-usbc-overlay.dts b/qcom/blair-mtp-usbc-overlay.dts index 514686ba..fb13eb59 100644 --- a/qcom/blair-mtp-usbc-overlay.dts +++ b/qcom/blair-mtp-usbc-overlay.dts @@ -11,3 +11,6 @@ qcom,board-id = <8 1>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blair-qrd-overlay.dts b/qcom/blair-qrd-overlay.dts index 4a0d331b..f8a57fbf 100644 --- a/qcom/blair-qrd-overlay.dts +++ b/qcom/blair-qrd-overlay.dts @@ -13,3 +13,6 @@ qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; }; +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blairp-mtp-overlay.dts b/qcom/blairp-mtp-overlay.dts index 6a117bed..37651c24 100644 --- a/qcom/blairp-mtp-overlay.dts +++ b/qcom/blairp-mtp-overlay.dts @@ -2,10 +2,17 @@ /plugin/; #include "blairp-mtp.dtsi" +#include "holi-mtp-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blairp MTP"; compatible = "qcom,blairp-mtp", "qcom,blairp", "qcom,mtp"; qcom,msm-id = <565 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/blairp-mtp-usbc-overlay.dts b/qcom/blairp-mtp-usbc-overlay.dts index ae88896d..337975b5 100644 --- a/qcom/blairp-mtp-usbc-overlay.dts +++ b/qcom/blairp-mtp-usbc-overlay.dts @@ -2,6 +2,7 @@ /plugin/; #include "blairp-mtp-usbc.dtsi" +#include "holi-mtp-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blairp MTP USBC audio"; @@ -9,3 +10,7 @@ qcom,msm-id = <565 0x10000>; qcom,board-id = <8 1>; }; + +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; diff --git a/qcom/blairp-qrd-overlay.dts b/qcom/blairp-qrd-overlay.dts index 9b2fe22a..40c9baef 100644 --- a/qcom/blairp-qrd-overlay.dts +++ b/qcom/blairp-qrd-overlay.dts @@ -2,10 +2,17 @@ /plugin/; #include "blairp-qrd.dtsi" +#include "holi-qrd-pm7250b.dtsi" / { model = "Qualcomm Technologies, Inc. Blairp QRD"; compatible = "qcom,blairp-qrd", "qcom,blairp", "qcom,qrd"; qcom,msm-id = <565 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/holi-atp-pm7250b.dtsi b/qcom/holi-atp-pm7250b.dtsi index dfb6cf89..f0824237 100644 --- a/qcom/holi-atp-pm7250b.dtsi +++ b/qcom/holi-atp-pm7250b.dtsi @@ -122,7 +122,7 @@ }; &pm7250b_charger { - dpdm-supply = <&usb2_phy0>; + dpdm-supply = <&qusb2_phy0>; smb5_vbus: qcom,smb5-vbus { regulator-name = "smb5-vbus"; diff --git a/qcom/holi-atp.dtsi b/qcom/holi-atp.dtsi index 3f2237c5..ae960ad6 100644 --- a/qcom/holi-atp.dtsi +++ b/qcom/holi-atp.dtsi @@ -1,4 +1,5 @@ #include +#include "holi-atp-pm7250b.dtsi" &soc { diff --git a/qcom/holi-cdp-lcd-pm6125-overlay.dts b/qcom/holi-cdp-lcd-pm6125-overlay.dts new file mode 100644 index 00000000..4fad0446 --- /dev/null +++ b/qcom/holi-cdp-lcd-pm6125-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-regulators-pm6125.dtsi" +#include "holi-cdp-lcd-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi CDP-LCD PM6125 attached"; + compatible = "qcom,holi-cdp", "qcom,holi", "qcom,cdp"; + qcom,msm-id = <454 0x10000>, <472 0x10000>; + qcom,board-id = <1 1>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; +}; diff --git a/qcom/holi-cdp-lcd-pm6125.dtsi b/qcom/holi-cdp-lcd-pm6125.dtsi new file mode 100644 index 00000000..3cfe5783 --- /dev/null +++ b/qcom/holi-cdp-lcd-pm6125.dtsi @@ -0,0 +1 @@ +#include "holi-cdp-pm6125.dtsi" diff --git a/qcom/holi-cdp-pm6125-overlay.dts b/qcom/holi-cdp-pm6125-overlay.dts new file mode 100644 index 00000000..903ccf67 --- /dev/null +++ b/qcom/holi-cdp-pm6125-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-regulators-pm6125.dtsi" +#include "holi-cdp-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi CDP PM6125"; + compatible = "qcom,holi-cdp", "qcom,holi", "qcom,cdp"; + qcom,msm-id = <454 0x10000>, <472 0x10000>; + qcom,board-id = <1 0>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; +}; diff --git a/qcom/holi-cdp-pm6125.dtsi b/qcom/holi-cdp-pm6125.dtsi new file mode 100644 index 00000000..f0540053 --- /dev/null +++ b/qcom/holi-cdp-pm6125.dtsi @@ -0,0 +1,204 @@ +#include +#include +#include "holi-pm7250b.dtsi" +#include "blair-pmic-overlay-pm6125.dtsi" +#include + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; + +&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>; + 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"; + qcom,batteryless-platform; + qcom,sec-charger-config = <0>; + 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; +}; + +&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>; + io-channel-names = "batt-therm", + "batt-id", + "input_current_limited", + "recharge_soc", + "force_recharge", + "charge_done"; + qcom,qg-iterm-ma = <100>; + qcom,hold-soc-while-full; + qcom,linearize-soc; + qcom,cl-feedback-on; + 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 = <&qusb2_phy0>; + + smb5_vbus: qcom,smb5-vbus { + regulator-name = "smb5-vbus"; + }; + + smb5_vconn: qcom,smb5-vconn { + regulator-name = "smb5-vconn"; + }; +}; + +&pm7250b_pdphy { + vdd-pdphy-supply = <&L7E>; + 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"; +}; + +&qupv3_se10_i2c { + awinic@64 { + compatible = "awinic,aw2016_led"; + reg = <0x64>; + + awinic,red { + awinic,name = "red"; + awinic,id = <0>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,green { + awinic,name = "green"; + awinic,id = <1>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,blue { + awinic,name = "blue"; + awinic,id = <2>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + }; +}; diff --git a/qcom/holi-cdp.dtsi b/qcom/holi-cdp.dtsi index 3f2237c5..65114482 100644 --- a/qcom/holi-cdp.dtsi +++ b/qcom/holi-cdp.dtsi @@ -1,7 +1,160 @@ #include +#include +#include "blair-pmic-overlay.dtsi" +#include &soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; + +&pm6150a_amoled { + status = "ok"; +}; + +&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>; + 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"; + qcom,batteryless-platform; + qcom,sec-charger-config = <0>; + 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; +}; + +&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>; + io-channel-names = "batt-therm", + "batt-id", + "input_current_limited", + "recharge_soc", + "force_recharge", + "charge_done"; + qcom,qg-iterm-ma = <100>; + qcom,hold-soc-while-full; + qcom,linearize-soc; + qcom,cl-feedback-on; +}; + +&pm7250b_charger { + dpdm-supply = <&qusb2_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"; }; &ufsphy_mem { diff --git a/qcom/holi-mtp-pm6125-nopmi-overlay.dts b/qcom/holi-mtp-pm6125-nopmi-overlay.dts new file mode 100644 index 00000000..4c01b18a --- /dev/null +++ b/qcom/holi-mtp-pm6125-nopmi-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-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-overlay.dts b/qcom/holi-mtp-pm6125-overlay.dts new file mode 100644 index 00000000..4c05bdaf --- /dev/null +++ b/qcom/holi-mtp-pm6125-overlay.dts @@ -0,0 +1,16 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-regulators-pm6125.dtsi" +#include "holi-mtp-pm7250b.dtsi" +#include "holi-mtp-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi MTP PM6125"; + 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 0x2E 0x0>; +}; diff --git a/qcom/holi-mtp-pm6125.dtsi b/qcom/holi-mtp-pm6125.dtsi new file mode 100644 index 00000000..27a34f02 --- /dev/null +++ b/qcom/holi-mtp-pm6125.dtsi @@ -0,0 +1,67 @@ +#include +#include +#include "blair-pmic-overlay-pm6125.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; + +&qupv3_se10_i2c { + awinic@64 { + compatible = "awinic,aw2016_led"; + reg = <0x64>; + + awinic,red { + awinic,name = "red"; + awinic,id = <0>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,green { + awinic,name = "green"; + awinic,id = <1>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,blue { + awinic,name = "blue"; + awinic,id = <2>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + }; +}; diff --git a/qcom/holi-mtp-pm7250b.dtsi b/qcom/holi-mtp-pm7250b.dtsi index cc881cbc..43844421 100644 --- a/qcom/holi-mtp-pm7250b.dtsi +++ b/qcom/holi-mtp-pm7250b.dtsi @@ -116,13 +116,9 @@ qcom,cl-feedback-on; qcom,tcss-enable; qcom,fvss-enable; + qcom,fvss-vbatt-mv = <3300>; 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 { @@ -180,7 +176,7 @@ }; &pm7250b_charger { - dpdm-supply = <&usb2_phy0>; + dpdm-supply = <&qusb2_phy0>; smb5_vbus: qcom,smb5-vbus { regulator-name = "smb5-vbus"; diff --git a/qcom/holi-mtp-usbc-pm6125-overlay.dts b/qcom/holi-mtp-usbc-pm6125-overlay.dts new file mode 100644 index 00000000..4e7616a3 --- /dev/null +++ b/qcom/holi-mtp-usbc-pm6125-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-regulators-pm6125.dtsi" +#include "holi-mtp-usbc-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi MTP USBC PM6125 audio"; + compatible = "qcom,holi-mtp", "qcom,holi", "qcom,mtp"; + qcom,msm-id = <454 0x10000>, <472 0x10000>; + qcom,board-id = <8 1>; + qcom,pmic-id-size = <4>; + qcom,pmic-id = <0x2D 0x0 0x2E 0x0>; +}; diff --git a/qcom/holi-mtp-usbc-pm6125.dtsi b/qcom/holi-mtp-usbc-pm6125.dtsi new file mode 100644 index 00000000..c3797f15 --- /dev/null +++ b/qcom/holi-mtp-usbc-pm6125.dtsi @@ -0,0 +1,248 @@ +#include +#include +#include "holi-pm7250b.dtsi" +#include "blair-pmic-overlay-pm6125.dtsi" +#include + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + 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" + }; +}; + +&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_charger { + dpdm-supply = <&qusb2_phy0>; + + smb5_vbus: qcom,smb5-vbus { + regulator-name = "smb5-vbus"; + }; + + smb5_vconn: qcom,smb5-vconn { + regulator-name = "smb5-vconn"; + }; +}; + +&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_pdphy { + vdd-pdphy-supply = <&L7E>; + 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"; +}; diff --git a/qcom/holi-mtp-usbc.dtsi b/qcom/holi-mtp-usbc.dtsi index 23df4507..e6cf3f8c 100644 --- a/qcom/holi-mtp-usbc.dtsi +++ b/qcom/holi-mtp-usbc.dtsi @@ -1,3 +1,247 @@ -&soc { +#include +#include +#include "blair-pmic-overlay.dtsi" +#include +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + 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" + }; +}; + +&pm6150a_amoled { + status = "ok"; +}; + +&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>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_MODE>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_OUTPUT_MODE>, + <&smb1396_div2_cp_master PSY_IIO_MIN_ICL>, + <&smb1396_div2_cp_master PSY_IIO_CP_SWITCHER_EN>, + <&smb1396_div2_cp_master PSY_IIO_CP_ENABLE>, + <&smb1396_div2_cp_master PSY_IIO_CP_ILIM>, + <&smb1396_div2_cp_master 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>, + <&smb1396_div2_cp_master 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_charger { + dpdm-supply = <&qusb2_phy0>; + + smb5_vbus: qcom,smb5-vbus { + regulator-name = "smb5-vbus"; + }; + + smb5_vconn: qcom,smb5-vconn { + regulator-name = "smb5-vconn"; + }; +}; + +&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 "smb1398.dtsi" +}; + +&smb1396 { + interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&spmi_bus>; + interrupt-names = "smb1396"; + pinctrl-names = "default"; + qcom,enable-toggle-stat; + pinctrl-0 = <&smb_stat_default>; + status = "ok"; +}; + +&smb1396_div2_cp_master { + 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_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"; }; diff --git a/qcom/holi-mtp.dtsi b/qcom/holi-mtp.dtsi index 3f2237c5..90e2f59f 100644 --- a/qcom/holi-mtp.dtsi +++ b/qcom/holi-mtp.dtsi @@ -1,7 +1,249 @@ #include +#include +#include "blair-pmic-overlay.dtsi" +#include &soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + 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" + }; +}; + +&pm6150a_amoled { + status = "ok"; +}; + +&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>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_MODE>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_OUTPUT_MODE>, + <&smb1396_div2_cp_master PSY_IIO_MIN_ICL>, + <&smb1396_div2_cp_master PSY_IIO_CP_SWITCHER_EN>, + <&smb1396_div2_cp_master PSY_IIO_CP_ENABLE>, + <&smb1396_div2_cp_master PSY_IIO_CP_ILIM>, + <&smb1396_div2_cp_master 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>, + <&smb1396_div2_cp_master 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 "smb1398.dtsi" +}; + +&smb1396 { + interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&spmi_bus>; + interrupt-names = "smb1396"; + pinctrl-names = "default"; + qcom,enable-toggle-stat; + pinctrl-0 = <&smb_stat_default>; + status = "ok"; +}; + +&smb1396_div2_cp_master { + 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 = <&qusb2_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"; }; &ufsphy_mem { diff --git a/qcom/holi-pinctrl.dtsi b/qcom/holi-pinctrl.dtsi index fc91385c..7266ab24 100644 --- a/qcom/holi-pinctrl.dtsi +++ b/qcom/holi-pinctrl.dtsi @@ -572,5 +572,19 @@ drive-strength = <2>; }; }; + + pm8008_active: pm8008_active { + mux { + pins = "gpio58"; + function = "gpio"; + }; + + config { + pins = "gpio58"; + bias-pull-up; + output-high; + drive-strength = <2>; + }; + }; }; }; diff --git a/qcom/holi-pm6125-overlay.dtsi b/qcom/holi-pm6125-overlay.dtsi new file mode 100644 index 00000000..3079d07b --- /dev/null +++ b/qcom/holi-pm6125-overlay.dtsi @@ -0,0 +1,34 @@ +&dispcc { + vdd_cx-supply = <&S2E_LEVEL>; /* VDD_CX_LEVEL */ +}; + +&gpucc { + vdd_cx-supply = <&S2E_LEVEL>; /* VDD_CX_LEVEL */ + vdd_mx-supply = <&S1E_LEVEL>; /* VDD_MX_LEVEL */ + vdd_gx-supply = <&S8A_LEVEL>; /* VDD_GFX_LEVEL */ +}; + +&gpu_cx_gdsc { + parent-supply = <&S2E_LEVEL>; /* VDD_CX_LEVEL */ +}; + +&gpu_gx_gdsc { + parent-supply = <&S8A_LEVEL>; /* VDD_GFX_LEVEL */ +}; + +&gcc { + vdd_cx-supply = <&S2E_LEVEL>; /* VDD_CX_LEVEL */ + vdd_mx-supply = <&S1E_LEVEL>; /* VDD_MX_LEVEL */ +}; + +&qusb2_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 00000000..a5c90d2d --- /dev/null +++ b/qcom/holi-qrd-pm6125-nopmi-overlay.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-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-overlay.dts b/qcom/holi-qrd-pm6125-overlay.dts new file mode 100644 index 00000000..fc3e8aca --- /dev/null +++ b/qcom/holi-qrd-pm6125-overlay.dts @@ -0,0 +1,16 @@ +/dts-v1/; +/plugin/; + +#include "holi-pm6125-overlay.dtsi" +#include "blair-regulators-pm6125.dtsi" +#include "holi-qrd-pm7250b.dtsi" +#include "holi-qrd-pm6125.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Holi QRD PM6125"; + 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 0x2E 0x0>; +}; diff --git a/qcom/holi-qrd-pm6125.dtsi b/qcom/holi-qrd-pm6125.dtsi new file mode 100644 index 00000000..27a34f02 --- /dev/null +++ b/qcom/holi-qrd-pm6125.dtsi @@ -0,0 +1,67 @@ +#include +#include +#include "blair-pmic-overlay-pm6125.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; + +&qupv3_se10_i2c { + awinic@64 { + compatible = "awinic,aw2016_led"; + reg = <0x64>; + + awinic,red { + awinic,name = "red"; + awinic,id = <0>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,green { + awinic,name = "green"; + awinic,id = <1>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + awinic,blue { + awinic,name = "blue"; + awinic,id = <2>; + awinic,imax = <2>; + awinic,led-current = <3>; + awinic,max-brightness = <255>; + awinic,rise-time-ms = <6>; + awinic,hold-time-ms = <0>; + awinic,fall-time-ms = <6>; + awinic,off-time-ms = <4>; + }; + + }; +}; diff --git a/qcom/holi-qrd-pm7250b.dtsi b/qcom/holi-qrd-pm7250b.dtsi index 3552619a..8389c6c0 100644 --- a/qcom/holi-qrd-pm7250b.dtsi +++ b/qcom/holi-qrd-pm7250b.dtsi @@ -117,17 +117,13 @@ qcom,cl-feedback-on; qcom,tcss-enable; qcom,fvss-enable; + qcom,fvss-vbatt-mv = <3300>; 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 = <&usb2_phy0>; + dpdm-supply = <&qusb2_phy0>; smb5_vbus: qcom,smb5-vbus { regulator-name = "smb5-vbus"; diff --git a/qcom/holi-qrd.dtsi b/qcom/holi-qrd.dtsi index 3f2237c5..8e7985b3 100644 --- a/qcom/holi-qrd.dtsi +++ b/qcom/holi-qrd.dtsi @@ -1,7 +1,254 @@ #include +#include +#include "blair-pmic-overlay.dtsi" +#include &soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + 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" + }; +}; + +&pm6150a_l1 { + qcom,init-voltage = <1860000>; +}; + +&pm6150a_amoled { + status = "ok"; +}; + +&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>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_MODE>, + <&smb1396_div2_cp_master PSY_IIO_PARALLEL_OUTPUT_MODE>, + <&smb1396_div2_cp_master PSY_IIO_MIN_ICL>, + <&smb1396_div2_cp_master PSY_IIO_CP_SWITCHER_EN>, + <&smb1396_div2_cp_master PSY_IIO_CP_ENABLE>, + <&smb1396_div2_cp_master PSY_IIO_CP_ILIM>, + <&smb1396_div2_cp_master 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>, + <&smb1396_div2_cp_master 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 = <&qusb2_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"; +}; + +&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 "smb1398.dtsi" +}; + +&smb1396 { + interrupts = <0x2 0xc5 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&spmi_bus>; + interrupt-names = "smb1396"; + pinctrl-names = "default"; + qcom,enable-toggle-stat; + pinctrl-0 = <&smb_stat_default>; + status = "ok"; +}; + +&smb1396_div2_cp_master { + 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"; }; &ufsphy_mem { diff --git a/qcom/holi.dtsi b/qcom/holi.dtsi index b06b128f..edbb4172 100644 --- a/qcom/holi.dtsi +++ b/qcom/holi.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include / { model = "Qualcomm Technologies, Inc. Holi"; @@ -569,6 +570,27 @@ qcom,master-offset = <4096>; }; + spmi_bus: qcom,spmi@1c40000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0x1c40000 0x1100>, + <0x1e00000 0x2000000>, + <0x3e00000 0x100000>, + <0x3f00000 0xa0000>, + <0x1c0a000 0x26000>; + reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; + interrupt-names = "periph_irq"; + interrupts-extended = <&mpm 86 IRQ_TYPE_LEVEL_HIGH>; + qcom,ee = <0>; + qcom,channel = <0>; + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + cell-index = <0>; + }; + + thermal_zones: thermal-zones {}; + arch_timer: timer { compatible = "arm,armv8-timer"; interrupts = , diff --git a/qcom/smb1398.dtsi b/qcom/smb1398.dtsi new file mode 100644 index 00000000..d9a6c8e9 --- /dev/null +++ b/qcom/smb1398.dtsi @@ -0,0 +1,58 @@ +#include + +smb1396: qcom,smb1396@34 { + compatible = "qcom,i2c-pmic"; + reg = <0x34>; + #address-cells = <1>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <3>; + qcom,periph-map = <0x6 0x26 0x27>; + status = "disabled"; + + smb1396_div2_cp_master: qcom,div2_cp { + compatible = "qcom,smb1396-div2-cp-master"; + #io-channel-cells = <1>; + interrupts = <0x26 0x1 IRQ_TYPE_EDGE_RISING>, + <0x26 0x3 IRQ_TYPE_EDGE_RISING>, + <0x26 0x5 IRQ_TYPE_EDGE_RISING>, + <0x26 0x7 IRQ_TYPE_EDGE_RISING>, + <0x27 0x5 IRQ_TYPE_EDGE_RISING>, + <0x27 0x6 IRQ_TYPE_EDGE_RISING>, + <0x27 0x7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "temp-shdwn", + "div2-irev", + "usbin-uv", + "usbin-ov", + "div2-ilim", + "div2-win-uv", + "div2-win-ov"; + qcom,div2-cp-min-ilim-ua = <1000000>; + status = "disabled"; + }; +}; + +smb1396_slave: qcom,smb1396@35 { + compatible = "qcom,i2c-pmic"; + reg = <0x35>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + smb1396_div2_cp_slave: qcom,div2_cp_slave { + compatible = "qcom,smb1396-div2-cp-slave"; + #io-channel-cells = <1>; + status = "disabled"; + }; +}; + +smb1398: qcom,smb1398@36 { + compatible = "qcom,i2c-pmic"; + reg = <0x36>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + smb1398_pre_regulator: qcom,pre_regulator { + compatible = "qcom,smb1398-pre-regulator"; + status = "disabled"; + }; +};