blob: abd7fd37eb7343c9673953be40590ea885f88f72 [file] [log] [blame]
developer24455dd2021-10-28 10:55:41 +08001/dts-v1/;
2#include "mt7981.dtsi"
3/ {
4 model = "MediaTek MT7981 RFB";
5 compatible = "mediatek,mt7981-spim-nor-rfb";
6 chosen {
7 bootargs = "console=ttyS0,115200n1 loglevel=8 \
8 earlycon=uart8250,mmio32,0x11002000";
9 };
10
11 memory {
12 // fpga ddr2: 128MB*2
13 reg = <0 0x40000000 0 0x10000000>;
14 };
15};
16
17&uart0 {
18 status = "okay";
19};
20
21&watchdog {
22 status = "okay";
23};
24
25&eth {
26 status = "okay";
27
28 gmac0: mac@0 {
29 compatible = "mediatek,eth-mac";
30 reg = <0>;
31 phy-mode = "2500base-x";
32
33 fixed-link {
34 speed = <2500>;
35 full-duplex;
36 pause;
37 };
38 };
39
40 gmac1: mac@1 {
41 compatible = "mediatek,eth-mac";
42 reg = <1>;
43 phy-mode = "gmii";
44 phy-handle = <&phy0>;
45 };
46
47 mdio: mdio-bus {
48 #address-cells = <1>;
49 #size-cells = <0>;
50
51 phy0: ethernet-phy@0 {
developera7de8be2021-11-15 21:14:31 +080052 compatible = "ethernet-phy-id03a2.9461";
developer24455dd2021-10-28 10:55:41 +080053 reg = <0>;
developera7de8be2021-11-15 21:14:31 +080054 phy-mode = "gmii";
developera7de8be2021-11-15 21:14:31 +080055 nvmem-cells = <&phy_calibration>;
56 nvmem-cell-names = "phy-cal-data";
developer24455dd2021-10-28 10:55:41 +080057 };
58
59 switch@0 {
60 compatible = "mediatek,mt7531";
61 reg = <31>;
62 reset-gpios = <&pio 39 0>;
63
64 ports {
65 #address-cells = <1>;
66 #size-cells = <0>;
67
68 port@0 {
69 reg = <0>;
70 label = "lan1";
71 };
72
73 port@1 {
74 reg = <1>;
75 label = "lan2";
76 };
77
78 port@2 {
79 reg = <2>;
80 label = "lan3";
81 };
82
83 port@3 {
84 reg = <3>;
85 label = "lan4";
86 };
87
88 port@6 {
89 reg = <6>;
90 label = "cpu";
91 ethernet = <&gmac0>;
92 phy-mode = "2500base-x";
93
94 fixed-link {
95 speed = <2500>;
96 full-duplex;
97 pause;
98 };
99 };
100 };
101 };
102 };
103};
104
105&hnat {
106 mtketh-wan = "eth1";
107 mtketh-lan = "lan";
108 mtketh-max-gmac = <2>;
109 status = "okay";
110};
111
112&spi1 {
113 pinctrl-names = "default";
114 pinctrl-0 = <&spic_pins>;
115 status = "disabled";
116};
117
118&spi2 {
119 pinctrl-names = "default";
120 pinctrl-0 = <&spi2_flash_pins>;
121 status = "okay";
122 spi_nor@0 {
123 #address-cells = <1>;
124 #size-cells = <1>;
125 compatible = "jedec,spi-nor";
126 reg = <0>;
127 spi-max-frequency = <52000000>;
128 spi-tx-buswidth = <4>;
129 spi-rx-buswidth = <4>;
130
131 partition@00000 {
132 label = "BL2";
133 reg = <0x00000 0x0040000>;
134 };
135 partition@40000 {
136 label = "u-boot-env";
137 reg = <0x40000 0x0010000>;
138 };
139 partition@50000 {
140 label = "Factory";
141 reg = <0x50000 0x00B0000>;
142 };
143 partition@100000 {
144 label = "FIP";
145 reg = <0x100000 0x0080000>;
146 };
147 partition@180000 {
148 label = "firmware";
149 reg = <0x180000 0xE00000>;
150 };
151 };
152};
153
154&pio {
155 spic_pins: spi1-pins {
156 mux {
157 function = "spi";
158 groups = "spi1_1";
159 };
160 };
161
162 spi2_flash_pins: spi2-pins {
163 mux {
164 function = "spi";
165 groups = "spi2", "spi2_wp_hold";
166 };
developer66b31fc2021-12-27 17:12:45 +0800167
168 conf-pu {
169 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
170 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800171 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer66b31fc2021-12-27 17:12:45 +0800172 };
173
174 conf-pd {
175 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
176 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800177 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer66b31fc2021-12-27 17:12:45 +0800178 };
developer24455dd2021-10-28 10:55:41 +0800179 };
180};
181
182&xhci {
183 status = "okay";
184};
185
186&wed {
187 dy_txbm_enable = "true";
developer4d455082021-11-22 16:00:28 +0800188 dy_txbm_budget = <8>;
189 txbm_init_sz = <8>;
190 txbm_max_sz = <32>;
developer24455dd2021-10-28 10:55:41 +0800191 status = "okay";
192};