ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_netgear_r6120.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "netgear,r6120", "mediatek,mt7628an-soc";
10         model = "Netgear R6120";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17                 label-mac-device = &ethernet;
18         };
19
20         keys {
21                 compatible = "gpio-keys";
22
23                 reset {
24                         label = "reset";
25                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_RESTART>;
27                 };
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 lan {
34                         label = "r6120:green:lan";
35                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
36                 };
37
38                 led_power: power {
39                         label = "r6120:green:power";
40                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
41                 };
42
43                 wlan {
44                         label = "r6120:green:wlan2g";
45                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wlan_orange {
49                         label = "r6120:orange:wlan2g";
50                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wan {
54                         label = "r6120:green:wan";
55                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
56                 };
57
58                 wan_orange {
59                         label = "r6120:orange:wan";
60                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
61                 };
62         };
63
64         usb-regulator {
65                 compatible = "regulator-fixed";
66
67                 regulator-name = "USB-power";
68                 gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
69                 regulator-min-microvolt = <5000000>;
70                 regulator-max-microvolt = <5000000>;
71                 enable-active-high;
72
73                 regulator-always-on;
74         };
75 };
76
77 &pinctrl {
78         state_default: pinctrl0 {
79                 gpio {
80                         ralink,group = "p0led_an", "p1led_an", "p2led_an",
81                                        "p3led_an", "p4led_an", "wdt",
82                                        "wled_an", "uart1";
83                         ralink,function = "gpio";
84                 };
85         };
86 };
87
88 &spi0 {
89         status = "okay";
90
91         flash@0 {
92                 compatible = "jedec,spi-nor";
93                 reg = <0>;
94                 spi-max-frequency = <10000000>;
95
96                 partitions {
97                         compatible = "fixed-partitions";
98                         #address-cells = <1>;
99                         #size-cells = <1>;
100
101                         partition@0 {
102                                 label = "u-boot";
103                                 reg = <0x0 0x40000>;
104                                 read-only;
105                         };
106
107                         factory: partition@40000 {
108                                 label = "factory";
109                                 reg = <0x40000 0x20000>;
110                                 read-only;
111                         };
112
113                         partition@60000 {
114                                 label = "nvram";
115                                 reg = <0x60000 0x30000>;
116                                 read-only;
117                         };
118
119                         partition@90000 {
120                                 compatible = "denx,uimage";
121                                 label = "firmware";
122                                 reg = <0x90000 0xf60000>;
123                         };
124
125                         partition@ff0000 {
126                                 label = "reserved";
127                                 reg = <0xff0000 0x10000>;
128                                 read-only;
129                         };
130                 };
131         };
132 };
133
134 &wmac {
135         status = "okay";
136 };
137
138 &ethernet {
139         mtd-mac-address = <&factory 0x4>;
140 };
141
142 &pcie {
143         status = "okay";
144 };
145
146 &pcie0 {
147         wifi@0,0 {
148                 reg = <0x0000 0 0 0 0>;
149                 mediatek,mtd-eeprom = <&factory 0x8000>;
150                 ieee80211-freq-limit = <5000000 6000000>;
151                 mtd-mac-address = <&factory 0x4>;
152                 mtd-mac-address-increment = <(2)>;
153         };
154 };