Commit Graph

49458 Commits

Author SHA1 Message Date
Joseph Chen c6666740ee common: android/rkimg: remove/clean android a/b (slot) code
- the partition disk layer takes over the responsibility of slot suffix
  appending, we remove relative code to make file clean;
- put android a/b code together and name them to be eary understood,
  this makes file esay to read.

Change-Id: Id8c838da682ce6098bd7192d7d7c64269f4e86ba
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 15:43:46 +08:00
Joseph Chen f2b98302da rockchip: resource: remove android a/b slot append
The partition disk layer takes over the responsibility of
slot suffix appending.

Change-Id: Ia02f5b8635676d49ec60eec7d3930740f2ba5ee4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 15:43:46 +08:00
Joseph Chen bd4d909bda disk: part: auto append android a/b slot suffix when query partition
This patch takes over the responsibility of slot suffix appending from
developer to framework on querying partition, it makes slot suffix
invisible for developers.

Change-Id: I33e1e8f6611232c4797d68b7b844a70db88a3eb8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 15:43:46 +08:00
Joseph Chen eb89f0a81d lib: avb: add partition slot append interface
Dump current slot information is helpful.

Change-Id: I872c29b9a67860703951a4e88e9549be17b94eed
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 15:43:46 +08:00
Joseph Chen 0ed06f16e2 rockchip: support boot from U-disk
- The U-disk boot is only supported from U-Boot, the earlier preloader
  doesn't support it;
- MMC1(SD) has higher priority than U-disk;
- Always boot into recovery mode and deliver "usbfwupdate" to cmdline;
- Usb driver may depend on clock/regulator init, so behind of them;
- Suggest to add ./dts/kern.dtb file to promise the kernel dtb always
  to be loaded successfully even the native images are all damaged.

Change-Id: Ibbb2a061a727752277ac1b80abf362de5d94cca2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 14:53:45 +08:00
Joseph Chen 01f0422dca common: bootm: skip usb_stop() if usb is boot device
We may access usb at late sequence.

Change-Id: I8e8b40fc7e1018fe279f384282481805bceb5daa
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 14:53:45 +08:00
Joseph Chen 5704c899ed fdtdec: support pack "kern.dtb" to the end of u-boot.bin
- It provides a way to promise kernel dtb can be loaded successfully
  even when the image is damaged.
- This makes developers easily to add what they what just like a "U-Boot" dtb.
- The kern.dtb file is pack into the end of u-boot.bin while ./dts/kern.dtb
  is exist.

Change-Id: I93a36a9c65ea8719e5610cdcbcc7708e5337c53f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 14:53:45 +08:00
Joseph Chen 6069a2cc24 rockchip: resource: fix/optimise some code logic
- alloc sysmem after load kernel dtb successfully;
- allow distro kernel dtb to be loaded later than other
  resource file, that is not controlled by code condition
  "if (list_empty(&entrys_head))".

Change-Id: If1657289a4f8980ad7d7a5df7da0e061aab21504
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 14:53:45 +08:00
Joseph Chen bcf005ba08 lib: sysmem: no need to increase alloc size when base is 0
Change-Id: Ia716956e1a0e980330d6a7f7eb6c89f91e133ddf
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 10:23:52 +08:00
Joseph Chen 3ceae1099b rockchip: param: fix get usable size error
fixes: (ced10db rockchip: param: add SDRAM_MAX_SIZE as ram top limit)

Change-Id: I9b27570116d931be484548c440df30f5026de1bd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-04 10:23:52 +08:00
Joseph Chen d65bf0c630 lib: sysmem: fix alloc failed at 0x0 address
The 0x0 address is usually allocated by 32-bit uncompressed kernel
and this alloc action is just a peek. Due to LMB core doesn't support
alloc at 0x0 address, we have to alloc the memblk backword a few bytes.

This patch is mainly to avoid fail message from sysmem/LMB.

Change-Id: I894ae2252a30a7690d10899484266191dfb12d15
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-31 16:39:43 +08:00
Joseph Chen ced10dbe1c rockchip: param: add SDRAM_MAX_SIZE as ram top limit
This patch handles the boot fail for RK3288 4GB machine.

Change-Id: I2be6e532120595a6c10e9e99a779d9ec32f48fb5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-31 16:39:42 +08:00
Jason Zhu f3ba630b34 mtd: mtd_blk: fix get: mtd error if device is nand
Change-Id: I1cebba63cbabefa87fd67d98a4d93e151604626d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-30 16:40:28 +08:00
Jason Zhu 4bac908b8b rockchip: spl-boot-order: move rk_nand_init() to the function end
Since the nand driver is not standard dm driver in spl, so move
rk_nand_init() to the function end.

