xref: /freebsd/sys/contrib/device-tree/Bindings/leds/ti,tps61310.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*ae5de77eSEmmanuel Vadot%YAML 1.2
3*ae5de77eSEmmanuel Vadot---
4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/leds/ti,tps61310.yaml#
5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ae5de77eSEmmanuel Vadot
7*ae5de77eSEmmanuel Vadottitle: Texas Instruments TPS6131X flash LED driver
8*ae5de77eSEmmanuel Vadot
9*ae5de77eSEmmanuel Vadotmaintainers:
10*ae5de77eSEmmanuel Vadot  - Matthias Fend <matthias.fend@emfend.at>
11*ae5de77eSEmmanuel Vadot
12*ae5de77eSEmmanuel Vadotdescription: |
13*ae5de77eSEmmanuel Vadot  The TPS61310/TPS61311 is a flash LED driver with I2C interface.
14*ae5de77eSEmmanuel Vadot  Its power stage is capable of supplying a maximum total current of roughly 1500mA.
15*ae5de77eSEmmanuel Vadot  The TPS6131x provides three constant-current sinks, capable of sinking
16*ae5de77eSEmmanuel Vadot  up to 2 x 400mA (LED1 and LED3) and 800mA (LED2) in flash mode.
17*ae5de77eSEmmanuel Vadot  In torch mode, each sink (LED1, LED2, LED3) supports currents up to 175mA.
18*ae5de77eSEmmanuel Vadot  Since the three current sinks share most of the control components such as
19*ae5de77eSEmmanuel Vadot  flash timer, control logic, safety timer and the operating mode, they cannot
20*ae5de77eSEmmanuel Vadot  be used completely independently of each other. Therefore, only one LED is
21*ae5de77eSEmmanuel Vadot  supported, but the current sinks can be combined accordingly.
22*ae5de77eSEmmanuel Vadot
23*ae5de77eSEmmanuel Vadot  The data sheet can be found at:
24*ae5de77eSEmmanuel Vadot    https://www.ti.com/lit/ds/symlink/tps61310.pdf
25*ae5de77eSEmmanuel Vadot
26*ae5de77eSEmmanuel Vadotproperties:
27*ae5de77eSEmmanuel Vadot  compatible:
28*ae5de77eSEmmanuel Vadot    oneOf:
29*ae5de77eSEmmanuel Vadot      - items:
30*ae5de77eSEmmanuel Vadot          - enum:
31*ae5de77eSEmmanuel Vadot              - ti,tps61311
32*ae5de77eSEmmanuel Vadot          - const: ti,tps61310
33*ae5de77eSEmmanuel Vadot      - items:
34*ae5de77eSEmmanuel Vadot          - const: ti,tps61310
35*ae5de77eSEmmanuel Vadot
36*ae5de77eSEmmanuel Vadot  reg:
37*ae5de77eSEmmanuel Vadot    maxItems: 1
38*ae5de77eSEmmanuel Vadot
39*ae5de77eSEmmanuel Vadot  reset-gpios:
40*ae5de77eSEmmanuel Vadot    maxItems: 1
41*ae5de77eSEmmanuel Vadot    description: GPIO connected to NRESET pin
42*ae5de77eSEmmanuel Vadot
43*ae5de77eSEmmanuel Vadot  ti,valley-current-limit:
44*ae5de77eSEmmanuel Vadot    type: boolean
45*ae5de77eSEmmanuel Vadot    description:
46*ae5de77eSEmmanuel Vadot      Reduce the valley peak current limit from 1750mA to 1250mA (TPS61310) or
47*ae5de77eSEmmanuel Vadot      from 2480mA to 1800mA (TPS61311).
48*ae5de77eSEmmanuel Vadot
49*ae5de77eSEmmanuel Vadot  led:
50*ae5de77eSEmmanuel Vadot    type: object
51*ae5de77eSEmmanuel Vadot    $ref: common.yaml#
52*ae5de77eSEmmanuel Vadot    unevaluatedProperties: false
53*ae5de77eSEmmanuel Vadot
54*ae5de77eSEmmanuel Vadot    properties:
55*ae5de77eSEmmanuel Vadot      led-sources:
56*ae5de77eSEmmanuel Vadot        minItems: 1
57*ae5de77eSEmmanuel Vadot        maxItems: 3
58*ae5de77eSEmmanuel Vadot        items:
59*ae5de77eSEmmanuel Vadot          enum: [1, 2, 3]
60*ae5de77eSEmmanuel Vadot
61*ae5de77eSEmmanuel Vadot      led-max-microamp:
62*ae5de77eSEmmanuel Vadot        oneOf:
63*ae5de77eSEmmanuel Vadot          - minimum: 50000
64*ae5de77eSEmmanuel Vadot            maximum: 350000
65*ae5de77eSEmmanuel Vadot            multipleOf: 50000
66*ae5de77eSEmmanuel Vadot          - minimum: 25000
67*ae5de77eSEmmanuel Vadot            maximum: 525000
68*ae5de77eSEmmanuel Vadot            multipleOf: 25000
69*ae5de77eSEmmanuel Vadot
70*ae5de77eSEmmanuel Vadot      flash-max-microamp:
71*ae5de77eSEmmanuel Vadot        oneOf:
72*ae5de77eSEmmanuel Vadot          - minimum: 50000
73*ae5de77eSEmmanuel Vadot            maximum: 800000
74*ae5de77eSEmmanuel Vadot            multipleOf: 50000
75*ae5de77eSEmmanuel Vadot          - minimum: 25000
76*ae5de77eSEmmanuel Vadot            maximum: 1500000
77*ae5de77eSEmmanuel Vadot            multipleOf: 25000
78*ae5de77eSEmmanuel Vadot
79*ae5de77eSEmmanuel Vadot      flash-max-timeout-us:
80*ae5de77eSEmmanuel Vadot        enum: [ 5300, 10700, 16000, 21300, 26600, 32000, 37300, 68200, 71500,
81*ae5de77eSEmmanuel Vadot                102200, 136300, 170400, 204500, 340800, 579300, 852000 ]
82*ae5de77eSEmmanuel Vadot
83*ae5de77eSEmmanuel Vadot    required:
84*ae5de77eSEmmanuel Vadot      - led-sources
85*ae5de77eSEmmanuel Vadot      - led-max-microamp
86*ae5de77eSEmmanuel Vadot      - flash-max-microamp
87*ae5de77eSEmmanuel Vadot      - flash-max-timeout-us
88*ae5de77eSEmmanuel Vadot
89*ae5de77eSEmmanuel Vadotrequired:
90*ae5de77eSEmmanuel Vadot  - compatible
91*ae5de77eSEmmanuel Vadot  - reg
92*ae5de77eSEmmanuel Vadot  - led
93*ae5de77eSEmmanuel Vadot
94*ae5de77eSEmmanuel VadotadditionalProperties: false
95*ae5de77eSEmmanuel Vadot
96*ae5de77eSEmmanuel Vadotexamples:
97*ae5de77eSEmmanuel Vadot  - |
98*ae5de77eSEmmanuel Vadot    #include <dt-bindings/leds/common.h>
99*ae5de77eSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
100*ae5de77eSEmmanuel Vadot
101*ae5de77eSEmmanuel Vadot    i2c {
102*ae5de77eSEmmanuel Vadot      #address-cells = <1>;
103*ae5de77eSEmmanuel Vadot      #size-cells = <0>;
104*ae5de77eSEmmanuel Vadot
105*ae5de77eSEmmanuel Vadot      led-controller@33 {
106*ae5de77eSEmmanuel Vadot        compatible = "ti,tps61311", "ti,tps61310";
107*ae5de77eSEmmanuel Vadot        reg = <0x33>;
108*ae5de77eSEmmanuel Vadot
109*ae5de77eSEmmanuel Vadot        reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
110*ae5de77eSEmmanuel Vadot
111*ae5de77eSEmmanuel Vadot        led {
112*ae5de77eSEmmanuel Vadot          function = LED_FUNCTION_FLASH;
113*ae5de77eSEmmanuel Vadot          color = <LED_COLOR_ID_WHITE>;
114*ae5de77eSEmmanuel Vadot          led-sources = <1>, <2>, <3>;
115*ae5de77eSEmmanuel Vadot          led-max-microamp = <525000>;
116*ae5de77eSEmmanuel Vadot          flash-max-microamp = <1500000>;
117*ae5de77eSEmmanuel Vadot          flash-max-timeout-us = <852000>;
118*ae5de77eSEmmanuel Vadot        };
119*ae5de77eSEmmanuel Vadot      };
120*ae5de77eSEmmanuel Vadot    };
121