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