xref: /freebsd/sys/contrib/device-tree/Bindings/leds/leds-bcm6358.txt (revision 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc)
1c66ec88fSEmmanuel VadotLEDs connected to Broadcom BCM6358 controller
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThis controller is present on BCM6358 and BCM6368.
4c66ec88fSEmmanuel VadotIn these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
5c66ec88fSEmmanuel Vadotwhich can either be controlled by software (exporting the 74x164 as spi-gpio.
6*2eb4d8dcSEmmanuel VadotSee Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or
7c66ec88fSEmmanuel Vadotby hardware using this driver.
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel VadotRequired properties:
10c66ec88fSEmmanuel Vadot  - compatible : should be "brcm,bcm6358-leds".
11c66ec88fSEmmanuel Vadot  - #address-cells : must be 1.
12c66ec88fSEmmanuel Vadot  - #size-cells : must be 0.
13c66ec88fSEmmanuel Vadot  - reg : BCM6358 LED controller address and size.
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel VadotOptional properties:
16c66ec88fSEmmanuel Vadot  - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
17c66ec88fSEmmanuel Vadot    Default : 1
18c66ec88fSEmmanuel Vadot  - brcm,clk-dat-low : Boolean, makes clock and data signals active low.
19c66ec88fSEmmanuel Vadot    Default : false
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel VadotEach LED is represented as a sub-node of the brcm,bcm6358-leds device.
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel VadotLED sub-node required properties:
24c66ec88fSEmmanuel Vadot  - reg : LED pin number (only LEDs 0 to 31 are valid).
25c66ec88fSEmmanuel Vadot
26c66ec88fSEmmanuel VadotLED sub-node optional properties:
27c66ec88fSEmmanuel Vadot  - label : see Documentation/devicetree/bindings/leds/common.txt
28c66ec88fSEmmanuel Vadot  - active-low : Boolean, makes LED active low.
29c66ec88fSEmmanuel Vadot    Default : false
30c66ec88fSEmmanuel Vadot  - default-state : see
31c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/leds/common.txt
32c66ec88fSEmmanuel Vadot  - linux,default-trigger : see
33c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/leds/common.txt
34c66ec88fSEmmanuel Vadot
35c66ec88fSEmmanuel VadotExamples:
36c66ec88fSEmmanuel VadotScenario 1 : BCM6358
37c66ec88fSEmmanuel Vadot	leds0: led-controller@fffe00d0 {
38c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm6358-leds";
39c66ec88fSEmmanuel Vadot		#address-cells = <1>;
40c66ec88fSEmmanuel Vadot		#size-cells = <0>;
41c66ec88fSEmmanuel Vadot		reg = <0xfffe00d0 0x8>;
42c66ec88fSEmmanuel Vadot
43c66ec88fSEmmanuel Vadot		alarm_white {
44c66ec88fSEmmanuel Vadot			reg = <0>;
45c66ec88fSEmmanuel Vadot			active-low;
46c66ec88fSEmmanuel Vadot			label = "white:alarm";
47c66ec88fSEmmanuel Vadot		};
48c66ec88fSEmmanuel Vadot		tv_white {
49c66ec88fSEmmanuel Vadot			reg = <2>;
50c66ec88fSEmmanuel Vadot			active-low;
51c66ec88fSEmmanuel Vadot			label = "white:tv";
52c66ec88fSEmmanuel Vadot		};
53c66ec88fSEmmanuel Vadot		tel_white {
54c66ec88fSEmmanuel Vadot			reg = <3>;
55c66ec88fSEmmanuel Vadot			active-low;
56c66ec88fSEmmanuel Vadot			label = "white:tel";
57c66ec88fSEmmanuel Vadot		};
58c66ec88fSEmmanuel Vadot		adsl_white {
59c66ec88fSEmmanuel Vadot			reg = <4>;
60c66ec88fSEmmanuel Vadot			active-low;
61c66ec88fSEmmanuel Vadot			label = "white:adsl";
62c66ec88fSEmmanuel Vadot		};
63c66ec88fSEmmanuel Vadot	};
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel VadotScenario 2 : BCM6368
66c66ec88fSEmmanuel Vadot	leds0: led-controller@100000d0 {
67c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm6358-leds";
68c66ec88fSEmmanuel Vadot		#address-cells = <1>;
69c66ec88fSEmmanuel Vadot		#size-cells = <0>;
70c66ec88fSEmmanuel Vadot		reg = <0x100000d0 0x8>;
71c66ec88fSEmmanuel Vadot		brcm,pol-low;
72c66ec88fSEmmanuel Vadot		brcm,clk-div = <4>;
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot		power_red {
75c66ec88fSEmmanuel Vadot			reg = <0>;
76c66ec88fSEmmanuel Vadot			active-low;
77c66ec88fSEmmanuel Vadot			label = "red:power";
78c66ec88fSEmmanuel Vadot		};
79c66ec88fSEmmanuel Vadot		power_green {
80c66ec88fSEmmanuel Vadot			reg = <1>;
81c66ec88fSEmmanuel Vadot			active-low;
82c66ec88fSEmmanuel Vadot			label = "green:power";
83c66ec88fSEmmanuel Vadot			default-state = "on";
84c66ec88fSEmmanuel Vadot		};
85c66ec88fSEmmanuel Vadot		power_blue {
86c66ec88fSEmmanuel Vadot			reg = <2>;
87c66ec88fSEmmanuel Vadot			label = "blue:power";
88c66ec88fSEmmanuel Vadot		};
89c66ec88fSEmmanuel Vadot		broadband_red {
90c66ec88fSEmmanuel Vadot			reg = <3>;
91c66ec88fSEmmanuel Vadot			active-low;
92c66ec88fSEmmanuel Vadot			label = "red:broadband";
93c66ec88fSEmmanuel Vadot		};
94c66ec88fSEmmanuel Vadot		broadband_green {
95c66ec88fSEmmanuel Vadot			reg = <4>;
96c66ec88fSEmmanuel Vadot			label = "green:broadband";
97c66ec88fSEmmanuel Vadot		};
98c66ec88fSEmmanuel Vadot		broadband_blue {
99c66ec88fSEmmanuel Vadot			reg = <5>;
100c66ec88fSEmmanuel Vadot			active-low;
101c66ec88fSEmmanuel Vadot			label = "blue:broadband";
102c66ec88fSEmmanuel Vadot		};
103c66ec88fSEmmanuel Vadot		wireless_red {
104c66ec88fSEmmanuel Vadot			reg = <6>;
105c66ec88fSEmmanuel Vadot			active-low;
106c66ec88fSEmmanuel Vadot			label = "red:wireless";
107c66ec88fSEmmanuel Vadot		};
108c66ec88fSEmmanuel Vadot		wireless_green {
109c66ec88fSEmmanuel Vadot			reg = <7>;
110c66ec88fSEmmanuel Vadot			active-low;
111c66ec88fSEmmanuel Vadot			label = "green:wireless";
112c66ec88fSEmmanuel Vadot		};
113c66ec88fSEmmanuel Vadot		wireless_blue {
114c66ec88fSEmmanuel Vadot			reg = <8>;
115c66ec88fSEmmanuel Vadot			label = "blue:wireless";
116c66ec88fSEmmanuel Vadot		};
117c66ec88fSEmmanuel Vadot		phone_red {
118c66ec88fSEmmanuel Vadot			reg = <9>;
119c66ec88fSEmmanuel Vadot			active-low;
120c66ec88fSEmmanuel Vadot			label = "red:phone";
121c66ec88fSEmmanuel Vadot		};
122c66ec88fSEmmanuel Vadot		phone_green {
123c66ec88fSEmmanuel Vadot			reg = <10>;
124c66ec88fSEmmanuel Vadot			active-low;
125c66ec88fSEmmanuel Vadot			label = "green:phone";
126c66ec88fSEmmanuel Vadot		};
127c66ec88fSEmmanuel Vadot		phone_blue {
128c66ec88fSEmmanuel Vadot			reg = <11>;
129c66ec88fSEmmanuel Vadot			label = "blue:phone";
130c66ec88fSEmmanuel Vadot		};
131c66ec88fSEmmanuel Vadot		upgrading_red {
132c66ec88fSEmmanuel Vadot			reg = <12>;
133c66ec88fSEmmanuel Vadot			active-low;
134c66ec88fSEmmanuel Vadot			label = "red:upgrading";
135c66ec88fSEmmanuel Vadot		};
136c66ec88fSEmmanuel Vadot		upgrading_green {
137c66ec88fSEmmanuel Vadot			reg = <13>;
138c66ec88fSEmmanuel Vadot			active-low;
139c66ec88fSEmmanuel Vadot			label = "green:upgrading";
140c66ec88fSEmmanuel Vadot		};
141c66ec88fSEmmanuel Vadot		upgrading_blue {
142c66ec88fSEmmanuel Vadot			reg = <14>;
143c66ec88fSEmmanuel Vadot			label = "blue:upgrading";
144c66ec88fSEmmanuel Vadot		};
145c66ec88fSEmmanuel Vadot	};
146