ramips: fix dts error in LED color/function conversion
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7620a_lenovo_newifi-y1s.dts
1 #include <dt-bindings/leds/common.h>
2
3 #include "mt7620a_lenovo_newifi-y1.dtsi"
4
5 / {
6 compatible = "lenovo,newifi-y1s", "lenovo,newifi-y1", "ralink,mt7620a-soc";
7 model = "Lenovo Y1S";
8
9 aliases {
10 led-boot = &led_power_blue;
11 led-failsafe = &led_power_blue;
12 led-running = &led_power_blue;
13 led-upgrade = &led_power_blue;
14 label-mac-device = &ethernet;
15 };
16
17 gpio_export {
18 compatible = "gpio-export";
19 #size-cells = <0>;
20
21 usb0 {
22 gpio-export,name = "usb0";
23 gpio-export,output = <1>;
24 gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
25 };
26 usb1 {
27 gpio-export,name = "usb1";
28 gpio-export,output = <1>;
29 gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
30 };
31 usb2 {
32 gpio-export,name = "usb2";
33 gpio-export,output = <1>;
34 gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 power1 {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_YELLOW>;
44 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
45 };
46
47 led_power_blue: power2 {
48 function = LED_FUNCTION_POWER;
49 color = <LED_COLOR_ID_BLUE>;
50 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan1 {
54 label = "yellow:wifi";
55 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
56 };
57
58 wlan2 {
59 label = "blue:wifi";
60 gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
61 };
62
63 usb1 {
64 function = LED_FUNCTION_USB;
65 color = <LED_COLOR_ID_YELLOW>;
66 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
67 };
68
69 usb2 {
70 function = LED_FUNCTION_USB;
71 color = <LED_COLOR_ID_BLUE>;
72 gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
73 trigger-sources = <&ohci_port1>, <&ehci_port1>;
74 linux,default-trigger = "usbport";
75 };
76
77 internet {
78 label = "blue:internet";
79 gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
80 };
81 };
82 };
83
84 &ethernet {
85 pinctrl-names = "default";
86 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
87
88 nvmem-cells = <&macaddr_factory_28>;
89 nvmem-cell-names = "mac-address";
90
91 mediatek,portmap = "wllll";
92
93 port@4 {
94 status = "okay";
95 phy-handle = <&phy4>;
96 phy-mode = "rgmii";
97 };
98
99 port@5 {
100 status = "okay";
101 phy-handle = <&phy5>;
102 phy-mode = "rgmii";
103 };
104
105 mdio-bus {
106 status = "okay";
107
108 phy4: ethernet-phy@4 {
109 reg = <4>;
110 phy-mode = "rgmii";
111 };
112
113 phy5: ethernet-phy@5 {
114 reg = <5>;
115 phy-mode = "rgmii";
116 };
117 };
118 };
119
120 &gsw {
121 mediatek,port4-gmac;
122 mediatek,ephy-base = /bits/ 8 <8>;
123 };