ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / Y1S.dts
1 /dts-v1/;
2
3 #include "Y1.dtsi"
4
5 / {
6 compatible = "lenovo,newifi-y1s", "lenovo,newifi-y1", "ralink,mt7620a-soc";
7 model = "Lenovo Y1S";
8
9 aliases {
10 led-status = &led_power_blue;
11 };
12
13 gpio_export {
14 compatible = "gpio-export";
15 #size-cells = <0>;
16 /* GPIO 54、55、56 USB1、2、3 */
17 usb0 {
18 gpio-export,name = "usb0";
19 gpio-export,output = <1>; // GPIOF_OUT_INIT_HIGH
20 gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>; // GPIO2:40+14=GPIO 54
21 };
22 usb1 {
23 gpio-export,name = "usb1";
24 gpio-export,output = <1>;
25 gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
26 };
27 usb2 {
28 gpio-export,name = "usb2";
29 gpio-export,output = <1>;
30 gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
31 };
32 };
33
34 gpio-leds {
35 compatible = "gpio-leds";
36
37 power1 {
38 label = "y1s:yellow:power";
39 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
40 };
41
42 led_power_blue: power2 {
43 label = "y1s:blue:power";
44 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan1 {
48 label = "y1s:yellow:wifi";
49 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
50 };
51
52 wlan2 {
53 label = "y1s:blue:wifi";
54 gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
55 };
56
57 usb1 {
58 label = "y1s:yellow:usb";
59 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
60 };
61
62 usb2 {
63 label = "y1s:blue:usb";
64 gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
65 };
66
67 internet {
68 label = "y1s:blue:internet";
69 gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
70 };
71 };
72 };
73
74 &ethernet {
75 status = "okay";
76 mtd-mac-address = <&factory 0x4>;
77 pinctrl-names = "default";
78 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
79 mediatek,portmap = "wllll";
80
81 port@4 {
82 status = "okay";
83 phy-handle = <&phy4>;
84 phy-mode = "rgmii";
85 };
86
87 port@5 {
88 status = "okay";
89 phy-handle = <&phy5>;
90 phy-mode = "rgmii";
91 };
92
93 mdio-bus {
94 status = "okay";
95
96 phy4: ethernet-phy@4 {
97 reg = <4>;
98 phy-mode = "rgmii";
99 };
100
101 phy5: ethernet-phy@5 {
102 reg = <5>;
103 phy-mode = "rgmii";
104 };
105 };
106 };
107
108 &gsw {
109 mediatek,port4 = "gmac";
110 };