Loading Documentation/devicetree/bindings/power/qpnp-smb2.txt +5 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,11 @@ Charger specific properties: Definition: Specifies the deglitch interval for OTG detection. If the value is not present, 50 msec is used as default. - qcom,pd-not-supported Usage: optional Value type: bool Definition: Option to indicate if the platform supports USB PD (power delivery). ============================================= Second Level Nodes - SMB2 Charger Peripherals ============================================= Loading arch/arm/boot/dts/qcom/fg-gen3-batterydata-ascent-3450mah.dtsi 0 → 100644 +81 −0 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 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. */ qcom,ascent_3450mah { /* Ascent_with_connector_3450mAh_averaged_MasterSlave_Jan6th2017 */ qcom,max-voltage-uv = <4350000>; qcom,fg-cc-cv-threshold-mv = <4340>; qcom,fastchg-current-ma = <3450>; qcom,batt-id-kohm = <60>; qcom,battery-beta = <3435>; qcom,battery-type = "ascent_3450mah_averaged_masterslave_jan6th2017"; qcom,checksum = <0x96AC>; qcom,gui-version = "PMI8998GUI - 2.0.0.54"; qcom,fg-profile-data = [ 9C 1F 85 05 82 0A 73 FC 2B 1D 72 EA EE 03 66 0C C8 17 F4 22 E0 45 1F 52 5C 00 00 00 10 00 00 00 00 00 4A C4 C7 BC 48 C2 0F 00 08 00 E1 DA 5D ED 8D FD B2 F3 96 E2 A7 12 7E F4 0E 3B 24 06 09 20 27 00 14 00 83 1F EE 05 1F 0A 45 FD 6B 1D 53 E5 EC 0B 31 14 44 18 49 23 18 45 A6 53 55 00 00 00 0E 00 00 00 00 00 61 CC B7 C3 0F BC 0F 00 00 00 92 00 5D ED E3 06 E0 00 75 FD 9C 03 47 DB B3 22 CB 33 CC FF 07 10 00 00 99 0D 99 45 0F 00 40 00 AB 01 0A FA FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]; }; arch/arm/boot/dts/qcom/fg-gen3-batterydata-itech-3000mah.dtsi 0 → 100644 +81 −0 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 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. */ qcom,itech_3000mah { /* #Itech_B00826LF_3000mAh_ver1660_averaged_MasterSlave_Jan10th2017*/ qcom,max-voltage-uv = <4350000>; qcom,fg-cc-cv-threshold-mv = <4340>; qcom,fastchg-current-ma = <3000>; qcom,batt-id-kohm = <100>; qcom,battery-beta = <3435>; qcom,battery-type = "itech_b00826lf_3000mah_ver1660_jan10th2017"; qcom,checksum = <0xFB8F>; qcom,gui-version = "PMI8998GUI - 2.0.0.54"; qcom,fg-profile-data = [ A4 1F 6E 05 9C 0A 2B FC 32 1D 23 E5 60 0B 1B 15 AD 17 8C 22 EA 3C 89 4A 5B 00 00 00 12 00 00 00 00 00 62 C2 0C CD D8 C2 19 00 08 00 85 EA C7 EC E2 05 2F 01 9B F5 12 12 5E 05 88 3B 22 06 09 20 27 00 14 00 7D 1F DD 05 3F 0A E5 FC 72 1D E3 F5 6F 12 C0 1D 88 18 FB 22 8D 45 C6 52 54 00 00 00 0F 00 00 00 00 00 BD CD 55 C2 5D C5 14 00 00 00 7E 00 C7 EC 60 06 BB 00 59 06 61 03 D9 FC 75 1B B3 33 CC FF 07 10 00 00 3E 0B 99 45 14 00 40 00 AE 01 0A FA FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]; }; arch/arm/boot/dts/qcom/msm8909w-pm660-mtp.dtsi +16 −0 Original line number Diff line number Diff line Loading @@ -239,3 +239,19 @@ qcom,support-twm-config; qcom,pbs-client = <&pm660_pbs>; }; / { mtp_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>; #include "fg-gen3-batterydata-itech-3000mah.dtsi" #include "fg-gen3-batterydata-ascent-3450mah.dtsi" }; }; &pm660_charger { qcom,pd-not-supported; }; &pm660_fg { qcom,battery-data = <&mtp_batterydata>; }; drivers/power/qpnp-smb2.c +6 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ struct smb_dt_props { bool no_battery; bool hvdcp_disable; bool auto_recharge_soc; bool no_pd; }; struct smb2 { Loading Loading @@ -202,6 +203,9 @@ static int smb2_parse_dt(struct smb2 *chip) chip->dt.no_battery = of_property_read_bool(node, "qcom,batteryless-platform"); chip->dt.no_pd = of_property_read_bool(node, "qcom,pd-not-supported"); chg->skip_usb_notification = of_property_read_bool(node, "qcom,skip-usb-notification"); Loading Loading @@ -1154,6 +1158,8 @@ static int smb2_init_hw(struct smb2 *chip) chg->micro_usb_mode, 0); vote(chg->hvdcp_enable_votable, MICRO_USB_VOTER, chg->micro_usb_mode, 0); vote(chg->pd_disallowed_votable_indirect, PD_NOT_SUPPORTED_VOTER, chip->dt.no_pd, 0); /* * AICL configuration: Loading Loading
Documentation/devicetree/bindings/power/qpnp-smb2.txt +5 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,11 @@ Charger specific properties: Definition: Specifies the deglitch interval for OTG detection. If the value is not present, 50 msec is used as default. - qcom,pd-not-supported Usage: optional Value type: bool Definition: Option to indicate if the platform supports USB PD (power delivery). ============================================= Second Level Nodes - SMB2 Charger Peripherals ============================================= Loading
arch/arm/boot/dts/qcom/fg-gen3-batterydata-ascent-3450mah.dtsi 0 → 100644 +81 −0 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 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. */ qcom,ascent_3450mah { /* Ascent_with_connector_3450mAh_averaged_MasterSlave_Jan6th2017 */ qcom,max-voltage-uv = <4350000>; qcom,fg-cc-cv-threshold-mv = <4340>; qcom,fastchg-current-ma = <3450>; qcom,batt-id-kohm = <60>; qcom,battery-beta = <3435>; qcom,battery-type = "ascent_3450mah_averaged_masterslave_jan6th2017"; qcom,checksum = <0x96AC>; qcom,gui-version = "PMI8998GUI - 2.0.0.54"; qcom,fg-profile-data = [ 9C 1F 85 05 82 0A 73 FC 2B 1D 72 EA EE 03 66 0C C8 17 F4 22 E0 45 1F 52 5C 00 00 00 10 00 00 00 00 00 4A C4 C7 BC 48 C2 0F 00 08 00 E1 DA 5D ED 8D FD B2 F3 96 E2 A7 12 7E F4 0E 3B 24 06 09 20 27 00 14 00 83 1F EE 05 1F 0A 45 FD 6B 1D 53 E5 EC 0B 31 14 44 18 49 23 18 45 A6 53 55 00 00 00 0E 00 00 00 00 00 61 CC B7 C3 0F BC 0F 00 00 00 92 00 5D ED E3 06 E0 00 75 FD 9C 03 47 DB B3 22 CB 33 CC FF 07 10 00 00 99 0D 99 45 0F 00 40 00 AB 01 0A FA FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]; };
arch/arm/boot/dts/qcom/fg-gen3-batterydata-itech-3000mah.dtsi 0 → 100644 +81 −0 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, 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. */ qcom,itech_3000mah { /* #Itech_B00826LF_3000mAh_ver1660_averaged_MasterSlave_Jan10th2017*/ qcom,max-voltage-uv = <4350000>; qcom,fg-cc-cv-threshold-mv = <4340>; qcom,fastchg-current-ma = <3000>; qcom,batt-id-kohm = <100>; qcom,battery-beta = <3435>; qcom,battery-type = "itech_b00826lf_3000mah_ver1660_jan10th2017"; qcom,checksum = <0xFB8F>; qcom,gui-version = "PMI8998GUI - 2.0.0.54"; qcom,fg-profile-data = [ A4 1F 6E 05 9C 0A 2B FC 32 1D 23 E5 60 0B 1B 15 AD 17 8C 22 EA 3C 89 4A 5B 00 00 00 12 00 00 00 00 00 62 C2 0C CD D8 C2 19 00 08 00 85 EA C7 EC E2 05 2F 01 9B F5 12 12 5E 05 88 3B 22 06 09 20 27 00 14 00 7D 1F DD 05 3F 0A E5 FC 72 1D E3 F5 6F 12 C0 1D 88 18 FB 22 8D 45 C6 52 54 00 00 00 0F 00 00 00 00 00 BD CD 55 C2 5D C5 14 00 00 00 7E 00 C7 EC 60 06 BB 00 59 06 61 03 D9 FC 75 1B B3 33 CC FF 07 10 00 00 3E 0B 99 45 14 00 40 00 AE 01 0A FA FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]; };
arch/arm/boot/dts/qcom/msm8909w-pm660-mtp.dtsi +16 −0 Original line number Diff line number Diff line Loading @@ -239,3 +239,19 @@ qcom,support-twm-config; qcom,pbs-client = <&pm660_pbs>; }; / { mtp_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>; #include "fg-gen3-batterydata-itech-3000mah.dtsi" #include "fg-gen3-batterydata-ascent-3450mah.dtsi" }; }; &pm660_charger { qcom,pd-not-supported; }; &pm660_fg { qcom,battery-data = <&mtp_batterydata>; };
drivers/power/qpnp-smb2.c +6 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ struct smb_dt_props { bool no_battery; bool hvdcp_disable; bool auto_recharge_soc; bool no_pd; }; struct smb2 { Loading Loading @@ -202,6 +203,9 @@ static int smb2_parse_dt(struct smb2 *chip) chip->dt.no_battery = of_property_read_bool(node, "qcom,batteryless-platform"); chip->dt.no_pd = of_property_read_bool(node, "qcom,pd-not-supported"); chg->skip_usb_notification = of_property_read_bool(node, "qcom,skip-usb-notification"); Loading Loading @@ -1154,6 +1158,8 @@ static int smb2_init_hw(struct smb2 *chip) chg->micro_usb_mode, 0); vote(chg->hvdcp_enable_votable, MICRO_USB_VOTER, chg->micro_usb_mode, 0); vote(chg->pd_disallowed_votable_indirect, PD_NOT_SUPPORTED_VOTER, chip->dt.no_pd, 0); /* * AICL configuration: Loading