Commit Graph

50450 Commits

Author SHA1 Message Date
Jason Zhu 4736384cd0 spl: Kconfig: add SPL_AB depends on SPL_EFI_PARTITION
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id4500ae748f965235aac278baee07f278d88d70a
2020-04-27 14:32:51 +08:00
Jon Lin bdf7b34b60 mtd: nand: Fix memory allocation in nanddev_bbt_init()
Fix the size of the buffer allocated to store the in-memory BBT.
This bug was previously hidden by a different bug, that was fixed in
commit e4fd10db8b8 ("mtd: nand: Fix nanddev_neraseblocks()").

Fixes: ed99f7731 ("mtd: nand: Add core infrastructure to deal with NAND devices")
Change-Id: I365fdfe053ef352661a832b33a232cbb18e81be6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-27 14:31:17 +08:00
Jon Lin 85c83705f8 mtd: nand: Fix nanddev_neraseblocks()
nanddev_neraseblocks() currently returns the number pages per LUN
instead of the total number of eraseblocks.

Change-Id: Id5ec7cd7170dae28acbfa568941ffea8e8907361
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-27 14:31:17 +08:00
Joseph Chen 9b31ae46e2 rockchip: dts: rk3399pro-npu: remove ramdisk-ro node
This device is decleared by U_BOOT_DEVICE().

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3e4c64e8fa0baad7d3770b98a96d3c5c787ea6b2
2020-04-26 15:23:08 +08:00
Joseph Chen a527a681cb rk1808: remove rkimg_bootdev
It's defined in rockchip-common.h now.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9e29b309f22a0a8d97a6b6111b59f594708280f8
2020-04-26 15:14:36 +08:00
Joseph Chen 8e2870c0cf rockchip: common: add rkimg_bootdev for dm ramdisk
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iea6b8cdd7c629be136e83de8e9626394a85b410d
2020-04-26 15:14:36 +08:00
Joseph Chen 5d45852261 ram: ramdisk_ro: add u-boot device definition
In order not to add the device info in dts.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I334c2c99a71476545f311d26b32d7954ca8d8dfd
2020-04-26 15:14:11 +08:00
Joseph Chen aedeb70ba0 ram: Kconfig: RAMDISK_RO requires rkparam partition
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I166450ab0d406d2a452afb137c57511def54760c
2020-04-26 15:13:44 +08:00
Jason Zhu 00c95c4989 rockchip: spl: implement fit_board_verify_required_sigs()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I5dbebf21a8c3ae76550fec7262bee66c256b5682
2020-04-26 09:15:15 +08:00
zain wang 4d06e4de74 tools: trust_merger: copy ImageSize from Component to ComponentData
rk3399_miniloader_v1.25 read ImageSize from ComponentData first now.
So copy ImageSize to ComponentData (named LoadSize).

For other chips, ComponentDate->LoadSize is reserved area, it no
inflence on other chips.

Signed-off-by: zain wang <wzz@rock-chips.com>
Change-Id: I51468aa3fad90d8999c1943ab9c720f7c90cefc1
2020-04-26 09:15:15 +08:00
Jon Lin 19a7802737 mtd: mtd_blk: skip bad block if mtd map isn't initiated
Change-Id: I3a2b5d311b43cc82135ecd84956e7a365c5910db
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-26 09:15:15 +08:00
Jason Zhu a5373663e8 rockchip: spl: implement fit_board_verify_required_sigs()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I5dbebf21a8c3ae76550fec7262bee66c256b5682
2020-04-24 16:04:50 +08:00
zain wang 5033bc62fe tools: trust_merger: copy ImageSize from Component to ComponentData
rk3399_miniloader_v1.25 read ImageSize from ComponentData first now.
So copy ImageSize to ComponentData (named LoadSize).

For other chips, ComponentDate->LoadSize is reserved area, it no
inflence on other chips.

