blob: 5d53f111a9c8b5f10fdf9208cdc5faa16ba85ca1 [file] [log] [blame]
developer1b76b3f2021-12-22 19:53:19 +08001/dts-v1/;
2#include "mt7986b.dtsi"
3#include "mt7986b-pinctrl.dtsi"
4#include "mt7986-spim-nand-partition.dtsi"
5/ {
6 model = "MediaTek MT7986b gsw RFB";
developerbd0dd0e2022-04-18 18:28:19 +08007 compatible = "mediatek,mt7986b-2500wan-gsw-spim-snand-rfb";
developer1b76b3f2021-12-22 19:53:19 +08008 chosen {
9 bootargs = "console=ttyS0,115200n1 loglevel=8 \
10 earlycon=uart8250,mmio32,0x11002000";
11 };
12
13 gsw: gsw@0 {
14 compatible = "mediatek,mt753x";
15 mediatek,ethsys = <&ethsys>;
16 #address-cells = <1>;
17 #size-cells = <0>;
18 };
19
20 memory {
21 reg = <0 0x40000000 0 0x10000000>;
22 };
23};
24
25&uart0 {
26 status = "okay";
27};
28
29/* Warning: pins shared with &snand */
30&uart1 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&uart1_pins>;
33 status = "disabled";
34};
35
36/* Warning: pins shared with &spi1 */
37&uart2 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&uart2_pins>;
40 status = "disabled";
41};
42
43&i2c0 {
44 pinctrl-names = "default";
45 pinctrl-0 = <&i2c_pins>;
46 status = "okay";
47};
48
49&watchdog {
50 status = "okay";
51};
52
53&eth {
54 status = "okay";
55
56 gmac0: mac@0 {
57 compatible = "mediatek,eth-mac";
58 reg = <0>;
59 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080060 phy-handle = <&phy5>;
developer1b76b3f2021-12-22 19:53:19 +080061 };
62
63 gmac1: mac@1 {
64 compatible = "mediatek,eth-mac";
65 reg = <1>;
66 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +080067 phy-handle = <&phy6>;
developer1b76b3f2021-12-22 19:53:19 +080068 };
69
70 mdio: mdio-bus {
71 #address-cells = <1>;
72 #size-cells = <0>;
73
developerf0a1e452022-08-15 12:06:11 +080074 reset-gpios = <&pio 6 1>;
75 reset-delay-us = <600>;
76
developer1b76b3f2021-12-22 19:53:19 +080077 phy5: phy@5 {
developerf0a1e452022-08-15 12:06:11 +080078 compatible = "ethernet-phy-ieee802.3-c45";
developer1b76b3f2021-12-22 19:53:19 +080079 reg = <5>;
developer1b76b3f2021-12-22 19:53:19 +080080 };
81
82 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +080083 compatible = "ethernet-phy-ieee802.3-c45";
developer1b76b3f2021-12-22 19:53:19 +080084 reg = <6>;
developer1b76b3f2021-12-22 19:53:19 +080085 };
developer1b76b3f2021-12-22 19:53:19 +080086 };
87};
88
89&gsw {
90 mediatek,mdio = <&mdio>;
91 mediatek,portmap = "lllll";
92 mediatek,mdio_master_pinmux = <1>;
93 reset-gpios = <&pio 5 0>;
94 interrupt-parent = <&pio>;
95 interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
96 status = "okay";
97
98 port5: port@5 {
99 compatible = "mediatek,mt753x-port";
100 reg = <5>;
101 phy-mode = "sgmii";
102
103 fixed-link {
104 speed = <2500>;
105 full-duplex;
106 };
107
108 };
109
110 port6: port@6 {
111 compatible = "mediatek,mt753x-port";
developer3c21f192022-03-14 20:37:51 +0800112 /* mediatek,ssc-on; */
developer1b76b3f2021-12-22 19:53:19 +0800113 reg = <6>;
114 phy-mode = "sgmii";
115 fixed-link {
116 speed = <2500>;
117 full-duplex;
118 };
119 };
120};
121
122&hnat {
123 mtketh-wan = "eth1";
developer3c21f192022-03-14 20:37:51 +0800124 mtketh-lan = "eth0";
developer1b76b3f2021-12-22 19:53:19 +0800125 mtketh-max-gmac = <2>;
126 status = "okay";
127};
128
129&spi0 {
130 pinctrl-names = "default";
131 pinctrl-0 = <&spi_flash_pins>;
132 cs-gpios = <0>, <0>;
133 status = "okay";
134
135 spi_nor@0 {
136 #address-cells = <1>;
137 #size-cells = <1>;
138 compatible = "jedec,spi-nor";
139 reg = <0>;
140 spi-max-frequency = <20000000>;
141 spi-tx-buswidth = <4>;
142 spi-rx-buswidth = <4>;
143 };
144
145 spi_nand: spi_nand@1 {
146 #address-cells = <1>;
147 #size-cells = <1>;
148 compatible = "spi-nand";
149 reg = <1>;
150 spi-max-frequency = <20000000>;
151 spi-tx-buswidth = <4>;
152 spi-rx-buswidth = <4>;
153 };
154};
155
156/* Warning: pins shared with &uart2 */
157&spi1 {
158 pinctrl-names = "default";
159 pinctrl-0 = <&spic_pins>;
160 status = "okay";
161};
162
163&wbsys {
164 mediatek,mtd-eeprom = <&factory 0x0000>;
165 status = "okay";
166};
167
168&pio {
169 spi_flash_pins: spi-flash-pins-33-to-38 {
170 mux {
171 function = "flash";
172 groups = "spi0", "spi0_wp_hold";
173 };
174 conf-pu {
175 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
176 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800177 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
developer1b76b3f2021-12-22 19:53:19 +0800178 };
179 conf-pd {
180 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
181 drive-strength = <MTK_DRIVE_8mA>;
developerb5a819c2022-05-16 19:16:07 +0800182 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
developer1b76b3f2021-12-22 19:53:19 +0800183 };
184
185 };
186};