ramips: mt7621: convert to nvmem-layout
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_asus_rt-acx5p.dtsi
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 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24
25 wps {
26 label = "wps";
27 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_WPS_BUTTON>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power: power {
36 label = "blue:power";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 };
39
40 wlan5g {
41 label = "blue:wlan5g";
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 wlan2g {
47 label = "blue:wlan2g";
48 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51 };
52 };
53
54 &i2c {
55 status = "okay";
56 };
57
58 &sdhci {
59 status = "okay";
60 };
61
62 &nand {
63 status = "okay";
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0xe0000>;
73 read-only;
74 };
75
76 partition@e0000 {
77 label = "u-boot-env";
78 reg = <0xe0000 0x100000>;
79 read-only;
80 };
81
82 factory: partition@1e0000 {
83 label = "factory";
84 reg = <0x1e0000 0x100000>;
85 read-only;
86
87 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 eeprom_factory_0: eeprom@0 {
93 reg = <0x0 0x4da8>;
94 };
95
96 eeprom_factory_8000: eeprom@8000 {
97 reg = <0x8000 0x4da8>;
98 };
99
100 macaddr_factory_e000: macaddr@e000 {
101 reg = <0xe000 0x6>;
102 };
103 };
104 };
105
106 factory2: partition@2e0000 {
107 label = "factory2";
108 reg = <0x2e0000 0x100000>;
109 read-only;
110 };
111
112 partition@3e0000 {
113 label = "kernel";
114 reg = <0x3e0000 0x400000>;
115 };
116
117 partition@7e0000 {
118 label = "ubi";
119 reg = <0x7e0000 0x2e00000>;
120 };
121
122 partition@35e0000 {
123 label = "firmware2";
124 reg = <0x35e0000 0x3200000>;
125 };
126 };
127 };
128
129 &pcie {
130 status = "okay";
131 };
132
133 &pcie0 {
134 wifi0: wifi@0,0 {
135 compatible = "pci14c3,7615";
136 reg = <0x0000 0 0 0 0>;
137 nvmem-cells = <&eeprom_factory_0>;
138 nvmem-cell-names = "eeprom";
139 ieee80211-freq-limit = <2400000 2500000>;
140 };
141 };
142
143 &pcie1 {
144 wifi1: wifi@0,0 {
145 compatible = "pci14c3,7615";
146 reg = <0x0000 0 0 0 0>;
147 nvmem-cells = <&eeprom_factory_8000>;
148 nvmem-cell-names = "eeprom";
149 ieee80211-freq-limit = <5000000 6000000>;
150 };
151 };
152
153 &gmac0 {
154 nvmem-cells = <&macaddr_factory_e000>;
155 nvmem-cell-names = "mac-address";
156 };
157
158 &gmac1 {
159 status = "okay";
160 label = "wan";
161 phy-handle = <&ethphy0>;
162
163 nvmem-cells = <&macaddr_factory_e000>;
164 nvmem-cell-names = "mac-address";
165 };
166
167 &mdio {
168 ethphy0: ethernet-phy@0 {
169 reg = <0>;
170 };
171 };
172
173 &switch0 {
174 ports {
175 port@1 {
176 status = "okay";
177 label = "lan1";
178 };
179
180 port@2 {
181 status = "okay";
182 label = "lan2";
183 };
184
185 port@3 {
186 status = "okay";
187 label = "lan3";
188 };
189
190 port@4 {
191 status = "okay";
192 label = "lan4";
193 };
194 };
195 };
196
197 &state_default {
198 gpio {
199 groups = "uart2", "uart3", "i2c";
200 function = "gpio";
201 };
202 };