ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_bolt_arion.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "bolt,arion", "mediatek,mt7621-soc";
10 model = "Bolt Arion";
11
12 aliases {
13 label-mac-device = &wan;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,57600n8";
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_wlan_blue: wlan_blue {
24 label = "blue:wlan";
25 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
26 };
27
28 led_wlan_red: wlan_red {
29 label = "red:wlan";
30 gpios = <&gpio 86 GPIO_ACTIVE_LOW>;
31 };
32
33 led_tel_blue: tel_blue {
34 label = "blue:tel";
35 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
36 };
37
38 led_sig1_blue: sig1_blue {
39 label = "blue:sig1";
40 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
41 };
42
43 led_sig1_red: sig1_red {
44 label = "red:sig1";
45 gpios = <&gpio 87 GPIO_ACTIVE_LOW>;
46 };
47
48 led_sig2_blue: sig2_blue {
49 label = "blue:sig2";
50 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
51 };
52
53 led_sig3_blue: sig3_blue {
54 label = "blue:sig3";
55 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67
68 wps {
69 label = "WPS";
70 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_WPS_BUTTON>;
72 };
73 };
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <50000000>;
83 m25p,fast-read;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x20000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "u-boot-env";
98 reg = <0x20000 0x20000>;
99 read-only;
100 };
101
102 factory: partition@40000 {
103 compatible = "nvmem-cells";
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 #address-cells = <1>;
107 #size-cells = <1>;
108 read-only;
109
110 eeprom_factory_0: eeprom@0 {
111 reg = <0x0 0x400>;
112 };
113
114 macaddr_factory_28: macaddr@28 {
115 reg = <0x28 0x6>;
116 };
117 };
118
119 partition@50000 {
120 compatible = "denx,uimage";
121 label = "firmware";
122 reg = <0x50000 0x1fb0000>;
123 };
124 };
125 };
126 };
127
128 &pcie {
129 status = "okay";
130 };
131
132 &pcie0 {
133 wifi@0,0 {
134 compatible = "pci14c3,7603";
135 reg = <0x0000 0 0 0 0>;
136 nvmem-cells = <&eeprom_factory_0>;
137 nvmem-cell-names = "eeprom";
138 ieee80211-freq-limit = <2400000 2500000>;
139 };
140 };
141
142 &pcie1 {
143 wifi@0,0 {
144 compatible = "pci14c3,7662";
145 reg = <0x0000 0 0 0 0>;
146 mediatek,mtd-eeprom = <&factory 0x8000>;
147 ieee80211-freq-limit = <5000000 6000000>;
148 };
149 };
150
151 &gmac0 {
152 nvmem-cells = <&macaddr_factory_28>;
153 nvmem-cell-names = "mac-address";
154 mac-address-increment = <3>;
155 };
156
157 &switch0 {
158 ports {
159 port@0 {
160 status = "okay";
161 label = "modem";
162 };
163
164 wan: port@1 {
165 status = "okay";
166 label = "wan";
167 nvmem-cells = <&macaddr_factory_28>;
168 nvmem-cell-names = "mac-address";
169 };
170
171 port@2 {
172 status = "okay";
173 label = "lan";
174 };
175 };
176 };
177
178 &ethernet {
179 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
180 };
181
182 &state_default {
183 gpio {
184 groups = "jtag", "uart2", "uart3", "wdt", "rgmii2";
185 function = "gpio";
186 };
187 };