README.rockchip 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. # SPDX-License-Identifier: GPL-2.0+
  2. #
  3. # Copyright (C) 2015 Google. Inc
  4. # Written by Simon Glass <sjg@chromium.org>
  5. U-Boot on Rockchip
  6. ==================
  7. A wide range of Rockchip SoCs are supported in mainline U-Boot
  8. Prerequisites
  9. =============
  10. You will need:
  11. - Firefly RK3288 board or something else with a supported RockChip SoC
  12. - Power connection to 5V using the supplied micro-USB power cable
  13. - Separate USB serial cable attached to your computer and the Firefly
  14. (connect to the micro-USB connector below the logo)
  15. - rkflashtool [3]
  16. - openssl (sudo apt-get install openssl)
  17. - Serial UART connection [4]
  18. - Suitable ARM cross compiler, e.g.:
  19. sudo apt-get install gcc-4.7-arm-linux-gnueabi
  20. Building
  21. ========
  22. At present 12 RK3288 boards are supported:
  23. - EVB RK3288 - use evb-rk3288 configuration
  24. - Fennec RK3288 - use fennec-rk3288 configuration
  25. - Firefly RK3288 - use firefly-rk3288 configuration
  26. - Hisense Chromebook - use chromebook_jerry configuration
  27. - Asus C100P Chromebook - use chromebook_minnie configuration
  28. - Asus Chromebit - use chromebook_mickey configuration
  29. - MiQi RK3288 - use miqi-rk3288 configuration
  30. - phyCORE-RK3288 RDK - use phycore-rk3288 configuration
  31. - PopMetal RK3288 - use popmetal-rk3288 configuration
  32. - Radxa Rock 2 - use rock2 configuration
  33. - Tinker RK3288 - use tinker-rk3288 configuration
  34. - Vyasa RK3288 - use vyasa-rk3288 configuration
  35. Two RK3036 boards are supported:
  36. - EVB RK3036 - use evb-rk3036 configuration
  37. - Kylin - use kylin_rk3036 configuration
  38. One RK3328 board is supported:
  39. - EVB RK3328
  40. Size RK3399 boards are supported (aarch64):
  41. - EBV RK3399 - use evb_rk3399 configuration
  42. - Firefly RK3399 - use the firefly_rk3399 configuration
  43. - Puma - use puma_rk3399 configuration
  44. - Ficus - use ficus-rk3399 configuration
  45. - Rock960 (Vamrs) - use rock960-rk3399 configuration
  46. - Bob - use chromebook_bob configuration
  47. Four RK3368 boards are supported:
  48. - Sheep - use sheep-rk3368 configuration
  49. - Lion - use lion-rk3368 configuration
  50. - Geekbox - use geekbox configuration
  51. - EVB PX5 - use evb-px5 configuration
  52. One RK3128 board is supported:
  53. - EVB RK3128 - use evb-rk3128 configuration
  54. One RK3229 board is supported:
  55. - EVB RK3229 - use evb-rk3229 configuration
  56. Two RV1108 boards are supported:
  57. - EVB RV1108 - use evb-rv1108 configuration
  58. - Elgin R1 - use elgin-rv1108 configuration
  59. One RV3188 baord is supported:
  60. - Raxda Rock - use rock configuration
  61. For example:
  62. 1. To build RK3288 board:
  63. CROSS_COMPILE=arm-linux-gnueabi- make O=firefly firefly-rk3288_defconfig all
  64. (or you can use another cross compiler if you prefer)
  65. 2. To build RK3399 board:
  66. Option 1: Package the image with Rockchip miniloader:
  67. - Compile U-Boot
  68. => cd /path/to/u-boot
  69. => make nanopi-neo4-rk3399_defconfig
  70. => make
  71. => make u-boot.itb
  72. - Get the rkbin
  73. => git clone https://github.com/rockchip-linux/rkbin.git
  74. - Create trust.img
  75. => cd /path/to/rkbin
  76. => ./tools/trust_merger RKTRUST/RK3399TRUST.ini
  77. - Create uboot.img
  78. => cd /path/to/rkbin
  79. => ./tools/loaderimage --pack --uboot /path/to/u-boot/u-boot-dtb.bin uboot.img
  80. (Get trust.img and uboot.img)
  81. Option 2: Package the image with SPL:
  82. - We need the Python elftools.elf.elffile library for make_fit_atf.py to work
  83. => sudo apt-get install python-pyelftools
  84. - Export cross compiler path for aarch64
  85. - Compile ATF
  86. For Puma board.
  87. => git clone git://git.theobroma-systems.com/arm-trusted-firmware.git
  88. => cd arm-trusted-firmware
  89. => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
  90. (copy bl31.bin into U-Boot root dir)
  91. => cp build/rk3399/release/bl31/bl31.bin /path/to/u-boot/bl31-rk3399.bin
  92. For rest of rk3399 boards.
  93. => git clone https://github.com/ARM-software/arm-trusted-firmware.git
  94. => cd arm-trusted-firmware
  95. (export cross compiler path for Cortex-M0 MCU likely arm-none-eabi-)
  96. => make realclean
  97. => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
  98. (copy bl31.elf into U-Boot root dir)
  99. => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot
  100. - Compile PMU M0 firmware
  101. This is optional for most of the rk3399 boards and required only for Puma board.
  102. => git clone git://git.theobroma-systems.com/rk3399-cortex-m0.git
  103. => cd rk3399-cortex-m0
  104. (export cross compiler path for Cortex-M0 PMU)
  105. => make CROSS_COMPILE=arm-cortex_m0-eabi-
  106. (copy rk3399m0.bin into U-Boot root dir)
  107. => cp rk3399m0.bin /path/to/u-boot
  108. - Compile U-Boot
  109. => cd /path/to/u-boot
  110. => make orangepi-rk3399_defconfig
  111. => make
  112. => make u-boot.itb
  113. (Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get
  114. spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL)
  115. Writing to the board with USB
  116. =============================
  117. For USB to work you must get your board into ROM boot mode, either by erasing
  118. your MMC or (perhaps) holding the recovery button when you boot the board.
  119. To erase your MMC, you can boot into Linux and type (as root)
  120. dd if=/dev/zero of=/dev/mmcblk0 bs=1M
  121. Connect your board's OTG port to your computer.
  122. To create a suitable image and write it to the board:
  123. ./firefly-rk3288/tools/mkimage -n rk3288 -T rkimage -d \
  124. ./firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
  125. cat out | openssl rc4 -K 7c4e0304550509072d2c7b38170d1711 | rkflashtool l
  126. If all goes well you should something like:
  127. U-Boot SPL 2015.07-rc1-00383-ge345740-dirty (Jun 03 2015 - 10:06:49)
  128. Card did not respond to voltage select!
  129. spl: mmc init failed with error: -17
  130. ### ERROR ### Please RESET the board ###
  131. You will need to reset the board before each time you try. Yes, that's all
  132. it does so far. If support for the Rockchip USB protocol or DFU were added
  133. in SPL then we could in principle load U-Boot and boot to a prompt from USB
  134. as several other platforms do. However it does not seem to be possible to
  135. use the existing boot ROM code from SPL.
  136. Booting from an SD card
  137. =======================
  138. To write an image that boots from an SD card (assumed to be /dev/sdc):
  139. ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
  140. firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
  141. sudo dd if=out of=/dev/sdc seek=64 && \
  142. sudo dd if=firefly-rk3288/u-boot-dtb.img of=/dev/sdc seek=16384
  143. This puts the Rockchip header and SPL image first and then places the U-Boot
  144. image at block 16384 (i.e. 8MB from the start of the SD card). This
  145. corresponds with this setting in U-Boot:
  146. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x4000
  147. Put this SD (or micro-SD) card into your board and reset it. You should see
  148. something like:
  149. U-Boot 2016.01-rc2-00309-ge5bad3b-dirty (Jan 02 2016 - 23:41:59 -0700)
  150. Model: Radxa Rock 2 Square
  151. DRAM: 2 GiB
  152. MMC: dwmmc@ff0f0000: 0, dwmmc@ff0c0000: 1
  153. *** Warning - bad CRC, using default environment
  154. In: serial
  155. Out: vop@ff940000.vidconsole
  156. Err: serial
  157. Net: Net Initialization Skipped
  158. No ethernet found.
  159. Hit any key to stop autoboot: 0
  160. =>
  161. The rockchip bootrom can load and boot an initial spl, then continue to
  162. load a second-stage bootloader (ie. U-Boot) as soon as the control is returned
  163. to the bootrom. Both the RK3288 and the RK3036 use this special boot sequence.
  164. The configuration option enabling this is:
  165. CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
  166. You can create the image via the following operations:
  167. ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
  168. firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
  169. cat firefly-rk3288/u-boot-dtb.bin >> out && \
  170. sudo dd if=out of=/dev/sdc seek=64
  171. If you have an HDMI cable attached you should see a video console.
  172. For evb_rk3036 board:
  173. ./evb-rk3036/tools/mkimage -n rk3036 -T rksd -d evb-rk3036/spl/u-boot-spl.bin out && \
  174. cat evb-rk3036/u-boot-dtb.bin >> out && \
  175. sudo dd if=out of=/dev/sdc seek=64
  176. Note: rk3036 SDMMC and debug uart use the same iomux, so if you boot from SD, the
  177. debug uart must be disabled
  178. Booting from an SD card on RK3288 with TPL
  179. ==========================================
  180. Since the size of SPL can't be exceeded 0x8000 bytes in RK3288, it is not possible add
  181. new SPL features like Falcon mode or etc.
  182. So introduce TPL so-that adding new features to SPL is possible because now TPL should
  183. run minimal with code like DDR, clock etc and rest of new features in SPL.
  184. As of now TPL is added on Vyasa-RK3288 board.
  185. To write an image that boots from an SD card (assumed to be /dev/mmcblk0):
  186. ./tools/mkimage -n rk3288 -T rksd -d ./tpl/u-boot-tpl.bin out &&
  187. cat ./spl/u-boot-spl-dtb.bin >> out &&
  188. sudo dd if=out of=/dev/mmcblk0 seek=64 &&
  189. sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 seek=16384
  190. Booting from an SD card on RK3188
  191. =================================
  192. For rk3188 boards the general storage onto the card stays the same as
  193. described above, but the image creation needs a bit more care.
  194. The bootrom of rk3188 expects to find a small 1kb loader which returns
  195. control to the bootrom, after which it will load the real loader, which
  196. can then be up to 29kb in size and does the regular ddr init. This is
  197. handled by a single image (built as the SPL stage) that tests whether
  198. it is handled for the first or second time via code executed from the
  199. boot0-hook.
  200. Additionally the rk3188 requires everything the bootrom loads to be
  201. rc4-encrypted. Except for the very first stage the bootrom always reads
  202. and decodes 2kb pages, so files should be sized accordingly.
  203. # copy tpl, pad to 1020 bytes and append spl
  204. tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out
  205. # truncate, encode and append u-boot.bin
  206. truncate -s %2048 u-boot.bin
  207. cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out
  208. Booting from an SD card on RK3399
  209. =================================
  210. To write an image that boots from an SD card (assumed to be /dev/sdc):
  211. Option 1: Package the image with Rockchip miniloader:
  212. - Create idbloader.img
  213. => cd /path/to/u-boot
  214. => ./tools/mkimage -n rk3399 -T rksd -d /path/to/rkbin/bin/rk33/rk3399_ddr_800MHz_v1.20.bin idbloader.img
  215. => cat /path/to/rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> idbloader.img
  216. - Write idbloader.img at 64 sector
  217. => sudo dd if=idbloader.img of=/dev/sdc seek=64
  218. - Write trust.img at 24576
  219. => sudo dd if=trust.img of=/dev/sdc seek=24576
  220. - Write uboot.img at 16384 sector
  221. => sudo dd if=uboot.img of=/dev/sdc seek=16384
  222. => sync
  223. Put this SD (or micro-SD) card into your board and reset it. You should see
  224. something like:
  225. DDR Version 1.20 20190314
  226. In
  227. Channel 0: DDR3, 933MHz
  228. Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
  229. no stride
  230. ch 0 ddrconfig = 0x101, ddrsize = 0x20
  231. pmugrf_os_reg[2] = 0x10006281, stride = 0x17
  232. OUT
  233. Boot1: 2019-03-14, version: 1.19
  234. CPUId = 0x0
  235. ChipType = 0x10, 239
  236. mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
  237. mmc: ERROR: Card did not respond to voltage select!
  238. emmc reinit
  239. mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
  240. mmc: ERROR: Card did not respond to voltage select!
  241. emmc reinit
  242. mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
  243. mmc: ERROR: Card did not respond to voltage select!
  244. SdmmcInit=2 1
  245. mmc0:cmd5,20
  246. SdmmcInit=0 0
  247. BootCapSize=0
  248. UserCapSize=60543MB
  249. FwPartOffset=2000 , 0
  250. StorageInit ok = 45266
  251. SecureMode = 0
  252. SecureInit read PBA: 0x4
  253. SecureInit read PBA: 0x404
  254. SecureInit read PBA: 0x804
  255. SecureInit read PBA: 0xc04
  256. SecureInit read PBA: 0x1004
  257. SecureInit read PBA: 0x1404
  258. SecureInit read PBA: 0x1804
  259. SecureInit read PBA: 0x1c04
  260. SecureInit ret = 0, SecureMode = 0
  261. atags_set_bootdev: ret:(0)
  262. GPT 0x3380ec0 signature is wrong
  263. recovery gpt...
  264. GPT 0x3380ec0 signature is wrong
  265. recovery gpt fail!
  266. LoadTrust Addr:0x4000
  267. No find bl30.bin
  268. Load uboot, ReadLba = 2000
  269. hdr 0000000003380880 + 0x0:0x88,0x41,0x3e,0x97,0xe6,0x61,0x54,0x23,0xe9,0x5a,0xd1,0x2b,0xdc,0x2f,0xf9,0x35,
  270. Load OK, addr=0x200000, size=0x9c9c0
  271. RunBL31 0x10000
  272. NOTICE: BL31: v1.3(debug):370ab80
  273. NOTICE: BL31: Built : 09:23:41, Mar 4 2019
  274. NOTICE: BL31: Rockchip release version: v1.1
  275. INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
  276. INFO: Using opteed sec cpu_context!
  277. INFO: boot cpu mask: 0
  278. INFO: plat_rockchip_pmu_init(1181): pd status 3e
  279. INFO: BL31: Initializing runtime services
  280. INFO: BL31: Initializing BL32
  281. INF [0x0] TEE-CORE:init_primary_helper:337: Initializing (1.1.0-195-g8f090d20 #6 Fri Dec 7 06:11:20 UTC 2018 aarch64)
  282. INF [0x0] TEE-CORE:init_primary_helper:338: Release version: 1.2
  283. INF [0x0] TEE-CORE:init_teecore:83: teecore inits done
  284. INFO: BL31: Preparing for EL3 exit to normal world
  285. INFO: Entry point address = 0x200000
  286. INFO: SPSR = 0x3c9
  287. U-Boot 2019.04-rc4-00136-gfd121f9641-dirty (Apr 16 2019 - 14:02:47 +0530)
  288. Model: FriendlyARM NanoPi NEO4
  289. DRAM: 1022 MiB
  290. MMC: dwmmc@fe310000: 2, dwmmc@fe320000: 1, sdhci@fe330000: 0
  291. Loading Environment from MMC... *** Warning - bad CRC, using default environment
  292. In: serial@ff1a0000
  293. Out: serial@ff1a0000
  294. Err: serial@ff1a0000
  295. Model: FriendlyARM NanoPi NEO4
  296. Net: eth0: ethernet@fe300000
  297. Hit any key to stop autoboot: 0
  298. =>
  299. Option 2: Package the image with SPL:
  300. - Prefix rk3399 header to SPL image
  301. => cd /path/to/u-boot
  302. => ./tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl-dtb.bin out
  303. - Write prefixed SPL at 64th sector
  304. => sudo dd if=out of=/dev/sdc seek=64
  305. - Write U-Boot proper at 16384 sector
  306. => sudo dd if=u-boot.itb of=/dev/sdc seek=16384
  307. => sync
  308. Put this SD (or micro-SD) card into your board and reset it. You should see
  309. something like:
  310. U-Boot SPL board init
  311. Trying to boot from MMC1
  312. U-Boot 2019.01-00004-g14db5ee998 (Mar 11 2019 - 13:18:41 +0530)
  313. Model: Orange Pi RK3399 Board
  314. DRAM: 2 GiB
  315. MMC: dwmmc@fe310000: 2, dwmmc@fe320000: 1, sdhci@fe330000: 0
  316. Loading Environment from MMC... OK
  317. In: serial@ff1a0000
  318. Out: serial@ff1a0000
  319. Err: serial@ff1a0000
  320. Model: Orange Pi RK3399 Board
  321. Net: eth0: ethernet@fe300000
  322. Hit any key to stop autoboot: 0
  323. =>
  324. Using fastboot on rk3288
  325. ========================
  326. - Write GPT partition layout to mmc device which fastboot want to use it to
  327. store the image
  328. => gpt write mmc 1 $partitions
  329. - Invoke fastboot command to prepare
  330. => fastboot 1
  331. - Start fastboot request on PC
  332. fastboot -i 0x2207 flash loader evb-rk3288/spl/u-boot-spl-dtb.bin
  333. You should see something like:
  334. => fastboot 1
  335. WARNING: unknown variable: partition-type:loader
  336. Starting download of 357796 bytes
  337. ..
  338. downloading of 357796 bytes finished
  339. Flashing Raw Image
  340. ........ wrote 357888 bytes to 'loader'
  341. Booting from SPI
  342. ================
  343. To write an image that boots from SPI flash (e.g. for the Haier Chromebook or
  344. Bob):
  345. ./chromebook_jerry/tools/mkimage -n rk3288 -T rkspi \
  346. -d chromebook_jerry/spl/u-boot-spl-dtb.bin spl.bin && \
  347. dd if=spl.bin of=spl-out.bin bs=128K conv=sync && \
  348. cat spl-out.bin chromebook_jerry/u-boot-dtb.img >out.bin && \
  349. dd if=out.bin of=out.bin.pad bs=4M conv=sync
  350. This converts the SPL image to the required SPI format by adding the Rockchip
  351. header and skipping every second 2KB block. Then the U-Boot image is written at
  352. offset 128KB and the whole image is padded to 4MB which is the SPI flash size.
  353. The position of U-Boot is controlled with this setting in U-Boot:
  354. #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
  355. If you have a Dediprog em100pro connected then you can write the image with:
  356. sudo em100 -s -c GD25LQ32 -d out.bin.pad -r
  357. When booting you should see something like:
  358. U-Boot SPL 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32)
  359. U-Boot 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32 -0600)
  360. Model: Google Jerry
  361. DRAM: 2 GiB
  362. MMC:
  363. Using default environment
  364. In: serial@ff690000
  365. Out: serial@ff690000
  366. Err: serial@ff690000
  367. =>
  368. Future work
  369. ===========
  370. Immediate priorities are:
  371. - USB host
  372. - USB device
  373. - Run CPU at full speed (code exists but we only see ~60 DMIPS maximum)
  374. - NAND flash
  375. - Boot U-Boot proper over USB OTG (at present only SPL works)
  376. Development Notes
  377. =================
  378. There are plenty of patches in the links below to help with this work.
  379. [1] https://github.com/rkchrome/uboot.git
  380. [2] https://github.com/linux-rockchip/u-boot-rockchip.git branch u-boot-rk3288
  381. [3] https://github.com/linux-rockchip/rkflashtool.git
  382. [4] http://wiki.t-firefly.com/index.php/Firefly-RK3288/Serial_debug/en
  383. rkimage
  384. -------
  385. rkimage.c produces an SPL image suitable for sending directly to the boot ROM
  386. over USB OTG. This is a very simple format - just the string RK32 (as 4 bytes)
  387. followed by u-boot-spl-dtb.bin.
  388. The boot ROM loads image to 0xff704000 which is in the internal SRAM. The SRAM
  389. starts at 0xff700000 and extends to 0xff718000 where we put the stack.
  390. rksd
  391. ----
  392. rksd.c produces an image consisting of 32KB of empty space, a header and
  393. u-boot-spl-dtb.bin. The header is defined by 'struct header0_info' although
  394. most of the fields are unused by U-Boot. We just need to specify the
  395. signature, a flag and the block offset and size of the SPL image.
  396. The header occupies a single block but we pad it out to 4 blocks. The header
  397. is encoding using RC4 with the key 7c4e0304550509072d2c7b38170d1711. The SPL
  398. image can be encoded too but we don't do that.
  399. The maximum size of u-boot-spl-dtb.bin which the boot ROM will read is 32KB,
  400. or 0x40 blocks. This is a severe and annoying limitation. There may be a way
  401. around this limitation, since there is plenty of SRAM, but at present the
  402. board refuses to boot if this limit is exceeded.
  403. The image produced is padded up to a block boundary (512 bytes). It should be
  404. written to the start of an SD card using dd.
  405. Since this image is set to load U-Boot from the SD card at block offset,
  406. CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR, dd should be used to write
  407. u-boot-dtb.img to the SD card at that offset. See above for instructions.
  408. rkspi
  409. -----
  410. rkspi.c produces an image consisting of a header and u-boot-spl-dtb.bin. The
  411. resulting image is then spread out so that only the first 2KB of each 4KB
  412. sector is used. The header is the same as with rksd and the maximum size is
  413. also 32KB (before spreading). The image should be written to the start of
  414. SPI flash.
  415. See above for instructions on how to write a SPI image.
  416. rkmux.py
  417. --------
  418. You can use this script to create #defines for SoC register access. See the
  419. script for usage.
  420. Device tree and driver model
  421. ----------------------------
  422. Where possible driver model is used to provide a structure to the
  423. functionality. Device tree is used for configuration. However these have an
  424. overhead and in SPL with a 32KB size limit some shortcuts have been taken.
  425. In general all Rockchip drivers should use these features, with SPL-specific
  426. modifications where required.
  427. GPT partition layout
  428. ----------------------------
  429. Rockchip use a unified GPT partition layout in open source support.
  430. With this GPT partition layout, uboot can be compatilbe with other components,
  431. like miniloader, trusted-os, arm-trust-firmware.
  432. There are some documents about partitions in the links below.
  433. http://rockchip.wikidot.com/partitions
  434. --
  435. Jagan Teki <jagan@amarulasolutions.com>
  436. 27 Mar 2019
  437. Simon Glass <sjg@chromium.org>
  438. 24 June 2015