blob: 4cbfe412562a24be0eb359c54750c0c8160ee5d4 [file] [log] [blame]
developer691e73f2021-06-28 19:41:35 +08001/dts-v1/;
developer565bacb2021-09-28 21:26:32 +08002#include "mt7986b.dtsi"
3#include "mt7986b-pinctrl.dtsi"
4#include "mt7986-spim-nor-partition.dtsi"
developer691e73f2021-06-28 19:41:35 +08005/ {
6 model = "MediaTek MT7986b RFB";
7 compatible = "mediatek,mt7986b-nor-rfb";
developer565bacb2021-09-28 21:26:32 +08008 chosen {
9 bootargs = "console=ttyS0,115200n1 loglevel=8 \
10 earlycon=uart8250,mmio32,0x11002000";
11 };
12
13 memory {
14 reg = <0 0x40000000 0 0x10000000>;
15 };
developer691e73f2021-06-28 19:41:35 +080016};
17
developer565bacb2021-09-28 21:26:32 +080018&uart0 {
developer691e73f2021-06-28 19:41:35 +080019 status = "okay";
developer5b91be72021-09-27 14:03:07 +080020};
21
developer565bacb2021-09-28 21:26:32 +080022/* Warning: pins shared with &snand */
23&uart1 {
24 pinctrl-names = "default";
25 pinctrl-0 = <&uart1_pins>;
developer5b91be72021-09-27 14:03:07 +080026 status = "disabled";
27};
28
developer565bacb2021-09-28 21:26:32 +080029/* Warning: pins shared with &spi1 */
30&uart2 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&uart2_pins>;
developer5b91be72021-09-27 14:03:07 +080033 status = "disabled";
developer691e73f2021-06-28 19:41:35 +080034};
35
developer565bacb2021-09-28 21:26:32 +080036&i2c0 {
37 pinctrl-names = "default";
38 pinctrl-0 = <&i2c_pins>;
39 status = "okay";
40};
41
42&watchdog {
43 status = "okay";
44};
45
46&eth {
47 status = "okay";
48
49 gmac0: mac@0 {
50 compatible = "mediatek,eth-mac";
51 reg = <0>;
52 phy-mode = "2500base-x";
developer283fc452022-08-18 19:50:33 +080053
54 fixed-link {
55 speed = <2500>;
56 full-duplex;
57 pause;
developer283fc452022-08-18 19:50:33 +080058 };
developer565bacb2021-09-28 21:26:32 +080059 };
60
61 gmac1: mac@1 {
62 compatible = "mediatek,eth-mac";
63 reg = <1>;
64 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080065 phy-handle = <&phy6>;
developer565bacb2021-09-28 21:26:32 +080066 };
67
68 mdio: mdio-bus {
69 #address-cells = <1>;
70 #size-cells = <0>;
71
developerf0a1e452022-08-15 12:06:11 +080072 reset-gpios = <&pio 6 1>;
73 reset-delay-us = <600>;
74
developer565bacb2021-09-28 21:26:32 +080075 phy5: phy@5 {
developere0c42a12022-08-19 11:01:38 +080076 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +080077 reg = <5>;
developer565bacb2021-09-28 21:26:32 +080078 };
79
80 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +080081 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +080082 reg = <6>;
developer565bacb2021-09-28 21:26:32 +080083 };
84
85 switch@0 {
86 compatible = "mediatek,mt7531";
87 reg = <31>;
88 reset-gpios = <&pio 5 0>;
89
90 ports {
91 #address-cells = <1>;
92 #size-cells = <0>;
developer691e73f2021-06-28 19:41:35 +080093
developer565bacb2021-09-28 21:26:32 +080094 port@0 {
95 reg = <0>;
96 label = "lan0";
97 };
98
99 port@1 {
100 reg = <1>;
101 label = "lan1";
102 };
103
104 port@2 {
105 reg = <2>;
106 label = "lan2";
107 };
108
109 port@3 {
110 reg = <3>;
111 label = "lan3";
112 };
113
114 port@4 {
115 reg = <4>;
116 label = "lan4";
117 };
developer691e73f2021-06-28 19:41:35 +0800118
developer565bacb2021-09-28 21:26:32 +0800119 port@5 {
120 reg = <5>;
121 label = "lan5";
122 phy-mode = "2500base-x";
developere0c42a12022-08-19 11:01:38 +0800123 phy-handle = <&phy5>;
developer565bacb2021-09-28 21:26:32 +0800124 };
125
126 port@6 {
127 reg = <6>;
128 label = "cpu";
129 ethernet = <&gmac0>;
130 phy-mode = "2500base-x";
131
132 fixed-link {
133 speed = <2500>;
134 full-duplex;
135 pause;
136 };
developer691e73f2021-06-28 19:41:35 +0800137 };
138 };
139 };
developer565bacb2021-09-28 21:26:32 +0800140 };
141};
142
143&hnat {
144 mtketh-wan = "eth1";
145 mtketh-lan = "lan";
146 mtketh-max-gmac = <2>;
147 status = "okay";
148};
149
150&spi0 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&spi_flash_pins>;
153 cs-gpios = <0>, <0>;
154 status = "okay";
155
156 spi_nor@0 {
157 #address-cells = <1>;
158 #size-cells = <1>;
159 compatible = "jedec,spi-nor";
160 reg = <0>;
developerb9b1ffc2021-12-16 14:19:08 +0800161 spi-max-frequency = <52000000>;
developer565bacb2021-09-28 21:26:32 +0800162 spi-tx-buswidth = <4>;
163 spi-rx-buswidth = <4>;
164 };
165};
166
167/* Warning: pins shared with &uart2 */
168&spi1 {
169 pinctrl-names = "default";
170 pinctrl-0 = <&spic_pins>;
171 status = "okay";
172};
173
174&wbsys {
175 mediatek,mtd-eeprom = <&factory 0x0000>;
176 status = "okay";
177};
178
179&pio {
180 spi_flash_pins: spi-flash-pins-33-to-38 {
181 mux {
182 function = "flash";
183 groups = "spi0", "spi0_wp_hold";
184 };
185 conf-pu {
186 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
187 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800188 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800189 };
190 conf-pd {
191 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
192 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800193 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer565bacb2021-09-28 21:26:32 +0800194 };
195
developer691e73f2021-06-28 19:41:35 +0800196 };
197};