Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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