ramips: fix factory partition size for SNR-CPE-W4N
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_linksys_e5400.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "linksys,e5400", "mediatek,mt7628an-soc";
10 model = "Linksys E5400";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x4000000>;
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37
38 wps {
39 label = "wps";
40 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WPS_BUTTON>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_wps: wps {
49 label = "green:wps";
50 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <40000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "u-boot-env";
76 reg = <0x30000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@40000 {
81 compatible = "nvmem-cells";
82 label = "factory";
83 reg = <0x40000 0x10000>;
84 #address-cells = <1>;
85 #size-cells = <1>;
86 read-only;
87
88 eeprom_factory_0: eeprom@0 {
89 reg = <0x0 0x400>;
90 };
91
92 eeprom_factory_8000: eeprom@8000 {
93 reg = <0x8000 0x200>;
94 };
95
96 macaddr_factory_28: macaddr@28 {
97 reg = <0x28 0x6>;
98 };
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfa0000>;
105 };
106
107 partition@ff0000 {
108 label = "cbtinfo";
109 reg = <0xff0000 0x10000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &ehci {
117 status = "disabled";
118 };
119
120 &esw {
121 mediatek,portmap = <0x2f>;
122 mediatek,portdisable = <0x20>;
123 };
124
125 &ethernet {
126 nvmem-cells = <&macaddr_factory_28>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &ohci {
131 status = "disabled";
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 wifi5: wifi@0,0 {
140 compatible = "mediatek,mt76";
141 reg = <0x0000 0 0 0 0>;
142 ieee80211-freq-limit = <5000000 6000000>;
143
144 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>;
145 nvmem-cell-names = "eeprom", "mac-address";
146 mac-address-increment = <3>;
147 };
148 };
149
150 &state_default {
151 gpio {
152 group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
153 function = "gpio";
154 };
155 };
156
157 &usbphy {
158 status = "disabled";
159 };
160
161 &wmac {
162 status = "okay";
163
164 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28>;
165 nvmem-cell-names = "eeprom", "mac-address";
166 mac-address-increment = <2>;
167 };
168