Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/leds-lp55xx.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: TI/National Semiconductor LP55xx and LP8501 LED Drivers
0008 
0009 maintainers:
0010   - Jacek Anaszewski <jacek.anaszewski@gmail.com>
0011   - Pavel Machek <pavel@ucw.cz>
0012 
0013 description: |
0014   Bindings for the TI/National Semiconductor LP55xx and LP8501 multi channel
0015   LED Drivers.
0016 
0017   For more product information please see the link below:
0018     https://www.ti.com/lit/gpn/lp5521
0019     https://www.ti.com/lit/gpn/lp5523
0020     https://www.ti.com/lit/gpn/lp55231
0021     https://www.ti.com/lit/gpn/lp5562
0022     https://www.ti.com/lit/gpn/lp8501
0023 
0024 properties:
0025   compatible:
0026     enum:
0027       - national,lp5521
0028       - national,lp5523
0029       - ti,lp55231
0030       - ti,lp5562
0031       - ti,lp8501
0032 
0033   reg:
0034     maxItems: 1
0035     description: I2C slave address
0036 
0037   clock-mode:
0038     $ref: /schemas/types.yaml#/definitions/uint8
0039     description: |
0040       Input clock mode
0041     enum:
0042       - 0 # automode
0043       - 1 # internal
0044       - 2 # external
0045 
0046   enable-gpio:
0047     maxItems: 1
0048     description: |
0049       GPIO attached to the chip's enable pin
0050 
0051   pwr-sel:
0052     $ref: /schemas/types.yaml#/definitions/uint8
0053     description: |
0054       LP8501 specific property. Power selection for output channels.
0055     enum:
0056       - 0 # D1~9 are connected to VDD
0057       - 1 # D1~6 with VDD, D7~9 with VOUT
0058       - 2 # D1~6 with VOUT, D7~9 with VDD
0059       - 3 # D1~9 are connected to VOUT
0060 
0061   '#address-cells':
0062     const: 1
0063 
0064   '#size-cells':
0065     const: 0
0066 
0067 patternProperties:
0068   "(^led@[0-9a-f]$|led)":
0069     type: object
0070     $ref: common.yaml#
0071     properties:
0072       led-cur:
0073         $ref: /schemas/types.yaml#/definitions/uint8
0074         description: |
0075           Current setting at each LED channel (mA x10, 0 if LED is not connected)
0076         minimum: 0
0077         maximum: 255
0078 
0079       max-cur:
0080         $ref: /schemas/types.yaml#/definitions/uint8
0081         description: Maximun current at each LED channel.
0082 
0083       reg:
0084         description: |
0085           Output channel for the LED.  This is zero based channel identifier and
0086           the data sheet is a one based channel identifier.
0087           reg value to output to LED output number
0088         enum:
0089           - 0 # LED output D1
0090           - 1 # LED output D2
0091           - 2 # LED output D3
0092           - 3 # LED output D4
0093           - 4 # LED output D5
0094           - 5 # LED output D6
0095           - 6 # LED output D7
0096           - 7 # LED output D8
0097           - 8 # LED output D9
0098 
0099       chan-name:
0100         $ref: /schemas/types.yaml#/definitions/string
0101         description: name of channel
0102 
0103 required:
0104   - compatible
0105   - reg
0106 
0107 additionalProperties: false
0108 
0109 examples:
0110   - |
0111     #include <dt-bindings/leds/common.h>
0112 
0113     i2c {
0114         #address-cells = <1>;
0115         #size-cells = <0>;
0116 
0117         led-controller@32 {
0118             #address-cells = <1>;
0119             #size-cells = <0>;
0120             compatible = "ti,lp8501";
0121             reg = <0x32>;
0122             clock-mode = /bits/ 8 <2>;
0123             pwr-sel = /bits/ 8 <3>;     /* D1~9 connected to VOUT */
0124 
0125             led@0 {
0126                 reg = <0>;
0127                 chan-name = "d1";
0128                 led-cur = /bits/ 8 <0x14>;
0129                 max-cur = /bits/ 8 <0x20>;
0130             };
0131 
0132             led@1 {
0133                 reg = <1>;
0134                 chan-name = "d2";
0135                 led-cur = /bits/ 8 <0x14>;
0136                 max-cur = /bits/ 8 <0x20>;
0137             };
0138 
0139             led@2 {
0140                 reg = <2>;
0141                 chan-name = "d3";
0142                 led-cur = /bits/ 8 <0x14>;
0143                 max-cur = /bits/ 8 <0x20>;
0144             };
0145 
0146             led@3 {
0147                 reg = <3>;
0148                 chan-name = "d4";
0149                 led-cur = /bits/ 8 <0x14>;
0150                 max-cur = /bits/ 8 <0x20>;
0151             };
0152 
0153             led@4 {
0154                 reg = <4>;
0155                 chan-name = "d5";
0156                 led-cur = /bits/ 8 <0x14>;
0157                 max-cur = /bits/ 8 <0x20>;
0158             };
0159 
0160             led@5 {
0161                 reg = <5>;
0162                 chan-name = "d6";
0163                 led-cur = /bits/ 8 <0x14>;
0164                 max-cur = /bits/ 8 <0x20>;
0165             };
0166 
0167             led@6 {
0168                 reg = <6>;
0169                 chan-name = "d7";
0170                 led-cur = /bits/ 8 <0x14>;
0171                 max-cur = /bits/ 8 <0x20>;
0172             };
0173 
0174             led@7 {
0175                 reg = <7>;
0176                 chan-name = "d8";
0177                 led-cur = /bits/ 8 <0x14>;
0178                 max-cur = /bits/ 8 <0x20>;
0179             };
0180 
0181             led@8 {
0182                 reg = <8>;
0183                 chan-name = "d9";
0184                 led-cur = /bits/ 8 <0x14>;
0185                 max-cur = /bits/ 8 <0x20>;
0186             };
0187         };
0188 
0189         led-controller@33 {
0190             #address-cells = <1>;
0191             #size-cells = <0>;
0192             compatible = "national,lp5523";
0193             reg = <0x33>;
0194             clock-mode = /bits/ 8 <0>;
0195 
0196             multi-led@2 {
0197                 #address-cells = <1>;
0198                 #size-cells = <0>;
0199                 reg = <0x2>;
0200                 color = <LED_COLOR_ID_RGB>;
0201                 function = LED_FUNCTION_STANDBY;
0202                 linux,default-trigger = "heartbeat";
0203 
0204                 led@0 {
0205                     led-cur = /bits/ 8 <50>;
0206                     max-cur = /bits/ 8 <100>;
0207                     reg = <0x0>;
0208                     color = <LED_COLOR_ID_GREEN>;
0209                 };
0210 
0211                 led@1 {
0212                     led-cur = /bits/ 8 <50>;
0213                     max-cur = /bits/ 8 <100>;
0214                     reg = <0x1>;
0215                     color = <LED_COLOR_ID_BLUE>;
0216                 };
0217 
0218                 led@6 {
0219                     led-cur = /bits/ 8 <50>;
0220                     max-cur = /bits/ 8 <100>;
0221                     reg = <0x6>;
0222                     color = <LED_COLOR_ID_RED>;
0223                 };
0224             };
0225         };
0226     };
0227 
0228 ...