xref: /freebsd-src/sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Copyright (c) 2015 MediaTek Inc.
4f126890aSEmmanuel Vadot * Author: Erin Lo <erin.lo@mediatek.com>
5f126890aSEmmanuel Vadot *
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadot/dts-v1/;
9f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10f126890aSEmmanuel Vadot#include "mt2701.dtsi"
11f126890aSEmmanuel Vadot
12f126890aSEmmanuel Vadot/ {
13f126890aSEmmanuel Vadot	model = "MediaTek MT2701 evaluation board";
14f126890aSEmmanuel Vadot	compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
15f126890aSEmmanuel Vadot
16f126890aSEmmanuel Vadot	memory {
17f126890aSEmmanuel Vadot		device_type = "memory";
18f126890aSEmmanuel Vadot		reg = <0 0x80000000 0 0x40000000>;
19f126890aSEmmanuel Vadot	};
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot	sound:sound {
22f126890aSEmmanuel Vadot		compatible = "mediatek,mt2701-cs42448-machine";
23f126890aSEmmanuel Vadot		mediatek,platform = <&afe>;
24f126890aSEmmanuel Vadot		/* CS42448 Machine name */
25f126890aSEmmanuel Vadot		audio-routing =
26f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT1L",
27f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT1R",
28f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT2L",
29f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT2R",
30f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT3L",
31f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT3R",
32f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT4L",
33f126890aSEmmanuel Vadot		"Line Out Jack", "AOUT4R",
34f126890aSEmmanuel Vadot		"AIN1L", "AMIC",
35f126890aSEmmanuel Vadot		"AIN1R", "AMIC",
36f126890aSEmmanuel Vadot		"AIN2L", "Tuner In",
37f126890aSEmmanuel Vadot		"AIN2R", "Tuner In",
38f126890aSEmmanuel Vadot		"AIN3L", "Satellite Tuner In",
39f126890aSEmmanuel Vadot		"AIN3R", "Satellite Tuner In",
40f126890aSEmmanuel Vadot		"AIN3L", "AUX In",
41f126890aSEmmanuel Vadot		"AIN3R", "AUX In";
42f126890aSEmmanuel Vadot		mediatek,audio-codec = <&cs42448>;
43f126890aSEmmanuel Vadot		mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
44f126890aSEmmanuel Vadot		pinctrl-names = "default";
45f126890aSEmmanuel Vadot		pinctrl-0 = <&aud_pins_default>;
46f126890aSEmmanuel Vadot		i2s1-in-sel-gpio1 = <&pio 53 0>;
47f126890aSEmmanuel Vadot		i2s1-in-sel-gpio2 = <&pio 54 0>;
48f126890aSEmmanuel Vadot		status = "okay";
49f126890aSEmmanuel Vadot	};
50f126890aSEmmanuel Vadot
51f126890aSEmmanuel Vadot	bt_sco_codec:bt_sco_codec {
52f126890aSEmmanuel Vadot		compatible = "linux,bt-sco";
53f126890aSEmmanuel Vadot	};
54f126890aSEmmanuel Vadot
55f126890aSEmmanuel Vadot	backlight_lcd: backlight_lcd {
56f126890aSEmmanuel Vadot		compatible = "pwm-backlight";
57f126890aSEmmanuel Vadot		pwms = <&bls 0 100000>;
58f126890aSEmmanuel Vadot		brightness-levels = <
59f126890aSEmmanuel Vadot			  0  16  32  48  64  80  96 112
60f126890aSEmmanuel Vadot			128 144 160 176 192 208 224 240
61f126890aSEmmanuel Vadot			255
62f126890aSEmmanuel Vadot		>;
63f126890aSEmmanuel Vadot		default-brightness-level = <9>;
64f126890aSEmmanuel Vadot	};
65f126890aSEmmanuel Vadot
66f126890aSEmmanuel Vadot	usb_vbus: regulator@0 {
67f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
68f126890aSEmmanuel Vadot		regulator-name = "usb_vbus";
69f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
70f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
71f126890aSEmmanuel Vadot		gpio = <&pio 45 GPIO_ACTIVE_HIGH>;
72f126890aSEmmanuel Vadot		enable-active-high;
73f126890aSEmmanuel Vadot	};
74f126890aSEmmanuel Vadot};
75f126890aSEmmanuel Vadot
76f126890aSEmmanuel Vadot&auxadc {
77f126890aSEmmanuel Vadot	status = "okay";
78f126890aSEmmanuel Vadot};
79f126890aSEmmanuel Vadot
80f126890aSEmmanuel Vadot&bls {
81f126890aSEmmanuel Vadot	status = "okay";
82f126890aSEmmanuel Vadot	pinctrl-names = "default";
83f126890aSEmmanuel Vadot	pinctrl-0 = <&pwm_bls_gpio>;
84f126890aSEmmanuel Vadot};
85f126890aSEmmanuel Vadot
86f126890aSEmmanuel Vadot&i2c0 {
87f126890aSEmmanuel Vadot	pinctrl-names = "default";
88f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c0_pins_a>;
89f126890aSEmmanuel Vadot	status = "okay";
90f126890aSEmmanuel Vadot};
91f126890aSEmmanuel Vadot
92f126890aSEmmanuel Vadot&i2c1 {
93f126890aSEmmanuel Vadot	pinctrl-names = "default";
94f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c1_pins_a>;
95f126890aSEmmanuel Vadot	status = "okay";
96f126890aSEmmanuel Vadot};
97f126890aSEmmanuel Vadot
98f126890aSEmmanuel Vadot&i2c2 {
99f126890aSEmmanuel Vadot	pinctrl-names = "default";
100f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c2_pins_a>;
101f126890aSEmmanuel Vadot	status = "okay";
102f126890aSEmmanuel Vadot	cs42448: cs42448@48 {
103f126890aSEmmanuel Vadot		compatible = "cirrus,cs42448";
104f126890aSEmmanuel Vadot		reg = <0x48>;
105f126890aSEmmanuel Vadot		clocks = <&topckgen CLK_TOP_AUD_I2S1_MCLK>;
106f126890aSEmmanuel Vadot		clock-names = "mclk";
107f126890aSEmmanuel Vadot	};
108f126890aSEmmanuel Vadot};
109f126890aSEmmanuel Vadot
110f126890aSEmmanuel Vadot&pio {
111f126890aSEmmanuel Vadot	i2c0_pins_a: i2c0@0 {
112f126890aSEmmanuel Vadot		pins1 {
113f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
114f126890aSEmmanuel Vadot				 <MT2701_PIN_76_SCL0__FUNC_SCL0>;
115f126890aSEmmanuel Vadot			bias-disable;
116f126890aSEmmanuel Vadot		};
117f126890aSEmmanuel Vadot	};
118f126890aSEmmanuel Vadot
119f126890aSEmmanuel Vadot	i2c1_pins_a: i2c1@0 {
120f126890aSEmmanuel Vadot		pins1 {
121f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
122f126890aSEmmanuel Vadot				 <MT2701_PIN_58_SCL1__FUNC_SCL1>;
123f126890aSEmmanuel Vadot			bias-disable;
124f126890aSEmmanuel Vadot		};
125f126890aSEmmanuel Vadot	};
126f126890aSEmmanuel Vadot
127f126890aSEmmanuel Vadot	i2c2_pins_a: i2c2@0 {
128f126890aSEmmanuel Vadot		pins1 {
129f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
130f126890aSEmmanuel Vadot				 <MT2701_PIN_78_SCL2__FUNC_SCL2>;
131f126890aSEmmanuel Vadot			bias-disable;
132f126890aSEmmanuel Vadot		};
133f126890aSEmmanuel Vadot	};
134f126890aSEmmanuel Vadot
135f126890aSEmmanuel Vadot	pwm_bls_gpio: pwm_bls_gpio {
136f126890aSEmmanuel Vadot		pins_cmd_dat {
137f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>;
138f126890aSEmmanuel Vadot		};
139f126890aSEmmanuel Vadot	};
140f126890aSEmmanuel Vadot
141f126890aSEmmanuel Vadot	spi_pins_a: spi0@0 {
142f126890aSEmmanuel Vadot		pins_spi {
143f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>,
144f126890aSEmmanuel Vadot				 <MT2701_PIN_54_SPI0_CK__FUNC_SPI0_CK>,
145f126890aSEmmanuel Vadot				 <MT2701_PIN_55_SPI0_MI__FUNC_SPI0_MI>,
146f126890aSEmmanuel Vadot				 <MT2701_PIN_56_SPI0_MO__FUNC_SPI0_MO>;
147f126890aSEmmanuel Vadot			bias-disable;
148f126890aSEmmanuel Vadot		};
149f126890aSEmmanuel Vadot	};
150f126890aSEmmanuel Vadot
151f126890aSEmmanuel Vadot	aud_pins_default: audiodefault {
152f126890aSEmmanuel Vadot		pins_cmd_dat {
153f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_49_I2S0_DATA__FUNC_I2S0_DATA>,
154f126890aSEmmanuel Vadot				 <MT2701_PIN_72_I2S0_DATA_IN__FUNC_I2S0_DATA_IN>,
155f126890aSEmmanuel Vadot				 <MT2701_PIN_73_I2S0_LRCK__FUNC_I2S0_LRCK>,
156f126890aSEmmanuel Vadot				 <MT2701_PIN_74_I2S0_BCK__FUNC_I2S0_BCK>,
157f126890aSEmmanuel Vadot				 <MT2701_PIN_126_I2S0_MCLK__FUNC_I2S0_MCLK>,
158f126890aSEmmanuel Vadot				 <MT2701_PIN_33_I2S1_DATA__FUNC_I2S1_DATA>,
159f126890aSEmmanuel Vadot				 <MT2701_PIN_34_I2S1_DATA_IN__FUNC_I2S1_DATA_IN>,
160f126890aSEmmanuel Vadot				 <MT2701_PIN_35_I2S1_BCK__FUNC_I2S1_BCK>,
161f126890aSEmmanuel Vadot				 <MT2701_PIN_36_I2S1_LRCK__FUNC_I2S1_LRCK>,
162f126890aSEmmanuel Vadot				 <MT2701_PIN_37_I2S1_MCLK__FUNC_I2S1_MCLK>,
163f126890aSEmmanuel Vadot				 <MT2701_PIN_203_PWM0__FUNC_I2S2_DATA>,
164f126890aSEmmanuel Vadot				 <MT2701_PIN_204_PWM1__FUNC_I2S3_DATA>,
165f126890aSEmmanuel Vadot				 <MT2701_PIN_53_SPI0_CSN__FUNC_GPIO53>,
166f126890aSEmmanuel Vadot				 <MT2701_PIN_54_SPI0_CK__FUNC_GPIO54>,
167f126890aSEmmanuel Vadot				 <MT2701_PIN_18_PCM_CLK__FUNC_MRG_CLK>,
168f126890aSEmmanuel Vadot				 <MT2701_PIN_19_PCM_SYNC__FUNC_MRG_SYNC>,
169f126890aSEmmanuel Vadot				 <MT2701_PIN_20_PCM_RX__FUNC_MRG_TX>,
170f126890aSEmmanuel Vadot				 <MT2701_PIN_21_PCM_TX__FUNC_MRG_RX>;
171f126890aSEmmanuel Vadot			drive-strength = <MTK_DRIVE_12mA>;
172f126890aSEmmanuel Vadot			bias-pull-down;
173f126890aSEmmanuel Vadot		};
174f126890aSEmmanuel Vadot	};
175f126890aSEmmanuel Vadot
176f126890aSEmmanuel Vadot	spi_pins_b: spi1@0 {
177f126890aSEmmanuel Vadot		pins_spi {
178f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_7_SPI1_CSN__FUNC_SPI1_CS>,
179f126890aSEmmanuel Vadot				 <MT2701_PIN_8_SPI1_MI__FUNC_SPI1_MI>,
180f126890aSEmmanuel Vadot				 <MT2701_PIN_9_SPI1_MO__FUNC_SPI1_MO>,
181f126890aSEmmanuel Vadot				 <MT2701_PIN_199_SPI1_CLK__FUNC_SPI1_CK>;
182f126890aSEmmanuel Vadot			bias-disable;
183f126890aSEmmanuel Vadot		};
184f126890aSEmmanuel Vadot	};
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot	spi_pins_c: spi2@0 {
187f126890aSEmmanuel Vadot		pins_spi {
188f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_101_SPI2_CSN__FUNC_SPI2_CS>,
189f126890aSEmmanuel Vadot				 <MT2701_PIN_102_SPI2_MI__FUNC_SPI2_MI>,
190f126890aSEmmanuel Vadot				 <MT2701_PIN_103_SPI2_MO__FUNC_SPI2_MO>,
191f126890aSEmmanuel Vadot				 <MT2701_PIN_104_SPI2_CLK__FUNC_SPI2_CK>;
192f126890aSEmmanuel Vadot			bias-disable;
193f126890aSEmmanuel Vadot		};
194f126890aSEmmanuel Vadot	};
195f126890aSEmmanuel Vadot};
196f126890aSEmmanuel Vadot
197f126890aSEmmanuel Vadot&spi0 {
198f126890aSEmmanuel Vadot	pinctrl-names = "default";
199f126890aSEmmanuel Vadot	pinctrl-0 = <&spi_pins_a>;
200f126890aSEmmanuel Vadot	status = "disabled";
201f126890aSEmmanuel Vadot};
202f126890aSEmmanuel Vadot
203f126890aSEmmanuel Vadot&spi1 {
204f126890aSEmmanuel Vadot	pinctrl-names = "default";
205f126890aSEmmanuel Vadot	pinctrl-0 = <&spi_pins_b>;
206f126890aSEmmanuel Vadot	status = "disabled";
207f126890aSEmmanuel Vadot};
208f126890aSEmmanuel Vadot
209f126890aSEmmanuel Vadot&spi2 {
210f126890aSEmmanuel Vadot	pinctrl-names = "default";
211f126890aSEmmanuel Vadot	pinctrl-0 = <&spi_pins_c>;
212f126890aSEmmanuel Vadot	status = "disabled";
213f126890aSEmmanuel Vadot};
214f126890aSEmmanuel Vadot
215f126890aSEmmanuel Vadot&nor_flash {
216f126890aSEmmanuel Vadot	pinctrl-names = "default";
217f126890aSEmmanuel Vadot	pinctrl-0 = <&nor_pins_default>;
218f126890aSEmmanuel Vadot	status = "okay";
219f126890aSEmmanuel Vadot	flash@0 {
220f126890aSEmmanuel Vadot		compatible = "jedec,spi-nor";
221f126890aSEmmanuel Vadot		reg = <0>;
222f126890aSEmmanuel Vadot	};
223f126890aSEmmanuel Vadot};
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot&pio {
226f126890aSEmmanuel Vadot	nor_pins_default: nor {
227f126890aSEmmanuel Vadot		pins1 {
228f126890aSEmmanuel Vadot			pinmux = <MT2701_PIN_240_EXT_XCS__FUNC_EXT_XCS>,
229f126890aSEmmanuel Vadot				 <MT2701_PIN_241_EXT_SCK__FUNC_EXT_SCK>,
230f126890aSEmmanuel Vadot				 <MT2701_PIN_239_EXT_SDIO0__FUNC_EXT_SDIO0>,
231f126890aSEmmanuel Vadot				 <MT2701_PIN_238_EXT_SDIO1__FUNC_EXT_SDIO1>,
232f126890aSEmmanuel Vadot				 <MT2701_PIN_237_EXT_SDIO2__FUNC_EXT_SDIO2>,
233f126890aSEmmanuel Vadot				 <MT2701_PIN_236_EXT_SDIO3__FUNC_EXT_SDIO3>;
234*0e8011faSEmmanuel Vadot			drive-strength = <4>;
235f126890aSEmmanuel Vadot			bias-pull-up;
236f126890aSEmmanuel Vadot		};
237f126890aSEmmanuel Vadot	};
238f126890aSEmmanuel Vadot};
239f126890aSEmmanuel Vadot
240f126890aSEmmanuel Vadot&uart0 {
241f126890aSEmmanuel Vadot	status = "okay";
242f126890aSEmmanuel Vadot};
243f126890aSEmmanuel Vadot
244f126890aSEmmanuel Vadot&usb2 {
245f126890aSEmmanuel Vadot	status = "okay";
246f126890aSEmmanuel Vadot	usb-role-switch;
247f126890aSEmmanuel Vadot	connector {
248f126890aSEmmanuel Vadot		compatible = "gpio-usb-b-connector", "usb-b-connector";
249f126890aSEmmanuel Vadot		type = "micro";
250f126890aSEmmanuel Vadot		id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
251f126890aSEmmanuel Vadot		vbus-supply = <&usb_vbus>;
252f126890aSEmmanuel Vadot	};
253f126890aSEmmanuel Vadot};
254