18c2ecf20Sopenharmony_ciQualcomm Switch-Mode Battery Charger and Boost 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciPROPERTIES 48c2ecf20Sopenharmony_ci- compatible: 58c2ecf20Sopenharmony_ci Usage: required 68c2ecf20Sopenharmony_ci Value type: <stringlist> 78c2ecf20Sopenharmony_ci Description: Must be one of: 88c2ecf20Sopenharmony_ci - "qcom,pm8941-charger" 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci- reg: 118c2ecf20Sopenharmony_ci Usage: required 128c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 138c2ecf20Sopenharmony_ci Description: Base address of registers for SMBB block 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci- interrupts: 168c2ecf20Sopenharmony_ci Usage: required 178c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 188c2ecf20Sopenharmony_ci Description: The format of the specifier is defined by the binding document 198c2ecf20Sopenharmony_ci describing the node's interrupt parent. Must contain one 208c2ecf20Sopenharmony_ci specifier for each of the following interrupts, in order: 218c2ecf20Sopenharmony_ci - charge done 228c2ecf20Sopenharmony_ci - charge fast mode 238c2ecf20Sopenharmony_ci - charge trickle mode 248c2ecf20Sopenharmony_ci - battery temperature ok 258c2ecf20Sopenharmony_ci - battery present 268c2ecf20Sopenharmony_ci - charger disconnected 278c2ecf20Sopenharmony_ci - USB-in valid 288c2ecf20Sopenharmony_ci - DC-in valid 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci- interrupt-names: 318c2ecf20Sopenharmony_ci Usage: required 328c2ecf20Sopenharmony_ci Value type: <stringlist> 338c2ecf20Sopenharmony_ci Description: Must contain the following list, strictly ordered: 348c2ecf20Sopenharmony_ci "chg-done", 358c2ecf20Sopenharmony_ci "chg-fast", 368c2ecf20Sopenharmony_ci "chg-trkl", 378c2ecf20Sopenharmony_ci "bat-temp-ok", 388c2ecf20Sopenharmony_ci "bat-present", 398c2ecf20Sopenharmony_ci "chg-gone", 408c2ecf20Sopenharmony_ci "usb-valid", 418c2ecf20Sopenharmony_ci "dc-valid" 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci- qcom,fast-charge-current-limit: 448c2ecf20Sopenharmony_ci Usage: optional (default: 1A, or pre-configured value) 458c2ecf20Sopenharmony_ci Value type: <u32>; uA; range [100mA : 3A] 468c2ecf20Sopenharmony_ci Description: Maximum charge current; May be clamped to safety limits. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci- qcom,fast-charge-low-threshold-voltage: 498c2ecf20Sopenharmony_ci Usage: optional (default: 3.2V, or pre-configured value) 508c2ecf20Sopenharmony_ci Value type: <u32>; uV; range [2.1V : 3.6V] 518c2ecf20Sopenharmony_ci Description: Battery voltage limit above which fast charging may operate; 528c2ecf20Sopenharmony_ci Below this value linear or switch-mode auto-trickle-charging 538c2ecf20Sopenharmony_ci will operate. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci- qcom,fast-charge-high-threshold-voltage: 568c2ecf20Sopenharmony_ci Usage: optional (default: 4.2V, or pre-configured value) 578c2ecf20Sopenharmony_ci Value type: <u32>; uV; range [3.24V : 5V] 588c2ecf20Sopenharmony_ci Description: Battery voltage limit below which fast charging may operate; 598c2ecf20Sopenharmony_ci The fast charger will attempt to charge the battery to this 608c2ecf20Sopenharmony_ci voltage. May be clamped to safety limits. 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci- qcom,fast-charge-safe-voltage: 638c2ecf20Sopenharmony_ci Usage: optional (default: 4.2V, or pre-configured value) 648c2ecf20Sopenharmony_ci Value type: <u32>; uV; range [3.24V : 5V] 658c2ecf20Sopenharmony_ci Description: Maximum safe battery voltage; May be pre-set by bootloader, in 668c2ecf20Sopenharmony_ci which case, setting this will harmlessly fail. The property 678c2ecf20Sopenharmony_ci 'fast-charge-high-watermark' will be clamped by this value. 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci- qcom,fast-charge-safe-current: 708c2ecf20Sopenharmony_ci Usage: optional (default: 1A, or pre-configured value) 718c2ecf20Sopenharmony_ci Value type: <u32>; uA; range [100mA : 3A] 728c2ecf20Sopenharmony_ci Description: Maximum safe battery charge current; May pre-set by bootloader, 738c2ecf20Sopenharmony_ci in which case, setting this will harmlessly fail. The property 748c2ecf20Sopenharmony_ci 'qcom,fast-charge-current-limit' will be clamped by this value. 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci- qcom,auto-recharge-threshold-voltage: 778c2ecf20Sopenharmony_ci Usage: optional (default: 4.1V, or pre-configured value) 788c2ecf20Sopenharmony_ci Value type: <u32>; uV; range [3.24V : 5V] 798c2ecf20Sopenharmony_ci Description: Battery voltage limit below which auto-recharge functionality 808c2ecf20Sopenharmony_ci will restart charging after end-of-charge; The high cutoff 818c2ecf20Sopenharmony_ci limit for auto-recharge is 5% above this value. 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci- qcom,minimum-input-voltage: 848c2ecf20Sopenharmony_ci Usage: optional (default: 4.3V, or pre-configured value) 858c2ecf20Sopenharmony_ci Value type: <u32>; uV; range [4.2V : 9.6V] 868c2ecf20Sopenharmony_ci Description: Input voltage level above which charging may operate 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci- qcom,dc-current-limit: 898c2ecf20Sopenharmony_ci Usage: optional (default: 100mA, or pre-configured value) 908c2ecf20Sopenharmony_ci Value type: <u32>; uA; range [100mA : 2.5A] 918c2ecf20Sopenharmony_ci Description: Default DC charge current limit 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci- qcom,disable-dc: 948c2ecf20Sopenharmony_ci Usage: optional (default: false) 958c2ecf20Sopenharmony_ci Value type: boolean: <u32> or <empty> 968c2ecf20Sopenharmony_ci Description: Disable DC charger 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci- qcom,jeita-extended-temp-range: 998c2ecf20Sopenharmony_ci Usage: optional (default: false) 1008c2ecf20Sopenharmony_ci Value type: boolean: <u32> or <empty> 1018c2ecf20Sopenharmony_ci Description: Enable JEITA extended temperature range; This does *not* 1028c2ecf20Sopenharmony_ci adjust the maximum charge voltage or current in the extended 1038c2ecf20Sopenharmony_ci temperature range. It only allows charging when the battery 1048c2ecf20Sopenharmony_ci is in the extended temperature range. Voltage/current 1058c2ecf20Sopenharmony_ci regulation must be done externally to fully comply with 1068c2ecf20Sopenharmony_ci the JEITA safety guidelines if this flag is set. 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci- usb_otg_in-supply: 1098c2ecf20Sopenharmony_ci Usage: optional 1108c2ecf20Sopenharmony_ci Value type: <phandle> 1118c2ecf20Sopenharmony_ci Description: Reference to the regulator supplying power to the USB_OTG_IN 1128c2ecf20Sopenharmony_ci pin. 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_cichild nodes: 1158c2ecf20Sopenharmony_ci- otg-vbus: 1168c2ecf20Sopenharmony_ci Usage: optional 1178c2ecf20Sopenharmony_ci Description: This node defines a regulator used to control the direction 1188c2ecf20Sopenharmony_ci of VBUS voltage - specifically: whether to supply voltage 1198c2ecf20Sopenharmony_ci to VBUS for host mode operation of the OTG port, or allow 1208c2ecf20Sopenharmony_ci input voltage from external VBUS for charging. In the 1218c2ecf20Sopenharmony_ci hardware, the supply for this regulator comes from 1228c2ecf20Sopenharmony_ci usb_otg_in-supply. 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ciEXAMPLE 1258c2ecf20Sopenharmony_cicharger@1000 { 1268c2ecf20Sopenharmony_ci compatible = "qcom,pm8941-charger"; 1278c2ecf20Sopenharmony_ci reg = <0x1000 0x700>; 1288c2ecf20Sopenharmony_ci interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, 1298c2ecf20Sopenharmony_ci <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, 1308c2ecf20Sopenharmony_ci <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, 1318c2ecf20Sopenharmony_ci <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, 1328c2ecf20Sopenharmony_ci <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, 1338c2ecf20Sopenharmony_ci <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, 1348c2ecf20Sopenharmony_ci <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, 1358c2ecf20Sopenharmony_ci <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; 1368c2ecf20Sopenharmony_ci interrupt-names = "chg-done", 1378c2ecf20Sopenharmony_ci "chg-fast", 1388c2ecf20Sopenharmony_ci "chg-trkl", 1398c2ecf20Sopenharmony_ci "bat-temp-ok", 1408c2ecf20Sopenharmony_ci "bat-present", 1418c2ecf20Sopenharmony_ci "chg-gone", 1428c2ecf20Sopenharmony_ci "usb-valid", 1438c2ecf20Sopenharmony_ci "dc-valid"; 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci qcom,fast-charge-current-limit = <1000000>; 1468c2ecf20Sopenharmony_ci qcom,dc-charge-current-limit = <1000000>; 1478c2ecf20Sopenharmony_ci usb_otg_in-supply = <&pm8941_5vs1>; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci otg-vbus {}; 1508c2ecf20Sopenharmony_ci}; 151