rockchip.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. .. Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com>
  3. ROCKCHIP
  4. ========
  5. About this
  6. ----------
  7. This document describes the information about Rockchip supported boards
  8. and it's usage steps.
  9. Rockchip boards
  10. ---------------
  11. Rockchip is SoC solutions provider for tablets & PCs, streaming media
  12. TV boxes, AI audio & vision, IoT hardware.
  13. A wide range of Rockchip SoCs with associated boardsare supported in
  14. mainline U-Boot.
  15. List of mainline supported rockchip boards:
  16. * rk3036
  17. - Rockchip Evb-RK3036 (evb-rk3036)
  18. - Kylin (kylin_rk3036)
  19. * rk3128
  20. - Rockchip Evb-RK3128 (evb-rk3128)
  21. * rk3229
  22. - Rockchip Evb-RK3229 (evb-rk3229)
  23. * rk3288
  24. - Rockchip Evb-RK3288 (evb-rk3288)
  25. - Firefly-RK3288 (firefly-rk3288)
  26. - MQmaker MiQi (miqi-rk3288)
  27. - Phytec RK3288 PCM-947 (phycore-rk3288)
  28. - PopMetal-RK3288 (popmetal-rk3288)
  29. - Radxa Rock 2 Square (rock2)
  30. - Tinker-RK3288 (tinker-rk3288)
  31. - Google Jerry (chromebook_jerry)
  32. - Google Mickey (chromebook_mickey)
  33. - Google Minnie (chromebook_minnie)
  34. - Google Speedy (chromebook_speedy)
  35. - Amarula Vyasa-RK3288 (vyasa-rk3288)
  36. * rk3308
  37. - Rockchip Evb-RK3308 (evb-rk3308)
  38. - Roc-cc-RK3308 (roc-cc-rk3308)
  39. * rk3328
  40. - Rockchip Evb-RK3328 (evb-rk3328)
  41. - Pine64 Rock64 (rock64-rk3328)
  42. - Firefly-RK3328 (roc-cc-rk3328)
  43. - Radxa Rockpi E (rock-pi-e-rk3328)
  44. * rk3368
  45. - GeekBox (geekbox)
  46. - PX5 EVB (evb-px5)
  47. - Rockchip Sheep (sheep-rk3368)
  48. - Theobroma Systems RK3368-uQ7 SoM - Lion (lion-rk3368)
  49. * rk3399
  50. - 96boards RK3399 Ficus (ficus-rk3399)
  51. - 96boards Rock960 (rock960-rk3399)
  52. - Firefly-RK3399 (firefly_rk3399)
  53. - Firefly ROC-RK3399-PC
  54. - FriendlyElec NanoPC-T4 (nanopc-t4-rk3399)
  55. - FriendlyElec NanoPi M4 (nanopi-m4-rk3399)
  56. - FriendlyARM NanoPi NEO4 (nanopi-neo4-rk3399)
  57. - Google Bob (chromebook_bob)
  58. - Khadas Edge (khadas-edge-rk3399)
  59. - Khadas Edge-Captain (khadas-edge-captain-rk3399)
  60. - Khadas Edge-V (hadas-edge-v-rk3399)
  61. - Orange Pi RK3399 (orangepi-rk3399)
  62. - Pine64 RockPro64 (rockpro64-rk3399)
  63. - Radxa ROCK Pi 4 (rock-pi-4-rk3399)
  64. - Rockchip Evb-RK3399 (evb_rk3399)
  65. - Theobroma Systems RK3399-Q7 SoM - Puma (puma_rk3399)
  66. * rv1108
  67. - Rockchip Evb-rv1108 (evb-rv1108)
  68. - Elgin-R1 (elgin-rv1108)
  69. * rv3188
  70. - Radxa Rock (rock)
  71. Building
  72. --------
  73. TF-A
  74. ^^^^
  75. TF-A would require to build for ARM64 Rockchip SoCs platforms.
  76. To build TF-A::
  77. git clone https://github.com/ARM-software/arm-trusted-firmware.git
  78. cd arm-trusted-firmware
  79. make realclean
  80. make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
  81. Specify the PLAT= with desired rockchip platform to build TF-A for.
  82. U-Boot
  83. ^^^^^^
  84. To build rk3328 boards::
  85. export BL31=/path/to/arm-trusted-firmware/to/bl31.elf
  86. make evb-rk3328_defconfig
  87. make
  88. To build rk3288 boards::
  89. make evb-rk3288_defconfig
  90. make
  91. To build rk3368 boards::
  92. export BL31=/path/to/arm-trusted-firmware/to/bl31.elf
  93. make evb-px5_defconfig
  94. make
  95. To build rk3399 boards::
  96. export BL31=/path/to/arm-trusted-firmware/to/bl31.elf
  97. make evb-rk3399_defconfig
  98. make
  99. Flashing
  100. --------
  101. SD Card
  102. ^^^^^^^
  103. All rockchip platforms, except rk3128 (which doesn't use SPL) are now
  104. supporting single boot image using binman and pad_cat.
  105. To write an image that boots from an SD card (assumed to be /dev/sda)::
  106. sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64
  107. sync
  108. eMMC
  109. ^^^^
  110. eMMC flash would probe on mmc0 in most of the rockchip platforms.
  111. Create GPT partition layout as defined in configurations::
  112. mmc dev 0
  113. gpt write mmc 0 $partitions
  114. Connect the USB-OTG cable between host and target device.
  115. Launch fastboot at target::
  116. fastboot 0
  117. Upon successful gadget connection,host show the USB device like::
  118. lsusb
  119. Bus 001 Device 020: ID 2207:330c Fuzhou Rockchip Electronics Company RK3399 in Mask ROM mode
  120. Program the flash::
  121. sudo fastboot -i 0x2207 flash loader1 idbloader.img
  122. sudo fastboot -i 0x2207 flash loader2 u-boot.itb
  123. Note: for rockchip 32-bit platforms the U-Boot proper image
  124. is u-boot-dtb.img
  125. SPI
  126. ^^^
  127. Generating idbloader for SPI boot would require to input a multi image
  128. image format to mkimage tool instead of concerting (like for MMC boot).
  129. SPL-alone SPI boot image::
  130. ./tools/mkimage -n rk3399 -T rkspi -d spl/u-boot-spl.bin idbloader.img
  131. TPL+SPL SPI boot image::
  132. ./tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin idbloader.img
  133. Copy SPI boot images into SD card and boot from SD::
  134. sf probe
  135. load mmc 1:1 $kernel_addr_r idbloader.img
  136. sf erase 0 +$filesize
  137. sf write $kernel_addr_r 0 ${filesize}
  138. load mmc 1:1 ${kernel_addr_r} u-boot.itb
  139. sf erase 0x60000 +$filesize
  140. sf write $kernel_addr_r 0x60000 ${filesize}
  141. TODO
  142. ----
  143. - Add rockchip idbloader image building
  144. - Add rockchip TPL image building
  145. - Document SPI flash boot
  146. - Add missing SoC's with it boards list
  147. .. Jagan Teki <jagan@amarulasolutions.com>
  148. .. Tuesday 02 June 2020 12:18:57 AM IST