ramips: gl-mt1300: downclock SPI to 50MHz
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_glinet_gl-mt1300.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 = "glinet,gl-mt1300", "mediatek,mt7621-soc";
10 model = "GL.iNet GL-MT1300";
11
12 aliases {
13 led-boot = &led_run;
14 led-failsafe = &led_run;
15 led-running = &led_run;
16 led-upgrade = &led_run;
17 label-mac-device = &gmac1;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 switch {
34 label = "switch";
35 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
36 linux,code = <BTN_0>;
37 linux,input-type = <EV_SW>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_run: run {
45 label = "blue:run";
46 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
47 };
48
49 system {
50 label = "white:system";
51 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
52 };
53 };
54 };
55
56 &i2c {
57 status = "okay";
58 };
59
60 &sdhci {
61 status = "okay";
62 };
63
64 &spi0 {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <50000000>;
71 broken-flash-reset;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 read-only;
88 };
89
90 factory: partition@40000 {
91 label = "factory";
92 reg = <0x40000 0x10000>;
93 read-only;
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0x1fb0000>;
100 };
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 wifi@0,0 {
111 compatible = "mediatek,mt76";
112 reg = <0x0000 0 0 0 0>;
113 mediatek,mtd-eeprom = <&factory 0x0>;
114 };
115 };
116
117 &gmac0 {
118 nvmem-cells = <&macaddr_factory_4000>;
119 nvmem-cell-names = "mac-address";
120 mac-address-increment = <1>;
121 };
122
123 &gmac1 {
124 status = "okay";
125 label = "wan";
126 phy-handle = <&ethphy4>;
127
128 nvmem-cells = <&macaddr_factory_4000>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &mdio {
133 ethphy4: ethernet-phy@4 {
134 reg = <4>;
135 };
136 };
137
138 &switch0 {
139 ports {
140 port@2 {
141 status = "okay";
142 label = "lan1";
143 };
144
145 port@3 {
146 status = "okay";
147 label = "lan2";
148 };
149 };
150 };
151
152 &uartlite3 {
153 status = "okay";
154 };
155
156 &state_default {
157 gpio {
158 group = "wdt", "jtag";
159 function = "gpio";
160 };
161 };
162
163 &factory {
164 compatible = "nvmem-cells";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 macaddr_factory_4000: macaddr@4000 {
169 reg = <0x4000 0x6>;
170 };
171 };