18c2ecf20Sopenharmony_ciDevice Tree Bindings for LED support on MT6323 PMIC
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciMT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
48c2ecf20Sopenharmony_cicontrollers are defined as the subnode of the function node provided by MT6323
58c2ecf20Sopenharmony_ciPMIC controller that is being defined as one kind of Muti-Function Device (MFD)
68c2ecf20Sopenharmony_ciusing shared bus called PMIC wrapper for each subfunction to access remote
78c2ecf20Sopenharmony_ciMT6323 PMIC hardware.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciFor MT6323 MFD bindings see:
108c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/mfd/mt6397.txt
118c2ecf20Sopenharmony_ciFor MediaTek PMIC wrapper bindings see:
128c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/soc/mediatek/pwrap.txt
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciRequired properties:
158c2ecf20Sopenharmony_ci- compatible : Must be "mediatek,mt6323-led"
168c2ecf20Sopenharmony_ci- address-cells : Must be 1
178c2ecf20Sopenharmony_ci- size-cells : Must be 0
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciEach led is represented as a child node of the mediatek,mt6323-led that
208c2ecf20Sopenharmony_cidescribes the initial behavior for each LED physically and currently only four
218c2ecf20Sopenharmony_ciLED child nodes can be supported.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciRequired properties for the LED child node:
248c2ecf20Sopenharmony_ci- reg : LED channel number (0..3)
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciOptional properties for the LED child node:
278c2ecf20Sopenharmony_ci- label : See Documentation/devicetree/bindings/leds/common.txt
288c2ecf20Sopenharmony_ci- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt
298c2ecf20Sopenharmony_ci- default-state: See Documentation/devicetree/bindings/leds/common.txt
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciExample:
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci	mt6323: pmic {
348c2ecf20Sopenharmony_ci		compatible = "mediatek,mt6323";
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci		...
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci		mt6323led: leds {
398c2ecf20Sopenharmony_ci			compatible = "mediatek,mt6323-led";
408c2ecf20Sopenharmony_ci			#address-cells = <1>;
418c2ecf20Sopenharmony_ci			#size-cells = <0>;
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci			led@0 {
448c2ecf20Sopenharmony_ci				reg = <0>;
458c2ecf20Sopenharmony_ci				label = "LED0";
468c2ecf20Sopenharmony_ci				linux,default-trigger = "timer";
478c2ecf20Sopenharmony_ci				default-state = "on";
488c2ecf20Sopenharmony_ci			};
498c2ecf20Sopenharmony_ci			led@1 {
508c2ecf20Sopenharmony_ci				reg = <1>;
518c2ecf20Sopenharmony_ci				label = "LED1";
528c2ecf20Sopenharmony_ci				default-state = "off";
538c2ecf20Sopenharmony_ci			};
548c2ecf20Sopenharmony_ci			led@2 {
558c2ecf20Sopenharmony_ci				reg = <2>;
568c2ecf20Sopenharmony_ci				label = "LED2";
578c2ecf20Sopenharmony_ci				default-state = "on";
588c2ecf20Sopenharmony_ci			};
598c2ecf20Sopenharmony_ci		};
608c2ecf20Sopenharmony_ci	};
61