Change-Id: I075a309fa3d2d0b938863cdb1867b70d217f2ce3
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-30 11:56:18 +08:00
Jon Lin 19d68200a9 rkflash: decrece reserved IDBlock from 16 to 8
Change-Id: Ice651f23ad487b6c08aacf73bab9bc7942155928
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-10-29 10:43:02 +08:00
Joseph Chen cd6239260c make.sh: ignore warn/error message of command 'ls'
fix: "ls: cannot access trust*.img: No such file or director".

Change-Id: Iabecb6b751dd3ba3f25fe725dac17cf4b7c39801
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-28 10:34:27 +08:00
Joseph Chen 9b32339749 fastboot: add Android-Q feature support
Add "fasboot getvar is-userspace" support.

The Android-Q document shows "not allow the flashing of dynamic partitions"
is not aimed at the physical partition(call "super") but its child partitions
(i.e. system, vendor, oem...).

Change-Id: I4e21a9728a1093b68a9d1a08420586f33dcf0117
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-28 09:45:19 +08:00
Joseph Chen 8b84e8b629 rockchip: rk3399: correct comment
Change-Id: I98046f1869504c0877e5e344ef121dfde7824227
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-28 09:18:07 +08:00
Jon Lin c84f0ed80a rkflash: uniform code with linux
Uniform loader, u-boot, linux low layer driver code to reduce bug in
the migration process

Change-Id: I618345fdfece2a59437a15cb3bd8d70b7c292abb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-10-24 22:09:37 +08:00
Joseph Chen d935323b7d common: board_info: print "AArch32" cpu mode
Change-Id: I7384f1fd1e8cad69464a3b218d7570e044905daa
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-24 10:52:45 +08:00
Joseph Chen 74ab8aa2e7 arm: lib: interrupt/stacktrace: remove unhelpful message
Update message dump format.

Change-Id: Ieea57283ba21d91ba5172a339450a7aaefa0d1b5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-24 10:52:45 +08:00
Joseph Chen 2a5ad8b355 rockchip: board: treat 'u-boot,dm-spl' as 'u-boot,dm-pre-reloc'
It works when CONFIG_USING_KERNEL_DTB is enabled, because we can
set either 'u-boot,dm-spl' or 'u-boot,dm-pre-reloc' for the node
that we can to leave in the u-boot.dtb.

Change-Id: I682e3900b9bf479f998304737031525004538724
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-24 10:52:45 +08:00
Joseph Chen 930ceb12e0 driver: core/input: treat 'u-boot,dm-spl' as 'u-boot,dm-pre-reloc'
It works when CONFIG_USING_KERNEL_DTB is enabled, because we can
set either 'u-boot,dm-spl' or 'u-boot,dm-pre-reloc' for the node
that we can to leave in the u-boot.dtb.

Change-Id: Id3cec0c64ee55ca9bc1e5871e7ad5a2ebb4b1b6a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-24 10:52:45 +08:00
Joseph Chen f988e29580 cmd: nvedit: add "env update ..." sub command
It supports to add/append/replace variable(s).

Change-Id: I1219e67e3dc778a634689516503e311d0577f35d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-24 09:12:10 +08:00
Joseph Chen 871b668671 pmic: rk8xx: default disable virq chip by new interface
The irq framework takes over the enable/disable management
for virq chip.

Change-Id: I63202b22b121b4a889d5a408a6a5a8f50a3c24d8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-23 11:25:02 +08:00
Joseph Chen 25c13168fe irq: virq: add parent irq enable/disable management
- disable virq chip by default;
- fix bank->use_count little than 0;

Change-Id: I69aa07cc2924dab40eea6524588869361ad8cf66
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-23 11:12:30 +08:00
Joseph Chen e6c4e3fbd5 disk: efi: ignore error message when signature is 0
Since the patch "3bdef7e gpt: return 1 directly when test the mbr sector"
always treats partition type as GPT, the error message is always printed
which may make developers miss understand.

Change-Id: I8be6cf5027ff4b61549b83132492d41d2b352ecd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-22 16:42:22 +08:00
Joseph Chen 3cc97df118 scripts: add unpack_resource.sh
Change-Id: Ie4422bfc36fb7a4c40adfbe1104d04fbd0d7d22a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-22 16:42:22 +08:00
Tony Xu 86574b32ce common: write_keybox: support write keybox by RKDevInfoWriteTool
Change-Id: I853663623f4550469b676239c44586e5efb6b21f
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-10-22 14:48:33 +08:00
Dayao Ji 5bc73b33ae common: android: add androidboot.dtbo_idx to cmdline
fix following vts issue:
0 == 0 Kernel command line missing androidboot.dtbo_idx

