Documentation / devicetree / bindings / power / supply / sgmicro,sgm41542.yaml


Based on kernel version 7.3. Page generated on 2026-10-19 13:17 EDT.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/sgmicro,sgm41542.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SGM41542 Battery Charger

description:
  The SGMicro SGM41542 is a single cell battery charger/boost controller.

maintainers:
  - Chris Morgan <macromorgan@hotmail.com>
  - Xu Shengfei <xsf@rock-chips.com>

allOf:
  - $ref: power-supply.yaml#

properties:
  compatible:
    const: sgmicro,sgm41542

  input-current-limit-microamp:
    default: 2400000
    minimum: 100000
    maximum: 3800000

  input-voltage-limit-microvolt:
    default: 4500000
    minimum: 3900000
    maximum: 12000000

  interrupts:
    maxItems: 1

  monitored-battery:
    description: |
        The charger uses the following battery properties
        constant-charge-current-max-microamp (default 2040000)
        constant-charge-voltage-max-microvolt (default 4208000)
        charge-term-current-microamp (default 180000)
        precharge-current-microamp (default 180000)

  reg:
    maxItems: 1

  regulators:
    type: object
    properties:
      otg-vbus:
        type: object
        description: OTG boost regulator
        $ref: /schemas/regulator/regulator.yaml
        unevaluatedProperties: false
    additionalProperties: false

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
 
    battery: battery {
      compatible = "simple-battery";
      constant-charge-current-max-microamp = <10000000>;
      constant-charge-voltage-max-microvolt = <4350000>;
      precharge-current-microamp = <180000>;
      charge-term-current-microamp = <300000>;
    };
 
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
 
      charger@3b {
        compatible = "sgmicro,sgm41542";
        reg = <0x3b>;
        input-current-limit-microamp = <3000000>;
        input-voltage-limit-microvolt = <4500000>;
        interrupt-parent = <&gpio0>;
        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
        monitored-battery = <&battery>;
 
        regulators {
          otg-vbus {
            regulator-max-microvolt = <5000000>;
            regulator-min-microvolt = <5000000>;
          };
        };
      };
    };