ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg2626.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc";
10         model = "Zbtlink ZBT-WG2626";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         palmbus: palmbus@1E000000 {
24                 i2c@900 {
25                         status = "okay";
26                 };
27         };
28
29         keys {
30                 compatible = "gpio-keys";
31
32                 reset {
33                         label = "reset";
34                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_RESTART>;
36                 };
37         };
38
39         leds {
40                 compatible = "gpio-leds";
41
42                 led_status: status {
43                         label = "zbt-wg2626:green:status";
44                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
45                 };
46         };
47 };
48
49 &sdhci {
50         status = "okay";
51 };
52
53 &spi0 {
54         status = "okay";
55
56         m25p80@0 {
57                 compatible = "jedec,spi-nor";
58                 reg = <0>;
59                 spi-max-frequency = <10000000>;
60
61                 partitions {
62                         compatible = "fixed-partitions";
63                         #address-cells = <1>;
64                         #size-cells = <1>;
65
66                         partition@0 {
67                                 label = "u-boot";
68                                 reg = <0x0 0x30000>;
69                                 read-only;
70                         };
71
72                         partition@30000 {
73                                 label = "u-boot-env";
74                                 reg = <0x30000 0x10000>;
75                                 read-only;
76                         };
77
78                         factory: partition@40000 {
79                                 label = "factory";
80                                 reg = <0x40000 0x10000>;
81                                 read-only;
82                         };
83
84                         partition@50000 {
85                                 compatible = "denx,uimage";
86                                 label = "firmware";
87                                 reg = <0x50000 0xfb0000>;
88                         };
89                 };
90         };
91 };
92
93 &pcie {
94         status = "okay";
95 };
96
97 &pcie0 {
98         mt76@0,0 {
99                 reg = <0x0000 0 0 0 0>;
100                 mediatek,mtd-eeprom = <&factory 0x8000>;
101                 ieee80211-freq-limit = <5000000 6000000>;
102         };
103 };
104
105 &pcie1 {
106         mt76@0,0 {
107                 reg = <0x0000 0 0 0 0>;
108                 mediatek,mtd-eeprom = <&factory 0x0000>;
109                 ieee80211-freq-limit = <2400000 2500000>;
110         };
111 };
112
113 &ethernet {
114         mtd-mac-address = <&factory 0xe000>;
115 };
116
117 &pinctrl {
118         state_default: pinctrl0 {
119                 gpio {
120                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
121                         ralink,function = "gpio";
122                 };
123         };
124 };