Signed-off-by: zain wang <wzz@rock-chips.com>
Change-Id: I51468aa3fad90d8999c1943ab9c720f7c90cefc1
2020-04-24 14:54:31 +08:00
Jon Lin d629023889 mtd: mtd_blk: skip bad block if mtd map isn't initiated
Change-Id: I3a2b5d311b43cc82135ecd84956e7a365c5910db
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-24 14:34:59 +08:00
Joseph Chen a46b05016b scripts: add uimage pack script
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id1570789d84f8aba3a6b857e92cc2941e640aaa4
2020-04-24 10:23:26 +08:00
Joseph Chen 0fb435fa05 scripts: fit-unpack: add hash verify
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I11982ee2e6fb09f5c0007334832d7decb6025756
2020-04-24 10:23:25 +08:00
Jon Lin 1f21bf610b mtd: mtd_blk: add flash map block management
1.SPI Nand MTD partition bad block will not be detected if the address
isn't begin with the partition first block.
2.To avoid this problem, we should use map partition block address to
get right data.
3.It's compatible if the map table isn't initialed.

Change-Id: I11858b9b30a8fffecdbad804b1bad7b247b51d23
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-24 10:23:25 +08:00
Jason Zhu 94b85d035d misc: otp: use buffer to store capability
ioctl() should return error code but not data.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica1242619ed59728acbeda7db493e5710f410a17
2020-04-24 10:23:25 +08:00
Joseph Chen 7be2247563 Merge branch 'next-dev' into thunder-boot 2020-04-23 20:16:25 +08:00
Joseph Chen c891a1cd82 scripts: add uimage pack script
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id1570789d84f8aba3a6b857e92cc2941e640aaa4
2020-04-23 20:11:13 +08:00
Joseph Chen 72a681d490 scripts: fit-unpack: add hash verify
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I11982ee2e6fb09f5c0007334832d7decb6025756
2020-04-23 20:11:13 +08:00
Jon Lin 0d7422431a mtd: mtd_blk: add flash map block management
1.SPI Nand MTD partition bad block will not be detected if the address
isn't begin with the partition first block.
2.To avoid this problem, we should use map partition block address to
get right data.
3.It's compatible if the map table isn't initialed.

Change-Id: I11858b9b30a8fffecdbad804b1bad7b247b51d23
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-23 20:00:40 +08:00
Jason Zhu f394ba0e85 misc: otp: use buffer to store capability
ioctl() should return error code but not data.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica1242619ed59728acbeda7db493e5710f410a17
2020-04-23 16:53:24 +08:00
Joseph Chen 2bc8e1106f Merge branch 'next-dev' into thunder-boot 2020-04-23 16:43:12 +08:00
Jason Zhu 5c8c82be5c arm: shield executing arm_init_before_mmu in spl
The device do not initialize the cache and mmu in bootrom and ddr,
so the spl do not need to clear the cache and disable mmu in function
arm_init_before_mmu.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: If7b19fa762c4803dcfc58c7b16fd8236a2262729
2020-04-23 16:39:07 +08:00
Joseph Chen dc33c23192 misc: rockchip_decompress: use buffer to store capability
ioctl() should return error code but not data.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I66eaefc64a20303400b730cc46f3814a9f050cf0
2020-04-23 16:17:06 +08:00
Joseph Chen 40f8ee7a99 misc: rockchip-efuse: implement IOCTL_REQ_CAPABILITY of ioctl()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8ae7b1bad8a892173bee442e1163cb5872b169e5
2020-04-23 16:17:06 +08:00
Joseph Chen 374c241cf9 misc: add a common api to get device by capability
fix: ioctl() should return error code but not capability.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8030a1842692697f32f87e765ce3d68d1adb1c11
2020-04-23 16:17:06 +08:00
Joseph Chen 1cef1b20c4 dm: misc: merge generic header file into misc.h
Puting the generic function declaration together that the
caller don't need care too much about different header file.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib37d1550e5a747d8f18e30c428ea8f613f9cc006
2020-04-23 16:17:06 +08:00
Jason Zhu ebe6646df9 configs: rv1126: support nand & spi nand
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I45b37b82fe50507f4b242ae3f768546678910e8f
2020-04-23 14:11:18 +08:00
Joseph Chen fd85085a4b Merge branch 'next-dev' into thunder-boot 2020-04-23 14:13:56 +08:00
Jason Zhu 14be0258b5 rockchip: spl-boot-order: adjust nand flash dectecting strategy
Now the nand device is attached to mtd block, so change its dectecting
strategy.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I7b5063ad1d1ba2d8305c84e4d67e09932b30574b
2020-04-23 12:56:18 +08:00
Lei Chen f21c060e4b driver: input: update RK remote control driver
This patch updates the RC driver to accommodate the new framework

Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I3ff2b5844ce5f1776ac2f94b3cbd42eb5d73cc41
2020-04-23 10:23:19 +08:00
Yifeng Zhao 6baa281141 rockchip: dts: rv1126: nand fix reg address
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I712862224d9650d0313a76b36af6549388e16f25
2020-04-23 10:22:34 +08:00
Jon Lin f3a2c32e2d rkflash: enable reinit SNOR from snor flash packet
Change-Id: I21fa94d1ded675323a02c8a8d7073b31290bc7c7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-23 10:19:50 +08:00
Jon Lin 9371a438f4 rkflash: support SNOR reinit from snor flash packet
That snor_info_packet is SPI Nor information placed in IDB header
area, each progress can parse it to get flash information.

