ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.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 label = "factory";
82 reg = <0x40000 0x10000>;
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x400>;
92 };
93
94 eeprom_factory_8000: eeprom@8000 {
95 reg = <0x8000 0x200>;
96 };
97
98 macaddr_factory_28: macaddr@28 {
99 reg = <0x28 0x6>;
100 };
101 };
102 };
103
104 partition@50000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x50000 0xfa0000>;
108 };
109
110 partition@ff0000 {
111 label = "cbtinfo";
112 reg = <0xff0000 0x10000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &ehci {
120 status = "disabled";
121 };
122
123 &esw {
124 mediatek,portmap = <0x2f>;
125 mediatek,portdisable = <0x20>;
126 };
127
128 &ethernet {
129 nvmem-cells = <&macaddr_factory_28>;
130 nvmem-cell-names = "mac-address";
131 };
132
133 &ohci {
134 status = "disabled";
135 };
136
137 &pcie {
138 status = "okay";
139 };
140
141 &pcie0 {
142 wifi5: wifi@0,0 {
143 compatible = "mediatek,mt76";
144 reg = <0x0000 0 0 0 0>;
145 ieee80211-freq-limit = <5000000 6000000>;
146
147 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>;
148 nvmem-cell-names = "eeprom", "mac-address";
149 mac-address-increment = <3>;
150 };
151 };
152
153 &state_default {
154 gpio {
155 group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
156 function = "gpio";
157 };
158 };
159
160 &usbphy {
161 status = "disabled";
162 };
163
164 &wmac {
165 status = "okay";
166
167 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28>;
168 nvmem-cell-names = "eeprom", "mac-address";
169 mac-address-increment = <2>;
170 };
171