ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_lenovo_newifi-y1s.dts
1 /dts-v1/;
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                         label = "newifi-y1s:yellow:power";
43                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
44                 };
45
46                 led_power_blue: power2 {
47                         label = "newifi-y1s:blue:power";
48                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
49                 };
50
51                 wlan1 {
52                         label = "newifi-y1s:yellow:wifi";
53                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
54                 };
55
56                 wlan2 {
57                         label = "newifi-y1s:blue:wifi";
58                         gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
59                 };
60
61                 usb1 {
62                         label = "newifi-y1s:yellow:usb";
63                         gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
64                 };
65
66                 usb2 {
67                         label = "newifi-y1s:blue:usb";
68                         gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
69                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
70                         linux,default-trigger = "usbport";
71                 };
72
73                 internet {
74                         label = "newifi-y1s:blue:internet";
75                         gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
76                 };
77         };
78 };
79
80 &ethernet {
81         status = "okay";
82         mtd-mac-address = <&factory 0x28>;
83         pinctrl-names = "default";
84         pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
85         mediatek,portmap = "wllll";
86
87         port@4 {
88                 status = "okay";
89                 phy-handle = <&phy4>;
90                 phy-mode = "rgmii";
91         };
92
93         port@5 {
94                 status = "okay";
95                 phy-handle = <&phy5>;
96                 phy-mode = "rgmii";
97         };
98
99         mdio-bus {
100                 status = "okay";
101
102                 phy4: ethernet-phy@4 {
103                         reg = <4>;
104                         phy-mode = "rgmii";
105                 };
106
107                 phy5: ethernet-phy@5 {
108                         reg = <5>;
109                         phy-mode = "rgmii";
110                 };
111         };
112 };
113
114 &gsw {
115         mediatek,port4 = "gmac";
116 };