mt8173-evb.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2014 MediaTek Inc.
  4. * Author: Eddie Huang <[email protected]>
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include "mt8173.dtsi"
  9. / {
  10. model = "MediaTek MT8173 evaluation board";
  11. compatible = "mediatek,mt8173-evb", "mediatek,mt8173";
  12. aliases {
  13. serial0 = &uart0;
  14. serial1 = &uart1;
  15. serial2 = &uart2;
  16. serial3 = &uart3;
  17. };
  18. memory@40000000 {
  19. device_type = "memory";
  20. reg = <0 0x40000000 0 0x80000000>;
  21. };
  22. chosen { };
  23. connector {
  24. compatible = "hdmi-connector";
  25. label = "hdmi";
  26. type = "d";
  27. port {
  28. hdmi_connector_in: endpoint {
  29. remote-endpoint = <&hdmi0_out>;
  30. };
  31. };
  32. };
  33. extcon_usb: extcon_iddig {
  34. compatible = "linux,extcon-usb-gpio";
  35. id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>;
  36. };
  37. usb_p1_vbus: regulator-usb-p1 {
  38. compatible = "regulator-fixed";
  39. regulator-name = "usb_vbus";
  40. regulator-min-microvolt = <5000000>;
  41. regulator-max-microvolt = <5000000>;
  42. gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
  43. enable-active-high;
  44. };
  45. usb_p0_vbus: regulator-usb-p0 {
  46. compatible = "regulator-fixed";
  47. regulator-name = "vbus";
  48. regulator-min-microvolt = <5000000>;
  49. regulator-max-microvolt = <5000000>;
  50. gpio = <&pio 9 GPIO_ACTIVE_HIGH>;
  51. enable-active-high;
  52. };
  53. };
  54. &mfg_async {
  55. domain-supply = <&da9211_vgpu_reg>;
  56. };
  57. &cec {
  58. status = "okay";
  59. };
  60. &cpu0 {
  61. proc-supply = <&mt6397_vpca15_reg>;
  62. };
  63. &cpu1 {
  64. proc-supply = <&mt6397_vpca15_reg>;
  65. };
  66. &cpu2 {
  67. proc-supply = <&da9211_vcpu_reg>;
  68. sram-supply = <&mt6397_vsramca7_reg>;
  69. };
  70. &cpu3 {
  71. proc-supply = <&da9211_vcpu_reg>;
  72. sram-supply = <&mt6397_vsramca7_reg>;
  73. };
  74. &dpi0 {
  75. status = "okay";
  76. };
  77. &hdmi_phy {
  78. status = "okay";
  79. };
  80. &hdmi0 {
  81. status = "okay";
  82. ports {
  83. port@1 {
  84. reg = <1>;
  85. hdmi0_out: endpoint {
  86. remote-endpoint = <&hdmi_connector_in>;
  87. };
  88. };
  89. };
  90. };
  91. &i2c1 {
  92. status = "okay";
  93. buck: da9211@68 {
  94. compatible = "dlg,da9211";
  95. reg = <0x68>;
  96. regulators {
  97. da9211_vcpu_reg: BUCKA {
  98. regulator-name = "VBUCKA";
  99. regulator-min-microvolt = < 700000>;
  100. regulator-max-microvolt = <1310000>;
  101. regulator-min-microamp = <2000000>;
  102. regulator-max-microamp = <4400000>;
  103. regulator-ramp-delay = <10000>;
  104. regulator-always-on;
  105. };
  106. da9211_vgpu_reg: BUCKB {
  107. regulator-name = "VBUCKB";
  108. regulator-min-microvolt = < 700000>;
  109. regulator-max-microvolt = <1310000>;
  110. regulator-min-microamp = <2000000>;
  111. regulator-max-microamp = <3000000>;
  112. regulator-ramp-delay = <10000>;
  113. };
  114. };
  115. };
  116. };
  117. &mmc0 {
  118. status = "okay";
  119. pinctrl-names = "default", "state_uhs";
  120. pinctrl-0 = <&mmc0_pins_default>;
  121. pinctrl-1 = <&mmc0_pins_uhs>;
  122. bus-width = <8>;
  123. max-frequency = <50000000>;
  124. cap-mmc-highspeed;
  125. mediatek,hs200-cmd-int-delay = <26>;
  126. mediatek,hs400-cmd-int-delay = <14>;
  127. mediatek,hs400-cmd-resp-sel-rising;
  128. vmmc-supply = <&mt6397_vemc_3v3_reg>;
  129. vqmmc-supply = <&mt6397_vio18_reg>;
  130. non-removable;
  131. };
  132. &mmc1 {
  133. status = "okay";
  134. pinctrl-names = "default", "state_uhs";
  135. pinctrl-0 = <&mmc1_pins_default>;
  136. pinctrl-1 = <&mmc1_pins_uhs>;
  137. bus-width = <4>;
  138. max-frequency = <50000000>;
  139. cap-sd-highspeed;
  140. sd-uhs-sdr25;
  141. cd-gpios = <&pio 132 0>;
  142. vmmc-supply = <&mt6397_vmch_reg>;
  143. vqmmc-supply = <&mt6397_vmc_reg>;
  144. };
  145. &pio {
  146. disp_pwm0_pins: disp_pwm0_pins {
  147. pins1 {
  148. pinmux = <MT8173_PIN_87_DISP_PWM0__FUNC_DISP_PWM0>;
  149. output-low;
  150. };
  151. };
  152. mmc0_pins_default: mmc0default {
  153. pins_cmd_dat {
  154. pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
  155. <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
  156. <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
  157. <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
  158. <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
  159. <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
  160. <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
  161. <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
  162. <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>;
  163. input-enable;
  164. bias-pull-up;
  165. };
  166. pins_clk {
  167. pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>;
  168. bias-pull-down;
  169. };
  170. pins_rst {
  171. pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>;
  172. bias-pull-up;
  173. };
  174. };
  175. mmc1_pins_default: mmc1default {
  176. pins_cmd_dat {
  177. pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
  178. <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
  179. <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
  180. <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
  181. <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>;
  182. input-enable;
  183. drive-strength = <MTK_DRIVE_4mA>;
  184. bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
  185. };
  186. pins_clk {
  187. pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>;
  188. bias-pull-down;
  189. drive-strength = <MTK_DRIVE_4mA>;
  190. };
  191. pins_insert {
  192. pinmux = <MT8173_PIN_132_I2S0_DATA1__FUNC_GPIO132>;
  193. bias-pull-up;
  194. };
  195. };
  196. mmc0_pins_uhs: mmc0 {
  197. pins_cmd_dat {
  198. pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
  199. <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
  200. <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
  201. <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
  202. <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
  203. <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
  204. <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
  205. <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
  206. <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>;
  207. input-enable;
  208. drive-strength = <MTK_DRIVE_2mA>;
  209. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  210. };
  211. pins_clk {
  212. pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>;
  213. drive-strength = <MTK_DRIVE_2mA>;
  214. bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
  215. };
  216. pins_rst {
  217. pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>;
  218. bias-pull-up;
  219. };
  220. };
  221. mmc1_pins_uhs: mmc1 {
  222. pins_cmd_dat {
  223. pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
  224. <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
  225. <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
  226. <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
  227. <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>;
  228. input-enable;
  229. drive-strength = <MTK_DRIVE_4mA>;
  230. bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
  231. };
  232. pins_clk {
  233. pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>;
  234. drive-strength = <MTK_DRIVE_4mA>;
  235. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  236. };
  237. };
  238. usb_id_pins_float: usb_iddig_pull_up {
  239. pins_iddig {
  240. pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
  241. bias-pull-up;
  242. };
  243. };
  244. usb_id_pins_ground: usb_iddig_pull_down {
  245. pins_iddig {
  246. pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
  247. bias-pull-down;
  248. };
  249. };
  250. };
  251. &pwm0 {
  252. pinctrl-names = "default";
  253. pinctrl-0 = <&disp_pwm0_pins>;
  254. status = "okay";
  255. };
  256. &pwrap {
  257. /* Only MT8173 E1 needs USB power domain */
  258. power-domains = <&spm MT8173_POWER_DOMAIN_USB>;
  259. pmic: mt6397 {
  260. compatible = "mediatek,mt6397";
  261. interrupt-parent = <&pio>;
  262. interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
  263. interrupt-controller;
  264. #interrupt-cells = <2>;
  265. mt6397regulator: mt6397regulator {
  266. compatible = "mediatek,mt6397-regulator";
  267. mt6397_vpca15_reg: buck_vpca15 {
  268. regulator-compatible = "buck_vpca15";
  269. regulator-name = "vpca15";
  270. regulator-min-microvolt = < 700000>;
  271. regulator-max-microvolt = <1350000>;
  272. regulator-ramp-delay = <12500>;
  273. regulator-always-on;
  274. };
  275. mt6397_vpca7_reg: buck_vpca7 {
  276. regulator-compatible = "buck_vpca7";
  277. regulator-name = "vpca7";
  278. regulator-min-microvolt = < 700000>;
  279. regulator-max-microvolt = <1350000>;
  280. regulator-ramp-delay = <12500>;
  281. regulator-enable-ramp-delay = <115>;
  282. };
  283. mt6397_vsramca15_reg: buck_vsramca15 {
  284. regulator-compatible = "buck_vsramca15";
  285. regulator-name = "vsramca15";
  286. regulator-min-microvolt = < 700000>;
  287. regulator-max-microvolt = <1350000>;
  288. regulator-ramp-delay = <12500>;
  289. regulator-always-on;
  290. };
  291. mt6397_vsramca7_reg: buck_vsramca7 {
  292. regulator-compatible = "buck_vsramca7";
  293. regulator-name = "vsramca7";
  294. regulator-min-microvolt = < 700000>;
  295. regulator-max-microvolt = <1350000>;
  296. regulator-ramp-delay = <12500>;
  297. regulator-always-on;
  298. };
  299. mt6397_vcore_reg: buck_vcore {
  300. regulator-compatible = "buck_vcore";
  301. regulator-name = "vcore";
  302. regulator-min-microvolt = < 700000>;
  303. regulator-max-microvolt = <1350000>;
  304. regulator-ramp-delay = <12500>;
  305. regulator-always-on;
  306. };
  307. mt6397_vgpu_reg: buck_vgpu {
  308. regulator-compatible = "buck_vgpu";
  309. regulator-name = "vgpu";
  310. regulator-min-microvolt = < 700000>;
  311. regulator-max-microvolt = <1350000>;
  312. regulator-ramp-delay = <12500>;
  313. regulator-enable-ramp-delay = <115>;
  314. };
  315. mt6397_vdrm_reg: buck_vdrm {
  316. regulator-compatible = "buck_vdrm";
  317. regulator-name = "vdrm";
  318. regulator-min-microvolt = <1200000>;
  319. regulator-max-microvolt = <1400000>;
  320. regulator-ramp-delay = <12500>;
  321. regulator-always-on;
  322. };
  323. mt6397_vio18_reg: buck_vio18 {
  324. regulator-compatible = "buck_vio18";
  325. regulator-name = "vio18";
  326. regulator-min-microvolt = <1620000>;
  327. regulator-max-microvolt = <1980000>;
  328. regulator-ramp-delay = <12500>;
  329. regulator-always-on;
  330. };
  331. mt6397_vtcxo_reg: ldo_vtcxo {
  332. regulator-compatible = "ldo_vtcxo";
  333. regulator-name = "vtcxo";
  334. regulator-always-on;
  335. };
  336. mt6397_va28_reg: ldo_va28 {
  337. regulator-compatible = "ldo_va28";
  338. regulator-name = "va28";
  339. regulator-always-on;
  340. };
  341. mt6397_vcama_reg: ldo_vcama {
  342. regulator-compatible = "ldo_vcama";
  343. regulator-name = "vcama";
  344. regulator-min-microvolt = <1500000>;
  345. regulator-max-microvolt = <2800000>;
  346. regulator-enable-ramp-delay = <218>;
  347. };
  348. mt6397_vio28_reg: ldo_vio28 {
  349. regulator-compatible = "ldo_vio28";
  350. regulator-name = "vio28";
  351. regulator-always-on;
  352. };
  353. mt6397_vusb_reg: ldo_vusb {
  354. regulator-compatible = "ldo_vusb";
  355. regulator-name = "vusb";
  356. };
  357. mt6397_vmc_reg: ldo_vmc {
  358. regulator-compatible = "ldo_vmc";
  359. regulator-name = "vmc";
  360. regulator-min-microvolt = <1800000>;
  361. regulator-max-microvolt = <3300000>;
  362. regulator-enable-ramp-delay = <218>;
  363. };
  364. mt6397_vmch_reg: ldo_vmch {
  365. regulator-compatible = "ldo_vmch";
  366. regulator-name = "vmch";
  367. regulator-min-microvolt = <3000000>;
  368. regulator-max-microvolt = <3300000>;
  369. regulator-enable-ramp-delay = <218>;
  370. };
  371. mt6397_vemc_3v3_reg: ldo_vemc3v3 {
  372. regulator-compatible = "ldo_vemc3v3";
  373. regulator-name = "vemc_3v3";
  374. regulator-min-microvolt = <3000000>;
  375. regulator-max-microvolt = <3300000>;
  376. regulator-enable-ramp-delay = <218>;
  377. };
  378. mt6397_vgp1_reg: ldo_vgp1 {
  379. regulator-compatible = "ldo_vgp1";
  380. regulator-name = "vcamd";
  381. regulator-min-microvolt = <1220000>;
  382. regulator-max-microvolt = <3300000>;
  383. regulator-enable-ramp-delay = <240>;
  384. };
  385. mt6397_vgp2_reg: ldo_vgp2 {
  386. regulator-compatible = "ldo_vgp2";
  387. regulator-name = "vcamio";
  388. regulator-min-microvolt = <1000000>;
  389. regulator-max-microvolt = <3300000>;
  390. regulator-enable-ramp-delay = <218>;
  391. };
  392. mt6397_vgp3_reg: ldo_vgp3 {
  393. regulator-compatible = "ldo_vgp3";
  394. regulator-name = "vcamaf";
  395. regulator-min-microvolt = <1200000>;
  396. regulator-max-microvolt = <3300000>;
  397. regulator-enable-ramp-delay = <218>;
  398. };
  399. mt6397_vgp4_reg: ldo_vgp4 {
  400. regulator-compatible = "ldo_vgp4";
  401. regulator-name = "vgp4";
  402. regulator-min-microvolt = <1200000>;
  403. regulator-max-microvolt = <3300000>;
  404. regulator-enable-ramp-delay = <218>;
  405. };
  406. mt6397_vgp5_reg: ldo_vgp5 {
  407. regulator-compatible = "ldo_vgp5";
  408. regulator-name = "vgp5";
  409. regulator-min-microvolt = <1200000>;
  410. regulator-max-microvolt = <3000000>;
  411. regulator-enable-ramp-delay = <218>;
  412. };
  413. mt6397_vgp6_reg: ldo_vgp6 {
  414. regulator-compatible = "ldo_vgp6";
  415. regulator-name = "vgp6";
  416. regulator-min-microvolt = <1200000>;
  417. regulator-max-microvolt = <3300000>;
  418. regulator-enable-ramp-delay = <218>;
  419. };
  420. mt6397_vibr_reg: ldo_vibr {
  421. regulator-compatible = "ldo_vibr";
  422. regulator-name = "vibr";
  423. regulator-min-microvolt = <1300000>;
  424. regulator-max-microvolt = <3300000>;
  425. regulator-enable-ramp-delay = <218>;
  426. };
  427. };
  428. };
  429. };
  430. &pio {
  431. spi_pins_a: spi0 {
  432. pins_spi {
  433. pinmux = <MT8173_PIN_69_SPI_CK__FUNC_SPI_CK_0_>,
  434. <MT8173_PIN_70_SPI_MI__FUNC_SPI_MI_0_>,
  435. <MT8173_PIN_71_SPI_MO__FUNC_SPI_MO_0_>,
  436. <MT8173_PIN_72_SPI_CS__FUNC_SPI_CS_0_>;
  437. };
  438. };
  439. };
  440. &spi {
  441. pinctrl-names = "default";
  442. pinctrl-0 = <&spi_pins_a>;
  443. mediatek,pad-select = <0>;
  444. status = "okay";
  445. };
  446. &ssusb {
  447. vusb33-supply = <&mt6397_vusb_reg>;
  448. vbus-supply = <&usb_p0_vbus>;
  449. extcon = <&extcon_usb>;
  450. dr_mode = "otg";
  451. wakeup-source;
  452. pinctrl-names = "default";
  453. pinctrl-0 = <&usb_id_pins_float>;
  454. status = "okay";
  455. };
  456. &uart0 {
  457. status = "okay";
  458. };
  459. &usb_host {
  460. vusb33-supply = <&mt6397_vusb_reg>;
  461. vbus-supply = <&usb_p1_vbus>;
  462. status = "okay";
  463. };