mt8195-demo.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /*
  3. * Copyright (C) 2022 BayLibre, SAS.
  4. * Author: Fabien Parent <[email protected]>
  5. */
  6. /dts-v1/;
  7. #include "mt8195.dtsi"
  8. #include "mt6359.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
  12. #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
  13. / {
  14. model = "MediaTek MT8195 demo board";
  15. compatible = "mediatek,mt8195-demo", "mediatek,mt8195";
  16. aliases {
  17. serial0 = &uart0;
  18. };
  19. chosen {
  20. stdout-path = "serial0:921600n8";
  21. };
  22. firmware {
  23. optee {
  24. compatible = "linaro,optee-tz";
  25. method = "smc";
  26. };
  27. };
  28. gpio-keys {
  29. compatible = "gpio-keys";
  30. pinctrl-names = "default";
  31. pinctrl-0 = <&gpio_keys_pins>;
  32. key-0 {
  33. gpios = <&pio 106 GPIO_ACTIVE_LOW>;
  34. label = "volume_up";
  35. linux,code = <KEY_VOLUMEUP>;
  36. wakeup-source;
  37. debounce-interval = <15>;
  38. };
  39. };
  40. memory@40000000 {
  41. device_type = "memory";
  42. reg = <0 0x40000000 0x2 0x00000000>;
  43. };
  44. reserved-memory {
  45. #address-cells = <2>;
  46. #size-cells = <2>;
  47. ranges;
  48. /*
  49. * 12 MiB reserved for OP-TEE (BL32)
  50. * +-----------------------+ 0x43e0_0000
  51. * | SHMEM 2MiB |
  52. * +-----------------------+ 0x43c0_0000
  53. * | | TA_RAM 8MiB |
  54. * + TZDRAM +--------------+ 0x4340_0000
  55. * | | TEE_RAM 2MiB |
  56. * +-----------------------+ 0x4320_0000
  57. */
  58. optee_reserved: optee@43200000 {
  59. no-map;
  60. reg = <0 0x43200000 0 0x00c00000>;
  61. };
  62. scp_mem: memory@50000000 {
  63. compatible = "shared-dma-pool";
  64. reg = <0 0x50000000 0 0x2900000>;
  65. no-map;
  66. };
  67. vpu_mem: memory@53000000 {
  68. compatible = "shared-dma-pool";
  69. reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
  70. };
  71. /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
  72. bl31_secmon_mem: memory@54600000 {
  73. no-map;
  74. reg = <0 0x54600000 0x0 0x200000>;
  75. };
  76. snd_dma_mem: memory@60000000 {
  77. compatible = "shared-dma-pool";
  78. reg = <0 0x60000000 0 0x1100000>;
  79. no-map;
  80. };
  81. apu_mem: memory@62000000 {
  82. compatible = "shared-dma-pool";
  83. reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
  84. };
  85. };
  86. };
  87. &i2c6 {
  88. clock-frequency = <400000>;
  89. pinctrl-0 = <&i2c6_pins>;
  90. pinctrl-names = "default";
  91. status = "okay";
  92. mt6360: pmic@34 {
  93. compatible = "mediatek,mt6360";
  94. reg = <0x34>;
  95. interrupt-controller;
  96. interrupts-extended = <&pio 101 IRQ_TYPE_EDGE_FALLING>;
  97. interrupt-names = "IRQB";
  98. charger {
  99. compatible = "mediatek,mt6360-chg";
  100. richtek,vinovp-microvolt = <14500000>;
  101. otg_vbus_regulator: usb-otg-vbus-regulator {
  102. regulator-compatible = "usb-otg-vbus";
  103. regulator-name = "usb-otg-vbus";
  104. regulator-min-microvolt = <4425000>;
  105. regulator-max-microvolt = <5825000>;
  106. };
  107. };
  108. regulator {
  109. compatible = "mediatek,mt6360-regulator";
  110. LDO_VIN3-supply = <&mt6360_buck2>;
  111. mt6360_buck1: buck1 {
  112. regulator-compatible = "BUCK1";
  113. regulator-name = "mt6360,buck1";
  114. regulator-min-microvolt = <300000>;
  115. regulator-max-microvolt = <1300000>;
  116. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  117. MT6360_OPMODE_LP
  118. MT6360_OPMODE_ULP>;
  119. regulator-always-on;
  120. };
  121. mt6360_buck2: buck2 {
  122. regulator-compatible = "BUCK2";
  123. regulator-name = "mt6360,buck2";
  124. regulator-min-microvolt = <300000>;
  125. regulator-max-microvolt = <1300000>;
  126. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  127. MT6360_OPMODE_LP
  128. MT6360_OPMODE_ULP>;
  129. regulator-always-on;
  130. };
  131. mt6360_ldo1: ldo1 {
  132. regulator-compatible = "LDO1";
  133. regulator-name = "mt6360,ldo1";
  134. regulator-min-microvolt = <1200000>;
  135. regulator-max-microvolt = <3600000>;
  136. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  137. MT6360_OPMODE_LP>;
  138. };
  139. mt6360_ldo2: ldo2 {
  140. regulator-compatible = "LDO2";
  141. regulator-name = "mt6360,ldo2";
  142. regulator-min-microvolt = <1200000>;
  143. regulator-max-microvolt = <3600000>;
  144. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  145. MT6360_OPMODE_LP>;
  146. };
  147. mt6360_ldo3: ldo3 {
  148. regulator-compatible = "LDO3";
  149. regulator-name = "mt6360,ldo3";
  150. regulator-min-microvolt = <1200000>;
  151. regulator-max-microvolt = <3600000>;
  152. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  153. MT6360_OPMODE_LP>;
  154. };
  155. mt6360_ldo5: ldo5 {
  156. regulator-compatible = "LDO5";
  157. regulator-name = "mt6360,ldo5";
  158. regulator-min-microvolt = <2700000>;
  159. regulator-max-microvolt = <3600000>;
  160. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  161. MT6360_OPMODE_LP>;
  162. };
  163. mt6360_ldo6: ldo6 {
  164. regulator-compatible = "LDO6";
  165. regulator-name = "mt6360,ldo6";
  166. regulator-min-microvolt = <500000>;
  167. regulator-max-microvolt = <2100000>;
  168. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  169. MT6360_OPMODE_LP>;
  170. };
  171. mt6360_ldo7: ldo7 {
  172. regulator-compatible = "LDO7";
  173. regulator-name = "mt6360,ldo7";
  174. regulator-min-microvolt = <500000>;
  175. regulator-max-microvolt = <2100000>;
  176. regulator-allowed-modes = <MT6360_OPMODE_NORMAL
  177. MT6360_OPMODE_LP>;
  178. regulator-always-on;
  179. };
  180. };
  181. };
  182. };
  183. &mmc0 {
  184. status = "okay";
  185. pinctrl-names = "default", "state_uhs";
  186. pinctrl-0 = <&mmc0_default_pins>;
  187. pinctrl-1 = <&mmc0_uhs_pins>;
  188. bus-width = <8>;
  189. max-frequency = <200000000>;
  190. cap-mmc-highspeed;
  191. mmc-hs200-1_8v;
  192. mmc-hs400-1_8v;
  193. cap-mmc-hw-reset;
  194. no-sdio;
  195. no-sd;
  196. hs400-ds-delay = <0x14c11>;
  197. vmmc-supply = <&mt6359_vemc_1_ldo_reg>;
  198. vqmmc-supply = <&mt6359_vufs_ldo_reg>;
  199. non-removable;
  200. };
  201. &mmc1 {
  202. pinctrl-names = "default", "state_uhs";
  203. pinctrl-0 = <&mmc1_default_pins>;
  204. pinctrl-1 = <&mmc1_uhs_pins>;
  205. cd-gpios = <&pio 129 GPIO_ACTIVE_LOW>;
  206. bus-width = <4>;
  207. max-frequency = <200000000>;
  208. cap-sd-highspeed;
  209. sd-uhs-sdr50;
  210. sd-uhs-sdr104;
  211. vmmc-supply = <&mt6360_ldo5>;
  212. vqmmc-supply = <&mt6360_ldo3>;
  213. status = "okay";
  214. };
  215. &mt6359_vbbck_ldo_reg {
  216. regulator-always-on;
  217. };
  218. &mt6359_vcore_buck_reg {
  219. regulator-always-on;
  220. };
  221. &mt6359_vgpu11_buck_reg {
  222. regulator-always-on;
  223. };
  224. &mt6359_vproc1_buck_reg {
  225. regulator-always-on;
  226. };
  227. &mt6359_vproc2_buck_reg {
  228. regulator-always-on;
  229. };
  230. &mt6359_vpu_buck_reg {
  231. regulator-always-on;
  232. };
  233. &mt6359_vrf12_ldo_reg {
  234. regulator-always-on;
  235. };
  236. &mt6359_vsram_md_ldo_reg {
  237. regulator-always-on;
  238. };
  239. &mt6359_vsram_others_ldo_reg {
  240. regulator-always-on;
  241. };
  242. &pio {
  243. gpio_keys_pins: gpio-keys-pins {
  244. pins {
  245. pinmux = <PINMUX_GPIO106__FUNC_GPIO106>;
  246. input-enable;
  247. };
  248. };
  249. i2c6_pins: i2c6-pins {
  250. pins {
  251. pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
  252. <PINMUX_GPIO26__FUNC_SCL6>;
  253. bias-pull-up;
  254. };
  255. };
  256. mmc0_default_pins: mmc0-default-pins {
  257. pins-clk {
  258. pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
  259. drive-strength = <MTK_DRIVE_6mA>;
  260. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  261. };
  262. pins-cmd-dat {
  263. pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
  264. <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
  265. <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
  266. <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
  267. <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
  268. <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
  269. <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
  270. <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
  271. <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
  272. input-enable;
  273. drive-strength = <MTK_DRIVE_6mA>;
  274. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  275. };
  276. pins-rst {
  277. pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
  278. drive-strength = <MTK_DRIVE_6mA>;
  279. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  280. };
  281. };
  282. mmc0_uhs_pins: mmc0-uhs-pins {
  283. pins-clk {
  284. pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
  285. drive-strength = <MTK_DRIVE_8mA>;
  286. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  287. };
  288. pins-cmd-dat {
  289. pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
  290. <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
  291. <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
  292. <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
  293. <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
  294. <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
  295. <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
  296. <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
  297. <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
  298. input-enable;
  299. drive-strength = <MTK_DRIVE_8mA>;
  300. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  301. };
  302. pins-ds {
  303. pinmux = <PINMUX_GPIO127__FUNC_MSDC0_DSL>;
  304. drive-strength = <MTK_DRIVE_8mA>;
  305. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  306. };
  307. pins-rst {
  308. pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
  309. drive-strength = <MTK_DRIVE_8mA>;
  310. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  311. };
  312. };
  313. mmc1_default_pins: mmc1-default-pins {
  314. pins-clk {
  315. pinmux = <PINMUX_GPIO111__FUNC_MSDC1_CLK>;
  316. drive-strength = <MTK_DRIVE_8mA>;
  317. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  318. };
  319. pins-cmd-dat {
  320. pinmux = <PINMUX_GPIO110__FUNC_MSDC1_CMD>,
  321. <PINMUX_GPIO112__FUNC_MSDC1_DAT0>,
  322. <PINMUX_GPIO113__FUNC_MSDC1_DAT1>,
  323. <PINMUX_GPIO114__FUNC_MSDC1_DAT2>,
  324. <PINMUX_GPIO115__FUNC_MSDC1_DAT3>;
  325. input-enable;
  326. drive-strength = <MTK_DRIVE_8mA>;
  327. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  328. };
  329. pins-insert {
  330. pinmux = <PINMUX_GPIO129__FUNC_GPIO129>;
  331. bias-pull-up;
  332. };
  333. };
  334. mmc1_uhs_pins: mmc1-uhs-pins {
  335. pins-clk {
  336. pinmux = <PINMUX_GPIO111__FUNC_MSDC1_CLK>;
  337. drive-strength = <MTK_DRIVE_8mA>;
  338. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  339. };
  340. pins-cmd-dat {
  341. pinmux = <PINMUX_GPIO110__FUNC_MSDC1_CMD>,
  342. <PINMUX_GPIO112__FUNC_MSDC1_DAT0>,
  343. <PINMUX_GPIO113__FUNC_MSDC1_DAT1>,
  344. <PINMUX_GPIO114__FUNC_MSDC1_DAT2>,
  345. <PINMUX_GPIO115__FUNC_MSDC1_DAT3>;
  346. input-enable;
  347. drive-strength = <MTK_DRIVE_8mA>;
  348. bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  349. };
  350. };
  351. uart0_pins: uart0-pins {
  352. pins {
  353. pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
  354. <PINMUX_GPIO99__FUNC_URXD0>;
  355. };
  356. };
  357. uart1_pins: uart1-pins {
  358. pins {
  359. pinmux = <PINMUX_GPIO102__FUNC_UTXD1>,
  360. <PINMUX_GPIO103__FUNC_URXD1>;
  361. };
  362. };
  363. };
  364. &pmic {
  365. interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
  366. };
  367. &uart0 {
  368. pinctrl-names = "default";
  369. pinctrl-0 = <&uart0_pins>;
  370. status = "okay";
  371. };
  372. &uart1 {
  373. pinctrl-names = "default";
  374. pinctrl-0 = <&uart1_pins>;
  375. status = "okay";
  376. };
  377. &u3phy0 {
  378. status = "okay";
  379. };
  380. &u3phy1 {
  381. status = "okay";
  382. };
  383. &u3phy2 {
  384. status = "okay";
  385. };
  386. &u3phy3 {
  387. status = "okay";
  388. };
  389. &xhci0 {
  390. vusb33-supply = <&mt6359_vusb_ldo_reg>;
  391. vbus-supply = <&otg_vbus_regulator>;
  392. status = "okay";
  393. };
  394. &xhci1 {
  395. vusb33-supply = <&mt6359_vusb_ldo_reg>;
  396. status = "okay";
  397. };
  398. &xhci2 {
  399. vusb33-supply = <&mt6359_vusb_ldo_reg>;
  400. status = "okay";
  401. };
  402. &xhci3 {
  403. vusb33-supply = <&mt6359_vusb_ldo_reg>;
  404. status = "okay";
  405. };