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