1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2021-2022 BayLibre, SAS.
5 * Fabien Parent <fparent@baylibre.com>
6 * Bernhard Rosenkränzer <bero@baylibre.com>
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/pinctrl/mt8365-pinfunc.h>
14 #include "mt8365.dtsi"
15 #include "mt6357.dtsi"
18 model = "MediaTek MT8365 Open Platform EVK";
19 compatible = "mediatek,mt8365-evk", "mediatek,mt8365";
26 stdout-path = "serial0:921600n8";
31 compatible = "linaro,optee-tz";
37 compatible = "gpio-keys";
38 pinctrl-names = "default";
39 pinctrl-0 = <&gpio_keys>;
42 gpios = <&pio 24 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_VOLUMEUP>;
46 debounce-interval = <15>;
51 device_type = "memory";
52 reg = <0 0x40000000 0 0xc0000000>;
55 usb_otg_vbus: regulator-0 {
56 compatible = "regulator-fixed";
57 regulator-name = "otg_vbus";
58 regulator-min-microvolt = <5000000>;
59 regulator-max-microvolt = <5000000>;
60 gpio = <&pio 16 GPIO_ACTIVE_HIGH>;
69 /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
70 bl31_secmon_reserved: secmon@43000000 {
72 reg = <0 0x43000000 0 0x30000>;
75 /* 12 MiB reserved for OP-TEE (BL32)
76 * +-----------------------+ 0x43e0_0000
78 * +-----------------------+ 0x43c0_0000
80 * + TZDRAM +--------------+ 0x4340_0000
82 * +-----------------------+ 0x4320_0000
84 optee_reserved: optee@43200000 {
86 reg = <0 0x43200000 0 0x00c00000>;
92 proc-supply = <&mt6357_vproc_reg>;
93 sram-supply = <&mt6357_vsram_proc_reg>;
97 proc-supply = <&mt6357_vproc_reg>;
98 sram-supply = <&mt6357_vsram_proc_reg>;
102 proc-supply = <&mt6357_vproc_reg>;
103 sram-supply = <&mt6357_vsram_proc_reg>;
107 proc-supply = <&mt6357_vproc_reg>;
108 sram-supply = <&mt6357_vsram_proc_reg>;
112 pinctrl-0 = <ðernet_pins>;
113 pinctrl-names = "default";
114 phy-handle = <ð_phy>;
117 * Ethernet and HDMI (DSI0) are sharing pins.
118 * Only one can be enabled at a time and require the physical switch
119 * SW2101 to be set on LAN position
120 * mt6357_vibr_reg and mt6357_vsim2_reg are needed to supply ethernet
125 #address-cells = <1>;
128 eth_phy: ethernet-phy@0 {
135 clock-frequency = <100000>;
136 pinctrl-0 = <&i2c0_pins>;
137 pinctrl-names = "default";
142 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
143 assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
147 hs400-ds-delay = <0x12012>;
148 max-frequency = <200000000>;
154 pinctrl-0 = <&mmc0_default_pins>;
155 pinctrl-1 = <&mmc0_uhs_pins>;
156 pinctrl-names = "default", "state_uhs";
157 vmmc-supply = <&mt6357_vemc_reg>;
158 vqmmc-supply = <&mt6357_vio18_reg>;
165 cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
166 max-frequency = <200000000>;
167 pinctrl-0 = <&mmc1_default_pins>;
168 pinctrl-1 = <&mmc1_uhs_pins>;
169 pinctrl-names = "default", "state_uhs";
172 vmmc-supply = <&mt6357_vmch_reg>;
173 vqmmc-supply = <&mt6357_vmc_reg>;
178 interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>;
179 interrupt-controller;
180 #interrupt-cells = <2>;
184 ethernet_pins: ethernet-pins {
186 pinmux = <MT8365_PIN_133_TDM_TX_DATA1__FUNC_GPIO133>;
190 pinmux = <MT8365_PIN_0_GPIO0__FUNC_EXT_TXD0>,
191 <MT8365_PIN_1_GPIO1__FUNC_EXT_TXD1>,
192 <MT8365_PIN_2_GPIO2__FUNC_EXT_TXD2>,
193 <MT8365_PIN_3_GPIO3__FUNC_EXT_TXD3>,
194 <MT8365_PIN_4_GPIO4__FUNC_EXT_TXC>,
195 <MT8365_PIN_5_GPIO5__FUNC_EXT_RXER>,
196 <MT8365_PIN_6_GPIO6__FUNC_EXT_RXC>,
197 <MT8365_PIN_7_GPIO7__FUNC_EXT_RXDV>,
198 <MT8365_PIN_8_GPIO8__FUNC_EXT_RXD0>,
199 <MT8365_PIN_9_GPIO9__FUNC_EXT_RXD1>,
200 <MT8365_PIN_10_GPIO10__FUNC_EXT_RXD2>,
201 <MT8365_PIN_11_GPIO11__FUNC_EXT_RXD3>,
202 <MT8365_PIN_12_GPIO12__FUNC_EXT_TXEN>,
203 <MT8365_PIN_13_GPIO13__FUNC_EXT_COL>,
204 <MT8365_PIN_14_GPIO14__FUNC_EXT_MDIO>,
205 <MT8365_PIN_15_GPIO15__FUNC_EXT_MDC>;
209 gpio_keys: gpio-keys-pins {
211 pinmux = <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
217 i2c0_pins: i2c0-pins {
219 pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
220 <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
225 mmc0_default_pins: mmc0-default-pins {
227 pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
232 pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
233 <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
234 <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
235 <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
236 <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
237 <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
238 <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
239 <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
240 <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
246 pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
251 mmc0_uhs_pins: mmc0-uhs-pins {
253 pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
254 drive-strength = <MTK_DRIVE_10mA>;
255 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
259 pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
260 <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
261 <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
262 <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
263 <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
264 <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
265 <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
266 <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
267 <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
269 drive-strength = <MTK_DRIVE_10mA>;
270 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
274 pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
275 drive-strength = <MTK_DRIVE_10mA>;
276 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
280 pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
281 drive-strength = <MTK_DRIVE_10mA>;
286 mmc1_default_pins: mmc1-default-pins {
288 pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
293 pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
294 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
298 pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
299 <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
300 <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
301 <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
302 <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
304 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
308 mmc1_uhs_pins: mmc1-uhs-pins {
310 pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
311 drive-strength = <MTK_DRIVE_8mA>;
312 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
316 pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
317 <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
318 <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
319 <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
320 <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
322 drive-strength = <MTK_DRIVE_6mA>;
323 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
327 uart0_pins: uart0-pins {
329 pinmux = <MT8365_PIN_35_URXD0__FUNC_URXD0>,
330 <MT8365_PIN_36_UTXD0__FUNC_UTXD0>;
334 uart1_pins: uart1-pins {
336 pinmux = <MT8365_PIN_37_URXD1__FUNC_URXD1>,
337 <MT8365_PIN_38_UTXD1__FUNC_UTXD1>;
341 uart2_pins: uart2-pins {
343 pinmux = <MT8365_PIN_39_URXD2__FUNC_URXD2>,
344 <MT8365_PIN_40_UTXD2__FUNC_UTXD2>;
350 pinmux = <MT8365_PIN_17_GPIO17__FUNC_GPIO17>;
356 pinmux = <MT8365_PIN_16_GPIO16__FUNC_USB_DRVVBUS>;
361 pinmux = <MT8365_PIN_18_GPIO18__FUNC_GPIO18>;
368 pinmux = <MT8365_PIN_19_DISP_PWM__FUNC_PWM_A>,
369 <MT8365_PIN_116_I2S_BCK__FUNC_PWM_C>;
375 pinctrl-0 = <&pwm_pins>;
376 pinctrl-names = "default";
382 maximum-speed = "high-speed";
383 pinctrl-0 = <&usb_pins>;
384 pinctrl-names = "default";
386 vusb33-supply = <&mt6357_vusb33_reg>;
390 compatible = "gpio-usb-b-connector", "usb-b-connector";
391 id-gpios = <&pio 17 GPIO_ACTIVE_HIGH>;
393 vbus-supply = <&usb_otg_vbus>;
398 vusb33-supply = <&mt6357_vusb33_reg>;
403 pinctrl-0 = <&uart0_pins>;
404 pinctrl-names = "default";
409 pinctrl-0 = <&uart1_pins>;
410 pinctrl-names = "default";
415 pinctrl-0 = <&uart2_pins>;
416 pinctrl-names = "default";