Revert "ramips: convert MT7915 EEPROM to NVMEM format"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-we3526.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-we3526", "mediatek,mt7621-soc";
8 model = "Zbtlink ZBT-WE3526";
9
10 chosen {
11 bootargs = "console=ttyS0,115200";
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22 };
23 };
24
25 &i2c {
26 status = "okay";
27 };
28
29 &sdhci {
30 status = "okay";
31 };
32
33 &spi0 {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <10000000>;
40
41 partitions {
42 compatible = "fixed-partitions";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 partition@0 {
47 label = "u-boot";
48 reg = <0x0 0x30000>;
49 read-only;
50 };
51
52 partition@30000 {
53 label = "u-boot-env";
54 reg = <0x30000 0x10000>;
55 read-only;
56 };
57
58 factory: partition@40000 {
59 compatible = "nvmem-cells";
60 label = "factory";
61 reg = <0x40000 0x10000>;
62 #address-cells = <1>;
63 #size-cells = <1>;
64 read-only;
65
66 eeprom_factory_0: eeprom@0 {
67 reg = <0x0 0x400>;
68 };
69
70 eeprom_factory_8000: eeprom@8000 {
71 reg = <0x8000 0x200>;
72 };
73
74 macaddr_factory_e000: macaddr@e000 {
75 reg = <0xe000 0x6>;
76 };
77
78 macaddr_factory_e006: macaddr@e006 {
79 reg = <0xe006 0x6>;
80 };
81 };
82
83 firmware: partition@50000 {
84 compatible = "denx,uimage";
85 label = "firmware";
86 reg = <0x50000 0xfb0000>;
87 };
88 };
89 };
90 };
91
92 &pcie {
93 status = "okay";
94 };
95
96 &pcie0 {
97 wifi@0,0 {
98 compatible = "pci14c3,7662";
99 reg = <0x0000 0 0 0 0>;
100 nvmem-cells = <&eeprom_factory_8000>;
101 nvmem-cell-names = "eeprom";
102 ieee80211-freq-limit = <5000000 6000000>;
103
104 led {
105 led-sources = <2>;
106 };
107 };
108 };
109
110 &pcie1 {
111 wifi@0,0 {
112 compatible = "pci14c3,7603";
113 reg = <0x0000 0 0 0 0>;
114 nvmem-cells = <&eeprom_factory_0>;
115 nvmem-cell-names = "eeprom";
116 };
117 };
118
119 &gmac0 {
120 nvmem-cells = <&macaddr_factory_e000>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 &gmac1 {
125 status = "okay";
126 label = "wan";
127 phy-handle = <&ethphy4>;
128
129 nvmem-cells = <&macaddr_factory_e006>;
130 nvmem-cell-names = "mac-address";
131 };
132
133 &mdio {
134 ethphy4: ethernet-phy@4 {
135 reg = <4>;
136 };
137 };
138
139 &switch0 {
140 ports {
141 port@0 {
142 status = "okay";
143 label = "lan1";
144 };
145
146 port@1 {
147 status = "okay";
148 label = "lan2";
149 };
150
151 port@2 {
152 status = "okay";
153 label = "lan3";
154 };
155
156 port@3 {
157 status = "okay";
158 label = "lan4";
159 };
160 };
161 };
162
163 &state_default {
164 gpio {
165 groups = "wdt";
166 function = "gpio";
167 };
168 };