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