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