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