mt7622-rfb1.dts 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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 0x3F000000>;
  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. &pcie {
  75. pinctrl-names = "default";
  76. pinctrl-0 = <&pcie0_pins>;
  77. status = "okay";
  78. pcie@0,0 {
  79. status = "okay";
  80. };
  81. };
  82. &pio {
  83. /* eMMC is shared pin with parallel NAND */
  84. emmc_pins_default: emmc-pins-default {
  85. mux {
  86. function = "emmc", "emmc_rst";
  87. groups = "emmc";
  88. };
  89. /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
  90. * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
  91. * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
  92. */
  93. conf-cmd-dat {
  94. pins = "NDL0", "NDL1", "NDL2",
  95. "NDL3", "NDL4", "NDL5",
  96. "NDL6", "NDL7", "NRB";
  97. input-enable;
  98. bias-pull-up;
  99. };
  100. conf-clk {
  101. pins = "NCLE";
  102. bias-pull-down;
  103. };
  104. };
  105. emmc_pins_uhs: emmc-pins-uhs {
  106. mux {
  107. function = "emmc";
  108. groups = "emmc";
  109. };
  110. conf-cmd-dat {
  111. pins = "NDL0", "NDL1", "NDL2",
  112. "NDL3", "NDL4", "NDL5",
  113. "NDL6", "NDL7", "NRB";
  114. input-enable;
  115. drive-strength = <4>;
  116. bias-pull-up;
  117. };
  118. conf-clk {
  119. pins = "NCLE";
  120. drive-strength = <4>;
  121. bias-pull-down;
  122. };
  123. };
  124. eth_pins: eth-pins {
  125. mux {
  126. function = "eth";
  127. groups = "mdc_mdio", "rgmii_via_gmac2";
  128. };
  129. };
  130. i2c1_pins: i2c1-pins {
  131. mux {
  132. function = "i2c";
  133. groups = "i2c1_0";
  134. };
  135. };
  136. i2c2_pins: i2c2-pins {
  137. mux {
  138. function = "i2c";
  139. groups = "i2c2_0";
  140. };
  141. };
  142. i2s1_pins: i2s1-pins {
  143. mux {
  144. function = "i2s";
  145. groups = "i2s_out_mclk_bclk_ws",
  146. "i2s1_in_data",
  147. "i2s1_out_data";
  148. };
  149. conf {
  150. pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
  151. "I2S_WS", "I2S_MCLK";
  152. drive-strength = <12>;
  153. bias-pull-down;
  154. };
  155. };
  156. irrx_pins: irrx-pins {
  157. mux {
  158. function = "ir";
  159. groups = "ir_1_rx";
  160. };
  161. };
  162. irtx_pins: irtx-pins {
  163. mux {
  164. function = "ir";
  165. groups = "ir_1_tx";
  166. };
  167. };
  168. /* Parallel nand is shared pin with eMMC */
  169. parallel_nand_pins: parallel-nand-pins {
  170. mux {
  171. function = "flash";
  172. groups = "par_nand";
  173. };
  174. };
  175. pcie0_pins: pcie0-pins {
  176. mux {
  177. function = "pcie";
  178. groups = "pcie0_pad_perst",
  179. "pcie0_1_waken",
  180. "pcie0_1_clkreq";
  181. };
  182. };
  183. pcie1_pins: pcie1-pins {
  184. mux {
  185. function = "pcie";
  186. groups = "pcie1_pad_perst",
  187. "pcie1_0_waken",
  188. "pcie1_0_clkreq";
  189. };
  190. };
  191. pmic_bus_pins: pmic-bus-pins {
  192. mux {
  193. function = "pmic";
  194. groups = "pmic_bus";
  195. };
  196. };
  197. pwm7_pins: pwm1-2-pins {
  198. mux {
  199. function = "pwm";
  200. groups = "pwm_ch7_2";
  201. };
  202. };
  203. wled_pins: wled-pins {
  204. mux {
  205. function = "led";
  206. groups = "wled";
  207. };
  208. };
  209. sd0_pins_default: sd0-pins-default {
  210. mux {
  211. function = "sd";
  212. groups = "sd_0";
  213. };
  214. /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
  215. * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
  216. * DAT2, DAT3, CMD, CLK for SD respectively.
  217. */
  218. conf-cmd-data {
  219. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  220. "I2S2_IN","I2S4_OUT";
  221. input-enable;
  222. drive-strength = <8>;
  223. bias-pull-up;
  224. };
  225. conf-clk {
  226. pins = "I2S3_OUT";
  227. drive-strength = <12>;
  228. bias-pull-down;
  229. };
  230. conf-cd {
  231. pins = "TXD3";
  232. bias-pull-up;
  233. };
  234. };
  235. sd0_pins_uhs: sd0-pins-uhs {
  236. mux {
  237. function = "sd";
  238. groups = "sd_0";
  239. };
  240. conf-cmd-data {
  241. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  242. "I2S2_IN","I2S4_OUT";
  243. input-enable;
  244. bias-pull-up;
  245. };
  246. conf-clk {
  247. pins = "I2S3_OUT";
  248. bias-pull-down;
  249. };
  250. };
  251. /* Serial NAND is shared pin with SPI-NOR */
  252. serial_nand_pins: serial-nand-pins {
  253. mux {
  254. function = "flash";
  255. groups = "snfi";
  256. };
  257. };
  258. spic0_pins: spic0-pins {
  259. mux {
  260. function = "spi";
  261. groups = "spic0_0";
  262. };
  263. };
  264. spic1_pins: spic1-pins {
  265. mux {
  266. function = "spi";
  267. groups = "spic1_0";
  268. };
  269. };
  270. /* SPI-NOR is shared pin with serial NAND */
  271. spi_nor_pins: spi-nor-pins {
  272. mux {
  273. function = "flash";
  274. groups = "spi_nor";
  275. };
  276. };
  277. /* serial NAND is shared pin with SPI-NOR */
  278. serial_nand_pins: serial-nand-pins {
  279. mux {
  280. function = "flash";
  281. groups = "snfi";
  282. };
  283. };
  284. uart0_pins: uart0-pins {
  285. mux {
  286. function = "uart";
  287. groups = "uart0_0_tx_rx" ;
  288. };
  289. };
  290. uart2_pins: uart2-pins {
  291. mux {
  292. function = "uart";
  293. groups = "uart2_1_tx_rx" ;
  294. };
  295. };
  296. watchdog_pins: watchdog-pins {
  297. mux {
  298. function = "watchdog";
  299. groups = "watchdog";
  300. };
  301. };
  302. };
  303. &bch {
  304. status = "disabled";
  305. };
  306. &btif {
  307. status = "okay";
  308. };
  309. &cir {
  310. pinctrl-names = "default";
  311. pinctrl-0 = <&irrx_pins>;
  312. status = "okay";
  313. };
  314. &eth {
  315. pinctrl-names = "default";
  316. pinctrl-0 = <&eth_pins>;
  317. status = "okay";
  318. gmac1: mac@1 {
  319. compatible = "mediatek,eth-mac";
  320. reg = <1>;
  321. phy-handle = <&phy5>;
  322. };
  323. mdio-bus {
  324. #address-cells = <1>;
  325. #size-cells = <0>;
  326. phy5: ethernet-phy@5 {
  327. reg = <5>;
  328. phy-mode = "sgmii";
  329. };
  330. };
  331. };
  332. &i2c1 {
  333. pinctrl-names = "default";
  334. pinctrl-0 = <&i2c1_pins>;
  335. status = "okay";
  336. };
  337. &i2c2 {
  338. pinctrl-names = "default";
  339. pinctrl-0 = <&i2c2_pins>;
  340. status = "okay";
  341. };
  342. &mmc0 {
  343. pinctrl-names = "default", "state_uhs";
  344. pinctrl-0 = <&emmc_pins_default>;
  345. pinctrl-1 = <&emmc_pins_uhs>;
  346. status = "okay";
  347. bus-width = <8>;
  348. max-frequency = <50000000>;
  349. cap-mmc-highspeed;
  350. mmc-hs200-1_8v;
  351. vmmc-supply = <&reg_3p3v>;
  352. vqmmc-supply = <&reg_1p8v>;
  353. assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
  354. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  355. non-removable;
  356. };
  357. &mmc1 {
  358. pinctrl-names = "default", "state_uhs";
  359. pinctrl-0 = <&sd0_pins_default>;
  360. pinctrl-1 = <&sd0_pins_uhs>;
  361. status = "okay";
  362. bus-width = <4>;
  363. max-frequency = <50000000>;
  364. cap-sd-highspeed;
  365. r_smpl = <1>;
  366. cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
  367. vmmc-supply = <&reg_3p3v>;
  368. vqmmc-supply = <&reg_3p3v>;
  369. assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
  370. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  371. };
  372. &nandc {
  373. pinctrl-names = "default";
  374. pinctrl-0 = <&parallel_nand_pins>;
  375. status = "disabled";
  376. };
  377. &nor_flash {
  378. pinctrl-names = "default";
  379. pinctrl-0 = <&spi_nor_pins>;
  380. status = "disabled";
  381. flash@0 {
  382. compatible = "jedec,spi-nor";
  383. reg = <0>;
  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. };