ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_youku_yk-l2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "youku,yk-l2", "mediatek,mt7621-soc";
11         model = "Youku YK-L2";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_wps;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "yk-l2:blue:power";
29                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
30                         default-state = "on";
31                 };
32
33                 led_wps: wps {
34                         label = "yk-l2:blue:wps";
35                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
36                 };
37
38                 usb {
39                         label = "yk-l2:blue:usb";
40                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
41                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
42                         linux,default-trigger = "usbport";
43                 };
44         };
45
46         keys {
47                 compatible = "gpio-keys";
48
49                 reset {
50                         label = "reset";
51                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_RESTART>;
53                 };
54
55                 wps {
56                         label = "wps";
57                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
58                         linux,code = <KEY_WPS_BUTTON>;
59                 };
60         };
61 };
62
63 &sdhci {
64         status = "okay";
65 };
66
67 &xhci {
68         status = "okay";
69 };
70
71 &spi0 {
72         status = "okay";
73
74         flash@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78
79                 partitions {
80                         compatible = "fixed-partitions";
81                         #address-cells = <1>;
82                         #size-cells = <1>;
83
84                         partition@0 {
85                                 label = "u-boot";
86                                 reg = <0x0 0x30000>;
87                                 read-only;
88                         };
89
90                         partition@30000 {
91                                 label = "u-boot-env";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         factory: partition@40000 {
97                                 label = "factory";
98                                 reg = <0x40000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@50000 {
103                                 compatible = "denx,uimage";
104                                 label = "firmware";
105                                 reg = <0x50000 0xfb0000>;
106                         };
107                 };
108         };
109 };
110
111 &pcie {
112         status = "okay";
113 };
114
115 &pcie0 {
116         wifi@0,0 {
117                 compatible = "pci14c3,7603";
118                 reg = <0x0000 0 0 0 0>;
119                 mediatek,mtd-eeprom = <&factory 0x0000>;
120                 ieee80211-freq-limit = <2400000 2500000>;
121                 led {
122                         led-active-low;
123                 };
124         };
125 };
126
127 &pcie1 {
128         wifi@0,0 {
129                 compatible = "pci14c3,7662";
130                 reg = <0x0000 0 0 0 0>;
131                 mediatek,mtd-eeprom = <&factory 0x8000>;
132                 ieee80211-freq-limit = <5000000 6000000>;
133                 led {
134                         led-sources = <2>;
135                         led-active-low;
136                 };
137         };
138 };
139
140 &ethernet {
141         mtd-mac-address = <&factory 0xe000>;
142 };
143
144 &pinctrl {
145         state_default: pinctrl0 {
146                 gpio {
147                         ralink,group = "jtag", "wdt";
148                         ralink,function = "gpio";
149                 };
150         };
151 };