mt7623-NAND.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. /*
  2. * Copyright (c) 2016 MediaTek Inc.
  3. * Author: John Crispin <[email protected]>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. /dts-v1/;
  15. #include "_mt7623.dtsi"
  16. #include <dt-bindings/gpio/gpio.h>
  17. / {
  18. model = "MediaTek MT7623 NAND reference board";
  19. compatible = "mediatek,mt7623-rfb-nand", "mediatek,mt7623";
  20. chosen {
  21. stdout-path = &uart2;
  22. };
  23. memory {
  24. reg = <0 0x80000000 0 0x20000000>;
  25. };
  26. usb_p1_vbus: regulator@0 {
  27. compatible = "regulator-fixed";
  28. regulator-name = "usb_vbus";
  29. regulator-min-microvolt = <5000000>;
  30. regulator-max-microvolt = <5000000>;
  31. gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
  32. enable-active-high;
  33. };
  34. };
  35. &cpu0 {
  36. proc-supply = <&mt6323_vproc_reg>;
  37. };
  38. &cpu1 {
  39. proc-supply = <&mt6323_vproc_reg>;
  40. };
  41. &cpu2 {
  42. proc-supply = <&mt6323_vproc_reg>;
  43. };
  44. &cpu3 {
  45. proc-supply = <&mt6323_vproc_reg>;
  46. };
  47. &pwrap {
  48. pmic: mt6323 {
  49. compatible = "mediatek,mt6323";
  50. interrupt-parent = <&pio>;
  51. interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
  52. interrupt-controller;
  53. #interrupt-cells = <2>;
  54. mt6323regulator: mt6323regulator{
  55. compatible = "mediatek,mt6323-regulator";
  56. mt6323_vproc_reg: buck_vproc{
  57. regulator-name = "vproc";
  58. regulator-min-microvolt = < 700000>;
  59. regulator-max-microvolt = <1350000>;
  60. regulator-ramp-delay = <12500>;
  61. regulator-always-on;
  62. regulator-boot-on;
  63. };
  64. mt6323_vsys_reg: buck_vsys{
  65. regulator-name = "vsys";
  66. regulator-min-microvolt = <1400000>;
  67. regulator-max-microvolt = <2987500>;
  68. regulator-ramp-delay = <25000>;
  69. regulator-always-on;
  70. regulator-boot-on;
  71. };
  72. mt6323_vpa_reg: buck_vpa{
  73. regulator-name = "vpa";
  74. regulator-min-microvolt = < 500000>;
  75. regulator-max-microvolt = <3650000>;
  76. };
  77. mt6323_vtcxo_reg: ldo_vtcxo{
  78. regulator-name = "vtcxo";
  79. regulator-min-microvolt = <2800000>;
  80. regulator-max-microvolt = <2800000>;
  81. regulator-enable-ramp-delay = <90>;
  82. regulator-always-on;
  83. regulator-boot-on;
  84. };
  85. mt6323_vcn28_reg: ldo_vcn28{
  86. regulator-name = "vcn28";
  87. regulator-min-microvolt = <2800000>;
  88. regulator-max-microvolt = <2800000>;
  89. regulator-enable-ramp-delay = <185>;
  90. };
  91. mt6323_vcn33_bt_reg: ldo_vcn33_bt{
  92. regulator-name = "vcn33_bt";
  93. regulator-min-microvolt = <3300000>;
  94. regulator-max-microvolt = <3600000>;
  95. regulator-enable-ramp-delay = <185>;
  96. };
  97. mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
  98. regulator-name = "vcn33_wifi";
  99. regulator-min-microvolt = <3300000>;
  100. regulator-max-microvolt = <3600000>;
  101. regulator-enable-ramp-delay = <185>;
  102. };
  103. mt6323_va_reg: ldo_va{
  104. regulator-name = "va";
  105. regulator-min-microvolt = <2800000>;
  106. regulator-max-microvolt = <2800000>;
  107. regulator-enable-ramp-delay = <216>;
  108. regulator-always-on;
  109. regulator-boot-on;
  110. };
  111. mt6323_vcama_reg: ldo_vcama{
  112. regulator-name = "vcama";
  113. regulator-min-microvolt = <1500000>;
  114. regulator-max-microvolt = <2800000>;
  115. regulator-enable-ramp-delay = <216>;
  116. };
  117. mt6323_vio28_reg: ldo_vio28{
  118. regulator-name = "vio28";
  119. regulator-min-microvolt = <2800000>;
  120. regulator-max-microvolt = <2800000>;
  121. regulator-enable-ramp-delay = <216>;
  122. regulator-always-on;
  123. regulator-boot-on;
  124. };
  125. mt6323_vusb_reg: ldo_vusb{
  126. regulator-name = "vusb";
  127. regulator-min-microvolt = <3300000>;
  128. regulator-max-microvolt = <3300000>;
  129. regulator-enable-ramp-delay = <216>;
  130. regulator-boot-on;
  131. };
  132. mt6323_vmc_reg: ldo_vmc{
  133. regulator-name = "vmc";
  134. regulator-min-microvolt = <1800000>;
  135. regulator-max-microvolt = <3300000>;
  136. regulator-enable-ramp-delay = <36>;
  137. regulator-boot-on;
  138. };
  139. mt6323_vmch_reg: ldo_vmch{
  140. regulator-name = "vmch";
  141. regulator-min-microvolt = <3000000>;
  142. regulator-max-microvolt = <3300000>;
  143. regulator-enable-ramp-delay = <36>;
  144. regulator-boot-on;
  145. };
  146. mt6323_vemc3v3_reg: ldo_vemc3v3{
  147. regulator-name = "vemc3v3";
  148. regulator-min-microvolt = <3000000>;
  149. regulator-max-microvolt = <3300000>;
  150. regulator-enable-ramp-delay = <36>;
  151. regulator-boot-on;
  152. };
  153. mt6323_vgp1_reg: ldo_vgp1{
  154. regulator-name = "vgp1";
  155. regulator-min-microvolt = <1200000>;
  156. regulator-max-microvolt = <3300000>;
  157. regulator-enable-ramp-delay = <216>;
  158. };
  159. mt6323_vgp2_reg: ldo_vgp2{
  160. regulator-name = "vgp2";
  161. regulator-min-microvolt = <1200000>;
  162. regulator-max-microvolt = <3000000>;
  163. regulator-enable-ramp-delay = <216>;
  164. };
  165. mt6323_vgp3_reg: ldo_vgp3{
  166. regulator-name = "vgp3";
  167. regulator-min-microvolt = <1200000>;
  168. regulator-max-microvolt = <1800000>;
  169. regulator-enable-ramp-delay = <216>;
  170. };
  171. mt6323_vcn18_reg: ldo_vcn18{
  172. regulator-name = "vcn18";
  173. regulator-min-microvolt = <1800000>;
  174. regulator-max-microvolt = <1800000>;
  175. regulator-enable-ramp-delay = <216>;
  176. };
  177. mt6323_vsim1_reg: ldo_vsim1{
  178. regulator-name = "vsim1";
  179. regulator-min-microvolt = <1800000>;
  180. regulator-max-microvolt = <3000000>;
  181. regulator-enable-ramp-delay = <216>;
  182. };
  183. mt6323_vsim2_reg: ldo_vsim2{
  184. regulator-name = "vsim2";
  185. regulator-min-microvolt = <1800000>;
  186. regulator-max-microvolt = <3000000>;
  187. regulator-enable-ramp-delay = <216>;
  188. };
  189. mt6323_vrtc_reg: ldo_vrtc{
  190. regulator-name = "vrtc";
  191. regulator-min-microvolt = <2800000>;
  192. regulator-max-microvolt = <2800000>;
  193. regulator-always-on;
  194. regulator-boot-on;
  195. };
  196. mt6323_vcamaf_reg: ldo_vcamaf{
  197. regulator-name = "vcamaf";
  198. regulator-min-microvolt = <1200000>;
  199. regulator-max-microvolt = <3300000>;
  200. regulator-enable-ramp-delay = <216>;
  201. };
  202. mt6323_vibr_reg: ldo_vibr{
  203. regulator-name = "vibr";
  204. regulator-min-microvolt = <1200000>;
  205. regulator-max-microvolt = <3300000>;
  206. regulator-enable-ramp-delay = <36>;
  207. };
  208. mt6323_vrf18_reg: ldo_vrf18{
  209. regulator-name = "vrf18";
  210. regulator-min-microvolt = <1825000>;
  211. regulator-max-microvolt = <1825000>;
  212. regulator-enable-ramp-delay = <187>;
  213. };
  214. mt6323_vm_reg: ldo_vm{
  215. regulator-name = "vm";
  216. regulator-min-microvolt = <1200000>;
  217. regulator-max-microvolt = <1800000>;
  218. regulator-enable-ramp-delay = <216>;
  219. regulator-always-on;
  220. regulator-boot-on;
  221. };
  222. mt6323_vio18_reg: ldo_vio18{
  223. regulator-name = "vio18";
  224. regulator-min-microvolt = <1800000>;
  225. regulator-max-microvolt = <1800000>;
  226. regulator-enable-ramp-delay = <216>;
  227. regulator-always-on;
  228. regulator-boot-on;
  229. };
  230. mt6323_vcamd_reg: ldo_vcamd{
  231. regulator-name = "vcamd";
  232. regulator-min-microvolt = <1200000>;
  233. regulator-max-microvolt = <1800000>;
  234. regulator-enable-ramp-delay = <216>;
  235. };
  236. mt6323_vcamio_reg: ldo_vcamio{
  237. regulator-name = "vcamio";
  238. regulator-min-microvolt = <1800000>;
  239. regulator-max-microvolt = <1800000>;
  240. regulator-enable-ramp-delay = <216>;
  241. };
  242. };
  243. mt6323led: leds {
  244. compatible = "mediatek,mt6323-led";
  245. #address-cells = <1>;
  246. #size-cells = <0>;
  247. led@0 {
  248. reg = <0>;
  249. label = "LED0";
  250. linux,default-trigger = "timer";
  251. default-state = "on";
  252. };
  253. led@1 {
  254. reg = <1>;
  255. label = "LED1";
  256. default-state = "off";
  257. };
  258. led@2 {
  259. reg = <2>;
  260. label = "LED2";
  261. default-state = "on";
  262. };
  263. led@3 {
  264. reg = <3>;
  265. label = "LED3";
  266. default-state = "on";
  267. };
  268. };
  269. };
  270. };
  271. &uart2 {
  272. status = "okay";
  273. };
  274. &pio {
  275. nand_pins_default: nanddefault {
  276. pins_dat {
  277. pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>,
  278. <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>,
  279. <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>,
  280. <MT7623_PIN_118_MSDC0_DAT3_FUNC_NLD3>,
  281. <MT7623_PIN_121_MSDC0_DAT0_FUNC_NLD0>,
  282. <MT7623_PIN_120_MSDC0_DAT1_FUNC_NLD1>,
  283. <MT7623_PIN_113_MSDC0_DAT5_FUNC_NLD5>,
  284. <MT7623_PIN_115_MSDC0_RSTB_FUNC_NLD8>,
  285. <MT7623_PIN_119_MSDC0_DAT2_FUNC_NLD2>;
  286. input-enable;
  287. drive-strength = <MTK_DRIVE_8mA>;
  288. bias-pull-up;
  289. };
  290. pins_we {
  291. pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>;
  292. drive-strength = <MTK_DRIVE_8mA>;
  293. bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
  294. };
  295. pins_ale {
  296. pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
  297. drive-strength = <MTK_DRIVE_8mA>;
  298. bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  299. };
  300. };
  301. eth_default: eth {
  302. pins_eth {
  303. pinmux = <MT7623_PIN_275_G2_MDC_FUNC_MDC>,
  304. <MT7623_PIN_276_G2_MDIO_FUNC_MDIO>,
  305. <MT7623_PIN_262_G2_TXEN_FUNC_G2_TXEN>,
  306. <MT7623_PIN_263_G2_TXD3_FUNC_G2_TXD3>,
  307. <MT7623_PIN_264_G2_TXD2_FUNC_G2_TXD2>,
  308. <MT7623_PIN_265_G2_TXD1_FUNC_G2_TXD1>,
  309. <MT7623_PIN_266_G2_TXD0_FUNC_G2_TXD0>,
  310. <MT7623_PIN_267_G2_TXCLK_FUNC_G2_TXC>,
  311. <MT7623_PIN_268_G2_RXCLK_FUNC_G2_RXC>,
  312. <MT7623_PIN_269_G2_RXD0_FUNC_G2_RXD0>,
  313. <MT7623_PIN_270_G2_RXD1_FUNC_G2_RXD1>,
  314. <MT7623_PIN_271_G2_RXD2_FUNC_G2_RXD2>,
  315. <MT7623_PIN_272_G2_RXD3_FUNC_G2_RXD3>,
  316. <MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV>;
  317. };
  318. pins_eth_esw {
  319. pinmux = <MT7623_PIN_273_ESW_INT_FUNC_ESW_INT>;
  320. input-enable;
  321. drive-strength = <MTK_DRIVE_8mA>;
  322. bias-pull-up;
  323. };
  324. pins_eth_rst {
  325. pinmux = <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
  326. output-low;
  327. };
  328. };
  329. pwm_pins: pwm {
  330. pins_pwm1 {
  331. pinmux = <MT7623_PIN_204_PWM1_FUNC_PWM1>;
  332. };
  333. pins_pwm2 {
  334. pinmux = <MT7623_PIN_205_PWM2_FUNC_PWM2>;
  335. };
  336. };
  337. };
  338. &nandc {
  339. status = "okay";
  340. pinctrl-names = "default";
  341. pinctrl-0 = <&nand_pins_default>;
  342. nand@0 {
  343. reg = <0>;
  344. spare_per_sector = <64>;
  345. nand-ecc-mode = "hw";
  346. nand-ecc-strength = <12>;
  347. nand-ecc-step-size = <1024>;
  348. partitions {
  349. compatible = "fixed-partitions";
  350. #address-cells = <1>;
  351. #size-cells = <1>;
  352. partition@C0000 {
  353. label = "uboot-env";
  354. reg = <0xC0000 0x40000>;
  355. };
  356. partition@100000 {
  357. label = "factory";
  358. reg = <0x100000 0x40000>;
  359. };
  360. partition@140000 {
  361. label = "kernel";
  362. reg = <0x140000 0x2000000>;
  363. };
  364. partition@2140000 {
  365. label = "recovery";
  366. reg = <0x2140000 0x2000000>;
  367. };
  368. partition@4140000 {
  369. label = "ubi";
  370. reg = <0x4140000 0x1000000>;
  371. };
  372. };
  373. };
  374. };
  375. &bch {
  376. status = "okay";
  377. };
  378. &usb1 {
  379. vusb33-supply = <&mt6323_vusb_reg>;
  380. vbus-supply = <&usb_p1_vbus>;
  381. status = "okay";
  382. };
  383. &u3phy1 {
  384. status = "okay";
  385. };
  386. &pcie {
  387. status = "okay";
  388. };
  389. &eth {
  390. status = "okay";
  391. };
  392. &gmac1 {
  393. mac-address = [00 11 22 33 44 56];
  394. status = "okay";
  395. phy-mode = "trgmii";
  396. fixed-link {
  397. speed = <1000>;
  398. full-duplex;
  399. pause;
  400. };
  401. };
  402. &gmac2 {
  403. mac-address = [00 11 22 33 44 55];
  404. status = "okay";
  405. phy-mode = "trgmii";
  406. fixed-link {
  407. speed = <1000>;
  408. full-duplex;
  409. pause;
  410. };
  411. };
  412. &mdio0 {
  413. switch@0 {
  414. compatible = "mediatek,mt7530";
  415. #address-cells = <1>;
  416. #size-cells = <0>;
  417. reg = <0>;
  418. pinctrl-names = "default";
  419. pinctrl-0 = <&eth_default>;
  420. core-supply = <&mt6323_vpa_reg>;
  421. io-supply = <&mt6323_vemc3v3_reg>;
  422. mediatek,mcm;
  423. resets = <&ethsys 2>;
  424. reset-names = "mcm";
  425. ports {
  426. #address-cells = <1>;
  427. #size-cells = <0>;
  428. reg = <0>;
  429. port@0 {
  430. reg = <0>;
  431. label = "lan0";
  432. cpu = <&cpu_port0>;
  433. };
  434. port@1 {
  435. reg = <1>;
  436. label = "lan1";
  437. cpu = <&cpu_port0>;
  438. };
  439. port@2 {
  440. reg = <2>;
  441. label = "lan2";
  442. cpu = <&cpu_port0>;
  443. };
  444. port@3 {
  445. reg = <3>;
  446. label = "lan3";
  447. cpu = <&cpu_port0>;
  448. };
  449. port@4 {
  450. reg = <4>;
  451. label = "wan";
  452. cpu = <&cpu_port1>;
  453. };
  454. cpu_port1: port@5 {
  455. reg = <5>;
  456. label = "cpu";
  457. ethernet = <&gmac2>;
  458. phy-mode = "trgmii";
  459. fixed-link {
  460. speed = <1000>;
  461. full-duplex;
  462. };
  463. };
  464. cpu_port0: port@6 {
  465. reg = <6>;
  466. label = "cpu";
  467. ethernet = <&gmac1>;
  468. phy-mode = "trgmii";
  469. fixed-link {
  470. speed = <1000>;
  471. full-duplex;
  472. };
  473. };
  474. };
  475. };
  476. };
  477. &pwm {
  478. pinctrl-names = "default";
  479. pinctrl-0 = <&pwm_pins>;
  480. status = "okay";
  481. };