ramips: convert MT7603 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 macaddr_factory_e000: macaddr@e000 {
71 reg = <0xe000 0x6>;
72 };
73
74 macaddr_factory_e006: macaddr@e006 {
75 reg = <0xe006 0x6>;
76 };
77 };
78
79 firmware: partition@50000 {
80 compatible = "denx,uimage";
81 label = "firmware";
82 reg = <0x50000 0xfb0000>;
83 };
84 };
85 };
86 };
87
88 &pcie {
89 status = "okay";
90 };
91
92 &pcie0 {
93 wifi@0,0 {
94 compatible = "pci14c3,7662";
95 reg = <0x0000 0 0 0 0>;
96 mediatek,mtd-eeprom = <&factory 0x8000>;
97 ieee80211-freq-limit = <5000000 6000000>;
98
99 led {
100 led-sources = <2>;
101 };
102 };
103 };
104
105 &pcie1 {
106 wifi@0,0 {
107 compatible = "pci14c3,7603";
108 reg = <0x0000 0 0 0 0>;
109 nvmem-cells = <&eeprom_factory_0>;
110 nvmem-cell-names = "eeprom";
111 };
112 };
113
114 &gmac0 {
115 nvmem-cells = <&macaddr_factory_e000>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &gmac1 {
120 status = "okay";
121 label = "wan";
122 phy-handle = <&ethphy4>;
123
124 nvmem-cells = <&macaddr_factory_e006>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &mdio {
129 ethphy4: ethernet-phy@4 {
130 reg = <4>;
131 };
132 };
133
134 &switch0 {
135 ports {
136 port@0 {
137 status = "okay";
138 label = "lan1";
139 };
140
141 port@1 {
142 status = "okay";
143 label = "lan2";
144 };
145
146 port@2 {
147 status = "okay";
148 label = "lan3";
149 };
150
151 port@3 {
152 status = "okay";
153 label = "lan4";
154 };
155 };
156 };
157
158 &state_default {
159 gpio {
160 groups = "wdt";
161 function = "gpio";
162 };
163 };