mt7622-rfb1.dts 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. /*
  2. * Copyright (c) 2017 MediaTek Inc.
  3. * Author: Ming Huang <ming.huang@mediatek.com>
  4. * Sean Wang <sean.wang@mediatek.com>
  5. *
  6. * SPDX-License-Identifier: (GPL-2.0 OR MIT)
  7. */
  8. /dts-v1/;
  9. #include <dt-bindings/input/input.h>
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include "mt7622.dtsi"
  12. #include "mt6380.dtsi"
  13. / {
  14. model = "MediaTek MT7622 RFB1 board";
  15. compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622";
  16. aliases {
  17. serial0 = &uart0;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
  22. };
  23. cpus {
  24. cpu@0 {
  25. proc-supply = <&mt6380_vcpu_reg>;
  26. sram-supply = <&mt6380_vm_reg>;
  27. };
  28. cpu@1 {
  29. proc-supply = <&mt6380_vcpu_reg>;
  30. sram-supply = <&mt6380_vm_reg>;
  31. };
  32. };
  33. gpio-keys {
  34. compatible = "gpio-keys";
  35. poll-interval = <100>;
  36. factory {
  37. label = "factory";
  38. linux,code = <BTN_0>;
  39. gpios = <&pio 0 0>;
  40. };
  41. wps {
  42. label = "wps";
  43. linux,code = <KEY_WPS_BUTTON>;
  44. gpios = <&pio 102 0>;
  45. };
  46. };
  47. memory {
  48. reg = <0 0x40000000 0 0x20000000>;
  49. };
  50. reg_1p8v: regulator-1p8v {
  51. compatible = "regulator-fixed";
  52. regulator-name = "fixed-1.8V";
  53. regulator-min-microvolt = <1800000>;
  54. regulator-max-microvolt = <1800000>;
  55. regulator-always-on;
  56. };
  57. reg_3p3v: regulator-3p3v {
  58. compatible = "regulator-fixed";
  59. regulator-name = "fixed-3.3V";
  60. regulator-min-microvolt = <3300000>;
  61. regulator-max-microvolt = <3300000>;
  62. regulator-boot-on;
  63. regulator-always-on;
  64. };
  65. reg_5v: regulator-5v {
  66. compatible = "regulator-fixed";
  67. regulator-name = "fixed-5V";
  68. regulator-min-microvolt = <5000000>;
  69. regulator-max-microvolt = <5000000>;
  70. regulator-boot-on;
  71. regulator-always-on;
  72. };
  73. };
  74. &bch {
  75. status = "disabled";
  76. };
  77. &btif {
  78. status = "okay";
  79. };
  80. &cir {
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&irrx_pins>;
  83. status = "okay";
  84. };
  85. &eth {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&eth_pins>;
  88. status = "okay";
  89. gmac1: mac@1 {
  90. compatible = "mediatek,eth-mac";
  91. reg = <1>;
  92. phy-handle = <&phy5>;
  93. };
  94. mdio-bus {
  95. #address-cells = <1>;
  96. #size-cells = <0>;
  97. phy5: ethernet-phy@5 {
  98. reg = <5>;
  99. phy-mode = "sgmii";
  100. };
  101. };
  102. };
  103. &i2c1 {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&i2c1_pins>;
  106. status = "okay";
  107. };
  108. &i2c2 {
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&i2c2_pins>;
  111. status = "okay";
  112. };
  113. &mmc0 {
  114. pinctrl-names = "default", "state_uhs";
  115. pinctrl-0 = <&emmc_pins_default>;
  116. pinctrl-1 = <&emmc_pins_uhs>;
  117. status = "okay";
  118. bus-width = <8>;
  119. max-frequency = <50000000>;
  120. cap-mmc-highspeed;
  121. mmc-hs200-1_8v;
  122. vmmc-supply = <&reg_3p3v>;
  123. vqmmc-supply = <&reg_1p8v>;
  124. assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
  125. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  126. non-removable;
  127. };
  128. &mmc1 {
  129. pinctrl-names = "default", "state_uhs";
  130. pinctrl-0 = <&sd0_pins_default>;
  131. pinctrl-1 = <&sd0_pins_uhs>;
  132. status = "okay";
  133. bus-width = <4>;
  134. max-frequency = <50000000>;
  135. cap-sd-highspeed;
  136. r_smpl = <1>;
  137. cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
  138. vmmc-supply = <&reg_3p3v>;
  139. vqmmc-supply = <&reg_3p3v>;
  140. assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
  141. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  142. };
  143. &nandc {
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&parallel_nand_pins>;
  146. status = "disabled";
  147. };
  148. &nor_flash {
  149. pinctrl-names = "default";
  150. pinctrl-0 = <&spi_nor_pins>;
  151. status = "disabled";
  152. flash@0 {
  153. compatible = "jedec,spi-nor";
  154. reg = <0>;
  155. };
  156. };
  157. &pcie {
  158. pinctrl-names = "default";
  159. pinctrl-0 = <&pcie0_pins>;
  160. status = "okay";
  161. pcie@0,0 {
  162. status = "okay";
  163. };
  164. };
  165. &pio {
  166. /* eMMC is shared pin with parallel NAND */
  167. emmc_pins_default: emmc-pins-default {
  168. mux {
  169. function = "emmc", "emmc_rst";
  170. groups = "emmc";
  171. };
  172. /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
  173. * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
  174. * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
  175. */
  176. conf-cmd-dat {
  177. pins = "NDL0", "NDL1", "NDL2",
  178. "NDL3", "NDL4", "NDL5",
  179. "NDL6", "NDL7", "NRB";
  180. input-enable;
  181. bias-pull-up;
  182. };
  183. conf-clk {
  184. pins = "NCLE";
  185. bias-pull-down;
  186. };
  187. };
  188. emmc_pins_uhs: emmc-pins-uhs {
  189. mux {
  190. function = "emmc";
  191. groups = "emmc";
  192. };
  193. conf-cmd-dat {
  194. pins = "NDL0", "NDL1", "NDL2",
  195. "NDL3", "NDL4", "NDL5",
  196. "NDL6", "NDL7", "NRB";
  197. input-enable;
  198. drive-strength = <4>;
  199. bias-pull-up;
  200. };
  201. conf-clk {
  202. pins = "NCLE";
  203. drive-strength = <4>;
  204. bias-pull-down;
  205. };
  206. };
  207. eth_pins: eth-pins {
  208. mux {
  209. function = "eth";
  210. groups = "mdc_mdio", "rgmii_via_gmac2";
  211. };
  212. };
  213. i2c1_pins: i2c1-pins {
  214. mux {
  215. function = "i2c";
  216. groups = "i2c1_0";
  217. };
  218. };
  219. i2c2_pins: i2c2-pins {
  220. mux {
  221. function = "i2c";
  222. groups = "i2c2_0";
  223. };
  224. };
  225. i2s1_pins: i2s1-pins {
  226. mux {
  227. function = "i2s";
  228. groups = "i2s_out_mclk_bclk_ws",
  229. "i2s1_in_data",
  230. "i2s1_out_data";
  231. };
  232. conf {
  233. pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
  234. "I2S_WS", "I2S_MCLK";
  235. drive-strength = <12>;
  236. bias-pull-down;
  237. };
  238. };
  239. irrx_pins: irrx-pins {
  240. mux {
  241. function = "ir";
  242. groups = "ir_1_rx";
  243. };
  244. };
  245. irtx_pins: irtx-pins {
  246. mux {
  247. function = "ir";
  248. groups = "ir_1_tx";
  249. };
  250. };
  251. /* Parallel nand is shared pin with eMMC */
  252. parallel_nand_pins: parallel-nand-pins {
  253. mux {
  254. function = "flash";
  255. groups = "par_nand";
  256. };
  257. };
  258. pcie0_pins: pcie0-pins {
  259. mux {
  260. function = "pcie";
  261. groups = "pcie0_pad_perst",
  262. "pcie0_1_waken",
  263. "pcie0_1_clkreq";
  264. };
  265. };
  266. pcie1_pins: pcie1-pins {
  267. mux {
  268. function = "pcie";
  269. groups = "pcie1_pad_perst",
  270. "pcie1_0_waken",
  271. "pcie1_0_clkreq";
  272. };
  273. };
  274. pmic_bus_pins: pmic-bus-pins {
  275. mux {
  276. function = "pmic";
  277. groups = "pmic_bus";
  278. };
  279. };
  280. pwm7_pins: pwm1-2-pins {
  281. mux {
  282. function = "pwm";
  283. groups = "pwm_ch7_2";
  284. };
  285. };
  286. wled_pins: wled-pins {
  287. mux {
  288. function = "led";
  289. groups = "wled";
  290. };
  291. };
  292. sd0_pins_default: sd0-pins-default {
  293. mux {
  294. function = "sd";
  295. groups = "sd_0";
  296. };
  297. /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
  298. * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
  299. * DAT2, DAT3, CMD, CLK for SD respectively.
  300. */
  301. conf-cmd-data {
  302. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  303. "I2S2_IN","I2S4_OUT";
  304. input-enable;
  305. drive-strength = <8>;
  306. bias-pull-up;
  307. };
  308. conf-clk {
  309. pins = "I2S3_OUT";
  310. drive-strength = <12>;
  311. bias-pull-down;
  312. };
  313. conf-cd {
  314. pins = "TXD3";
  315. bias-pull-up;
  316. };
  317. };
  318. sd0_pins_uhs: sd0-pins-uhs {
  319. mux {
  320. function = "sd";
  321. groups = "sd_0";
  322. };
  323. conf-cmd-data {
  324. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  325. "I2S2_IN","I2S4_OUT";
  326. input-enable;
  327. bias-pull-up;
  328. };
  329. conf-clk {
  330. pins = "I2S3_OUT";
  331. bias-pull-down;
  332. };
  333. };
  334. /* Serial NAND is shared pin with SPI-NOR */
  335. serial_nand_pins: serial-nand-pins {
  336. mux {
  337. function = "flash";
  338. groups = "snfi";
  339. };
  340. };
  341. spic0_pins: spic0-pins {
  342. mux {
  343. function = "spi";
  344. groups = "spic0_0";
  345. };
  346. };
  347. spic1_pins: spic1-pins {
  348. mux {
  349. function = "spi";
  350. groups = "spic1_0";
  351. };
  352. };
  353. /* SPI-NOR is shared pin with serial NAND */
  354. spi_nor_pins: spi-nor-pins {
  355. mux {
  356. function = "flash";
  357. groups = "spi_nor";
  358. };
  359. };
  360. /* serial NAND is shared pin with SPI-NOR */
  361. serial_nand_pins: serial-nand-pins {
  362. mux {
  363. function = "flash";
  364. groups = "snfi";
  365. };
  366. };
  367. uart0_pins: uart0-pins {
  368. mux {
  369. function = "uart";
  370. groups = "uart0_0_tx_rx" ;
  371. };
  372. };
  373. uart2_pins: uart2-pins {
  374. mux {
  375. function = "uart";
  376. groups = "uart2_1_tx_rx" ;
  377. };
  378. };
  379. watchdog_pins: watchdog-pins {
  380. mux {
  381. function = "watchdog";
  382. groups = "watchdog";
  383. };
  384. };
  385. };
  386. &pwm {
  387. pinctrl-names = "default";
  388. pinctrl-0 = <&pwm7_pins>;
  389. status = "okay";
  390. };
  391. &pwrap {
  392. pinctrl-names = "default";
  393. pinctrl-0 = <&pmic_bus_pins>;
  394. status = "okay";
  395. };
  396. &sata {
  397. status = "okay";
  398. };
  399. &sata_phy {
  400. status = "okay";
  401. };
  402. &spi0 {
  403. pinctrl-names = "default";
  404. pinctrl-0 = <&spic0_pins>;
  405. status = "okay";
  406. };
  407. &spi1 {
  408. pinctrl-names = "default";
  409. pinctrl-0 = <&spic1_pins>;
  410. status = "okay";
  411. };
  412. &ssusb {
  413. vusb33-supply = <&reg_3p3v>;
  414. vbus-supply = <&reg_5v>;
  415. status = "okay";
  416. };
  417. &u3phy {
  418. status = "okay";
  419. };
  420. &uart0 {
  421. pinctrl-names = "default";
  422. pinctrl-0 = <&uart0_pins>;
  423. status = "okay";
  424. };
  425. &uart2 {
  426. pinctrl-names = "default";
  427. pinctrl-0 = <&uart2_pins>;
  428. status = "okay";
  429. };
  430. &watchdog {
  431. pinctrl-names = "default";
  432. pinctrl-0 = <&watchdog_pins>;
  433. status = "okay";
  434. };