Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1* NXP - pca955x LED driver
2
3The PCA955x family of chips are I2C LED blinkers whose pins not used
4to control LEDs can be used as general purpose I/Os. The GPIO pins can
5be input or output, and output pins can also be pulse-width controlled.
6
7Required properties:
8- compatible : should be one of :
9 "nxp,pca9550"
10 "nxp,pca9551"
11 "nxp,pca9552"
12 "nxp,pca9553"
13- #address-cells: must be 1
14- #size-cells: must be 0
15- reg: I2C slave address. depends on the model.
16
17Optional properties:
18- gpio-controller: allows pins to be used as GPIOs.
19- #gpio-cells: must be 2.
20- gpio-line-names: define the names of the GPIO lines
21
22LED sub-node properties:
23- reg : number of LED line.
24 from 0 to 1 for the pca9550
25 from 0 to 7 for the pca9551
26 from 0 to 15 for the pca9552
27 from 0 to 3 for the pca9553
28- type: (optional) either
29 PCA9532_TYPE_NONE
30 PCA9532_TYPE_LED
31 PCA9532_TYPE_GPIO
32 see dt-bindings/leds/leds-pca955x.h (default to LED)
33- label : (optional)
34 see Documentation/devicetree/bindings/leds/common.txt
35- linux,default-trigger : (optional)
36 see Documentation/devicetree/bindings/leds/common.txt
37
38Examples:
39
40pca9552: pca9552@60 {
41 compatible = "nxp,pca9552";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 reg = <0x60>;
45
46 gpio-controller;
47 #gpio-cells = <2>;
48 gpio-line-names = "GPIO12", "GPIO13", "GPIO14", "GPIO15";
49
50 gpio@12 {
51 reg = <12>;
52 type = <PCA955X_TYPE_GPIO>;
53 };
54 gpio@13 {
55 reg = <13>;
56 type = <PCA955X_TYPE_GPIO>;
57 };
58 gpio@14 {
59 reg = <14>;
60 type = <PCA955X_TYPE_GPIO>;
61 };
62 gpio@15 {
63 reg = <15>;
64 type = <PCA955X_TYPE_GPIO>;
65 };
66
67 led@0 {
68 label = "red:power";
69 linux,default-trigger = "default-on";
70 reg = <0>;
71 type = <PCA955X_TYPE_LED>;
72 };
73 led@1 {
74 label = "green:power";
75 reg = <1>;
76 type = <PCA955X_TYPE_LED>;
77 };
78 led@2 {
79 label = "pca9552:yellow";
80 reg = <2>;
81 type = <PCA955X_TYPE_LED>;
82 };
83 led@3 {
84 label = "pca9552:white";
85 reg = <3>;
86 type = <PCA955X_TYPE_LED>;
87 };
88};