xref: /linux/scripts/dtc/include-prefixes/arm/mediatek/mt2701-evb.dts (revision c04774af7ae392322e204dd20117e6c5162e0fe4)
1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2724ba675SRob Herring/*
3724ba675SRob Herring * Copyright (c) 2015 MediaTek Inc.
4724ba675SRob Herring * Author: Erin Lo <erin.lo@mediatek.com>
5724ba675SRob Herring *
6724ba675SRob Herring */
7724ba675SRob Herring
8724ba675SRob Herring/dts-v1/;
9724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
10724ba675SRob Herring#include "mt2701.dtsi"
11724ba675SRob Herring
12724ba675SRob Herring/ {
13724ba675SRob Herring	model = "MediaTek MT2701 evaluation board";
14724ba675SRob Herring	compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
15724ba675SRob Herring
16724ba675SRob Herring	memory {
17724ba675SRob Herring		device_type = "memory";
18724ba675SRob Herring		reg = <0 0x80000000 0 0x40000000>;
19724ba675SRob Herring	};
20724ba675SRob Herring
21724ba675SRob Herring	sound:sound {
22724ba675SRob Herring		compatible = "mediatek,mt2701-cs42448-machine";
23724ba675SRob Herring		mediatek,platform = <&afe>;
24724ba675SRob Herring		/* CS42448 Machine name */
25724ba675SRob Herring		audio-routing =
26724ba675SRob Herring		"Line Out Jack", "AOUT1L",
27724ba675SRob Herring		"Line Out Jack", "AOUT1R",
28724ba675SRob Herring		"Line Out Jack", "AOUT2L",
29724ba675SRob Herring		"Line Out Jack", "AOUT2R",
30724ba675SRob Herring		"Line Out Jack", "AOUT3L",
31724ba675SRob Herring		"Line Out Jack", "AOUT3R",
32724ba675SRob Herring		"Line Out Jack", "AOUT4L",
33724ba675SRob Herring		"Line Out Jack", "AOUT4R",
34724ba675SRob Herring		"AIN1L", "AMIC",
35724ba675SRob Herring		"AIN1R", "AMIC",
36724ba675SRob Herring		"AIN2L", "Tuner In",
37724ba675SRob Herring		"AIN2R", "Tuner In",
38724ba675SRob Herring		"AIN3L", "Satellite Tuner In",
39724ba675SRob Herring		"AIN3R", "Satellite Tuner In",
40724ba675SRob Herring		"AIN3L", "AUX In",
41724ba675SRob Herring		"AIN3R", "AUX In";
42724ba675SRob Herring		mediatek,audio-codec = <&cs42448>;
43724ba675SRob Herring		mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
44724ba675SRob Herring		pinctrl-names = "default";
45724ba675SRob Herring		pinctrl-0 = <&aud_pins_default>;
46724ba675SRob Herring		i2s1-in-sel-gpio1 = <&pio 53 0>;
47724ba675SRob Herring		i2s1-in-sel-gpio2 = <&pio 54 0>;
48724ba675SRob Herring		status = "okay";
49724ba675SRob Herring	};
50724ba675SRob Herring
51724ba675SRob Herring	bt_sco_codec:bt_sco_codec {
52724ba675SRob Herring		compatible = "linux,bt-sco";
53724ba675SRob Herring	};
54724ba675SRob Herring
55724ba675SRob Herring	backlight_lcd: backlight_lcd {
56724ba675SRob Herring		compatible = "pwm-backlight";
57724ba675SRob Herring		pwms = <&bls 0 100000>;
58724ba675SRob Herring		brightness-levels = <
59724ba675SRob Herring			  0  16  32  48  64  80  96 112
60724ba675SRob Herring			128 144 160 176 192 208 224 240
61724ba675SRob Herring			255
62724ba675SRob Herring		>;
63724ba675SRob Herring		default-brightness-level = <9>;
64724ba675SRob Herring	};
65724ba675SRob Herring
66724ba675SRob Herring	usb_vbus: regulator@0 {
67724ba675SRob Herring		compatible = "regulator-fixed";
68724ba675SRob Herring		regulator-name = "usb_vbus";
69724ba675SRob Herring		regulator-min-microvolt = <5000000>;
70724ba675SRob Herring		regulator-max-microvolt = <5000000>;
71724ba675SRob Herring		gpio = <&pio 45 GPIO_ACTIVE_HIGH>;
72724ba675SRob Herring		enable-active-high;
73724ba675SRob Herring	};
74724ba675SRob Herring};
75724ba675SRob Herring
76724ba675SRob Herring&auxadc {
77724ba675SRob Herring	status = "okay";
78724ba675SRob Herring};
79724ba675SRob Herring
80724ba675SRob Herring&bls {
81724ba675SRob Herring	status = "okay";
82724ba675SRob Herring	pinctrl-names = "default";
83724ba675SRob Herring	pinctrl-0 = <&pwm_bls_gpio>;
84724ba675SRob Herring};
85724ba675SRob Herring
86724ba675SRob Herring&i2c0 {
87724ba675SRob Herring	pinctrl-names = "default";
88724ba675SRob Herring	pinctrl-0 = <&i2c0_pins_a>;
89724ba675SRob Herring	status = "okay";
90724ba675SRob Herring};
91724ba675SRob Herring
92724ba675SRob Herring&i2c1 {
93724ba675SRob Herring	pinctrl-names = "default";
94724ba675SRob Herring	pinctrl-0 = <&i2c1_pins_a>;
95724ba675SRob Herring	status = "okay";
96724ba675SRob Herring};
97724ba675SRob Herring
98724ba675SRob Herring&i2c2 {
99724ba675SRob Herring	pinctrl-names = "default";
100724ba675SRob Herring	pinctrl-0 = <&i2c2_pins_a>;
101724ba675SRob Herring	status = "okay";
102724ba675SRob Herring	cs42448: cs42448@48 {
103724ba675SRob Herring		compatible = "cirrus,cs42448";
104724ba675SRob Herring		reg = <0x48>;
105724ba675SRob Herring		clocks = <&topckgen CLK_TOP_AUD_I2S1_MCLK>;
106724ba675SRob Herring		clock-names = "mclk";
107724ba675SRob Herring	};
108724ba675SRob Herring};
109724ba675SRob Herring
110724ba675SRob Herring&pio {
111724ba675SRob Herring	i2c0_pins_a: i2c0@0 {
112724ba675SRob Herring		pins1 {
113724ba675SRob Herring			pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
114724ba675SRob Herring				 <MT2701_PIN_76_SCL0__FUNC_SCL0>;
115724ba675SRob Herring			bias-disable;
116724ba675SRob Herring		};
117724ba675SRob Herring	};
118724ba675SRob Herring
119724ba675SRob Herring	i2c1_pins_a: i2c1@0 {
120724ba675SRob Herring		pins1 {
121724ba675SRob Herring			pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
122724ba675SRob Herring				 <MT2701_PIN_58_SCL1__FUNC_SCL1>;
123724ba675SRob Herring			bias-disable;
124724ba675SRob Herring		};
125724ba675SRob Herring	};
126724ba675SRob Herring
127724ba675SRob Herring	i2c2_pins_a: i2c2@0 {
128724ba675SRob Herring		pins1 {
129724ba675SRob Herring			pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
130724ba675SRob Herring				 <MT2701_PIN_78_SCL2__FUNC_SCL2>;
131724ba675SRob Herring			bias-disable;
132724ba675SRob Herring		};
133724ba675SRob Herring	};
134724ba675SRob Herring
135724ba675SRob Herring	pwm_bls_gpio: pwm_bls_gpio {
136724ba675SRob Herring		pins_cmd_dat {
137724ba675SRob Herring			pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>;
138724ba675SRob Herring		};
139724ba675SRob Herring	};
140724ba675SRob Herring
141724ba675SRob Herring	spi_pins_a: spi0@0 {
142724ba675SRob Herring		pins_spi {
143724ba675SRob Herring			pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>,
144724ba675SRob Herring				 <MT2701_PIN_54_SPI0_CK__FUNC_SPI0_CK>,
145724ba675SRob Herring				 <MT2701_PIN_55_SPI0_MI__FUNC_SPI0_MI>,
146724ba675SRob Herring				 <MT2701_PIN_56_SPI0_MO__FUNC_SPI0_MO>;
147724ba675SRob Herring			bias-disable;
148724ba675SRob Herring		};
149724ba675SRob Herring	};
150724ba675SRob Herring
151724ba675SRob Herring	aud_pins_default: audiodefault {
152724ba675SRob Herring		pins_cmd_dat {
153724ba675SRob Herring			pinmux = <MT2701_PIN_49_I2S0_DATA__FUNC_I2S0_DATA>,
154724ba675SRob Herring				 <MT2701_PIN_72_I2S0_DATA_IN__FUNC_I2S0_DATA_IN>,
155724ba675SRob Herring				 <MT2701_PIN_73_I2S0_LRCK__FUNC_I2S0_LRCK>,
156724ba675SRob Herring				 <MT2701_PIN_74_I2S0_BCK__FUNC_I2S0_BCK>,
157724ba675SRob Herring				 <MT2701_PIN_126_I2S0_MCLK__FUNC_I2S0_MCLK>,
158724ba675SRob Herring				 <MT2701_PIN_33_I2S1_DATA__FUNC_I2S1_DATA>,
159724ba675SRob Herring				 <MT2701_PIN_34_I2S1_DATA_IN__FUNC_I2S1_DATA_IN>,
160724ba675SRob Herring				 <MT2701_PIN_35_I2S1_BCK__FUNC_I2S1_BCK>,
161724ba675SRob Herring				 <MT2701_PIN_36_I2S1_LRCK__FUNC_I2S1_LRCK>,
162724ba675SRob Herring				 <MT2701_PIN_37_I2S1_MCLK__FUNC_I2S1_MCLK>,
163724ba675SRob Herring				 <MT2701_PIN_203_PWM0__FUNC_I2S2_DATA>,
164724ba675SRob Herring				 <MT2701_PIN_204_PWM1__FUNC_I2S3_DATA>,
165724ba675SRob Herring				 <MT2701_PIN_53_SPI0_CSN__FUNC_GPIO53>,
166724ba675SRob Herring				 <MT2701_PIN_54_SPI0_CK__FUNC_GPIO54>,
167724ba675SRob Herring				 <MT2701_PIN_18_PCM_CLK__FUNC_MRG_CLK>,
168724ba675SRob Herring				 <MT2701_PIN_19_PCM_SYNC__FUNC_MRG_SYNC>,
169724ba675SRob Herring				 <MT2701_PIN_20_PCM_RX__FUNC_MRG_TX>,
170724ba675SRob Herring				 <MT2701_PIN_21_PCM_TX__FUNC_MRG_RX>;
171724ba675SRob Herring			drive-strength = <MTK_DRIVE_12mA>;
172724ba675SRob Herring			bias-pull-down;
173724ba675SRob Herring		};
174724ba675SRob Herring	};
175724ba675SRob Herring
176724ba675SRob Herring	spi_pins_b: spi1@0 {
177724ba675SRob Herring		pins_spi {
178724ba675SRob Herring			pinmux = <MT2701_PIN_7_SPI1_CSN__FUNC_SPI1_CS>,
179724ba675SRob Herring				 <MT2701_PIN_8_SPI1_MI__FUNC_SPI1_MI>,
180724ba675SRob Herring				 <MT2701_PIN_9_SPI1_MO__FUNC_SPI1_MO>,
181724ba675SRob Herring				 <MT2701_PIN_199_SPI1_CLK__FUNC_SPI1_CK>;
182724ba675SRob Herring			bias-disable;
183724ba675SRob Herring		};
184724ba675SRob Herring	};
185724ba675SRob Herring
186724ba675SRob Herring	spi_pins_c: spi2@0 {
187724ba675SRob Herring		pins_spi {
188724ba675SRob Herring			pinmux = <MT2701_PIN_101_SPI2_CSN__FUNC_SPI2_CS>,
189724ba675SRob Herring				 <MT2701_PIN_102_SPI2_MI__FUNC_SPI2_MI>,
190724ba675SRob Herring				 <MT2701_PIN_103_SPI2_MO__FUNC_SPI2_MO>,
191724ba675SRob Herring				 <MT2701_PIN_104_SPI2_CLK__FUNC_SPI2_CK>;
192724ba675SRob Herring			bias-disable;
193724ba675SRob Herring		};
194724ba675SRob Herring	};
195724ba675SRob Herring};
196724ba675SRob Herring
197724ba675SRob Herring&spi0 {
198724ba675SRob Herring	pinctrl-names = "default";
199724ba675SRob Herring	pinctrl-0 = <&spi_pins_a>;
200724ba675SRob Herring	status = "disabled";
201724ba675SRob Herring};
202724ba675SRob Herring
203724ba675SRob Herring&spi1 {
204724ba675SRob Herring	pinctrl-names = "default";
205724ba675SRob Herring	pinctrl-0 = <&spi_pins_b>;
206724ba675SRob Herring	status = "disabled";
207724ba675SRob Herring};
208724ba675SRob Herring
209724ba675SRob Herring&spi2 {
210724ba675SRob Herring	pinctrl-names = "default";
211724ba675SRob Herring	pinctrl-0 = <&spi_pins_c>;
212724ba675SRob Herring	status = "disabled";
213724ba675SRob Herring};
214724ba675SRob Herring
215724ba675SRob Herring&nor_flash {
216724ba675SRob Herring	pinctrl-names = "default";
217724ba675SRob Herring	pinctrl-0 = <&nor_pins_default>;
218724ba675SRob Herring	status = "okay";
219724ba675SRob Herring	flash@0 {
220724ba675SRob Herring		compatible = "jedec,spi-nor";
221724ba675SRob Herring		reg = <0>;
222724ba675SRob Herring	};
223724ba675SRob Herring};
224724ba675SRob Herring
225724ba675SRob Herring&pio {
226724ba675SRob Herring	nor_pins_default: nor {
227724ba675SRob Herring		pins1 {
228724ba675SRob Herring			pinmux = <MT2701_PIN_240_EXT_XCS__FUNC_EXT_XCS>,
229724ba675SRob Herring				 <MT2701_PIN_241_EXT_SCK__FUNC_EXT_SCK>,
230724ba675SRob Herring				 <MT2701_PIN_239_EXT_SDIO0__FUNC_EXT_SDIO0>,
231724ba675SRob Herring				 <MT2701_PIN_238_EXT_SDIO1__FUNC_EXT_SDIO1>,
232724ba675SRob Herring				 <MT2701_PIN_237_EXT_SDIO2__FUNC_EXT_SDIO2>,
233724ba675SRob Herring				 <MT2701_PIN_236_EXT_SDIO3__FUNC_EXT_SDIO3>;
234*c04774afSAngeloGioacchino Del Regno			drive-strength = <4>;
235724ba675SRob Herring			bias-pull-up;
236724ba675SRob Herring		};
237724ba675SRob Herring	};
238724ba675SRob Herring};
239724ba675SRob Herring
240724ba675SRob Herring&uart0 {
241724ba675SRob Herring	status = "okay";
242724ba675SRob Herring};
243724ba675SRob Herring
244724ba675SRob Herring&usb2 {
245724ba675SRob Herring	status = "okay";
246724ba675SRob Herring	usb-role-switch;
247724ba675SRob Herring	connector {
248724ba675SRob Herring		compatible = "gpio-usb-b-connector", "usb-b-connector";
249724ba675SRob Herring		type = "micro";
250724ba675SRob Herring		id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
251724ba675SRob Herring		vbus-supply = <&usb_vbus>;
252724ba675SRob Herring	};
253724ba675SRob Herring};
254