Álvaro Fernández Rojas | c7c859c | 2017-05-07 20:10:24 +0200 | [diff] [blame] | 1 | LEDs connected to Broadcom BCM6328 controller |
| 2 | |
| 3 | This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268. |
| 4 | In these SoCs it's possible to control LEDs both as GPIOs or by hardware. |
| 5 | However, on some devices there are Serial LEDs (LEDs connected to a 74x164 |
| 6 | controller), which can either be controlled by software (exporting the 74x164 |
| 7 | as spi-gpio. See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or |
| 8 | by hardware using this driver. |
| 9 | Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and |
| 10 | exporting the 74x164 as spi-gpio prevents those LEDs to be hardware |
| 11 | controlled, so the only chance to keep them working is by using this driver. |
| 12 | |
| 13 | Required properties: |
| 14 | - compatible : should be "brcm,bcm6328-leds". |
| 15 | - #address-cells : must be 1. |
| 16 | - #size-cells : must be 0. |
| 17 | - reg : BCM6328 LED controller address and size. |
| 18 | |
| 19 | Optional properties: |
| 20 | - brcm,serial-leds : Boolean, enables Serial LEDs. |
| 21 | Default : false |
| 22 | - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing. |
| 23 | Default : false |
| 24 | - brcm,serial-clk-low : Boolean, makes clock signal active low. |
| 25 | Default : false |
| 26 | - brcm,serial-dat-low : Boolean, makes data signal active low. |
| 27 | Default : false |
| 28 | - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction. |
| 29 | Default : false |
| 30 | |
| 31 | Each LED is represented as a sub-node of the brcm,bcm6328-leds device. |
| 32 | |
| 33 | LED sub-node required properties: |
| 34 | - reg : LED pin number (only LEDs 0 to 23 are valid). |
| 35 | |
| 36 | LED sub-node optional properties: |
| 37 | - label : see Documentation/devicetree/bindings/leds/common.txt |
| 38 | - active-low : Boolean, makes LED active low. |
| 39 | Default : false |
| 40 | |
| 41 | Examples: |
| 42 | Scenario 1 : BCM6328 with 4 GPIO LEDs |
| 43 | leds0: led-controller@10000800 { |
| 44 | compatible = "brcm,bcm6328-leds"; |
| 45 | #address-cells = <1>; |
| 46 | #size-cells = <0>; |
| 47 | reg = <0x10000800 0x24>; |
| 48 | |
| 49 | alarm_red@2 { |
| 50 | reg = <2>; |
| 51 | active-low; |
| 52 | label = "red:alarm"; |
| 53 | }; |
| 54 | inet_green@3 { |
| 55 | reg = <3>; |
| 56 | active-low; |
| 57 | label = "green:inet"; |
| 58 | }; |
| 59 | power_green@4 { |
| 60 | reg = <4>; |
| 61 | active-low; |
| 62 | label = "green:power"; |
| 63 | }; |
| 64 | }; |
| 65 | |
| 66 | Scenario 2 : BCM63268 with Serial LEDs |
| 67 | leds0: led-controller@10001900 { |
| 68 | compatible = "brcm,bcm6328-leds"; |
| 69 | #address-cells = <1>; |
| 70 | #size-cells = <0>; |
| 71 | reg = <0x10001900 0x24>; |
| 72 | brcm,serial-leds; |
| 73 | brcm,serial-dat-low; |
| 74 | brcm,serial-shift-inv; |
| 75 | |
| 76 | inet_red@2 { |
| 77 | reg = <2>; |
| 78 | active-low; |
| 79 | label = "red:inet"; |
| 80 | }; |
| 81 | dsl_green@3 { |
| 82 | reg = <3>; |
| 83 | active-low; |
| 84 | label = "green:dsl"; |
| 85 | }; |
| 86 | usb_green@4 { |
| 87 | reg = <4>; |
| 88 | active-low; |
| 89 | label = "green:usb"; |
| 90 | }; |
| 91 | wps_green@7 { |
| 92 | reg = <7>; |
| 93 | active-low; |
| 94 | label = "green:wps"; |
| 95 | }; |
| 96 | inet_green@8 { |
| 97 | reg = <8>; |
| 98 | active-low; |
| 99 | label = "green:inet"; |
| 100 | }; |
| 101 | power_green@20 { |
| 102 | reg = <20>; |
| 103 | active-low; |
| 104 | label = "green:power"; |
| 105 | }; |
| 106 | }; |