summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/leds/leds-pca955x.txt
blob: 817f460f3a72ac74c25b9297f9eb4464ea270d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
* NXP - pca955x LED driver

The PCA955x family of chips are I2C LED blinkers whose pins not used
to control LEDs can be used as general purpose I/Os. The GPIO pins can
be input or output, and output pins can also be pulse-width controlled.

Required properties:
- compatible : should be one of :
	"nxp,pca9550"
	"nxp,pca9551"
	"nxp,pca9552"
	"ibm,pca9552"
	"nxp,pca9553"
- #address-cells: must be 1
- #size-cells: must be 0
- reg: I2C slave address. depends on the model.

Optional properties:
- gpio-controller: allows pins to be used as GPIOs.
- #gpio-cells: must be 2.
- gpio-line-names: define the names of the GPIO lines

LED sub-node properties:
- reg : number of LED line.
		from 0 to  1 for the pca9550
		from 0 to  7 for the pca9551
		from 0 to 15 for the pca9552
		from 0 to  3 for the pca9553
- type: (optional) either
	PCA955X_TYPE_NONE
	PCA955X_TYPE_LED
	PCA955X_TYPE_GPIO
	see dt-bindings/leds/leds-pca955x.h (default to LED)
- label : (optional)
	see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger : (optional)
	see Documentation/devicetree/bindings/leds/common.txt

Examples:

pca9552: pca9552@60 {
	compatible = "nxp,pca9552";
	#address-cells = <1>;
        #size-cells = <0>;
	reg = <0x60>;

	gpio-controller;
	#gpio-cells = <2>;
	gpio-line-names = "GPIO12", "GPIO13", "GPIO14", "GPIO15";

	gpio@12 {
		reg = <12>;
		type = <PCA955X_TYPE_GPIO>;
	};
	gpio@13 {
		reg = <13>;
		type = <PCA955X_TYPE_GPIO>;
	};
	gpio@14 {
		reg = <14>;
		type = <PCA955X_TYPE_GPIO>;
	};
	gpio@15 {
		reg = <15>;
		type = <PCA955X_TYPE_GPIO>;
	};

	led@0 {
		label = "red:power";
		linux,default-trigger = "default-on";
		reg = <0>;
		type = <PCA955X_TYPE_LED>;
	};
	led@1 {
		label = "green:power";
		reg = <1>;
		type = <PCA955X_TYPE_LED>;
	};
	led@2 {
		label = "pca9552:yellow";
		reg = <2>;
		type = <PCA955X_TYPE_LED>;
	};
	led@3 {
		label = "pca9552:white";
		reg = <3>;
		type = <PCA955X_TYPE_LED>;
	};
};