18c2ecf20Sopenharmony_ciBinding for sbs-manager
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible: "<vendor>,<part-number>", "sbs,sbs-charger" as fallback. The part
58c2ecf20Sopenharmony_ci  number compatible string might be used in order to take care of vendor
68c2ecf20Sopenharmony_ci  specific registers.
78c2ecf20Sopenharmony_ci- reg: integer, i2c address of the device. Should be <0xa>.
88c2ecf20Sopenharmony_ciOptional properties:
98c2ecf20Sopenharmony_ci- gpio-controller: Marks the port as GPIO controller.
108c2ecf20Sopenharmony_ci  See "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
118c2ecf20Sopenharmony_ci- #gpio-cells: Should be <2>. The first cell is the pin number, the second cell
128c2ecf20Sopenharmony_ci  is used to specify optional parameters:
138c2ecf20Sopenharmony_ci  See "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciFrom OS view the device is basically an i2c-mux used to communicate with up to
168c2ecf20Sopenharmony_cifour smart battery devices at address 0xb. The driver actually implements this
178c2ecf20Sopenharmony_cibehaviour. So standard i2c-mux nodes can be used to register up to four slave
188c2ecf20Sopenharmony_cibatteries. Channels will be numerated starting from 1 to 4.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciExample:
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cibatman@a {
238c2ecf20Sopenharmony_ci    compatible = "lltc,ltc1760", "sbs,sbs-manager";
248c2ecf20Sopenharmony_ci    reg = <0x0a>;
258c2ecf20Sopenharmony_ci    #address-cells = <1>;
268c2ecf20Sopenharmony_ci    #size-cells = <0>;
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci    gpio-controller;
298c2ecf20Sopenharmony_ci    #gpio-cells = <2>;
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci    i2c@1 {
328c2ecf20Sopenharmony_ci        #address-cells = <1>;
338c2ecf20Sopenharmony_ci        #size-cells = <0>;
348c2ecf20Sopenharmony_ci        reg = <1>;
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci        battery@b {
378c2ecf20Sopenharmony_ci            compatible = "ti,bq2060", "sbs,sbs-battery";
388c2ecf20Sopenharmony_ci            reg = <0x0b>;
398c2ecf20Sopenharmony_ci            sbs,battery-detect-gpios = <&batman 1 1>;
408c2ecf20Sopenharmony_ci        };
418c2ecf20Sopenharmony_ci    };
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci    i2c@2 {
448c2ecf20Sopenharmony_ci        #address-cells = <1>;
458c2ecf20Sopenharmony_ci        #size-cells = <0>;
468c2ecf20Sopenharmony_ci        reg = <2>;
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci        battery@b {
498c2ecf20Sopenharmony_ci            compatible = "ti,bq2060", "sbs,sbs-battery";
508c2ecf20Sopenharmony_ci            reg = <0x0b>;
518c2ecf20Sopenharmony_ci            sbs,battery-detect-gpios = <&batman 2 1>;
528c2ecf20Sopenharmony_ci        };
538c2ecf20Sopenharmony_ci    };
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci    i2c@3 {
568c2ecf20Sopenharmony_ci        #address-cells = <1>;
578c2ecf20Sopenharmony_ci        #size-cells = <0>;
588c2ecf20Sopenharmony_ci        reg = <3>;
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci        battery@b {
618c2ecf20Sopenharmony_ci            compatible = "ti,bq2060", "sbs,sbs-battery";
628c2ecf20Sopenharmony_ci            reg = <0x0b>;
638c2ecf20Sopenharmony_ci            sbs,battery-detect-gpios = <&batman 3 1>;
648c2ecf20Sopenharmony_ci        };
658c2ecf20Sopenharmony_ci    };
668c2ecf20Sopenharmony_ci};
67