ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_asus_rt-ac51u.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
10         model = "Asus RT-AC51U";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_power: power {
23                         label = "rt-ac51u:blue:power";
24                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25                 };
26
27                 usb {
28                         label = "rt-ac51u:blue:usb";
29                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
30                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
31                         linux,default-trigger = "usbport";
32                 };
33
34                 wifi {
35                         label = "rt-ac51u:blue:wifi";
36                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys";
42
43                 reset {
44                         label = "reset";
45                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RESTART>;
47                 };
48
49                 wps {
50                         label = "wps";
51                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_WPS_BUTTON>;
53                 };
54         };
55 };
56
57 &spi0 {
58         status = "okay";
59
60         m25p80@0 {
61                 compatible = "jedec,spi-nor";
62                 reg = <0>;
63                 spi-max-frequency = <10000000>;
64
65                 partitions {
66                         compatible = "fixed-partitions";
67                         #address-cells = <1>;
68                         #size-cells = <1>;
69
70                         partition@0 {
71                                 label = "u-boot";
72                                 reg = <0x0 0x30000>;
73                                 read-only;
74                         };
75
76                         partition@30000 {
77                                 label = "u-boot-env";
78                                 reg = <0x30000 0x10000>;
79                                 read-only;
80                         };
81
82                         factory: partition@40000 {
83                                 label = "factory";
84                                 reg = <0x40000 0x10000>;
85                                 read-only;
86                         };
87
88                         partition@50000 {
89                                 compatible = "denx,uimage";
90                                 label = "firmware";
91                                 reg = <0x50000 0xfb0000>;
92                         };
93                 };
94         };
95 };
96
97 &ehci {
98         status = "okay";
99 };
100
101 &ohci {
102         status = "okay";
103 };
104
105 &gpio0 {
106         enable-leds {
107                 gpio-hog;
108                 line-name = "enable-leds";
109                 output-low;
110                 gpios = <10 GPIO_ACTIVE_HIGH>;
111         };
112 };
113
114 &gpio3 {
115         status = "okay";
116 };
117
118 &ethernet {
119         status = "okay";
120         mtd-mac-address = <&factory 0x4>;
121         mediatek,portmap = "wllll";
122 };
123
124 &wmac {
125         ralink,mtd-eeprom = <&factory 0>;
126 };
127
128 &pinctrl {
129         state_default: pinctrl0 {
130                 gpio {
131                         ralink,group = "i2c", "wled", "uartf";
132                         ralink,function = "gpio";
133                 };
134         };
135 };
136
137 &pcie {
138         status = "okay";
139 };
140
141 &pcie0 {
142         wifi@0,0 {
143                 reg = <0x0000 0 0 0 0>;
144                 mediatek,mtd-eeprom = <&factory 0x8000>;
145         };
146 };