Browse Source

ramips: convert to new LED color/function format where possible

Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.

Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 1 year ago
parent
commit
19c45b95db
100 changed files with 549 additions and 219 deletions
  1. 5 2
      target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
  2. 3 1
      target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
  3. 7 3
      target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
  4. 5 2
      target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
  5. 5 2
      target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
  6. 5 2
      target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
  7. 5 2
      target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
  8. 5 2
      target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
  9. 5 2
      target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
  10. 9 4
      target/linux/ramips/dts/mt7620a_cameo_810.dtsi
  11. 5 2
      target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
  12. 5 2
      target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
  13. 7 3
      target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
  14. 7 3
      target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
  15. 7 3
      target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi
  16. 3 1
      target/linux/ramips/dts/mt7620a_domywifi.dtsi
  17. 3 1
      target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts
  18. 7 3
      target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
  19. 7 3
      target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
  20. 7 3
      target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
  21. 3 1
      target/linux/ramips/dts/mt7620a_engenius_epg600.dts
  22. 3 1
      target/linux/ramips/dts/mt7620a_engenius_esr600.dts
  23. 3 1
      target/linux/ramips/dts/mt7620a_fon_fon2601.dts
  24. 5 2
      target/linux/ramips/dts/mt7620a_hnet_c108.dts
  25. 9 4
      target/linux/ramips/dts/mt7620a_humax_e2.dts
  26. 3 1
      target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
  27. 3 1
      target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
  28. 6 2
      target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts
  29. 6 2
      target/linux/ramips/dts/mt7620a_iptime_a104ns.dts
  30. 3 1
      target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
  31. 3 1
      target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
  32. 3 1
      target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
  33. 8 3
      target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
  34. 10 4
      target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
  35. 5 2
      target/linux/ramips/dts/mt7620a_linksys_e1700.dts
  36. 3 1
      target/linux/ramips/dts/mt7620a_netcore_nw5212.dts
  37. 7 3
      target/linux/ramips/dts/mt7620a_netgear_ex2700.dts
  38. 7 3
      target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
  39. 7 3
      target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi
  40. 3 1
      target/linux/ramips/dts/mt7620a_netis_wf2770.dts
  41. 3 1
      target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
  42. 7 3
      target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi
  43. 3 1
      target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
  44. 3 1
      target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
  45. 3 1
      target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
  46. 5 2
      target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
  47. 3 1
      target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
  48. 5 2
      target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
  49. 5 2
      target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
  50. 5 2
      target/linux/ramips/dts/mt7620a_sercomm_na930.dts
  51. 5 2
      target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts
  52. 11 5
      target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
  53. 14 6
      target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
  54. 12 5
      target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
  55. 14 6
      target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
  56. 11 5
      target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
  57. 8 3
      target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
  58. 4 1
      target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts
  59. 7 3
      target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
  60. 7 3
      target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts
  61. 7 3
      target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
  62. 9 4
      target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
  63. 7 3
      target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
  64. 6 2
      target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
  65. 8 3
      target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi
  66. 5 2
      target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
  67. 5 2
      target/linux/ramips/dts/mt7620a_zte_q7.dts
  68. 9 4
      target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
  69. 7 3
      target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
  70. 9 4
      target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
  71. 3 1
      target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
  72. 3 1
      target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
  73. 3 1
      target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts
  74. 3 1
      target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts
  75. 3 1
      target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts
  76. 5 2
      target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
  77. 4 1
      target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts
  78. 8 3
      target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts
  79. 3 1
      target/linux/ramips/dts/mt7620n_netgear_pr2000.dts
  80. 3 1
      target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi
  81. 4 1
      target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
  82. 5 2
      target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
  83. 5 2
      target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
  84. 3 1
      target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
  85. 7 3
      target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
  86. 7 3
      target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
  87. 3 1
      target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
  88. 7 3
      target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi
  89. 7 3
      target/linux/ramips/dts/mt7621_asus_rp-ac56.dts
  90. 3 1
      target/linux/ramips/dts/mt7621_asus_rp-ac87.dts
  91. 5 2
      target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
  92. 3 1
      target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
  93. 9 4
      target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
  94. 2 1
      target/linux/ramips/dts/mt7621_belkin_rt1800.dts
  95. 5 2
      target/linux/ramips/dts/mt7621_bolt_arion.dts
  96. 3 1
      target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
  97. 3 1
      target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
  98. 3 1
      target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
  99. 6 3
      target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts
  100. 2 1
      target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts

