1fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2fac71e4eSEmmanuel Vadot%YAML 1.2
3fac71e4eSEmmanuel Vadot---
4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/leds/nxp,pca953x.yaml#
5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6fac71e4eSEmmanuel Vadot
7fac71e4eSEmmanuel Vadottitle: NXP PCA9532 LED Dimmer
8fac71e4eSEmmanuel Vadot
9fac71e4eSEmmanuel Vadotmaintainers:
10fac71e4eSEmmanuel Vadot  - Riku Voipio <riku.voipio@iki.fi>
11fac71e4eSEmmanuel Vadot
12fac71e4eSEmmanuel Vadotdescription: |
13fac71e4eSEmmanuel Vadot  The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
14fac71e4eSEmmanuel Vadot  The PWM support 256 steps.
15fac71e4eSEmmanuel Vadot
16fac71e4eSEmmanuel Vadot  For more product information please see the link below:
17fac71e4eSEmmanuel Vadot    https://www.nxp.com/docs/en/data-sheet/PCA9532.pdf
18fac71e4eSEmmanuel Vadot
19fac71e4eSEmmanuel Vadotproperties:
20fac71e4eSEmmanuel Vadot  compatible:
21fac71e4eSEmmanuel Vadot    enum:
22fac71e4eSEmmanuel Vadot      - nxp,pca9530
23fac71e4eSEmmanuel Vadot      - nxp,pca9531
24fac71e4eSEmmanuel Vadot      - nxp,pca9532
25fac71e4eSEmmanuel Vadot      - nxp,pca9533
26fac71e4eSEmmanuel Vadot
27fac71e4eSEmmanuel Vadot  reg:
28fac71e4eSEmmanuel Vadot    maxItems: 1
29fac71e4eSEmmanuel Vadot
30fac71e4eSEmmanuel Vadot  gpio-controller: true
31fac71e4eSEmmanuel Vadot
32*aa1a8ff2SEmmanuel Vadot  gpio-line-names:
33*aa1a8ff2SEmmanuel Vadot    minItems: 1
34*aa1a8ff2SEmmanuel Vadot    maxItems: 16
35*aa1a8ff2SEmmanuel Vadot
36fac71e4eSEmmanuel Vadot  '#gpio-cells':
37fac71e4eSEmmanuel Vadot    const: 2
38fac71e4eSEmmanuel Vadot
39fac71e4eSEmmanuel VadotpatternProperties:
40fac71e4eSEmmanuel Vadot  "^led-[0-9a-z]+$":
41fac71e4eSEmmanuel Vadot    type: object
42fac71e4eSEmmanuel Vadot    $ref: common.yaml#
43fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
44fac71e4eSEmmanuel Vadot
45fac71e4eSEmmanuel Vadot    properties:
46fac71e4eSEmmanuel Vadot      type:
47fac71e4eSEmmanuel Vadot        description: |
48fac71e4eSEmmanuel Vadot          Output configuration, see include/dt-bindings/leds/leds-pca9532.h
49fac71e4eSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
50fac71e4eSEmmanuel Vadot        default: 0
51fac71e4eSEmmanuel Vadot        minimum: 0
52fac71e4eSEmmanuel Vadot        maximum: 4
53fac71e4eSEmmanuel Vadot
54fac71e4eSEmmanuel Vadotrequired:
55fac71e4eSEmmanuel Vadot  - compatible
56fac71e4eSEmmanuel Vadot  - reg
57fac71e4eSEmmanuel Vadot
58fac71e4eSEmmanuel VadotadditionalProperties: false
59fac71e4eSEmmanuel Vadot
60fac71e4eSEmmanuel Vadotexamples:
61fac71e4eSEmmanuel Vadot  - |
62fac71e4eSEmmanuel Vadot    #include <dt-bindings/leds/leds-pca9532.h>
63fac71e4eSEmmanuel Vadot
64fac71e4eSEmmanuel Vadot    i2c {
65fac71e4eSEmmanuel Vadot        #address-cells = <1>;
66fac71e4eSEmmanuel Vadot        #size-cells = <0>;
67fac71e4eSEmmanuel Vadot
68fac71e4eSEmmanuel Vadot        led-controller@62 {
69fac71e4eSEmmanuel Vadot            compatible = "nxp,pca9533";
70fac71e4eSEmmanuel Vadot            reg = <0x62>;
71fac71e4eSEmmanuel Vadot
72fac71e4eSEmmanuel Vadot            led-1 {
73fac71e4eSEmmanuel Vadot                label = "pca:red:power";
74fac71e4eSEmmanuel Vadot                type = <PCA9532_TYPE_LED>;
75fac71e4eSEmmanuel Vadot            };
76fac71e4eSEmmanuel Vadot
77fac71e4eSEmmanuel Vadot            led-2 {
78fac71e4eSEmmanuel Vadot                label = "pca:green:power";
79fac71e4eSEmmanuel Vadot                type = <PCA9532_TYPE_LED>;
80fac71e4eSEmmanuel Vadot            };
81fac71e4eSEmmanuel Vadot
82fac71e4eSEmmanuel Vadot            led-3 {
83fac71e4eSEmmanuel Vadot                type = <PCA9532_TYPE_LED>;
84fac71e4eSEmmanuel Vadot                default-state = "on";
85fac71e4eSEmmanuel Vadot            };
86fac71e4eSEmmanuel Vadot
87fac71e4eSEmmanuel Vadot            led-4 {
88fac71e4eSEmmanuel Vadot                type = <PCA9532_TYPE_LED>;
89fac71e4eSEmmanuel Vadot                default-state = "keep";
90fac71e4eSEmmanuel Vadot            };
91fac71e4eSEmmanuel Vadot        };
92fac71e4eSEmmanuel Vadot    };
93fac71e4eSEmmanuel Vadot
94fac71e4eSEmmanuel Vadot...
95