Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame^] | 1 | Device Tree Bindings for LED support on MT6323 PMIC |
| 2 | |
| 3 | MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED |
| 4 | controllers are defined as the subnode of the function node provided by MT6323 |
| 5 | PMIC controller that is being defined as one kind of Muti-Function Device (MFD) |
| 6 | using shared bus called PMIC wrapper for each subfunction to access remote |
| 7 | MT6323 PMIC hardware. |
| 8 | |
| 9 | For MT6323 MFD bindings see: |
| 10 | Documentation/devicetree/bindings/mfd/mt6397.txt |
| 11 | For MediaTek PMIC wrapper bindings see: |
| 12 | Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml |
| 13 | |
| 14 | Required properties: |
| 15 | - compatible : Must be one of |
| 16 | - "mediatek,mt6323-led" |
| 17 | - "mediatek,mt6331-led" |
| 18 | - "mediatek,mt6332-led" |
| 19 | - address-cells : Must be 1 |
| 20 | - size-cells : Must be 0 |
| 21 | |
| 22 | Each led is represented as a child node of the mediatek,mt6323-led that |
| 23 | describes the initial behavior for each LED physically and currently only four |
| 24 | LED child nodes can be supported. |
| 25 | |
| 26 | Required properties for the LED child node: |
| 27 | - reg : LED channel number (0..3) |
| 28 | |
| 29 | Optional properties for the LED child node: |
| 30 | - label : See Documentation/devicetree/bindings/leds/common.txt |
| 31 | - linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt |
| 32 | - default-state: See Documentation/devicetree/bindings/leds/common.txt |
| 33 | |
| 34 | Example: |
| 35 | |
| 36 | mt6323: pmic { |
| 37 | compatible = "mediatek,mt6323"; |
| 38 | |
| 39 | ... |
| 40 | |
| 41 | mt6323led: leds { |
| 42 | compatible = "mediatek,mt6323-led"; |
| 43 | #address-cells = <1>; |
| 44 | #size-cells = <0>; |
| 45 | |
| 46 | led@0 { |
| 47 | reg = <0>; |
| 48 | label = "LED0"; |
| 49 | linux,default-trigger = "timer"; |
| 50 | default-state = "on"; |
| 51 | }; |
| 52 | led@1 { |
| 53 | reg = <1>; |
| 54 | label = "LED1"; |
| 55 | default-state = "off"; |
| 56 | }; |
| 57 | led@2 { |
| 58 | reg = <2>; |
| 59 | label = "LED2"; |
| 60 | default-state = "on"; |
| 61 | }; |
| 62 | }; |
| 63 | }; |