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) Qualcomm PM8058 LED driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) The Qualcomm PM8058 is a multi-functional device which contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) an LED driver block for up to six LEDs: three normal LEDs, two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) "flash" LEDs and one "keypad backlight" LED. The names are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) quoted because sometimes these LED drivers are used for wildly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) different things than flash or keypad backlight: their names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) are more of a suggestion than a hard-wired usecase.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Hardware-wise the different LEDs support slightly different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) output currents. The "flash" LEDs do not need to charge nor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) do they support external triggers. They are just powerful LED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The LEDs appear as children to the PM8058 device, with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) proper compatible string. For the PM8058 bindings see:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) mfd/qcom-pm8xxx.txt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) Each LED is represented as a sub-node of the syscon device. Each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) node's name represents the name of the corresponding LED.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) LED sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - compatible: one of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)   "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)   "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)   "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) - label: see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - default-state: see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) - linux,default-trigger: see 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) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) qcom,ssbi@500000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	pmicintc: pmic@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 		compatible = "qcom,pm8058";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 		led@48 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 			compatible = "qcom,pm8058-keypad-led";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 			reg = <0x48>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 			label = "pm8050:white:keypad";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 			default-state = "off";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 		led@131 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 			compatible = "qcom,pm8058-led";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 			reg = <0x131>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 			label = "pm8058:red";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 			default-state = "off";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 		led@132 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 			compatible = "qcom,pm8058-led";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 			reg = <0x132>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 			label = "pm8058:yellow";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 			default-state = "off";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 			linux,default-trigger = "mmc0";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 		led@133 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 			compatible = "qcom,pm8058-led";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 			reg = <0x133>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 			label = "pm8058:green";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 			default-state = "on";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 			linux,default-trigger = "heartbeat";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) };