rz-g2.rst 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. Renesas RZ/G
  2. ============
  3. The "RZ/G" Family of high-end 64-bit Arm®-based microprocessors (MPUs)
  4. enables the solutions required for the smart society of the future.
  5. Through a variety of Arm Cortex®-A53 and A57-based devices, engineers can
  6. easily implement high-resolution human machine interfaces (HMI), embedded
  7. vision, embedded artificial intelligence (e-AI) and real-time control and
  8. industrial ethernet connectivity.
  9. The scalable RZ/G hardware platform and flexible software platform
  10. cover the full product range, from the premium class to the entry
  11. level. Plug-ins are available for multiple open-source software tools.
  12. Renesas RZ/G2 reference platforms:
  13. ----------------------------------
  14. +--------------+----------------------------------------------------------------------------------+
  15. | Board | Details |
  16. +==============+===============+==================================================================+
  17. | hihope-rzg2h | "96 boards" compatible board from Hoperun equipped with Renesas RZ/G2H SoC |
  18. | +----------------------------------------------------------------------------------+
  19. | | http://hihope.org/product/musashi |
  20. +--------------+----------------------------------------------------------------------------------+
  21. | hihope-rzg2m | "96 boards" compatible board from Hoperun equipped with Renesas RZ/G2M SoC |
  22. | +----------------------------------------------------------------------------------+
  23. | | http://hihope.org/product/musashi |
  24. +--------------+----------------------------------------------------------------------------------+
  25. | hihope-rzg2n | "96 boards" compatible board from Hoperun equipped with Renesas RZ/G2N SoC |
  26. | +----------------------------------------------------------------------------------+
  27. | | http://hihope.org/product/musashi |
  28. +--------------+----------------------------------------------------------------------------------+
  29. | ek874 | "96 boards" compatible board from Silicon Linux equipped with Renesas RZ/G2E SoC |
  30. | +----------------------------------------------------------------------------------+
  31. | | https://www.si-linux.co.jp/index.php?CAT%2FCAT874 |
  32. +--------------+----------------------------------------------------------------------------------+
  33. `boards info <https://www.renesas.com/us/en/products/rzg-linux-platform/rzg-marcketplace/board-solutions.html#rzg2>`__
  34. The current TF-A port has been tested on the HiHope RZ/G2M
  35. SoC_id r8a774a1 revision ES1.3.
  36. ::
  37. ARM CA57 (ARMv8) 1.5 GHz dual core, with NEON/VFPv4, L1$ I/D 48K/32K, L2$ 1MB
  38. ARM CA53 (ARMv8) 1.2 GHz quad core, with NEON/VFPv4, L1$ I/D 32K/32K, L2$ 512K
  39. Memory controller for LPDDR4-3200 4GB in 2 channels(32-bit bus mode)
  40. Two- and three-dimensional graphics engines,
  41. Video processing units,
  42. Display Output,
  43. Video Input,
  44. SD card host interface,
  45. USB3.0 and USB2.0 interfaces,
  46. CAN interfaces,
  47. Ethernet AVB,
  48. Wi-Fi + BT,
  49. PCI Express Interfaces,
  50. Memories
  51. INTERNAL 384KB SYSTEM RAM
  52. DDR 4 GB LPDDR4
  53. QSPI FLASH 64MB
  54. EMMC 32 GB EMMC (HS400 240 MBYTES/S)
  55. MICROSD-CARD SLOT (SDR104 100 MBYTES/S)
  56. Overview
  57. --------
  58. On RZ/G2 SoCs the BOOTROM starts the cpu at EL3; for this port BL2
  59. will therefore be entered at this exception level (the Renesas' ATF
  60. reference tree [1] resets into EL1 before entering BL2 - see its
  61. bl2.ld.S)
  62. BL2 initializes DDR before determining the boot reason (cold or warm).
  63. Once BL2 boots, it determines the boot reason, writes it to shared
  64. memory (BOOT_KIND_BASE) together with the BL31 parameters
  65. (PARAMS_BASE) and jumps to BL31.
  66. To all effects, BL31 is as if it is being entered in reset mode since
  67. it still needs to initialize the rest of the cores; this is the reason
  68. behind using direct shared memory access to BOOT_KIND_BASE _and_
  69. PARAMS_BASE instead of using registers to get to those locations (see
  70. el3_common_macros.S and bl31_entrypoint.S for the RESET_TO_BL31 use
  71. case).
  72. [1] https://github.com/renesas-rz/meta-rzg2/tree/BSP-1.0.5/recipes-bsp/arm-trusted-firmware/files
  73. How to build
  74. ------------
  75. The TF-A build options depend on the target board so you will have to
  76. refer to those specific instructions. What follows is customized to
  77. the HiHope RZ/G2M development kit used in this port.
  78. Build Tested:
  79. ~~~~~~~~~~~~~
  80. .. code:: bash
  81. make bl2 bl31 rzg LOG_LEVEL=40 PLAT=rzg LSI=G2M RCAR_DRAM_SPLIT=2\
  82. RCAR_LOSSY_ENABLE=1 SPD="none" MBEDTLS_DIR=$mbedtls
  83. System Tested:
  84. ~~~~~~~~~~~~~~
  85. * mbed_tls:
  86. git@github.com:ARMmbed/mbedtls.git [devel]
  87. | commit 72ca39737f974db44723760623d1b29980c00a88
  88. | Merge: ef94c4fcf dd9ec1c57
  89. | Author: Janos Follath <janos.follath@arm.com>
  90. | Date: Wed Oct 7 09:21:01 2020 +0100
  91. * u-boot:
  92. The port has beent tested using mainline uboot with HiHope RZ/G2M board
  93. specific patches.
  94. | commit 46ce9e777c1314ccb78906992b94001194eaa87b
  95. | Author: Heiko Schocher <hs@denx.de>
  96. | Date: Tue Nov 3 15:22:36 2020 +0100
  97. * linux:
  98. The port has beent tested using mainline kernel.
  99. | commit f8394f232b1eab649ce2df5c5f15b0e528c92091
  100. | Author: Linus Torvalds <torvalds@linux-foundation.org>
  101. | Date: Sun Nov 8 16:10:16 2020 -0800
  102. | Linux 5.10-rc3
  103. TF-A Build Procedure
  104. ~~~~~~~~~~~~~~~~~~~~
  105. - Fetch all the above 3 repositories.
  106. - Prepare the AARCH64 toolchain.
  107. - Build u-boot using hihope_rzg2_defconfig.
  108. Result: u-boot-elf.srec
  109. .. code:: bash
  110. make CROSS_COMPILE=aarch64-linux-gnu-
  111. hihope_rzg2_defconfig
  112. make CROSS_COMPILE=aarch64-linux-gnu-
  113. - Build TF-A
  114. Result: bootparam_sa0.srec, cert_header_sa6.srec, bl2.srec, bl31.srec
  115. .. code:: bash
  116. make bl2 bl31 rzg LOG_LEVEL=40 PLAT=rzg LSI=G2M RCAR_DRAM_SPLIT=2\
  117. RCAR_LOSSY_ENABLE=1 SPD="none" MBEDTLS_DIR=$mbedtls
  118. Install Procedure
  119. ~~~~~~~~~~~~~~~~~
  120. - Boot the board in Mini-monitor mode and enable access to the
  121. QSPI flash.
  122. - Use the flash_writer utility[2] to flash all the SREC files.
  123. [2] https://github.com/renesas-rz/rzg2_flash_writer
  124. Boot trace
  125. ----------
  126. ::
  127. INFO: ARM GICv2 driver initialized
  128. NOTICE: BL2: RZ/G2 Initial Program Loader(CA57) Rev.2.0.6
  129. NOTICE: BL2: PRR is RZ/G2M Ver.1.3
  130. NOTICE: BL2: Board is HiHope RZ/G2M Rev.4.0
  131. NOTICE: BL2: Boot device is QSPI Flash(40MHz)
  132. NOTICE: BL2: LCM state is unknown
  133. NOTICE: BL2: DDR3200(rev.0.40)
  134. NOTICE: BL2: [COLD_BOOT]
  135. NOTICE: BL2: DRAM Split is 2ch
  136. NOTICE: BL2: QoS is default setting(rev.0.19)
  137. NOTICE: BL2: DRAM refresh interval 1.95 usec
  138. NOTICE: BL2: Periodic Write DQ Training
  139. NOTICE: BL2: CH0: 400000000 - 47fffffff, 2 GiB
  140. NOTICE: BL2: CH2: 600000000 - 67fffffff, 2 GiB
  141. NOTICE: BL2: Lossy Decomp areas
  142. NOTICE: Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
  143. NOTICE: Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
  144. NOTICE: Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
  145. NOTICE: BL2: FDT at 0xe631db30
  146. NOTICE: BL2: v2.3(release):v2.4-rc0-2-g1433701e5
  147. NOTICE: BL2: Built : 13:45:26, Nov 7 2020
  148. NOTICE: BL2: Normal boot
  149. INFO: BL2: Doing platform setup
  150. INFO: BL2: Loading image id 3
  151. NOTICE: BL2: dst=0xe631d200 src=0x8180000 len=512(0x200)
  152. NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
  153. WARNING: r-car ignoring the BL31 size from certificate,using RCAR_TRUSTED_SRAM_SIZE instead
  154. INFO: Loading image id=3 at address 0x44000000
  155. NOTICE: rcar_file_len: len: 0x0003e000
  156. NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
  157. INFO: Image id=3 loaded: 0x44000000 - 0x4403e000
  158. INFO: BL2: Loading image id 5
  159. INFO: Loading image id=5 at address 0x50000000
  160. NOTICE: rcar_file_len: len: 0x00100000
  161. NOTICE: BL2: dst=0x50000000 src=0x8300000 len=1048576(0x100000)
  162. INFO: Image id=5 loaded: 0x50000000 - 0x50100000
  163. NOTICE: BL2: Booting BL31
  164. INFO: Entry point address = 0x44000000
  165. INFO: SPSR = 0x3cd
  166. U-Boot 2021.01-rc1-00244-gac37e14fbd (Nov 04 2020 - 20:03:34 +0000)
  167. CPU: Renesas Electronics R8A774A1 rev 1.3
  168. Model: HopeRun HiHope RZ/G2M with sub board
  169. DRAM: 3.9 GiB
  170. MMC: mmc@ee100000: 0, mmc@ee160000: 1
  171. Loading Environment from MMC... OK
  172. In: serial@e6e88000
  173. Out: serial@e6e88000
  174. Err: serial@e6e88000
  175. Net: eth0: ethernet@e6800000
  176. Hit any key to stop autoboot: 0
  177. =>