From 921d3fac091b4f5641dfc85955c2c8633a6b59c0 Mon Sep 17 00:00:00 2001 From: xieqiong2 Date: Fri, 18 Sep 2020 18:54:47 +0800 Subject: [PATCH] arm64/dts:Capri/Capri+ charging bring up. Capri 5000, Capri 6000, Capri+ 3 products have different requirement, bring up. Change-Id: I54fae278122017f74f509eaeb10e8776eb367213 Signed-off-by: xieqiong2 Reviewed-on: https://gerrit.mot.com/1755478 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- qcom/Makefile | 4 +- qcom/bengal-capri-charge-5000-overlay.dtsi | 49 ++++++++++++++++++++++ qcom/bengal-capri-charge-6000-overlay.dtsi | 44 +++++++++++++++++++ qcom/bengal-capri-common-overlay.dtsi | 44 +++++++++---------- qcom/bengal-capri-evt-overlay.dts | 1 + qcom/bengal-capri-evt-sku5-overlay.dts | 28 +++++++++++++ qcom/bengal-caprip-common-overlay.dtsi | 4 +- 7 files changed, 150 insertions(+), 24 deletions(-) create mode 100644 qcom/bengal-capri-charge-5000-overlay.dtsi create mode 100644 qcom/bengal-capri-charge-6000-overlay.dtsi create mode 100644 qcom/bengal-capri-evt-sku5-overlay.dts diff --git a/qcom/Makefile b/qcom/Makefile index 0e688d03d46a..37b7ae4e1c8d 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -58,9 +58,11 @@ dtbo-$(CONFIG_CEBU_DTB) += \ bengal-cebu-evt-overlay.dtbo-base := bengal-moto-base-cebu.dtb dtbo-$(CONFIG_CAPRI_DTB) += \ - bengal-capri-evt-overlay.dtbo + bengal-capri-evt-overlay.dtbo \ + bengal-capri-evt-sku5-overlay.dtbo bengal-capri-evt-overlay.dtbo-base := bengal-moto-base.dtb +bengal-capri-evt-sku5-overlay.dtbo-base := bengal-moto-base.dtb dtbo-$(CONFIG_CAPRIP_DTB) += \ bengal-caprip-evt-overlay.dtbo diff --git a/qcom/bengal-capri-charge-5000-overlay.dtsi b/qcom/bengal-capri-charge-5000-overlay.dtsi new file mode 100644 index 000000000000..bc04b9621da7 --- /dev/null +++ b/qcom/bengal-capri-charge-5000-overlay.dtsi @@ -0,0 +1,49 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc{ + mtp_batterydata: qcom,battery-data { + qcom,batt-id-range-pct = <15>; + df-serialnum = "SB18C77591"; + #include "qg-batterydata-jk50-atl-4850mah.dtsi" + #include "qg-batterydata-jk50-scud-4850mah.dtsi" + #include "qg-batterydata-jk50-atl-flex-4850mah.dtsi" + #include "qg-batterydata-jk50-atl-unicoba-4850mah.dtsi" + #include "qg-batterydata-jk50-swd-4850mah.dtsi" + }; +}; + +&pmi632_qg { + qcom,qg-iterm-ma = <350>; +}; + +&pmi632_charger { + qcom,iterm-ma = <100>; + qcom,fcc-max-ua = <2000000>; + qcom,fv-max-uv = <4400000>; + qcom,usb-icl-ua = <2000000>; + qcom,thermal-mitigation = <2000>, + <1800>, + <1600>, + <1300>, + <1100>, + <900>, + <600>, + <400>; + qcom,mmi-temp-zones = <0 4200 1000 0>, + <10 4200 1000 1000>, + <15 0 1000 1000>, + <45 0 2000 2000>, + <60 4200 2000 0>; + qcom,hvdcp-disable; + qcom,support-2a-dcp; +}; diff --git a/qcom/bengal-capri-charge-6000-overlay.dtsi b/qcom/bengal-capri-charge-6000-overlay.dtsi new file mode 100644 index 000000000000..88471fa13c54 --- /dev/null +++ b/qcom/bengal-capri-charge-6000-overlay.dtsi @@ -0,0 +1,44 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc{ + mtp_batterydata: qcom,battery-data { + qcom,batt-id-range-pct = <15>; + df-serialnum = "SB18C96996"; + #include "qg-batterydata-ATL-4V45_6000mah.dtsi" + }; +}; + +&pmi632_qg { + qcom,qg-iterm-ma = <400>; +}; + +&pmi632_charger { + qcom,iterm-ma = <290>; + qcom,fcc-max-ua = <3000000>; + qcom,fv-max-uv = <4450000>; + qcom,usb-icl-ua = <3000000>; + qcom,thermal-mitigation = <3000>, + <2600>, + <2300>, + <1800>, + <1500>, + <1000>, + <600>, + <400>; + qcom,mmi-temp-zones = <0 4200 1164 0>, + <10 4200 3000 1164>, + <15 0 3000 3000>, + <45 0 3000 3000>, + <60 4200 3000 0>; + mmi,ext-ovp-greater-12v; +}; diff --git a/qcom/bengal-capri-common-overlay.dtsi b/qcom/bengal-capri-common-overlay.dtsi index 0dd20be05acd..c2404e56d872 100644 --- a/qcom/bengal-capri-common-overlay.dtsi +++ b/qcom/bengal-capri-common-overlay.dtsi @@ -168,6 +168,7 @@ qcom,dsi-default-panel = <&dsi_hlt_hx83102d_video>; }; +/* &soc{ mtp_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>; @@ -179,9 +180,10 @@ #include "qg-batterydata-jk50-swd-4850mah.dtsi" }; }; +*/ &pmi632_qg { - qcom,qg-iterm-ma = <350>; + //qcom,qg-iterm-ma = <350>; qcom,vbatt-cutoff-mv = <3200>; qcom,vbatt-empty-mv = <3000>; qcom,vbatt-low-mv = <3300>; @@ -212,28 +214,28 @@ }; &pmi632_charger { - qcom,iterm-ma = <100>; - qcom,fcc-max-ua = <2000000>; - qcom,fv-max-uv = <4400000>; - qcom,usb-icl-ua = <2000000>; - qcom,thermal-mitigation = <2000>, - <1800>, - <1600>, - <1300>, - <1100>, - <900>, - <600>, - <400>; + //qcom,iterm-ma = <100>; + //qcom,fcc-max-ua = <2000000>; + //qcom,fv-max-uv = <4400000>; + //qcom,usb-icl-ua = <2000000>; + //qcom,thermal-mitigation = <2000>, + // <1800>, + // <1600>, + // <1300>, + // <1100>, + // <900>, + // <600>, + // <400>; qcom,battery-data = <&mtp_batterydata>; - qcom,mmi-temp-zones = <0 4200 1000 0>, - <10 4200 1000 1000>, - <15 0 1000 1000>, - <45 0 2000 2000>, - <60 4200 2000 0>; + //qcom,mmi-temp-zones = <0 4200 1000 0>, + // <10 4200 1000 1000>, + // <15 0 1000 1000>, + // <45 0 2000 2000>, + // <60 4200 2000 0>; qcom,enable-charging-limit; - qcom,upper-limit-capacity = <70>; + qcom,upper-limit-capacity = <75>; qcom,lower-limit-capacity = <60>; - qcom,hvdcp-disable; + //qcom,hvdcp-disable; qcom,otg-cl-ua = <1000000>; qcom,dc-unsupported; qcom,wireless-unsupported; @@ -241,7 +243,7 @@ qcom,disable-suspend-on-collapse; dpdm-supply = <&qusb_phy0>; qcom,auto-recharge-soc = <99>; - qcom,support-microb-dcp; + //qcom,support-2a-dcp; }; &soc { diff --git a/qcom/bengal-capri-evt-overlay.dts b/qcom/bengal-capri-evt-overlay.dts index d3c0ef8dce35..2aa0649d6518 100644 --- a/qcom/bengal-capri-evt-overlay.dts +++ b/qcom/bengal-capri-evt-overlay.dts @@ -14,6 +14,7 @@ /plugin/; #include "bengal-capri-common-overlay.dtsi" +#include "bengal-capri-charge-5000-overlay.dtsi" / { model = "capri"; diff --git a/qcom/bengal-capri-evt-sku5-overlay.dts b/qcom/bengal-capri-evt-sku5-overlay.dts new file mode 100644 index 000000000000..306b0e7bb0e4 --- /dev/null +++ b/qcom/bengal-capri-evt-sku5-overlay.dts @@ -0,0 +1,28 @@ +/* Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include "bengal-capri-common-overlay.dtsi" +#include "bengal-capri-charge-6000-overlay.dtsi" + +/ { + model = "capri"; + compatible = "qcom,bengal-capri", "qcom,bengal-moto", "qcom,bengal"; + qcom,msm-id = <417 0x10000>; + qcom,board-id = <(5<<8) 0xA000>; +}; + +/* + * capri HW rev specific changes go here + */ diff --git a/qcom/bengal-caprip-common-overlay.dtsi b/qcom/bengal-caprip-common-overlay.dtsi index 30d835b58bae..e8874eeddff6 100644 --- a/qcom/bengal-caprip-common-overlay.dtsi +++ b/qcom/bengal-caprip-common-overlay.dtsi @@ -304,9 +304,9 @@ <10 4200 1000 1000>, <15 0 1000 1000>, <45 0 3000 3000>, - <60 4200 2000 0>; + <60 4200 2500 0>; qcom,enable-charging-limit; - qcom,upper-limit-capacity = <70>; + qcom,upper-limit-capacity = <75>; qcom,lower-limit-capacity = <60>; qcom,otg-cl-ua = <1000000>; qcom,dc-unsupported;