+ 5 - 2
target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "aigale,ai-br100", "ralink,mt7620a-soc";
@@ -18,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
 		led_wlan: wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts

@@ -8,6 +8,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
@@ -41,7 +42,8 @@
 		};
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc";
@@ -86,7 +87,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
 		};
 
@@ -109,12 +111,14 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "orange:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0radio";
 		};

+ 5 - 2
target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc";
@@ -74,12 +75,14 @@
 		};
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
 		power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};

+ 5 - 2
target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -32,12 +33,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 5 - 2
target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc";
@@ -22,14 +23,16 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_power: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 		};
 
@@ -28,7 +30,8 @@
 		};
 
 		led_power_green: power2 {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 		};
 
@@ -28,7 +30,8 @@
 		};
 
 		led_power_green: power2 {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,whr-600d", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 		};
 
@@ -28,7 +30,8 @@
 		};
 
 		led_power_green: power2 {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 9 - 4
target/linux/ramips/dts/mt7620a_cameo_810.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -34,22 +35,26 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		};
 
 		wan_orange {
-			label = "orange:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 5 - 2
target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
@@ -34,13 +35,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		status {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts

@@ -3,6 +3,7 @@
 #include "mt7620a.dtsi"
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
@@ -41,12 +42,14 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
 		};
 
 		status-red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -36,7 +37,8 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 
@@ -46,7 +48,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 		};
 
@@ -56,7 +59,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -33,7 +34,8 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 
@@ -43,7 +45,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 		};
 
@@ -53,7 +56,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi

