mediatek: update to latest kernel patchset from v4.13-rc
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.9 / 0018-dt-bindings-leds-Add-document-bindings-for-leds-mt63.patch
1 From 424ca23e68b043ce26d6981839ca825ef8637aba Mon Sep 17 00:00:00 2001
2 From: Sean Wang <sean.wang@mediatek.com>
3 Date: Mon, 20 Mar 2017 14:47:24 +0800
4 Subject: [PATCH 18/57] dt-bindings: leds: Add document bindings for
5 leds-mt6323
6
7 This patch adds documentation for devicetree bindings for LED support on
8 MT6323 PMIC.
9
10 Signed-off-by: Sean Wang <sean.wang@mediatek.com>
11 ---
12 .../devicetree/bindings/leds/leds-mt6323.txt | 60 ++++++++++++++++++++++
13 1 file changed, 60 insertions(+)
14 create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
15
16 --- /dev/null
17 +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
18 @@ -0,0 +1,60 @@
19 +Device Tree Bindings for LED support on MT6323 PMIC
20 +
21 +MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
22 +controllers are defined as the subnode of the function node provided by MT6323
23 +PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
24 +using shared bus called PMIC wrapper for each subfunction to access remote
25 +MT6323 PMIC hardware.
26 +
27 +For MT6323 MFD bindings see:
28 +Documentation/devicetree/bindings/mfd/mt6397.txt
29 +For MediaTek PMIC wrapper bindings see:
30 +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
31 +
32 +Required properties:
33 +- compatible : Must be "mediatek,mt6323-led"
34 +- address-cells : Must be 1
35 +- size-cells : Must be 0
36 +
37 +Each led is represented as a child node of the mediatek,mt6323-led that
38 +describes the initial behavior for each LED physically and currently only four
39 +LED child nodes can be supported.
40 +
41 +Required properties for the LED child node:
42 +- reg : LED channel number (0..3)
43 +
44 +Optional properties for the LED child node:
45 +- label : See Documentation/devicetree/bindings/leds/common.txt
46 +- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt
47 +- default-state: See Documentation/devicetree/bindings/leds/common.txt
48 +
49 +Example:
50 +
51 + mt6323: pmic {
52 + compatible = "mediatek,mt6323";
53 +
54 + ...
55 +
56 + mt6323led: leds {
57 + compatible = "mediatek,mt6323-led";
58 + #address-cells = <1>;
59 + #size-cells = <0>;
60 +
61 + led@0 {
62 + reg = <0>;
63 + label = "LED0";
64 + linux,default-trigger = "timer";
65 + default-state = "on";
66 + };
67 + led@1 {
68 + reg = <1>;
69 + label = "LED1";
70 + default-state = "off";
71 + };
72 + led@2 {
73 + reg = <2>;
74 + label = "LED2";
75 + default-state = "on";
76 + };
77 + };
78 + };