ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7620a_iodata_wn-ac733gr3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
10 model = "I-O DATA WN-AC733GR3";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 default-state = "on";
26 };
27
28 notification {
29 label = "green:notification";
30 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
31 };
32
33 wlan2g {
34 label = "green:wlan2g";
35 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan5g {
39 label = "green:wlan5g";
40 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58
59 router {
60 label = "router";
61 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
62 linux,code = <BTN_0>;
63 linux,input-type = <EV_SW>;
64 };
65
66 auto {
67 label = "auto";
68 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
69 linux,code = <BTN_0>;
70 linux,input-type = <EV_SW>;
71 };
72 };
73
74 rtl8367rb {
75 compatible = "realtek,rtl8367b";
76 gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
77 gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
78 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
79 };
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 compatible = "nvmem-cells";
109 label = "factory";
110 reg = <0x40000 0x8000>;
111 #address-cells = <1>;
112 #size-cells = <1>;
113 read-only;
114
115 eeprom_factory_0: eeprom@0 {
116 reg = <0x0 0x200>;
117 };
118
119 macaddr_factory_4: macaddr@4 {
120 reg = <0x4 0x6>;
121 };
122 };
123
124 iNIC_rf: partition@48000 {
125 label = "iNIC_rf";
126 reg = <0x48000 0x8000>;
127 read-only;
128 };
129
130 partition@50000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x50000 0x6d4000>;
134 };
135
136 partition@724000 {
137 label = "manufacture";
138 reg = <0x724000 0x8c000>;
139 read-only;
140 };
141
142 partition@7b0000 {
143 label = "backup";
144 reg = <0x7b0000 0x10000>;
145 read-only;
146 };
147
148 partition@7c0000 {
149 label = "storage";
150 reg = <0x7c0000 0x40000>;
151 read-only;
152 };
153 };
154 };
155 };
156
157 &ethernet {
158 pinctrl-names = "default";
159 pinctrl-0 = <&rgmii1_pins>;
160
161 nvmem-cells = <&macaddr_factory_4>;
162 nvmem-cell-names = "mac-address";
163
164 port@5 {
165 status = "okay";
166 mediatek,fixed-link = <1000 1 1 1>;
167 phy-mode = "rgmii";
168 };
169 };
170
171 &gpio0 {
172 rtl8367rb_reset {
173 gpio-hog;
174 gpios = <0 GPIO_ACTIVE_HIGH>;
175 output-high;
176 line-name = "rtl8367rb-reset";
177 };
178 };
179
180 &state_default {
181 gpio {
182 groups = "i2c", "uartf", "mdio";
183 function = "gpio";
184 };
185 };
186
187 &pcie {
188 status = "okay";
189 };
190
191 &pcie0 {
192 wifi@0,0 {
193 compatible = "mediatek,mt76";
194 reg = <0x0000 0 0 0 0>;
195 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
196 ieee80211-freq-limit = <5000000 6000000>;
197 };
198 };
199
200 &wmac {
201 nvmem-cells = <&eeprom_factory_0>;
202 nvmem-cell-names = "eeprom";
203 };