@@ -7,6 +7,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -38,17 +39,20 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_domywifi.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -67,7 +68,8 @@
 		};
 
 		wan {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
@@ -11,7 +12,8 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts

@@ -9,6 +9,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -36,7 +37,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
@@ -46,12 +48,14 @@
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -31,7 +32,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
@@ -41,12 +43,14 @@
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -30,17 +31,20 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_engenius_epg600.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,epg600", "ralink,mt7620a-soc";
@@ -46,7 +47,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 3 - 1
target/linux/ramips/dts/mt7620a_engenius_esr600.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,esr600", "ralink,mt7620a-soc";
@@ -24,7 +25,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_fon_fon2601.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "fon,fon2601", "ralink,mt7620a-soc";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power_r {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_hnet_c108.dts

@@ -8,6 +8,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "hnet,c108", "ralink,mt7620a-soc";
@@ -54,12 +55,14 @@
 		};
 
 		lan_red {
-			label = "red:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_lan_green: lan_green {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 9 - 4
target/linux/ramips/dts/mt7620a_humax_e2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -22,7 +23,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
 		};
 
@@ -32,17 +34,20 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 3 - 1
target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 6 - 2
target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_iptime.dtsi"
 
 / {
@@ -17,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		led_cpu: cpu {
-			label = "blue:cpu";
+			function = LED_FUNCTION_CPU;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 6 - 2
target/linux/ramips/dts/mt7620a_iptime_a104ns.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_iptime.dtsi"
 
 / {
@@ -17,14 +19,16 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_cpu: cpu {
-			label = "blue:cpu";
+			function = LED_FUNCTION_CPU;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 /{
 	compatible = "kimax,u25awf-h1","ralink,mt7620a-soc";
@@ -33,7 +34,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -35,7 +36,8 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc";
@@ -29,7 +30,8 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 8 - 3
target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts

@@ -16,7 +16,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 
@@ -31,14 +32,16 @@
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
 		};
 
@@ -57,4 +60,6 @@
 	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
+#include <dt-bindings/leds/common.h>
+
 };

+ 10 - 4
target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts

@@ -37,12 +37,14 @@
 		compatible = "gpio-leds";
 
 		power1 {
-			label = "yellow:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_blue: power2 {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 
@@ -57,12 +59,14 @@
 		};
 
 		usb1 {
-			label = "yellow:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
 		};
 
 		usb2 {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
@@ -114,4 +118,6 @@
 &gsw {
 	mediatek,port4-gmac;
 	mediatek,ephy-base = /bits/ 8 <8>;
+#include <dt-bindings/leds/common.h>
+
 };

+ 5 - 2
target/linux/ramips/dts/mt7620a_linksys_e1700.dts

@@ -7,6 +7,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "linksys,e1700", "ralink,mt7620a-soc";
@@ -39,12 +40,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_netcore_nw5212.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "netcore,nw5212", "ralink,mt7620a-soc";
@@ -37,7 +38,8 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ramips/dts/mt7620a_netgear_ex2700.dts

@@ -7,6 +7,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "netgear,ex2700", "ralink,mt7620a-soc";
@@ -39,13 +40,15 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_g {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		power_r {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
@@ -70,7 +73,8 @@
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -31,13 +32,15 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
 		};
 
@@ -62,7 +65,8 @@
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -33,13 +34,15 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_g {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		power_r {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
@@ -64,7 +67,8 @@
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_netis_wf2770.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "netis,wf2770", "ralink,mt7620a-soc";
@@ -13,7 +14,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
@@ -22,7 +23,8 @@
 		compatible = "gpio-leds";
 
 		led_power: powerled {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -25,18 +26,21 @@
 		compatible = "gpio-leds";
 
 		led_blue: blue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		yellow {
-			label = "yellow:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
 		red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "phicomm,psg1208", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "white:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "planex,db-wrt01", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "planex,mzk-750dhp", "ralink,mt7620a-soc";
@@ -18,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc";
@@ -23,7 +24,8 @@
 		};
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "planex,mzk-ex750np", "ralink,mt7620a-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 		};
 
@@ -28,7 +30,8 @@
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_sanlinking_d240.dts

@@ -8,6 +8,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "sanlinking,d240", "ralink,mt7620a-soc";
@@ -45,12 +46,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 5 - 2
target/linux/ramips/dts/mt7620a_sercomm_na930.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "sercomm,na930", "ralink,mt7620a-soc";
@@ -83,7 +84,8 @@
 		};
 
 		status {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
@@ -95,7 +97,8 @@
 		};
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc";
@@ -24,7 +25,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
@@ -36,7 +38,8 @@
 		};
 
 		wps {
-			label = "white:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 11 - 5
target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
@@ -22,29 +23,34 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};

+ 14 - 6
target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts

@@ -15,30 +15,35 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
 		};
 
 		wan_orange {
-			label = "orange:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		};
 
@@ -55,7 +60,8 @@
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -80,4 +86,6 @@
 &wifi {
 	nvmem-cells = <&macaddr_rom_f100 (-1)>;
 	nvmem-cell-names = "mac-address";
+#include <dt-bindings/leds/common.h>
+
 };

+ 12 - 5
target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts

@@ -16,29 +16,34 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_wps: wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};
@@ -60,4 +65,6 @@
 &wifi {
 	nvmem-cells = <&macaddr_rom_f100 (-1)>;
 	nvmem-cell-names = "mac-address";
+#include <dt-bindings/leds/common.h>
+
 };

+ 14 - 6
target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts

@@ -15,30 +15,35 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_orange {
-			label = "orange:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
@@ -55,7 +60,8 @@
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -80,4 +86,6 @@
 &wifi {
 	nvmem-cells = <&macaddr_rom_f100 (-1)>;
 	nvmem-cell-names = "mac-address";
+#include <dt-bindings/leds/common.h>
+
 };

+ 11 - 5
target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,archer-mr200", "ralink,mt7620a-soc";
@@ -22,17 +23,20 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "white:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "white:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power: power {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
 		};
 
@@ -42,7 +46,8 @@
 		};
 
 		wps {
-			label = "white:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
@@ -67,7 +72,8 @@
 		};
 
 		wlan {
-			label = "white:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};

+ 8 - 3
target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_tplink_re2x0-v1.dtsi"
 
 / {
@@ -17,17 +19,20 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
 		};
 

+ 4 - 1
target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_tplink_re2x0-v1.dtsi"
 
 / {
@@ -17,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc";
@@ -20,17 +21,20 @@
 		compatible = "gpio-leds";
 
 		led_status_blue: status_blue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 
 		status_yellow {
-			label = "yellow:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 		};
 
 		status_red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "wavlink,wl-wn535k1", "ralink,mt7620a-soc";
@@ -37,12 +38,14 @@
 		compatible = "gpio-leds";
 
 		led_status_blue: status_blue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_status_red: status_red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
 		};
 
@@ -57,7 +60,8 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "wavlink,wl-wn579x3", "ralink,mt7620a-soc";
@@ -50,17 +51,20 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 		};
 

+ 9 - 4
target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
@@ -23,22 +24,26 @@
 		compatible = "gpio-leds";
 
 		led_blue: blue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 		};
 
 		led_yellow: yellow {
-			label = "yellow:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
 		};
 
 		led_red: red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -16,20 +17,23 @@
 		compatible = "gpio-leds";
 
 		led_wlan: wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_zbtlink_zbt-we1026.dtsi"
 
 / {
@@ -10,12 +12,14 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 8 - 3
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620a_zbtlink_zbt-we1026.dtsi"
 
 / {
@@ -10,17 +12,20 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc";
@@ -21,12 +22,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 5 - 2
target/linux/ramips/dts/mt7620a_zte_q7.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zte,q7", "ralink,mt7620a-soc";
@@ -18,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		statred {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
 		};
 
 		led_status_blue: statblue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 9 - 4
target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
@@ -18,19 +19,22 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		power_alert {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
 		};
 
@@ -40,7 +44,8 @@
 		};
 
 		led_power_green: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rt-n12p", "ralink,mt7620n-soc";
@@ -22,17 +23,20 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
 		};
 

+ 9 - 4
target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
@@ -18,24 +19,28 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,wmr-300", "ralink,mt7620n-soc";
@@ -28,7 +29,8 @@
 		};
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "comfast,cf-wr800n", "ralink,mt7620n-soc";
@@ -32,7 +33,8 @@
 		};
 
 		led_wps: wps {
-			label = "white:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -35,7 +36,8 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -38,7 +39,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -41,7 +42,8 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
@@ -28,7 +30,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 4 - 1
target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620n_sunvalley_filehub.dtsi"
 
 / {
@@ -17,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 8 - 3
target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7620n_netgear_n300.dtsi"
 
 / {
@@ -18,17 +20,20 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0radio";
 		};

+ 3 - 1
target/linux/ramips/dts/mt7620n_netgear_pr2000.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "netgear,pr2000", "ralink,mt7620n-soc";
@@ -28,7 +29,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "nexx,wt3020", "ralink,mt7620n-soc";
@@ -28,7 +29,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 4 - 1
target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts

@@ -17,7 +17,8 @@
 		compatible = "gpio-leds";
 
 		led_indicator: indicator {
-			label = "blue:indicator";
+			function = LED_FUNCTION_INDICATOR;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -106,4 +107,6 @@
 		groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk";
 		function = "gpio";
 	};
+#include <dt-bindings/leds/common.h>
+
 };

+ 5 - 2
target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc";
@@ -22,12 +23,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 5 - 2
target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zbtlink,zbt-we2026", "ralink,mt7620n-soc";
@@ -22,12 +23,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
@@ -23,7 +24,8 @@
 		};
 
 		lan {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc";
@@ -18,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
@@ -35,7 +38,8 @@
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc";
@@ -18,12 +19,14 @@
 		compatible = "gpio-leds";
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ohci_port1>, <&ehci_port1>;
 			linux,default-trigger = "usbport";
@@ -35,7 +38,8 @@
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
@@ -33,7 +34,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -40,17 +41,20 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_status_red: status_red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_status_amber: status_amber {
-			label = "amber:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ramips/dts/mt7621_asus_rp-ac56.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rp-ac56", "mediatek,mt7621-soc";
@@ -53,17 +54,20 @@
 		};
 
 		led_power_white: power_white {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 3 - 1
target/linux/ramips/dts/mt7621_asus_rp-ac87.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rp-ac87", "mediatek,mt7621-soc";
@@ -37,7 +38,8 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rt-ac57u-v1", "mediatek,mt7621-soc";
@@ -20,12 +21,14 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ehci_port2>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -33,7 +34,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 9 - 4
target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "asus,rt-n56u-b1", "mediatek,mt7621-soc";
@@ -25,7 +26,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 		};
 
@@ -42,17 +44,20 @@
 		};
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
 			linux,default-trigger = "usbport";

+ 2 - 1
target/linux/ramips/dts/mt7621_belkin_rt1800.dts

@@ -47,7 +47,8 @@
 		};
 
 		led_power: led-power {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 5 - 2
target/linux/ramips/dts/mt7621_bolt_arion.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "bolt,arion", "mediatek,mt7621-soc";
@@ -21,12 +22,14 @@
 		compatible = "gpio-leds";
 
 		led_wlan_blue: wlan_blue {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
 		};
 
 		led_wlan_red: wlan_red {
-			label = "red:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 86 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
@@ -43,7 +44,8 @@
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,wsr-2533dhpl", "mediatek,mt7621-soc";
@@ -46,7 +47,8 @@
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts

@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc";
@@ -18,7 +19,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 		};
 

+ 6 - 3
target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts

@@ -28,17 +28,20 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_status_blue: status_blue {
-			label = "blue:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		led_status_red: status_red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 2 - 1
target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts

@@ -70,7 +70,8 @@
 		};
 
 		wlan_blue {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 	};

Some files were not shown because too many files changed in this diff