Change-Id: I63621a5b92c2fb85b588365d9415fbb40eece8a3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-23 10:19:50 +08:00
Joseph Chen 710cfa3daa Merge branch 'next-dev' into thunder-boot 2020-04-22 18:15:33 +08:00
Yifeng Zhao e65bf00a8c spl: drivers: mtd: nand: raw: switch to the device model
Switch to the device model and support mtd.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Idfb60cec7a375254a423677b1c3f1da4be954eb5
2020-04-22 18:10:49 +08:00
Jason Zhu 6a8fa29e04 misc: otp: realize otp interface layer function
Realize otp read & write functions for application layer calling.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ic8f698b36fce4c1c6cd7a2848afd370567b43448
2020-04-22 18:08:19 +08:00
Jason Zhu f9519410b1 misc: otp: support rockchip secure otp version 2 driver
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I10a8cc92f2130c1f1957fd36fb924d9846707e65
2020-04-22 18:08:19 +08:00
Jason Zhu 5b7d32987c drivers: misc: use misc_mode to distinguish different device
The misc attach different device. We use the misc_mode to show
different device's capability.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibce5bb0465e452a7e783c5859f1e8ab2bfd8b0c5
2020-04-22 18:08:19 +08:00
Joseph Chen 2ca0cbb64a dm: sysreset: disable psci sysreset for SPL and TPL
SPL is the stage early than atf/op-tee that psci sysreset
is not supported.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I46b988b3776638265bf8f374a10f9027d1ebc90f
2020-04-22 18:07:21 +08:00
Joseph Chen 92916bd121 Merge branch 'next-dev' into thunder-boot 2020-04-22 12:56:53 +08:00
Jason Zhu cead3ab891 rockchip: spl: support spl_hang_reset
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I2be2671c7b1848d8d1af654319c4e7a518b484eb
2020-04-21 20:20:53 +08:00
Jason Zhu e663d2b596 lib: hang: reset the device if hang in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica9426db31809dc316ef0cad3e4b2c0ff7985632
2020-04-21 20:04:22 +08:00
Joseph Chen 346c39b341 rockchip: board: implement fit_board_verify_required_sigs()
Get otp/efuse key status by optee client.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I820d387558fb50221d4025cab9c10168024558f7
2020-04-21 16:19:58 +08:00
Joseph Chen 90b678f6a0 cmd: charge: clean code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ief810522d1bd55eccce6d096d3a945fac61fa00a
2020-04-21 16:19:25 +08:00
Joseph Chen 98894c7310 Merge branch 'next-dev' into thunder-boot 2020-04-21 16:19:07 +08:00
Joseph Chen 52387546ad rockchip: spl: read key without depending on CONFIG_DM_KEY
Key read can be access with key uclass or a tiny key read interface,
such as CONFIG_SPL_ADC_KEY.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic1abdee3f778fd1d0d57ab270d5cead81a580fa9
2020-04-21 16:15:22 +08:00
Joseph Chen abedddcfae input: add spl adc key driver
Providing a mininum adc key driver for SPL, which does not
depend on key uclass, but ADC uclass is still required.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I80f861780acd9c47d345b95762a4dd39d19ea6fc
2020-04-21 16:15:22 +08:00