ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_sercomm_na930.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 = "sercomm,na930", "ralink,mt7620a-soc";
10         model = "Sercomm NA930";
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         chosen {
20                 bootargs = "console=ttyS1,57600";
21         };
22
23         nand {
24                 compatible = "mtk,mt7620-nand";
25
26                 partitions {
27                         compatible = "fixed-partitions";
28                         #address-cells = <1>;
29                         #size-cells = <1>;
30
31                         partition@0 {
32                                 label = "u-boot";
33                                 reg = <0x0 0x20000>;
34                                 read-only;
35                         };
36
37                         partition@200000 {
38                                 label = "factory";
39                                 reg = <0x200000 0x40000>;
40                                 read-only;
41                         };
42
43                         partition@240000 {
44                                 label = "Config";
45                                 reg = <0x240000 0x400000>;
46                                 read-only;
47                         };
48
49                         partition@640000 {
50                                 compatible = "denx,uimage";
51                                 label = "firmware";
52                                 reg = <0x640000 0x1400000>;
53                         };
54                 };
55         };
56
57         keys {
58                 compatible = "gpio-keys";
59
60                 reset {
61                         label = "reset";
62                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
63                         linux,code = <KEY_RESTART>;
64                 };
65
66                 zwave {
67                         label = "zwave";
68                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
69                         linux,code = <BTN_0>;
70                 };
71
72                 wps {
73                         label = "wps";
74                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
75                         linux,code = <KEY_WPS_BUTTON>;
76                 };
77         };
78
79         leds {
80                 compatible = "gpio-leds";
81
82                 zwave {
83                         label = "na930:blue:zwave";
84                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
85                 };
86
87                 status {
88                         label = "na930:blue:status";
89                         gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
90                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
91                         linux,default-trigger = "usbport";
92                 };
93
94                 service {
95                         label = "na930:blue:service";
96                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
97                 };
98
99                 led_power: power {
100                         label = "na930:blue:power";
101                         gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
102                 };
103         };
104
105         gpio_export {
106                 compatible = "gpio-export";
107                 #size-cells = <0>;
108
109                 telit {
110                         gpio-export,name = "telit";
111                         gpio-export,output = <1>;
112                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
113                 };
114         };
115 };
116
117 &pinctrl {
118         state_default: pinctrl0 {
119                 gpio {
120                         ralink,group = "i2c", "rgmii2", "spi", "ephy";
121                         ralink,function = "gpio";
122                 };
123
124                 uartf_gpio {
125                         ralink,group = "uartf";
126                         ralink,function = "gpio uartf";
127                 };
128         };
129 };
130
131 &uart {
132         status = "okay";
133 };
134
135 &gpio1 {
136         status = "okay";
137 };
138
139 &gpio2 {
140         status = "okay";
141 };
142
143 &ethernet {
144         status = "okay";
145         pinctrl-names = "default";
146         pinctrl-0 = <&rgmii1_pins &mdio_pins>;
147         mediatek,portmap = "llllw";
148
149         port@4 {
150                 status = "okay";
151                 phy-handle = <&phy4>;
152                 phy-mode = "rgmii";
153         };
154
155         port@5 {
156                 status = "okay";
157                 phy-handle = <&phy5>;
158                 phy-mode = "rgmii";
159         };
160
161         mdio-bus {
162                 status = "okay";
163
164                 phy4: ethernet-phy@4 {
165                         reg = <4>;
166                         phy-mode = "rgmii";
167                 };
168
169                 phy5: ethernet-phy@5 {
170                         reg = <5>;
171                         phy-mode = "rgmii";
172                 };
173         };
174 };
175
176 &gsw {
177         mediatek,port4 = "gmac";
178 };
179
180 &ehci {
181         status = "okay";
182 };
183
184 &ohci {
185         status = "okay";
186 };