Change-Id: Ib2990b5e204d704d895662c60f18e9e0c8a05b25
Signed-off-by: Dayao Ji <jdy@rock-chips.com>
2019-10-22 14:47:59 +08:00
Jian Qiu 4d8bb99d14 configs: rk3126: enable CONFIG_CMD_DTIMG
Change-Id: Ia17bc29999577503220023036738aea07a612dc2
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2019-10-22 09:17:05 +08:00
Jon Lin cb560f1934 mtd: spinand: Fix GD5F1GQ4UExxG flash info table QE bit flag
Change-Id: Id55ae1dad8798e9c607d76831dc3309882227b3e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-10-17 09:32:29 +08:00
Jason Zhu 1d39542f38 mtd: mtd_blk: find the useful lba size
Find the first useful block in the end, and it is the end of
the nand storage.

Change-Id: I83203cbd764b2a6a6baa69694407f75339f176d5
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-17 09:32:29 +08:00
Joseph Chen 535b44c04d cmd: rockusb: forbid to flash mmc 1(sdcard)
Change-Id: I186bfe127e6146aab1df52f8bafb20da9d1647d2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-16 10:01:39 +08:00
Wyon Bi 5e135dc791 configs: rk3368: enable rockchip io domain driver
Change-Id: I65508590bbc78b532b3f968c47b6c861d35c14bc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-15 19:36:44 +08:00
Joseph Chen ca69da8403 make.sh: fix missing create .temp folder after delete
Change-Id: I05ffb3f518a96158bbd0940287d79ce73610b2c4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-15 11:20:15 +08:00
Jason Zhu 160fd5b688 configs: rk1808: support build spl image
Change-Id: Ibb8718c85991e85556b199d6221eb249e0d8e2e4
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-15 08:49:07 +08:00
Jason Zhu b4761549e8 rockchip: rk1808: support spl build
Add some spl configs for spl build.

Change-Id: Idc0d3e89c3ac316a540bd6fc7571b68ee440952c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-15 08:49:07 +08:00
Jason Zhu 3d95740a70 rockchip: rk1808: support spl & tpl build
Change-Id: I6588fcc592d4ce64b8f0f774c7bca4d0a633543d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-10-15 08:49:07 +08:00
Lin Jinhan a13a6cc2f5 clk: rockchip: rk3308: drop CONFIG_SPL_BUILD control rules
Change-Id: Iba8a3cfcf201e10630211b1190bf9e95b04cf475
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-15 08:48:00 +08:00
Lin Jinhan c9d107b5b9 dm: crypto: add TRNG test
Change-Id: Id88d07ff36d20fa19e4be969673f88384f2f658e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-14 20:57:26 +08:00
Lin Jinhan 434d6fd368 crypto: add crypto v2 TRNG support
Change-Id: I25d4e8115e3ab9060d3bc87db06de481e299d6ab
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-14 20:57:26 +08:00
Lin Jinhan 394f2cff98 dts: rk3308: add crypto node
Change-Id: I36fe3bf4ad238679f9613520bf5c86ab4766ace0
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-14 20:57:26 +08:00
Lin Jinhan 8132d8af90 crypto: crypto v2: add rk3308 support
current support: px30/rk1808/rk3308

Change-Id: Ic7ae717bcbc6340a50e23051b35dba695f6222bb
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-14 20:57:25 +08:00
Joseph Chen 0afd6c2b71 driver: Makefile: add crypto compile for SPL
Change-Id: I686b223ba6e3cd208af2e6663fdf5bb2f430a27f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-14 20:57:25 +08:00
Joseph Chen 35ca3e037c cmd: bootrkp: fix always detect sdcard successfully
fixes:(1476830 cmd: bootrkp: clean up code)

Change-Id: I437174085875b70bd72768f900b7c64c33163822
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-14 20:45:38 +08:00
Joseph Chen 7ceab85022 common: fdt_support: add hotkey to dump cmdline
Change-Id: Icb95fc242f9cb5ee33807aac6c25ebe093ba6ecd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-14 20:44:48 +08:00
YouMin Chen 16bd710246 driver: ram: rockchip: rk3328: dram init select common code
Change-Id: Ifa9561942a631ec5feed75e558a0cbe5e20673af
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-10-10 11:55:22 +08:00
YouMin Chen bbf5a1e483 driver: ram: rockchip: dram common code add RK3328 driver
Change-Id: I956f9eb01ce3fc393901aab6bf1a40931114b1b0
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-10-10 11:55:22 +08:00
YouMin Chen 5e6e8f2deb driver: ram: rockchip: modify sdram common driver
Remove the config about SDRAM_COMMON_CAP_DETECT,SDRAM_COMMON_OSREG,
SDRAM_COMMON_MSCH_RK3399 and SDRAM_COMMON_MSCH_PX30.

Change-Id: I17f2bdae585454a1d869ae9d967843d1d169381f
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-10-10 11:55:22 +08:00