1c1f90759SDavid Heidelberg# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c1f90759SDavid Heidelberg%YAML 1.2 3c1f90759SDavid Heidelberg--- 4*1ea78ec5SKrzysztof Kozlowski$id: http://devicetree.org/schemas/power/supply/summit,smb347-charger.yaml# 5*1ea78ec5SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 6c1f90759SDavid Heidelberg 7c1f90759SDavid Heidelbergtitle: Battery charger driver for SMB345, SMB347 and SMB358 8c1f90759SDavid Heidelberg 9c1f90759SDavid Heidelbergmaintainers: 10c1f90759SDavid Heidelberg - David Heidelberg <david@ixit.cz> 11c1f90759SDavid Heidelberg - Dmitry Osipenko <digetx@gmail.com> 12c1f90759SDavid Heidelberg 13c1f90759SDavid Heidelbergproperties: 14c1f90759SDavid Heidelberg compatible: 15c1f90759SDavid Heidelberg enum: 16c1f90759SDavid Heidelberg - summit,smb345 17c1f90759SDavid Heidelberg - summit,smb347 18c1f90759SDavid Heidelberg - summit,smb358 19c1f90759SDavid Heidelberg 20c1f90759SDavid Heidelberg reg: 21c1f90759SDavid Heidelberg maxItems: 1 22c1f90759SDavid Heidelberg 23c1f90759SDavid Heidelberg interrupts: 24c1f90759SDavid Heidelberg maxItems: 1 25c1f90759SDavid Heidelberg 26c1f90759SDavid Heidelberg monitored-battery: 27c1f90759SDavid Heidelberg description: phandle to the battery node 28c1f90759SDavid Heidelberg $ref: /schemas/types.yaml#/definitions/phandle 29c1f90759SDavid Heidelberg 30c1f90759SDavid Heidelberg summit,enable-usb-charging: 31c1f90759SDavid Heidelberg type: boolean 32c1f90759SDavid Heidelberg description: Enable charging through USB. 33c1f90759SDavid Heidelberg 34c1f90759SDavid Heidelberg summit,enable-otg-charging: 35c1f90759SDavid Heidelberg type: boolean 36c1f90759SDavid Heidelberg description: Provide power for USB OTG 37c1f90759SDavid Heidelberg 38c1f90759SDavid Heidelberg summit,enable-mains-charging: 39c1f90759SDavid Heidelberg type: boolean 40c1f90759SDavid Heidelberg description: Enable charging through mains 41c1f90759SDavid Heidelberg 42c1f90759SDavid Heidelberg summit,enable-charge-control: 43c1f90759SDavid Heidelberg description: Enable charging control 44c1f90759SDavid Heidelberg $ref: /schemas/types.yaml#/definitions/uint32 45c1f90759SDavid Heidelberg enum: 46c1f90759SDavid Heidelberg - 0 # SMB3XX_CHG_ENABLE_SW SW (I2C interface) 47c1f90759SDavid Heidelberg - 1 # SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW Pin control (Active Low) 48c1f90759SDavid Heidelberg - 2 # SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH Pin control (Active High) 49c1f90759SDavid Heidelberg 50c1f90759SDavid Heidelberg summit,fast-voltage-threshold-microvolt: 51c1f90759SDavid Heidelberg description: Voltage threshold to transit to fast charge mode (in uV) 52c1f90759SDavid Heidelberg minimum: 2400000 53c1f90759SDavid Heidelberg maximum: 3000000 54c1f90759SDavid Heidelberg 55c1f90759SDavid Heidelberg summit,mains-current-limit-microamp: 56c1f90759SDavid Heidelberg description: Maximum input current from AC/DC input (in uA) 57c1f90759SDavid Heidelberg 58c1f90759SDavid Heidelberg summit,usb-current-limit-microamp: 59c1f90759SDavid Heidelberg description: Maximum input current from USB input (in uA) 60c1f90759SDavid Heidelberg 61c1f90759SDavid Heidelberg summit,charge-current-compensation-microamp: 62c1f90759SDavid Heidelberg description: Charge current compensation (in uA) 63c1f90759SDavid Heidelberg 64c1f90759SDavid Heidelberg summit,chip-temperature-threshold-celsius: 65c1f90759SDavid Heidelberg description: Chip temperature for thermal regulation in °C. 66c1f90759SDavid Heidelberg enum: [100, 110, 120, 130] 67c1f90759SDavid Heidelberg 68c1f90759SDavid Heidelberg summit,soft-compensation-method: 69c1f90759SDavid Heidelberg description: Soft temperature limit compensation method 70c1f90759SDavid Heidelberg $ref: /schemas/types.yaml#/definitions/uint32 71c1f90759SDavid Heidelberg enum: 72c1f90759SDavid Heidelberg - 0 # SMB3XX_SOFT_TEMP_COMPENSATE_NONE Compensation none 73c1f90759SDavid Heidelberg - 1 # SMB3XX_SOFT_TEMP_COMPENSATE_CURRENT Current compensation 74c1f90759SDavid Heidelberg - 2 # SMB3XX_SOFT_TEMP_COMPENSATE_VOLTAGE Voltage compensation 75c1f90759SDavid Heidelberg 763e81bd7dSDmitry Osipenko summit,inok-polarity: 773e81bd7dSDmitry Osipenko description: | 783e81bd7dSDmitry Osipenko Polarity of INOK signal indicating presence of external power supply. 793e81bd7dSDmitry Osipenko $ref: /schemas/types.yaml#/definitions/uint32 803e81bd7dSDmitry Osipenko enum: 813e81bd7dSDmitry Osipenko - 0 # SMB3XX_SYSOK_INOK_ACTIVE_LOW 823e81bd7dSDmitry Osipenko - 1 # SMB3XX_SYSOK_INOK_ACTIVE_HIGH 833e81bd7dSDmitry Osipenko 843e81bd7dSDmitry Osipenko usb-vbus: 852a21fe01SKrzysztof Kozlowski $ref: /schemas/regulator/regulator.yaml# 863e81bd7dSDmitry Osipenko type: object 873e81bd7dSDmitry Osipenko 883e81bd7dSDmitry Osipenko properties: 893e81bd7dSDmitry Osipenko summit,needs-inok-toggle: 903e81bd7dSDmitry Osipenko type: boolean 913e81bd7dSDmitry Osipenko description: INOK signal is fixed and polarity needs to be toggled 923e81bd7dSDmitry Osipenko in order to enable/disable output mode. 933e81bd7dSDmitry Osipenko 943e81bd7dSDmitry Osipenko unevaluatedProperties: false 953e81bd7dSDmitry Osipenko 96c1f90759SDavid HeidelbergallOf: 97c1f90759SDavid Heidelberg - if: 98c1f90759SDavid Heidelberg properties: 99c1f90759SDavid Heidelberg compatible: 100c1f90759SDavid Heidelberg enum: 101c1f90759SDavid Heidelberg - summit,smb345 102c1f90759SDavid Heidelberg - summit,smb358 103c1f90759SDavid Heidelberg 104c1f90759SDavid Heidelberg then: 105c1f90759SDavid Heidelberg properties: 106c1f90759SDavid Heidelberg summit,mains-current-limit-microamp: 107c1f90759SDavid Heidelberg enum: [ 300000, 500000, 700000, 1000000, 108c1f90759SDavid Heidelberg 1500000, 1800000, 2000000] 109c1f90759SDavid Heidelberg 110c1f90759SDavid Heidelberg summit,usb-current-limit-microamp: 111c1f90759SDavid Heidelberg enum: [ 300000, 500000, 700000, 1000000, 112c1f90759SDavid Heidelberg 1500000, 1800000, 2000000] 113c1f90759SDavid Heidelberg 114c1f90759SDavid Heidelberg summit,charge-current-compensation-microamp: 115c1f90759SDavid Heidelberg enum: [200000, 450000, 600000, 900000] 116c1f90759SDavid Heidelberg 117c1f90759SDavid Heidelberg else: 118c1f90759SDavid Heidelberg properties: 119c1f90759SDavid Heidelberg summit,mains-current-limit-microamp: 120c1f90759SDavid Heidelberg enum: [ 300000, 500000, 700000, 900000, 1200000, 121c1f90759SDavid Heidelberg 1500000, 1800000, 2000000, 2200000, 2500000] 122c1f90759SDavid Heidelberg 123c1f90759SDavid Heidelberg summit,usb-current-limit-microamp: 124c1f90759SDavid Heidelberg enum: [ 300000, 500000, 700000, 900000, 1200000, 125c1f90759SDavid Heidelberg 1500000, 1800000, 2000000, 2200000, 2500000] 126c1f90759SDavid Heidelberg 127c1f90759SDavid Heidelberg summit,charge-current-compensation-microamp: 128c1f90759SDavid Heidelberg enum: [250000, 700000, 900000, 1200000] 129c1f90759SDavid Heidelberg 130c1f90759SDavid Heidelbergrequired: 131c1f90759SDavid Heidelberg - compatible 132c1f90759SDavid Heidelberg - reg 133c1f90759SDavid Heidelberg 134c1f90759SDavid HeidelberganyOf: 135c1f90759SDavid Heidelberg - required: 136c1f90759SDavid Heidelberg - summit,enable-usb-charging 137c1f90759SDavid Heidelberg - required: 138c1f90759SDavid Heidelberg - summit,enable-otg-charging 139c1f90759SDavid Heidelberg - required: 140c1f90759SDavid Heidelberg - summit,enable-mains-charging 141c1f90759SDavid Heidelberg 142c1f90759SDavid HeidelbergadditionalProperties: false 143c1f90759SDavid Heidelberg 144c1f90759SDavid Heidelbergexamples: 145c1f90759SDavid Heidelberg - | 146c1f90759SDavid Heidelberg #include <dt-bindings/power/summit,smb347-charger.h> 147c1f90759SDavid Heidelberg 148c1f90759SDavid Heidelberg i2c { 149c1f90759SDavid Heidelberg #address-cells = <1>; 150c1f90759SDavid Heidelberg #size-cells = <0>; 151c1f90759SDavid Heidelberg 152c1f90759SDavid Heidelberg charger@7f { 153c1f90759SDavid Heidelberg compatible = "summit,smb347"; 154c1f90759SDavid Heidelberg reg = <0x7f>; 155c1f90759SDavid Heidelberg 156c1f90759SDavid Heidelberg summit,enable-charge-control = <SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH>; 1573e81bd7dSDmitry Osipenko summit,inok-polarity = <SMB3XX_SYSOK_INOK_ACTIVE_LOW>; 158c1f90759SDavid Heidelberg summit,chip-temperature-threshold-celsius = <110>; 159c1f90759SDavid Heidelberg summit,mains-current-limit-microamp = <2000000>; 160c1f90759SDavid Heidelberg summit,usb-current-limit-microamp = <500000>; 161c1f90759SDavid Heidelberg summit,enable-usb-charging; 162c1f90759SDavid Heidelberg summit,enable-mains-charging; 163c1f90759SDavid Heidelberg 164c1f90759SDavid Heidelberg monitored-battery = <&battery>; 1653e81bd7dSDmitry Osipenko 1663e81bd7dSDmitry Osipenko usb-vbus { 1673e81bd7dSDmitry Osipenko regulator-name = "usb_vbus"; 1683e81bd7dSDmitry Osipenko regulator-min-microvolt = <5000000>; 1693e81bd7dSDmitry Osipenko regulator-max-microvolt = <5000000>; 1703e81bd7dSDmitry Osipenko regulator-min-microamp = <750000>; 1713e81bd7dSDmitry Osipenko regulator-max-microamp = <750000>; 1723e81bd7dSDmitry Osipenko summit,needs-inok-toggle; 1733e81bd7dSDmitry Osipenko }; 174c1f90759SDavid Heidelberg }; 175c1f90759SDavid Heidelberg }; 176c1f90759SDavid Heidelberg 177c1f90759SDavid Heidelberg battery: battery-cell { 178c1f90759SDavid Heidelberg compatible = "simple-battery"; 179c1f90759SDavid Heidelberg constant-charge-current-max-microamp = <1800000>; 180c1f90759SDavid Heidelberg operating-range-celsius = <0 45>; 181c1f90759SDavid Heidelberg alert-celsius = <3 42>; 182c1f90759SDavid Heidelberg }; 183