xref: /freebsd-src/sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright (c) 2019 MediaTek Inc.
4*f126890aSEmmanuel Vadot * Author: Ryder Lee <ryder.lee@mediatek.com>
5*f126890aSEmmanuel Vadot */
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadot/dts-v1/;
8*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
9*f126890aSEmmanuel Vadot#include "mt7629.dtsi"
10*f126890aSEmmanuel Vadot
11*f126890aSEmmanuel Vadot/ {
12*f126890aSEmmanuel Vadot	model = "MediaTek MT7629 reference board";
13*f126890aSEmmanuel Vadot	compatible = "mediatek,mt7629-rfb", "mediatek,mt7629";
14*f126890aSEmmanuel Vadot
15*f126890aSEmmanuel Vadot	aliases {
16*f126890aSEmmanuel Vadot		serial0 = &uart0;
17*f126890aSEmmanuel Vadot	};
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadot	chosen {
20*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
21*f126890aSEmmanuel Vadot	};
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot	gpio-keys {
24*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
25*f126890aSEmmanuel Vadot
26*f126890aSEmmanuel Vadot		button-reset {
27*f126890aSEmmanuel Vadot			label = "factory";
28*f126890aSEmmanuel Vadot			linux,code = <KEY_RESTART>;
29*f126890aSEmmanuel Vadot			gpios = <&pio 60 GPIO_ACTIVE_LOW>;
30*f126890aSEmmanuel Vadot		};
31*f126890aSEmmanuel Vadot
32*f126890aSEmmanuel Vadot		button-wps {
33*f126890aSEmmanuel Vadot			label = "wps";
34*f126890aSEmmanuel Vadot			linux,code = <KEY_WPS_BUTTON>;
35*f126890aSEmmanuel Vadot			gpios = <&pio 58 GPIO_ACTIVE_LOW>;
36*f126890aSEmmanuel Vadot		};
37*f126890aSEmmanuel Vadot	};
38*f126890aSEmmanuel Vadot
39*f126890aSEmmanuel Vadot	memory@40000000 {
40*f126890aSEmmanuel Vadot		device_type = "memory";
41*f126890aSEmmanuel Vadot		reg = <0x40000000 0x10000000>;
42*f126890aSEmmanuel Vadot	};
43*f126890aSEmmanuel Vadot
44*f126890aSEmmanuel Vadot	reg_3p3v: regulator-3p3v {
45*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
46*f126890aSEmmanuel Vadot		regulator-name = "fixed-3.3V";
47*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
48*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
49*f126890aSEmmanuel Vadot		regulator-boot-on;
50*f126890aSEmmanuel Vadot		regulator-always-on;
51*f126890aSEmmanuel Vadot	};
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot	reg_5v: regulator-5v {
54*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
55*f126890aSEmmanuel Vadot		regulator-name = "fixed-5V";
56*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
57*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
58*f126890aSEmmanuel Vadot		regulator-boot-on;
59*f126890aSEmmanuel Vadot		regulator-always-on;
60*f126890aSEmmanuel Vadot	};
61*f126890aSEmmanuel Vadot};
62*f126890aSEmmanuel Vadot
63*f126890aSEmmanuel Vadot&eth {
64*f126890aSEmmanuel Vadot	pinctrl-names = "default";
65*f126890aSEmmanuel Vadot	pinctrl-0 = <&eth_pins>;
66*f126890aSEmmanuel Vadot	pinctrl-1 = <&ephy_leds_pins>;
67*f126890aSEmmanuel Vadot	status = "okay";
68*f126890aSEmmanuel Vadot
69*f126890aSEmmanuel Vadot	gmac0: mac@0 {
70*f126890aSEmmanuel Vadot		compatible = "mediatek,eth-mac";
71*f126890aSEmmanuel Vadot		reg = <0>;
72*f126890aSEmmanuel Vadot		phy-mode = "2500base-x";
73*f126890aSEmmanuel Vadot		fixed-link {
74*f126890aSEmmanuel Vadot			speed = <2500>;
75*f126890aSEmmanuel Vadot			full-duplex;
76*f126890aSEmmanuel Vadot			pause;
77*f126890aSEmmanuel Vadot		};
78*f126890aSEmmanuel Vadot	};
79*f126890aSEmmanuel Vadot
80*f126890aSEmmanuel Vadot	gmac1: mac@1 {
81*f126890aSEmmanuel Vadot		compatible = "mediatek,eth-mac";
82*f126890aSEmmanuel Vadot		reg = <1>;
83*f126890aSEmmanuel Vadot		phy-mode = "gmii";
84*f126890aSEmmanuel Vadot		phy-handle = <&phy0>;
85*f126890aSEmmanuel Vadot	};
86*f126890aSEmmanuel Vadot
87*f126890aSEmmanuel Vadot	mdio: mdio-bus {
88*f126890aSEmmanuel Vadot		#address-cells = <1>;
89*f126890aSEmmanuel Vadot		#size-cells = <0>;
90*f126890aSEmmanuel Vadot
91*f126890aSEmmanuel Vadot		phy0: ethernet-phy@0 {
92*f126890aSEmmanuel Vadot			reg = <0>;
93*f126890aSEmmanuel Vadot		};
94*f126890aSEmmanuel Vadot	};
95*f126890aSEmmanuel Vadot};
96*f126890aSEmmanuel Vadot
97*f126890aSEmmanuel Vadot&i2c {
98*f126890aSEmmanuel Vadot	pinctrl-names = "default";
99*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c_pins>;
100*f126890aSEmmanuel Vadot	status = "okay";
101*f126890aSEmmanuel Vadot};
102*f126890aSEmmanuel Vadot
103*f126890aSEmmanuel Vadot&qspi {
104*f126890aSEmmanuel Vadot	pinctrl-names = "default";
105*f126890aSEmmanuel Vadot	pinctrl-0 = <&qspi_pins>;
106*f126890aSEmmanuel Vadot	status = "okay";
107*f126890aSEmmanuel Vadot
108*f126890aSEmmanuel Vadot	flash@0 {
109*f126890aSEmmanuel Vadot		compatible = "jedec,spi-nor";
110*f126890aSEmmanuel Vadot		reg = <0>;
111*f126890aSEmmanuel Vadot
112*f126890aSEmmanuel Vadot		partitions {
113*f126890aSEmmanuel Vadot			compatible = "fixed-partitions";
114*f126890aSEmmanuel Vadot			#address-cells = <1>;
115*f126890aSEmmanuel Vadot			#size-cells = <1>;
116*f126890aSEmmanuel Vadot
117*f126890aSEmmanuel Vadot			partition@0 {
118*f126890aSEmmanuel Vadot				label = "u-boot";
119*f126890aSEmmanuel Vadot				reg = <0x00000 0x60000>;
120*f126890aSEmmanuel Vadot				read-only;
121*f126890aSEmmanuel Vadot			};
122*f126890aSEmmanuel Vadot
123*f126890aSEmmanuel Vadot			partition@60000 {
124*f126890aSEmmanuel Vadot				label = "u-boot-env";
125*f126890aSEmmanuel Vadot				reg = <0x60000 0x10000>;
126*f126890aSEmmanuel Vadot				read-only;
127*f126890aSEmmanuel Vadot			};
128*f126890aSEmmanuel Vadot
129*f126890aSEmmanuel Vadot			factory: partition@70000 {
130*f126890aSEmmanuel Vadot				label = "factory";
131*f126890aSEmmanuel Vadot				reg = <0x70000 0x40000>;
132*f126890aSEmmanuel Vadot				read-only;
133*f126890aSEmmanuel Vadot			};
134*f126890aSEmmanuel Vadot
135*f126890aSEmmanuel Vadot			partition@b0000 {
136*f126890aSEmmanuel Vadot				label = "kernel";
137*f126890aSEmmanuel Vadot				reg = <0xb0000 0xb50000>;
138*f126890aSEmmanuel Vadot			};
139*f126890aSEmmanuel Vadot		};
140*f126890aSEmmanuel Vadot	};
141*f126890aSEmmanuel Vadot};
142*f126890aSEmmanuel Vadot
143*f126890aSEmmanuel Vadot&pcie1 {
144*f126890aSEmmanuel Vadot	pinctrl-names = "default";
145*f126890aSEmmanuel Vadot	pinctrl-0 = <&pcie_pins>;
146*f126890aSEmmanuel Vadot	status = "okay";
147*f126890aSEmmanuel Vadot};
148*f126890aSEmmanuel Vadot
149*f126890aSEmmanuel Vadot&pciephy1 {
150*f126890aSEmmanuel Vadot	status = "okay";
151*f126890aSEmmanuel Vadot};
152*f126890aSEmmanuel Vadot
153*f126890aSEmmanuel Vadot&pio {
154*f126890aSEmmanuel Vadot	eth_pins: eth-pins {
155*f126890aSEmmanuel Vadot		mux {
156*f126890aSEmmanuel Vadot			function = "eth";
157*f126890aSEmmanuel Vadot			groups = "mdc_mdio";
158*f126890aSEmmanuel Vadot		};
159*f126890aSEmmanuel Vadot	};
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot	ephy_leds_pins: ephy-leds-pins {
162*f126890aSEmmanuel Vadot		mux {
163*f126890aSEmmanuel Vadot			function = "led";
164*f126890aSEmmanuel Vadot			groups = "gphy_leds_0", "ephy_leds";
165*f126890aSEmmanuel Vadot		};
166*f126890aSEmmanuel Vadot	};
167*f126890aSEmmanuel Vadot
168*f126890aSEmmanuel Vadot	i2c_pins: i2c-pins {
169*f126890aSEmmanuel Vadot		mux {
170*f126890aSEmmanuel Vadot			function = "i2c";
171*f126890aSEmmanuel Vadot			groups = "i2c_0";
172*f126890aSEmmanuel Vadot		};
173*f126890aSEmmanuel Vadot
174*f126890aSEmmanuel Vadot		conf {
175*f126890aSEmmanuel Vadot			pins = "I2C_SDA", "I2C_SCL";
176*f126890aSEmmanuel Vadot			drive-strength = <4>;
177*f126890aSEmmanuel Vadot			bias-disable;
178*f126890aSEmmanuel Vadot		};
179*f126890aSEmmanuel Vadot	};
180*f126890aSEmmanuel Vadot
181*f126890aSEmmanuel Vadot	pcie_pins: pcie-pins {
182*f126890aSEmmanuel Vadot		mux {
183*f126890aSEmmanuel Vadot			function = "pcie";
184*f126890aSEmmanuel Vadot			groups = "pcie_clkreq",
185*f126890aSEmmanuel Vadot				 "pcie_pereset",
186*f126890aSEmmanuel Vadot				 "pcie_wake";
187*f126890aSEmmanuel Vadot		};
188*f126890aSEmmanuel Vadot	};
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot	pwm_pins: pwm-pins {
191*f126890aSEmmanuel Vadot		mux {
192*f126890aSEmmanuel Vadot			function = "pwm";
193*f126890aSEmmanuel Vadot			groups = "pwm_0";
194*f126890aSEmmanuel Vadot		};
195*f126890aSEmmanuel Vadot	};
196*f126890aSEmmanuel Vadot
197*f126890aSEmmanuel Vadot	/* SPI-NOR is shared pin with serial NAND */
198*f126890aSEmmanuel Vadot	qspi_pins: qspi-pins {
199*f126890aSEmmanuel Vadot		mux {
200*f126890aSEmmanuel Vadot			function = "flash";
201*f126890aSEmmanuel Vadot			groups = "spi_nor";
202*f126890aSEmmanuel Vadot		};
203*f126890aSEmmanuel Vadot	};
204*f126890aSEmmanuel Vadot
205*f126890aSEmmanuel Vadot	/* Serial NAND is shared pin with SPI-NOR */
206*f126890aSEmmanuel Vadot	serial_nand_pins: serial-nand-pins {
207*f126890aSEmmanuel Vadot		mux {
208*f126890aSEmmanuel Vadot			function = "flash";
209*f126890aSEmmanuel Vadot			groups = "snfi";
210*f126890aSEmmanuel Vadot		};
211*f126890aSEmmanuel Vadot	};
212*f126890aSEmmanuel Vadot
213*f126890aSEmmanuel Vadot	spi_pins: spi-pins {
214*f126890aSEmmanuel Vadot		mux {
215*f126890aSEmmanuel Vadot			function = "spi";
216*f126890aSEmmanuel Vadot			groups = "spi_0";
217*f126890aSEmmanuel Vadot		};
218*f126890aSEmmanuel Vadot	};
219*f126890aSEmmanuel Vadot
220*f126890aSEmmanuel Vadot	uart0_pins: uart0-pins {
221*f126890aSEmmanuel Vadot		mux {
222*f126890aSEmmanuel Vadot			function = "uart";
223*f126890aSEmmanuel Vadot			groups = "uart0_txd_rxd" ;
224*f126890aSEmmanuel Vadot		};
225*f126890aSEmmanuel Vadot	};
226*f126890aSEmmanuel Vadot
227*f126890aSEmmanuel Vadot	uart1_pins: uart1-pins {
228*f126890aSEmmanuel Vadot		mux {
229*f126890aSEmmanuel Vadot			function = "uart";
230*f126890aSEmmanuel Vadot			groups = "uart1_0_tx_rx" ;
231*f126890aSEmmanuel Vadot		};
232*f126890aSEmmanuel Vadot	};
233*f126890aSEmmanuel Vadot
234*f126890aSEmmanuel Vadot	uart2_pins: uart2-pins {
235*f126890aSEmmanuel Vadot		mux {
236*f126890aSEmmanuel Vadot			function = "uart";
237*f126890aSEmmanuel Vadot			groups = "uart2_0_txd_rxd" ;
238*f126890aSEmmanuel Vadot		};
239*f126890aSEmmanuel Vadot	};
240*f126890aSEmmanuel Vadot
241*f126890aSEmmanuel Vadot	watchdog_pins: watchdog-pins {
242*f126890aSEmmanuel Vadot		mux {
243*f126890aSEmmanuel Vadot			function = "watchdog";
244*f126890aSEmmanuel Vadot			groups = "watchdog";
245*f126890aSEmmanuel Vadot		};
246*f126890aSEmmanuel Vadot	};
247*f126890aSEmmanuel Vadot};
248*f126890aSEmmanuel Vadot
249*f126890aSEmmanuel Vadot&spi {
250*f126890aSEmmanuel Vadot	pinctrl-names = "default";
251*f126890aSEmmanuel Vadot	pinctrl-0 = <&spi_pins>;
252*f126890aSEmmanuel Vadot	status = "okay";
253*f126890aSEmmanuel Vadot};
254*f126890aSEmmanuel Vadot
255*f126890aSEmmanuel Vadot&ssusb {
256*f126890aSEmmanuel Vadot	vusb33-supply = <&reg_3p3v>;
257*f126890aSEmmanuel Vadot	vbus-supply = <&reg_5v>;
258*f126890aSEmmanuel Vadot	status = "okay";
259*f126890aSEmmanuel Vadot};
260*f126890aSEmmanuel Vadot
261*f126890aSEmmanuel Vadot&u3phy0 {
262*f126890aSEmmanuel Vadot	status = "okay";
263*f126890aSEmmanuel Vadot};
264*f126890aSEmmanuel Vadot
265*f126890aSEmmanuel Vadot&uart0 {
266*f126890aSEmmanuel Vadot	pinctrl-names = "default";
267*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pins>;
268*f126890aSEmmanuel Vadot	status = "okay";
269*f126890aSEmmanuel Vadot};
270*f126890aSEmmanuel Vadot
271*f126890aSEmmanuel Vadot&watchdog {
272*f126890aSEmmanuel Vadot	pinctrl-names = "default";
273*f126890aSEmmanuel Vadot	pinctrl-0 = <&watchdog_pins>;
274*f126890aSEmmanuel Vadot	status = "okay";
275*f126890aSEmmanuel Vadot};
276