ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-nano.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 = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
10 model = "Xiaomi MiWiFi Nano";
11
12 aliases {
13 led-boot = &led_status_amber;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_amber;
17 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_blue: status_blue {
28 label = "miwifi-nano:blue:status";
29 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_red: status_red {
33 label = "miwifi-nano:red:status";
34 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_amber: status_amber {
38 label = "miwifi-nano:amber:status";
39 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &state_default {
55 gpio {
56 ralink,group = "gpio", "refclk", "wdt", "wled_an";
57 ralink,function = "gpio";
58 };
59 };
60
61 &ehci {
62 status = "disabled";
63 };
64
65 &ohci {
66 status = "disabled";
67 };
68
69 &wmac {
70 status = "okay";
71 ralink,mtd-eeprom = <&factory 0x4>;
72 };
73
74 &ethernet {
75 mtd-mac-address = <&factory 0x28>;
76 };
77
78 &spi0 {
79 status = "okay";
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <40000000>;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 };
101
102 factory: partition@40000 {
103 label = "factory";
104 reg = <0x40000 0x10000>;
105 read-only;
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0xfb0000>;
112 };
113 };
114 };
115 };