Battery charger driver for SMB345, SMB347 and SMB358
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/summit,smb347-charger.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "David Heidelberg <david@ixit.cz>", "Dmitry Osipenko <digetx@gmail.com>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "summit,smb345", "summit,smb347", "summit,smb358"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
monitored-battery — not listed as required here #
true — No constraints added by this property rule.
summit,enable-usb-charging — not listed as required here #
Value type (type): "boolean"
Enable charging through USB.
summit,enable-otg-charging — not listed as required here #
Value type (type): "boolean"
Provide power for USB OTG
summit,enable-mains-charging — not listed as required here #
Value type (type): "boolean"
Enable charging through mains
summit,enable-charge-control — not listed as required here #
Enable charging control
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2
summit,fast-voltage-threshold-microvolt — not listed as required here #
Voltage threshold to transit to fast charge mode (in uV)
Minimum value (minimum): 2400000
Maximum value (maximum): 3000000
summit,mains-current-limit-microamp — not listed as required here #
Maximum input current from AC/DC input (in uA)
summit,usb-current-limit-microamp — not listed as required here #
Maximum input current from USB input (in uA)
summit,charge-current-compensation-microamp — not listed as required here #
Charge current compensation (in uA)
summit,chip-temperature-threshold-celsius — not listed as required here #
Chip temperature for thermal regulation in °C.
Allowed values (enum): 100, 110, 120, 130
summit,soft-compensation-method — not listed as required here #
Soft temperature limit compensation method
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2
summit,inok-polarity — not listed as required here #
Polarity of INOK signal indicating presence of external power supply.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
usb-vbus — not listed as required here #
Shared schema rule ($ref): /schemas/regulator/regulator.yaml#
Value type (type): "object"
Properties and child nodes (properties) #
summit,needs-inok-toggle — not listed as required here
Value type (type): "boolean"
INOK signal is fixed and polarity needs to be toggled in order to enable/disable output mode.
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):power-supply.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
summit,mains-current-limit-microamp— not listed as required hereAllowed values (
enum):300000,500000,700000,1000000,1500000,1800000,2000000
summit,usb-current-limit-microamp— not listed as required hereAllowed values (
enum):300000,500000,700000,1000000,1500000,1800000,2000000
summit,charge-current-compensation-microamp— not listed as required hereWhen the condition does not match (
else) #Properties and child nodes (
properties)
summit,mains-current-limit-microamp— not listed as required hereAllowed values (
enum):300000,500000,700000,900000,1200000,1500000,1800000,2000000,2200000,2500000
summit,usb-current-limit-microamp— not listed as required hereAllowed values (
enum):300000,500000,700000,900000,1200000,1500000,1800000,2000000,2200000,2500000
summit,charge-current-compensation-microamp— not listed as required here
Required in this object (required): "compatible", "reg"
At least one of these rules must match (anyOf) #
Rule 1 #
Required in this object (
required):"summit,enable-usb-charging"
Rule 2 #
Required in this object (
required):"summit,enable-otg-charging"
Rule 3 #
Required in this object (
required):"summit,enable-mains-charging"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/power/summit,smb347-charger.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@7f {
compatible = "summit,smb347";
reg = <0x7f>;
summit,enable-charge-control = <SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH>;
summit,inok-polarity = <SMB3XX_SYSOK_INOK_ACTIVE_LOW>;
summit,chip-temperature-threshold-celsius = <110>;
summit,mains-current-limit-microamp = <2000000>;
summit,usb-current-limit-microamp = <500000>;
summit,enable-usb-charging;
summit,enable-mains-charging;
monitored-battery = <&battery>;
usb-vbus {
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-min-microamp = <750000>;
regulator-max-microamp = <750000>;
summit,needs-inok-toggle;
};
};
};
battery: battery-cell {
compatible = "simple-battery";
constant-charge-current-max-microamp = <1800000>;
operating-range-celsius = <0 45>;
alert-celsius = <3 42>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 44: SMB3XX_CHG_ENABLE_SW SW (I2C interface)
Line 45: SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW Pin control (Active Low)
Line 46: SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH Pin control (Active High)
Line 70: SMB3XX_SOFT_TEMP_COMPENSATE_NONE Compensation none
Line 71: SMB3XX_SOFT_TEMP_COMPENSATE_CURRENT Current compensation
Line 72: SMB3XX_SOFT_TEMP_COMPENSATE_VOLTAGE Voltage compensation
Line 79: SMB3XX_SYSOK_INOK_ACTIVE_LOW
Line 80: SMB3XX_SYSOK_INOK_ACTIVE_HIGH