aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2022-05-07 19:41:55 +0200
committerChristian Lamparter <chunkeey@gmail.com>2022-05-15 11:17:31 +0200
commit308ce4607687fb2e1cd013f221751139e3cdafdb (patch)
tree9234b8a421ddebce483a37d73df8044e29e65d05
parent19a8c723b65ae3d15f36601e93a1ef2dc9783731 (diff)
downloadupstream-308ce4607687fb2e1cd013f221751139e3cdafdb.tar.gz
upstream-308ce4607687fb2e1cd013f221751139e3cdafdb.tar.bz2
upstream-308ce4607687fb2e1cd013f221751139e3cdafdb.zip
ipq40xx: Lyra: update RGB LED-Controller node for 5.10+
Add the reg and color property to each channel node. This update is to accommodate the multicolor framework. Refer to: <https://lore.kernel.org/all/20200622185919.2131-9-dmurphy@ti.com> <https://lore.kernel.org/all/20210818070209.1540451-1-michal.vokac@ysoft.com> Note: There is only a single extremely bright RGB-LED. The RGB-color channels (i.e.: blue-0, blue-1 and blue-2) are running in parallel to increase the current delivery beyond what a single PWM-output on the LED controller could do. BugLink: https://github.com/openwrt/openwrt/issues/9851 Reported-By: Thomas Bøge <thomas@boegenielsen.dk> Tested-By: Thomas Bøge <thomas@boegenielsen.dk> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 834c9b3f055e5ea719f6adfb3fa979e32f2adbd0)
-rw-r--r--target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration3
-rw-r--r--target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts122
2 files changed, 78 insertions, 47 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration
index ef4d3d037c..e8818a41ed 100644
--- a/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration
@@ -3,6 +3,9 @@
board=$(board_name)
case "$board" in
+asus,map-ac2200)
+ migrate_leds ':chan=-'
+ ;;
engenius,emr3500)
migrate_leds "emr3500:="
;;
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
index 3b9078bc08..433048dd4b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "ASUS Lyra MAP-AC2200";
@@ -252,69 +253,96 @@
/* 9-channel RGB LED controller */
compatible = "national,lp5523";
reg = <0x32>;
- clock-mode = [01];
-
- led_blue0: blue0 {
- chan-name = "blue0";
- label = "blue:chan0";
- led-cur = [fa];
- max-cur = [ff];
+ clock-mode = /bits/ 8 <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /*
+ * There is only one single extremely bright RGB-LED.
+ * The RGB-color channels are running in parallel to
+ * increase the current delivery capabilities beyond
+ * what a single PWM-output of the controller can do.
+ */
+
+ led_blue0: led@0 {
+ chan-name = "blue-0";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <0>;
+ color = <LED_COLOR_ID_BLUE>;
+ function-enumerator = <0>;
};
- blue1 {
- chan-name = "blue1";
- label = "blue:chan1";
- led-cur = [fa];
- max-cur = [ff];
+ led@1 {
+ chan-name = "blue-1";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <1>;
+ color = <LED_COLOR_ID_BLUE>;
+ function-enumerator = <1>;
};
- blue2 {
- chan-name = "blue2";
- label = "blue:chan2";
- led-cur = [fa];
- max-cur = [ff];
+ led@2 {
+ chan-name = "blue-2";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ function-enumerator = <2>;
};
- led_green0: green0 {
- chan-name = "green0";
- label = "green:chan0";
- led-cur = [fa];
- max-cur = [ff];
+ led_green0: led@3 {
+ chan-name = "green-0";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <3>;
+ color = <LED_COLOR_ID_GREEN>;
+ function-enumerator = <0>;
};
- green1 {
- chan-name = "green1";
- label = "green:chan1";
- led-cur = [fa];
- max-cur = [ff];
+ led@4 {
+ chan-name = "green-1";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <4>;
+ color = <LED_COLOR_ID_GREEN>;
+ function-enumerator = <1>;
};
- green2 {
- chan-name = "green2";
- label = "green:chan2";
- led-cur = [fa];
- max-cur = [ff];
+ led@5 {
+ chan-name = "green-2";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <5>;
+ color = <LED_COLOR_ID_GREEN>;
+ function-enumerator = <2>;
};
- led_red0: red0 {
- chan-name = "red0";
- label = "red:chan0";
- led-cur = [fa];
- max-cur = [ff];
+ led_red0: led@6 {
+ chan-name = "red-0";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <6>;
+ color = <LED_COLOR_ID_RED>;
+ function-enumerator = <0>;
};
- red1 {
- chan-name = "red1";
- label = "red:chan1";
- led-cur = [fa];
- max-cur = [ff];
+ led@7 {
+ chan-name = "red-1";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <7>;
+ color = <LED_COLOR_ID_RED>;
+ function-enumerator = <1>;
};
- red2 {
- chan-name = "red2";
- label = "red:chan2";
- led-cur = [fa];
- max-cur = [ff];
+ led@8 {
+ chan-name = "red-2";
+ led-cur = /bits/ 8 <0xfa>;
+ max-cur = /bits/ 8 <0xff>;
+ reg = <8>;
+ color = <LED_COLOR_ID_RED>;
+ function-enumerator = <2>;
};
};
};