uboot-board.dts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. /*
  2. * Allwinner Technology CO., Ltd. sun8iw20p1 soc board.
  3. *
  4. * soc board support.
  5. */
  6. &platform {
  7. eraseflag = <1>;
  8. next_work = <3>;
  9. debug_mode = <1>;
  10. };
  11. &target {
  12. boot_clock = <1008>; /*CPU boot frequency, Unit: MHz*/
  13. storage_type = <0xffffffff>; /*boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan*/
  14. burn_key = <0>; /*1:support burn key; 0:not support burn key*/
  15. dragonboard_test = <0>; /*1:support card boot dragonboard; 0:not support card boot dragonboard*/
  16. };
  17. &charger0 {
  18. pmu_safe_vol = <3500>;
  19. };
  20. &twi6 {
  21. clock-frequency = <200000>;
  22. pinctrl-0 = <&s_twi0_pins_a>;
  23. no_suspend = <1>;
  24. twi_drv_used = <1>;
  25. status = "okay";
  26. };
  27. &rgb18_pins_a {
  28. allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
  29. "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
  30. "PD20", "PD21";
  31. allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
  32. "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
  33. "PD20", "PD21";
  34. allwinner,function = "rgb18";
  35. allwinner,muxsel = <2>;
  36. allwinner,drive = <3>;
  37. allwinner,pull = <0>;
  38. };
  39. &rgb18_pins_b {
  40. allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
  41. "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
  42. "PD20", "PD21";
  43. allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
  44. "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
  45. "PD20", "PD21";
  46. allwinner,function = "rgb18_suspend";
  47. allwinner,muxsel = <7>;
  48. allwinner,drive = <1>;
  49. allwinner,pull = <0>;
  50. };
  51. &pwm7_pin_a {
  52. pins = "PD22";
  53. function = "pwm7";
  54. muxsel = <5>;
  55. drive-strength = <10>;
  56. bias-pull-up;
  57. };
  58. &pwm7_pin_b {
  59. pins = "PD22";
  60. muxsel = <0>;
  61. function = "gpio_in";
  62. };
  63. &pwm7 {
  64. pinctrl-names = "active", "sleep";
  65. pinctrl-0 = <&pwm7_pin_a>;
  66. pinctrl-1 = <&pwm7_pin_b>;
  67. status = "disabled";
  68. };
  69. &sdc0_pins_a {
  70. allwinner,pins = "PF0", "PF1", "PF2",
  71. "PF3", "PF4", "PF5";
  72. allwinner,function = "sdc0";
  73. allwinner,muxsel = <2>;
  74. allwinner,drive = <3>;
  75. allwinner,pull = <1>;
  76. pins = "PF0", "PF1", "PF2",
  77. "PF3", "PF4", "PF5";
  78. function = "sdc0";
  79. drive-strength = <30>;
  80. bias-pull-up;
  81. power-source = <3300>;
  82. };
  83. &sdc0_pins_b {
  84. pins = "PF0", "PF1", "PF2",
  85. "PF3", "PF4", "PF5";
  86. function = "sdc0";
  87. drive-strength = <30>;
  88. bias-pull-up;
  89. power-source = <1800>;
  90. };
  91. &sdc0_pins_c {
  92. pins = "PF0", "PF1", "PF2",
  93. "PF3", "PF4", "PF5";
  94. function = "gpio_in";
  95. };
  96. &sdc2_pins_a {
  97. allwinner,pins = "PC2", "PC3", "PC4",
  98. "PC5", "PC6", "PC7";
  99. allwinner,function = "sdc2";
  100. allwinner,muxsel = <3>;
  101. allwinner,drive = <3>;
  102. allwinner,pull = <1>;
  103. pins = "PC2", "PC3", "PC4",
  104. "PC5", "PC6", "PC7";
  105. function = "sdc2";
  106. drive-strength = <30>;
  107. bias-pull-up;
  108. };
  109. &sdc2_pins_b {
  110. pins = "PC2", "PC3", "PC4",
  111. "PC5", "PC6", "PC7";
  112. function = "gpio_in";
  113. };
  114. &nand0_pins_a {
  115. allwinner,pins = "PC0", "PC1", "PC2", "PC5",
  116. "PC8", "PC9", "PC10", "PC11",
  117. "PC12", "PC13", "PC14", "PC15",
  118. "PC16";
  119. allwinner,pname= "nand0_we", "nand0_ale","nand0_cle", "nand0_nre",
  120. "nand0_d0", "nand0_d1", "nand0_d2", "nand0_d3",
  121. "nand0_d4", "nand0_d5", "nand0_d6", "nand0_d7",
  122. "nand0_ndqs";
  123. allwinner,function = "nand0";
  124. allwinner,muxsel = <2>;
  125. allwinner,drive = <1>;
  126. allwinner,pull = <0>;
  127. };
  128. &nand0_pins_b {
  129. allwinner,pins = "PC4", "PC6", "PC03", "PC07";
  130. allwinner,pname= "nand0_ce0", "nand0_rb0", "nand0_ce1", "nand0_rb1";
  131. allwinner,function = "nand0";
  132. allwinner,muxsel = <2>;
  133. allwinner,drive = <1>;
  134. allwinner,pull = <1>; /* only RB&CE should be pulled up */
  135. };
  136. &nand0_pins_c {
  137. allwinner,pins = "PC0", "PC1", "PC2", "PC3",
  138. "PC4", "PC5", "PC6", "PC7",
  139. "PC8", "PC9", "PC10", "PC11",
  140. "PC12", "PC13", "PC14", "PC15",
  141. "PC16";
  142. allwinner,function = "io_disabled";
  143. allwinner,muxsel = <7>;
  144. allwinner,drive = <1>;
  145. allwinner,pull = <0>;
  146. };
  147. &spi0_pins_a {
  148. allwinner,pins = "PC2", "PC4", "PC5",
  149. "PC7", "PC6";
  150. allwinner,pname = "spi0_sclk", "spi0_mosi",
  151. "spi0_miso", "spi0_hold", "spi0_wp";
  152. allwinner,function = "spi0";
  153. allwinner,muxsel = <2>;
  154. allwinner,drive = <1>;
  155. allwinner,pull = <0>;
  156. };
  157. &spi0_pins_b {
  158. allwinner,pins = "PC3";
  159. allwinner,pname = "spi0_cs0";
  160. allwinner,function = "spi0";
  161. allwinner,muxsel = <2>;
  162. allwinner,drive = <1>;
  163. allwinner,pull = <1>; // only CS should be pulled up
  164. };
  165. &spi0_pins_c {
  166. allwinner,pins = "PC2", "PC3", "PC4", "PC5",
  167. "PC6", "PC7";
  168. allwinner,function = "gpio_in";
  169. allwinner,muxsel = <0>;
  170. allwinner,drive = <1>;
  171. allwinner,pull = <0>;
  172. };
  173. &dsi4lane_pins_a {
  174. allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9";
  175. allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9";
  176. allwinner,function = "dsi4lane";
  177. allwinner,muxsel = <4>;
  178. allwinner,drive = <3>;
  179. allwinner,pull = <0>;
  180. };
  181. &dsi4lane_pins_b {
  182. allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9";
  183. allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9";
  184. allwinner,function = "dsi4lane_suspend";
  185. allwinner,muxsel = <7>;
  186. allwinner,drive = <1>;
  187. allwinner,pull = <0>;
  188. };
  189. &card0_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
  190. /* reg = <0x0 0x2 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
  191. device_type = "card0_boot_para";
  192. card_ctrl = <0x0>;
  193. card_high_speed = <0x1>;
  194. card_line = <0x4>;
  195. pinctrl-0 = <&sdc0_pins_a>;
  196. };
  197. &card2_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
  198. /* reg = <0x0 0x3 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
  199. device_type = "card2_boot_para";
  200. card_ctrl = <0x2>;
  201. card_high_speed = <0x1>;
  202. card_line = <0x4>;
  203. pinctrl-0 = <&sdc2_pins_a>;
  204. sdc_ex_dly_used = <0x2>;
  205. sdc_io_1v8 = <0x1>;
  206. sdc_tm4_win_th = <0x08>;
  207. sdc_tm4_hs200_max_freq = <150>;
  208. sdc_tm4_hs400_max_freq = <100>;
  209. sdc_type = "tm4";
  210. };
  211. &gpio_bias { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
  212. device_type = "gpio_bias";
  213. pc_bias = <1800>;
  214. };
  215. &nand0 {
  216. compatible = "allwinner,sun8iw20-nand";
  217. device_type = "nand0";
  218. //reg = <0x0 0x04011000 0x0 0x1000>;/* nand0 */
  219. pinctrl-names = "default", "sleep";
  220. pinctrl-0 = <&nand0_pins_a &nand0_pins_b>;
  221. pinctrl-1 = <&nand0_pins_c>;
  222. nand0_regulator1 = "vcc-nand";
  223. nand0_regulator2 = "none";
  224. nand0_cache_level = <0x55aaaa55>;
  225. nand0_flush_cache_num = <0x55aaaa55>;
  226. nand0_capacity_level = <0x55aaaa55>;
  227. nand0_id_number_ctl = <0x55aaaa55>;
  228. nand0_print_level = <0x55aaaa55>;
  229. nand0_p0 = <0x55aaaa55>;
  230. nand0_p1 = <0x55aaaa55>;
  231. nand0_p2 = <0x55aaaa55>;
  232. nand0_p3 = <0x55aaaa55>;
  233. chip_code = "sun8iw20";
  234. status = "disabled";
  235. };
  236. &spi0 {
  237. clock-frequency = <100000000>;
  238. pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
  239. pinctrl-1 = <&spi0_pins_c>;
  240. pinctrl-names = "default", "sleep";
  241. /*spi-supply = <&reg_dcdc1>;*/
  242. spi_slave_mode = <0>;
  243. spi0_cs_number = <1>;
  244. spi0_cs_bitmap = <1>;
  245. status = "okay";
  246. spi-nand@0 {
  247. compatible = "spi-nand";
  248. spi-max-frequency=<0x5F5E100>;
  249. reg = <0x0>;
  250. spi-rx-bus-width=<0x01>;
  251. spi-tx-bus-width=<0x01>;
  252. status="okay";
  253. };
  254. };
  255. &disp {
  256. disp_init_enable = <1>;
  257. disp_mode = <0>;
  258. screen0_output_type = <1>;
  259. screen0_output_mode = <4>;
  260. screen1_output_type = <3>;
  261. screen1_output_mode = <4>;
  262. screen1_output_format = <0>;
  263. screen1_output_bits = <0>;
  264. screen1_output_eotf = <4>;
  265. screen1_output_cs = <257>;
  266. screen1_output_range = <2>;
  267. screen1_output_scan = <0>;
  268. screen1_output_aspect_ratio = <8>;
  269. dev0_output_type = <1>;
  270. dev0_output_mode = <4>;
  271. dev0_screen_id = <0>;
  272. dev0_do_hpd = <0>;
  273. dev1_output_type = <4>;
  274. dev1_output_mode = <10>;
  275. dev1_screen_id = <1>;
  276. dev1_do_hpd = <1>;
  277. def_output_dev = <0>;
  278. disp_rotation_used = <1>;
  279. degree0 = <0>;
  280. fb0_format = <0>;
  281. fb0_buffer_num = <1>;
  282. //fb0_width = <800>;
  283. //fb0_height = <480>;
  284. fb1_format = <0>;
  285. fb1_width = <0>;
  286. fb1_height = <0>;
  287. chn_cfg_mode = <1>;
  288. disp_para_zone = <1>;
  289. //dc1sw-supply = <&reg_dc1sw>;
  290. //eldo3-supply = <&reg_eldo3>;
  291. //dcdc1-supply = <&reg_dcdc1>;
  292. };
  293. // 480x272 RGB LCD
  294. /*
  295. &lcd0 {
  296. lcd_used = <1>;
  297. lcd_driver_name = "default_lcd";
  298. lcd_backlight = <50>;
  299. lcd_if = <0>;
  300. lcd_x = <480>;
  301. lcd_y = <272>;
  302. lcd_width = <95>;
  303. lcd_height = <54>;
  304. lcd_dclk_freq = <9>;
  305. lcd_pwm_used = <0>;
  306. lcd_pwm_ch = <7>;
  307. lcd_pwm_freq = <50000>;
  308. lcd_pwm_pol = <1>;
  309. lcd_hbp = <43>;
  310. lcd_ht = <525>;
  311. lcd_hspw = <41>;
  312. lcd_vbp = <12>;
  313. lcd_vt = <286>;
  314. lcd_vspw = <10>;
  315. lcd_lvds_if = <0>;
  316. lcd_lvds_colordepth = <1>;
  317. lcd_lvds_mode = <0>;
  318. lcd_frm = <0>;
  319. lcd_io_phase = <0x0000>;
  320. lcd_gamma_en = <0>;
  321. lcd_bright_curve_en = <0>;
  322. lcd_cmap_en = <0>;
  323. deu_mode = <0>;
  324. lcdgamma4iep = <22>;
  325. smart_color = <90>;
  326. pinctrl-0 = <&rgb18_pins_a>;
  327. pinctrl-1 = <&rgb18_pins_b>;
  328. };
  329. */
  330. // 800x480 RGB LCD
  331. /*
  332. &lcd0 {
  333. lcd_used = <1>;
  334. lcd_driver_name = "default_lcd";
  335. lcd_backlight = <50>;
  336. lcd_if = <0>;
  337. lcd_x = <800>;
  338. lcd_y = <480>;
  339. lcd_width = <95>;
  340. lcd_height = <54>;
  341. lcd_dclk_freq = <33>;
  342. lcd_pwm_used = <0>;
  343. lcd_pwm_ch = <7>;
  344. lcd_pwm_freq = <50000>;
  345. lcd_pwm_pol = <1>;
  346. lcd_hbp = <41>;
  347. lcd_ht = <928>;
  348. lcd_hspw = <2>;
  349. lcd_vbp = <14>;
  350. lcd_vt = <525>;
  351. lcd_vspw = <2>;
  352. lcd_lvds_if = <0>;
  353. lcd_lvds_colordepth = <1>;
  354. lcd_lvds_mode = <0>;
  355. lcd_frm = <1>;
  356. lcd_io_phase = <0x0000>;
  357. lcd_gamma_en = <0>;
  358. lcd_bright_curve_en = <0>;
  359. lcd_cmap_en = <0>;
  360. deu_mode = <0>;
  361. lcdgamma4iep = <22>;
  362. smart_color = <90>;
  363. pinctrl-0 = <&rgb18_pins_a>;
  364. pinctrl-1 = <&rgb18_pins_b>;
  365. };
  366. */
  367. // 1024x600 RGB LCD
  368. /*
  369. &lcd0 {
  370. lcd_used = <1>;
  371. lcd_driver_name = "default_lcd";
  372. lcd_backlight = <50>;
  373. lcd_if = <0>;
  374. lcd_x = <1024>;
  375. lcd_y = <600>;
  376. lcd_width = <95>;
  377. lcd_height = <54>;
  378. lcd_dclk_freq = <51>;
  379. lcd_pwm_used = <0>;
  380. lcd_pwm_ch = <7>;
  381. lcd_pwm_freq = <50000>;
  382. lcd_pwm_pol = <1>;
  383. lcd_hbp = <160>;
  384. lcd_ht = <1344>;
  385. lcd_hspw = <20>;
  386. lcd_vbp = <23>;
  387. lcd_vt = <635>;
  388. lcd_vspw = <3>;
  389. lcd_lvds_if = <0>;
  390. lcd_lvds_colordepth = <1>;
  391. lcd_lvds_mode = <0>;
  392. lcd_frm = <1>;
  393. lcd_io_phase = <0x0000>;
  394. lcd_gamma_en = <0>;
  395. lcd_bright_curve_en = <0>;
  396. lcd_cmap_en = <0>;
  397. deu_mode = <0>;
  398. lcdgamma4iep = <22>;
  399. smart_color = <90>;
  400. pinctrl-0 = <&rgb18_pins_a>;
  401. pinctrl-1 = <&rgb18_pins_b>;
  402. };
  403. */
  404. // 1280x800 MIPI LCD
  405. /*
  406. &lcd0 {
  407. lcd_used = <1>;
  408. lcd_driver_name = "he0801a068";
  409. lcd_backlight = <50>;
  410. lcd_if = <4>;
  411. lcd_x = <800>;
  412. lcd_y = <1280>;
  413. lcd_width = <52>;
  414. lcd_height = <52>;
  415. lcd_dclk_freq = <68>;
  416. lcd_pwm_used = <1>;
  417. lcd_pwm_ch = <7>;
  418. lcd_pwm_freq = <50000>;
  419. lcd_pwm_pol = <1>;
  420. lcd_pwm_max_limit = <255>;
  421. lcd_hbp = <40>;
  422. lcd_ht = <860>;
  423. lcd_hspw = <20>;
  424. lcd_vbp = <12>;
  425. lcd_vt = <1322>;
  426. lcd_vspw = <4>;
  427. lcd_dsi_lane = <4>;
  428. lcd_dsi_if = <0>;
  429. lcd_dsi_format = <0>;
  430. lcd_dsi_te = <0>;
  431. lcd_frm = <0>;
  432. lcd_gamma_en = <0>;
  433. lcd_cmap_en = <0>;
  434. pinctrl-0 = <&dsi4lane_pins_a>;
  435. pinctrl-1 = <&dsi4lane_pins_b>;
  436. //lcd_gpio_0 = <&pio PD 20 1 0 3 1>;
  437. };
  438. */
  439. &lcd0 {
  440. lcd_used = <1>;
  441. lcd_driver_name = "st7789v";
  442. lcd_x = <240>;
  443. lcd_y = <240>;
  444. lcd_width = <108>;
  445. lcd_height = <64>;
  446. lcd_dclk_freq = <19>;
  447. lcd_pwm_used = <0>;
  448. lcd_pwm_ch = <8>;
  449. lcd_pwm_freq = <50000>;
  450. lcd_pwm_pol = <0>;
  451. lcd_pwm_max_limit = <255>;
  452. lcd_hbp = <120>;
  453. lcd_ht = <850>;
  454. lcd_hspw = <10>;
  455. lcd_vbp = <13>;
  456. lcd_vt = <373>;
  457. lcd_vspw = <2>;
  458. lcd_frm = <1>;
  459. lcd_if = <0>;
  460. lcd_hv_if = <8>;
  461. lcd_hv_clk_phase = <0>;
  462. lcd_hv_sync_polarity = <0>;
  463. lcd_hv_srgb_seq = <0>;
  464. lcd_io_phase = <0x0000>;
  465. lcd_gamma_en = <0>;
  466. lcd_bright_curve_en = <1>;
  467. lcd_cmap_en = <0>;
  468. lcd_rb_swap = <0>;
  469. deu_mode = <0>;
  470. lcdgamma4iep = <22>;
  471. smart_color = <90>;
  472. lcd_bl_en = <&pio PE 8 1 0 3 1>;
  473. //reset
  474. lcd_gpio_0 = <&pio PD 13 1 0 3 1>;
  475. //cs
  476. lcd_gpio_1 = <&pio PD 10 1 0 3 1>;
  477. //sda
  478. lcd_gpio_2 = <&pio PD 12 1 0 3 1>;
  479. //sck
  480. lcd_gpio_3 = <&pio PD 11 1 0 3 1>;
  481. };
  482. &aliases {
  483. nand0 = &nand0;
  484. twi6 = &twi6;
  485. pwm = &pwm;
  486. pwm0 = &pwm0;
  487. pwm1 = &pwm1;
  488. pwm2 = &pwm2;
  489. pwm3 = &pwm3;
  490. pwm4 = &pwm4;
  491. pwm5 = &pwm5;
  492. pwm6 = &pwm6;
  493. pwm7 = &pwm7;
  494. disp = &disp;
  495. // lcd0 = &lcd0;
  496. // lcd1 = &lcd1;
  497. // eink = &eink;
  498. // spi0 = &spi0;
  499. spi0 = &spi0;
  500. spi1 = &spi1;
  501. // spi_gpio =&spi_gpio;
  502. };