mt7622-rfb1.dts 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. /*
  2. * Copyright (c) 2017 MediaTek Inc.
  3. * Author: Ming Huang <[email protected]>
  4. * Sean Wang <[email protected]>
  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. key-factory {
  36. label = "factory";
  37. linux,code = <BTN_0>;
  38. gpios = <&pio 0 0>;
  39. };
  40. key-wps {
  41. label = "wps";
  42. linux,code = <KEY_WPS_BUTTON>;
  43. gpios = <&pio 102 0>;
  44. };
  45. };
  46. memory@40000000 {
  47. reg = <0 0x40000000 0 0x20000000>;
  48. };
  49. reg_1p8v: regulator-1p8v {
  50. compatible = "regulator-fixed";
  51. regulator-name = "fixed-1.8V";
  52. regulator-min-microvolt = <1800000>;
  53. regulator-max-microvolt = <1800000>;
  54. regulator-always-on;
  55. };
  56. reg_3p3v: regulator-3p3v {
  57. compatible = "regulator-fixed";
  58. regulator-name = "fixed-3.3V";
  59. regulator-min-microvolt = <3300000>;
  60. regulator-max-microvolt = <3300000>;
  61. regulator-boot-on;
  62. regulator-always-on;
  63. };
  64. reg_5v: regulator-5v {
  65. compatible = "regulator-fixed";
  66. regulator-name = "fixed-5V";
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. regulator-boot-on;
  70. regulator-always-on;
  71. };
  72. };
  73. &bch {
  74. status = "disabled";
  75. };
  76. &btif {
  77. status = "okay";
  78. };
  79. &cir {
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&irrx_pins>;
  82. status = "okay";
  83. };
  84. &eth {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&eth_pins>;
  87. status = "okay";
  88. gmac0: mac@0 {
  89. compatible = "mediatek,eth-mac";
  90. reg = <0>;
  91. phy-mode = "2500base-x";
  92. fixed-link {
  93. speed = <2500>;
  94. full-duplex;
  95. pause;
  96. };
  97. };
  98. mdio-bus {
  99. #address-cells = <1>;
  100. #size-cells = <0>;
  101. switch@0 {
  102. compatible = "mediatek,mt7531";
  103. reg = <0>;
  104. reset-gpios = <&pio 54 0>;
  105. ports {
  106. #address-cells = <1>;
  107. #size-cells = <0>;
  108. port@0 {
  109. reg = <0>;
  110. label = "lan0";
  111. };
  112. port@1 {
  113. reg = <1>;
  114. label = "lan1";
  115. };
  116. port@2 {
  117. reg = <2>;
  118. label = "lan2";
  119. };
  120. port@3 {
  121. reg = <3>;
  122. label = "lan3";
  123. };
  124. port@4 {
  125. reg = <4>;
  126. label = "wan";
  127. };
  128. port@6 {
  129. reg = <6>;
  130. label = "cpu";
  131. ethernet = <&gmac0>;
  132. phy-mode = "2500base-x";
  133. fixed-link {
  134. speed = <2500>;
  135. full-duplex;
  136. pause;
  137. };
  138. };
  139. };
  140. };
  141. };
  142. };
  143. &i2c1 {
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&i2c1_pins>;
  146. status = "okay";
  147. };
  148. &i2c2 {
  149. pinctrl-names = "default";
  150. pinctrl-0 = <&i2c2_pins>;
  151. status = "okay";
  152. };
  153. &mmc0 {
  154. pinctrl-names = "default", "state_uhs";
  155. pinctrl-0 = <&emmc_pins_default>;
  156. pinctrl-1 = <&emmc_pins_uhs>;
  157. status = "okay";
  158. bus-width = <8>;
  159. max-frequency = <50000000>;
  160. cap-mmc-highspeed;
  161. mmc-hs200-1_8v;
  162. vmmc-supply = <&reg_3p3v>;
  163. vqmmc-supply = <&reg_1p8v>;
  164. assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
  165. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  166. non-removable;
  167. };
  168. &mmc1 {
  169. pinctrl-names = "default", "state_uhs";
  170. pinctrl-0 = <&sd0_pins_default>;
  171. pinctrl-1 = <&sd0_pins_uhs>;
  172. status = "okay";
  173. bus-width = <4>;
  174. max-frequency = <50000000>;
  175. cap-sd-highspeed;
  176. r_smpl = <1>;
  177. cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
  178. vmmc-supply = <&reg_3p3v>;
  179. vqmmc-supply = <&reg_3p3v>;
  180. assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
  181. assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  182. };
  183. &nandc {
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&parallel_nand_pins>;
  186. status = "disabled";
  187. };
  188. &nor_flash {
  189. pinctrl-names = "default";
  190. pinctrl-0 = <&spi_nor_pins>;
  191. status = "disabled";
  192. flash@0 {
  193. compatible = "jedec,spi-nor";
  194. reg = <0>;
  195. };
  196. };
  197. &pcie0 {
  198. pinctrl-names = "default";
  199. pinctrl-0 = <&pcie0_pins>;
  200. status = "okay";
  201. };
  202. &pio {
  203. /* eMMC is shared pin with parallel NAND */
  204. emmc_pins_default: emmc-pins-default {
  205. mux {
  206. function = "emmc", "emmc_rst";
  207. groups = "emmc";
  208. };
  209. /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
  210. * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
  211. * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
  212. */
  213. conf-cmd-dat {
  214. pins = "NDL0", "NDL1", "NDL2",
  215. "NDL3", "NDL4", "NDL5",
  216. "NDL6", "NDL7", "NRB";
  217. input-enable;
  218. bias-pull-up;
  219. };
  220. conf-clk {
  221. pins = "NCLE";
  222. bias-pull-down;
  223. };
  224. };
  225. emmc_pins_uhs: emmc-pins-uhs {
  226. mux {
  227. function = "emmc";
  228. groups = "emmc";
  229. };
  230. conf-cmd-dat {
  231. pins = "NDL0", "NDL1", "NDL2",
  232. "NDL3", "NDL4", "NDL5",
  233. "NDL6", "NDL7", "NRB";
  234. input-enable;
  235. drive-strength = <4>;
  236. bias-pull-up;
  237. };
  238. conf-clk {
  239. pins = "NCLE";
  240. drive-strength = <4>;
  241. bias-pull-down;
  242. };
  243. };
  244. eth_pins: eth-pins {
  245. mux {
  246. function = "eth";
  247. groups = "mdc_mdio", "rgmii_via_gmac2";
  248. };
  249. };
  250. i2c1_pins: i2c1-pins {
  251. mux {
  252. function = "i2c";
  253. groups = "i2c1_0";
  254. };
  255. };
  256. i2c2_pins: i2c2-pins {
  257. mux {
  258. function = "i2c";
  259. groups = "i2c2_0";
  260. };
  261. };
  262. i2s1_pins: i2s1-pins {
  263. mux {
  264. function = "i2s";
  265. groups = "i2s_out_mclk_bclk_ws",
  266. "i2s1_in_data",
  267. "i2s1_out_data";
  268. };
  269. conf {
  270. pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
  271. "I2S_WS", "I2S_MCLK";
  272. drive-strength = <12>;
  273. bias-pull-down;
  274. };
  275. };
  276. irrx_pins: irrx-pins {
  277. mux {
  278. function = "ir";
  279. groups = "ir_1_rx";
  280. };
  281. };
  282. irtx_pins: irtx-pins {
  283. mux {
  284. function = "ir";
  285. groups = "ir_1_tx";
  286. };
  287. };
  288. /* Parallel nand is shared pin with eMMC */
  289. parallel_nand_pins: parallel-nand-pins {
  290. mux {
  291. function = "flash";
  292. groups = "par_nand";
  293. };
  294. };
  295. pcie0_pins: pcie0-pins {
  296. mux {
  297. function = "pcie";
  298. groups = "pcie0_pad_perst",
  299. "pcie0_1_waken",
  300. "pcie0_1_clkreq";
  301. };
  302. };
  303. pcie1_pins: pcie1-pins {
  304. mux {
  305. function = "pcie";
  306. groups = "pcie1_pad_perst",
  307. "pcie1_0_waken",
  308. "pcie1_0_clkreq";
  309. };
  310. };
  311. pmic_bus_pins: pmic-bus-pins {
  312. mux {
  313. function = "pmic";
  314. groups = "pmic_bus";
  315. };
  316. };
  317. pwm7_pins: pwm1-2-pins {
  318. mux {
  319. function = "pwm";
  320. groups = "pwm_ch7_2";
  321. };
  322. };
  323. wled_pins: wled-pins {
  324. mux {
  325. function = "led";
  326. groups = "wled";
  327. };
  328. };
  329. sd0_pins_default: sd0-pins-default {
  330. mux {
  331. function = "sd";
  332. groups = "sd_0";
  333. };
  334. /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
  335. * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
  336. * DAT2, DAT3, CMD, CLK for SD respectively.
  337. */
  338. conf-cmd-data {
  339. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  340. "I2S2_IN","I2S4_OUT";
  341. input-enable;
  342. drive-strength = <8>;
  343. bias-pull-up;
  344. };
  345. conf-clk {
  346. pins = "I2S3_OUT";
  347. drive-strength = <12>;
  348. bias-pull-down;
  349. };
  350. conf-cd {
  351. pins = "TXD3";
  352. bias-pull-up;
  353. };
  354. };
  355. sd0_pins_uhs: sd0-pins-uhs {
  356. mux {
  357. function = "sd";
  358. groups = "sd_0";
  359. };
  360. conf-cmd-data {
  361. pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
  362. "I2S2_IN","I2S4_OUT";
  363. input-enable;
  364. bias-pull-up;
  365. };
  366. conf-clk {
  367. pins = "I2S3_OUT";
  368. bias-pull-down;
  369. };
  370. };
  371. /* Serial NAND is shared pin with SPI-NOR */
  372. serial_nand_pins: serial-nand-pins {
  373. mux {
  374. function = "flash";
  375. groups = "snfi";
  376. };
  377. };
  378. spic0_pins: spic0-pins {
  379. mux {
  380. function = "spi";
  381. groups = "spic0_0";
  382. };
  383. };
  384. spic1_pins: spic1-pins {
  385. mux {
  386. function = "spi";
  387. groups = "spic1_0";
  388. };
  389. };
  390. /* SPI-NOR is shared pin with serial NAND */
  391. spi_nor_pins: spi-nor-pins {
  392. mux {
  393. function = "flash";
  394. groups = "spi_nor";
  395. };
  396. };
  397. /* serial NAND is shared pin with SPI-NOR */
  398. serial_nand_pins: serial-nand-pins {
  399. mux {
  400. function = "flash";
  401. groups = "snfi";
  402. };
  403. };
  404. uart0_pins: uart0-pins {
  405. mux {
  406. function = "uart";
  407. groups = "uart0_0_tx_rx" ;
  408. };
  409. };
  410. uart2_pins: uart2-pins {
  411. mux {
  412. function = "uart";
  413. groups = "uart2_1_tx_rx" ;
  414. };
  415. };
  416. watchdog_pins: watchdog-pins {
  417. mux {
  418. function = "watchdog";
  419. groups = "watchdog";
  420. };
  421. };
  422. wmac_pins: wmac-pins {
  423. mux {
  424. function = "antsel";
  425. groups = "antsel0", "antsel1", "antsel2", "antsel3",
  426. "antsel4", "antsel5", "antsel6", "antsel7",
  427. "antsel8", "antsel9", "antsel12", "antsel13",
  428. "antsel14", "antsel15", "antsel16", "antsel17";
  429. };
  430. };
  431. };
  432. &pwm {
  433. pinctrl-names = "default";
  434. pinctrl-0 = <&pwm7_pins>;
  435. status = "okay";
  436. };
  437. &pwrap {
  438. pinctrl-names = "default";
  439. pinctrl-0 = <&pmic_bus_pins>;
  440. status = "okay";
  441. };
  442. &sata {
  443. status = "okay";
  444. };
  445. &sata_phy {
  446. status = "okay";
  447. };
  448. &spi0 {
  449. pinctrl-names = "default";
  450. pinctrl-0 = <&spic0_pins>;
  451. status = "okay";
  452. };
  453. &spi1 {
  454. pinctrl-names = "default";
  455. pinctrl-0 = <&spic1_pins>;
  456. status = "okay";
  457. };
  458. &ssusb {
  459. vusb33-supply = <&reg_3p3v>;
  460. vbus-supply = <&reg_5v>;
  461. status = "okay";
  462. };
  463. &u3phy {
  464. status = "okay";
  465. };
  466. &uart0 {
  467. pinctrl-names = "default";
  468. pinctrl-0 = <&uart0_pins>;
  469. status = "okay";
  470. };
  471. &uart2 {
  472. pinctrl-names = "default";
  473. pinctrl-0 = <&uart2_pins>;
  474. status = "okay";
  475. };
  476. &watchdog {
  477. pinctrl-names = "default";
  478. pinctrl-0 = <&watchdog_pins>;
  479. status = "okay";
  480. };
  481. &wmac {
  482. pinctrl-names = "default";
  483. pinctrl-0 = <&wmac_pins>;
  484. status = "okay";
  485. };