blob: 139db541862fe58323f8c3aa0220e59d3e230124 [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";
developerf0a1e452022-08-15 12:06:11 +080053 phy-handle = <&phy5>;
developer565bacb2021-09-28 21:26:32 +080054 };
55
56 gmac1: mac@1 {
57 compatible = "mediatek,eth-mac";
58 reg = <1>;
59 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080060 phy-handle = <&phy6>;
developer565bacb2021-09-28 21:26:32 +080061 };
62
63 mdio: mdio-bus {
64 #address-cells = <1>;
65 #size-cells = <0>;
66
developerf0a1e452022-08-15 12:06:11 +080067 reset-gpios = <&pio 6 1>;
68 reset-delay-us = <600>;
69
developer565bacb2021-09-28 21:26:32 +080070 phy5: phy@5 {
developerf0a1e452022-08-15 12:06:11 +080071 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +080072 reg = <5>;
developer565bacb2021-09-28 21:26:32 +080073 };
74
75 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +080076 compatible = "ethernet-phy-ieee802.3-c45";
developer565bacb2021-09-28 21:26:32 +080077 reg = <6>;
developer565bacb2021-09-28 21:26:32 +080078 };
79
80 switch@0 {
81 compatible = "mediatek,mt7531";
82 reg = <31>;
83 reset-gpios = <&pio 5 0>;
84
85 ports {
86 #address-cells = <1>;
87 #size-cells = <0>;
developer691e73f2021-06-28 19:41:35 +080088
developer565bacb2021-09-28 21:26:32 +080089 port@0 {
90 reg = <0>;
91 label = "lan0";
92 };
93
94 port@1 {
95 reg = <1>;
96 label = "lan1";
97 };
98
99 port@2 {
100 reg = <2>;
101 label = "lan2";
102 };
103
104 port@3 {
105 reg = <3>;
106 label = "lan3";
107 };
108
109 port@4 {
110 reg = <4>;
111 label = "lan4";
112 };
developer691e73f2021-06-28 19:41:35 +0800113
developer565bacb2021-09-28 21:26:32 +0800114 port@5 {
115 reg = <5>;
116 label = "lan5";
117 phy-mode = "2500base-x";
118
119 fixed-link {
120 speed = <2500>;
121 full-duplex;
122 pause;
123 };
124 };
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};