README.uniphier 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. U-Boot for UniPhier SoC family
  2. ==============================
  3. Recommended toolchains
  4. ----------------------
  5. The UniPhier platform is well tested with Linaro toolchains.
  6. You can download pre-built toolchains from:
  7. http://www.linaro.org/downloads/
  8. Compile the source
  9. ------------------
  10. The source can be configured and built with the following commands:
  11. $ make <defconfig>
  12. $ make CROSS_COMPILE=<toolchain-prefix> DEVICE_TREE=<device-tree>
  13. The recommended <toolchain-prefix> is `arm-linux-gnueabihf-` for 32bit SoCs,
  14. `aarch64-linux-gnu-` for 64bit SoCs, but you may wish to change it to use your
  15. favorite compiler.
  16. The following tables show <defconfig> and <device-tree> for each board.
  17. 32bit SoC boards:
  18. Board | <defconfig> | <device-tree>
  19. ---------------|-----------------------------|------------------------------
  20. LD4 reference | uniphier_ld4_sld8_defconfig | uniphier-ld4-ref (default)
  21. sld8 reference | uniphier_ld4_sld8_defconfig | uniphier-sld8-def
  22. Pro4 reference | uniphier_v7_defconfig | uniphier-pro4-ref
  23. Pro4 Ace | uniphier_v7_defconfig | uniphier-pro4-ace
  24. Pro4 Sanji | uniphier_v7_defconfig | uniphier-pro4-sanji
  25. Pro5 4KBOX | uniphier_v7_defconfig | uniphier-pro5-4kbox
  26. PXs2 Gentil | uniphier_v7_defconfig | uniphier-pxs2-gentil
  27. PXs2 Vodka | uniphier_v7_defconfig | uniphier-pxs2-vodka (default)
  28. LD6b reference | uniphier_v7_defconfig | uniphier-ld6b-ref
  29. 64bit SoC boards:
  30. Board | <defconfig> | <device-tree>
  31. ---------------|-----------------------|----------------------------
  32. LD11 reference | uniphier_v8_defconfig | uniphier-ld11-ref
  33. LD11 Global | uniphier_v8_defconfig | uniphier-ld11-global
  34. LD20 reference | uniphier_v8_defconfig | uniphier-ld20-ref (default)
  35. LD20 Global | uniphier_v8_defconfig | uniphier-ld20-global
  36. PXs3 reference | uniphier_v8_defconfig | uniphier-pxs3-ref
  37. For example, to compile the source for PXs2 Vodka board, run the following:
  38. $ make uniphier_v7_defconfig
  39. $ make CROSS_COMPILE=arm-linux-gnueabihf- DEVICE_TREE=uniphier-pxs2-vodka
  40. The device tree marked as (default) can be omitted. `uniphier-pxs2-vodka` is
  41. the default device tree for the configuration `uniphier_v7_defconfig`, so the
  42. following gives the same result.
  43. $ make uniphier_v7_defconfig
  44. $ make CROSS_COMPILE=arm-linux-gnueabihf-
  45. Booting 32bit SoC boards
  46. ------------------------
  47. The build command will generate the following:
  48. - u-boot.bin
  49. - spl/u-boot.bin
  50. U-Boot can boot UniPhier 32bit SoC boards by itself. Flash the generated images
  51. to the storage device (NAND or eMMC) on your board.
  52. - spl/u-boot-spl.bin at the offset address 0x00000000
  53. - u-boot.bin at the offset address 0x00020000
  54. The `u-boot-with-spl.bin` is the concatenation of the two (with appropriate
  55. padding), so you can also do:
  56. - u-boot-with-spl.bin at the offset address 0x00000000
  57. If a TFTP server is available, the images can be easily updated.
  58. Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
  59. and run the following command at the U-Boot command line:
  60. To update the images in NAND:
  61. => run nandupdate
  62. To update the images in eMMC:
  63. => run emmcupdate
  64. Booting 64bit SoC boards
  65. ------------------------
  66. The build command will generate the following:
  67. - u-boot.bin
  68. However, U-Boot is not the first stage loader for UniPhier 64bit SoC boards.
  69. U-Boot serves as a non-secure boot loader loaded by [ARM Trusted Firmware],
  70. so you need to provide the `u-boot.bin` to the build command of ARM Trusted
  71. Firmware.
  72. [ARM Trusted Firmware]: https://github.com/ARM-software/arm-trusted-firmware
  73. UniPhier specific commands
  74. --------------------------
  75. - pinmon (enabled by CONFIG_CMD_PINMON)
  76. shows the boot mode pins that has been latched at the power-on reset
  77. - ddrphy (enabled by CONFIG_CMD_DDRPHY_DUMP)
  78. shows the DDR PHY parameters set by the PHY training
  79. - ddrmphy (enabled by CONFIG_CMD_DDRMPHY_DUMP)
  80. shows the DDR Multi PHY parameters set by the PHY training
  81. Supported devices
  82. -----------------
  83. - UART (on-chip)
  84. - NAND
  85. - SD/eMMC
  86. - USB 2.0 (EHCI)
  87. - USB 3.0 (xHCI)
  88. - GPIO
  89. - LAN (on-board SMSC9118)
  90. - I2C
  91. - EEPROM (connected to the on-board I2C bus)
  92. - Support card (SRAM, NOR flash, some peripherals)
  93. Micro Support Card
  94. ------------------
  95. The recommended bit switch settings are as follows:
  96. SW2 OFF(1)/ON(0) Description
  97. ------------------------------------------
  98. bit 1 <---- BKSZ[0]
  99. bit 2 ----> BKSZ[1]
  100. bit 3 <---- SoC Bus Width 16/32
  101. bit 4 <---- SERIAL_SEL[0]
  102. bit 5 ----> SERIAL_SEL[1]
  103. bit 6 ----> BOOTSWAP_EN
  104. bit 7 <---- CS1/CS5
  105. bit 8 <---- SOC_SERIAL_DISABLE
  106. SW8 OFF(1)/ON(0) Description
  107. ------------------------------------------
  108. bit 1 <---- CS1_SPLIT
  109. bit 2 <---- CASE9_ON
  110. bit 3 <---- CASE10_ON
  111. bit 4 Don't Care Reserve
  112. bit 5 Don't Care Reserve
  113. bit 6 Don't Care Reserve
  114. bit 7 ----> BURST_EN
  115. bit 8 ----> FLASHBUS32_16
  116. The BKSZ[1:0] specifies the address range of memory slot and peripherals
  117. as follows:
  118. BKSZ Description RAM slot Peripherals
  119. --------------------------------------------------------------------
  120. 0b00 15MB RAM / 1MB Peri 00000000-00efffff 00f00000-00ffffff
  121. 0b01 31MB RAM / 1MB Peri 00000000-01efffff 01f00000-01ffffff
  122. 0b10 64MB RAM / 1MB Peri 00000000-03efffff 03f00000-03ffffff
  123. 0b11 127MB RAM / 1MB Peri 00000000-07efffff 07f00000-07ffffff
  124. Set BSKZ[1:0] to 0b01 for U-Boot.
  125. This mode is the most handy because EA[24] is always supported by the save pin
  126. mode of the system bus. On the other hand, EA[25] is not supported for some
  127. newer SoCs. Even if it is, EA[25] is not connected on most of the boards.
  128. --
  129. Masahiro Yamada <yamada.masahiro@socionext.com>
  130. Sep. 2017