Commit Graph

13428 Commits

Author SHA1 Message Date
Joseph Chen 8e3eb57c1c rockchip: add arm 32/64 its file for verified-boot image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If4d76b8736510ca6455a4b448e9d2ed1be5721fe
2020-03-29 09:57:04 +08:00
Joseph Chen 9889a0e0a7 rockchip: hotkey: update configure name
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie04b4aa61900f11937f93b6a363ad827a8b7dd86
2020-03-28 18:21:16 +08:00
Joseph Chen 4ab50248f6 rockchip: implement autoboot_command_fail_handle()
It's not friendly to handle the fail event in a bootcmd list,
let's handle this in C function.

Entering rockusb/fastboot mode after verified-boot failed.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib617582e1cc386f5c30abe1a8bbd2b5f353c0e49
2020-03-28 18:21:16 +08:00
Joseph Chen 96158db731 arm: rockchip: select CONFIG_PANIC_HANG
Not reset system.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I03b02fa0aada05dcea34a3e4609c68cc1b9cb029
2020-03-28 18:16:08 +08:00
Joseph Chen 4e07096a0b rockchip: fit: reserve LSB as an image identity number
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I917e89793aebc6a411ad7e4678b00e7f7b770e73
2020-03-27 18:08:12 +08:00
Joseph Chen ba2acfb819 rockchip: make_fit_atf.py: update conf@1 descrption and arch
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5eeb1b897508db1073b2ec63b9e28a895c1f417b
2020-03-27 18:08:11 +08:00
Joseph Chen 311b4dd629 rockchip: make_fit_optee.sh: add components for verified boot
Require sha256 and rsa2048 for all images to be signed.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5c74f811fe5c49a2552a5a059c200a0d35f210cb
2020-03-27 18:08:11 +08:00
Joseph Chen a86a723e2e rockchip: uimage: fix alloc and free ramdisk sysmem
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I84d965caff7c0d733792bcf2387d751808991c0d
2020-03-27 16:12:20 +08:00
Joseph Chen ac5d8aa9aa rockchip: board: implement board_do_bootm()
Implement it to support CLI command:
  - Android: bootm [aosp addr]
  - FIT:     bootm [fit addr]
  - uImage:  bootm [uimage addr]

Purpose:
  - The original bootm command args require fdt addr on AOSP,
    which is not flexible on rockchip boot/recovery.img.
  - Take Android/FIT/uImage image into sysmem management to avoid image
    memory overlap.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4ef3f1b0307f2e061105ee29307051202445c9e9
2020-03-19 09:54:27 +08:00
Joseph Chen 85cad72d55 rockchip: board: implement bootm_board_start()
- print console record data;
- disable fdt/ramdisk relocation;

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If8c2008e04c57e0309dbb5d679a21cb7d435d4ff
2020-03-19 09:54:27 +08:00
Joseph Chen c5b2395492 rockchip: support read kernel from fit and uimage
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If77ffadc81bb3a53789d74f3185aa6f1650ee0e7
2020-03-19 09:54:27 +08:00
Joseph Chen 191c6877bc rockchip: add basic uimage code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Idaf6d9e1888fde4e750435a0484636945442cbe2
2020-03-19 09:54:27 +08:00
Joseph Chen 059c50ac0b rockchip: add basic fit image code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic0eaba1b625eba710fd6b30fee4e3545af59cb30
2020-03-19 09:54:27 +08:00
Joseph Chen 45390edfba rockchip: resource: optimise code
- clean init_resource_list();
- support create resource list and read file from memory

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If308c1dc6f43d0250d81cfa6fb0898d59efe8975
2020-03-16 15:03:51 +08:00
Joseph Chen 3fe16d468f arm64: interrupts: show ESR register for SPL
It contains the exception reason.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibcd381979dccb0dd17b5b8899053cb0c5cd22a96
2020-03-16 15:03:50 +08:00
Joseph Chen 53f956c218 rockchip: make_fit_atf.py: add components for verified boot
Require sha256 and rsa2048 for all images to be signed.

Use u-boot.dtb to be included as fdt component since the
u-boot.dtb contains the "/signature" information of U-Boot
proper.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1a3ac5f323730b7ef52afd883110d41179740f4f
2020-03-16 11:42:38 +08:00
Joseph Chen c15f307504 arm: Kconfig: default select SKIP_RELOCATE_UBOOT if !ARM64
Remove select from rockchip Kconfig.

Some 32-bit platforms needs relocation to support non-compressed
kernel image.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0b60b79d7c67c5bd8439bd55bb277522c74a8bdd
2020-03-13 17:35:40 +08:00
Elaine Zhang 904b267d4b clk: rockchip: rk3036: add nandc clk init
Change-Id: I8aefe310a366e346310135f684f3b5db43b0b734
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-11 17:05:17 +08:00
Jon Lin 7196e3306a rockchip: rk3036: enable NANDC
Change-Id: I9ad4dd1497656f41b42907892c17a2bd85eace0c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-02 11:56:08 +08:00
Jon Lin eb45fc5ab7 rockchip: rk3036: add NANDC node
Change-Id: I04c33d238fabeffcf470da71624009313050b904
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-02 11:55:37 +08:00
Joseph Chen 57be1825cb rockchip: clean kernel dtb code to kernel_dtb.c
Since there is a lot of code for kernel dtb feature, let's
move them into a individual file to make board.c clean.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4e01627c265807b1c0e26b432f0b4fc1db0d889e
2020-02-28 12:38:42 +08:00
Joseph Chen bc4ccd5396 rockchip: clean rockchip_read_dtb_file() api to boot_rkimg.c
rockchip_read_dtb_file() is top level api which reads dtb from
resource/fit/uImage/distro image, etc.

only leave code about resource image in resource_img.c.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2157ffc204ebd564aa9171de2b8167fbd6c94bcf
2020-02-28 12:38:42 +08:00
Joseph Chen c01d448924 sysmem: simplify the memblk name
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icfe908ade21d1d8f568db796298f67ba9f013da6
2020-02-28 11:22:04 +08:00
Jean-Jacques Hiblot 94fbbf0f6d UPSTREAM: dm: Add a No-op uclass
This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.

Change-Id: Iad9ba5f368bd2de9940cf069baf9bec9d668920c
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 07e33711fec4f1106f36805b5dc830da07c783c5)
2020-02-27 17:51:21 +08:00
Joseph Chen c6f0e81965 rockchip: board: add env fixup
It was called from set_env_default() which only handles
nowhere env, let's move it to board late to handle all
env types.

Fix fdt address earlier before init kernel dtb.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1e60355eef7897b7e92c7652c60a3c72350e46b0
2020-02-25 14:18:15 +08:00
Jason Zhu 3a07c42d83 rockchip: dts: rk1808: support eMMC hs200
Change-Id: I759d5c711887966e732216719c557da804105c15
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 18:21:03 +08:00
Jason Zhu 36e8ecdb69 rockchip: rk1808: set dram area unsecure in spl
So that the mmc controller can read data to dram since the mmc
controller is unsecure.

Change-Id: Iaf8f5cebeacbc034eb129c6b52a702abdbd7fed3
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 17:27:50 +08:00
Jason Zhu ddd4dd8141 rockchip: dts: rk1808: change necessary nodes's u-boot attribute
Change necessary nodes's "u-boot,dm-pre-reloc" to "u-boot,dm-spl",
so that we generate dtb with the nodes which include "u-boot,dm-spl".

The reducing dtb size fuction is supported by the commit:
1. dts: Makefile: simplify the logic of kernel dtb feature
2. dts: Makefile: support provide a minimum SPL DTB

Change-Id: Ibe43a20b435315349bdc1c45a14cf91cd90ecd89
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 16:35:36 +08:00
Jason Zhu 8956822660 arch: rockchip: support resource file in spl
Change-Id: I00a1d9731554cf401b0a82e6d4f07440af1f554d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu fec9980f93 rockchip: dts: rk1808: add u-boot,spl-boot-order
Change-Id: I783c14843d7aa28bb65100ca0a2903b40c88e9d0
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu 28e9e98a51 clk: rockchip: rk1808: set gpll to 594000000
The eMMC clk is depended on gpll, and the eMMC is needed to run 150MHz
in HS200 mode. So set gpll to 594000000.

Change-Id: Id356c87b1db158a0638e4560e886868f133dfaf9
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu a4933f72a5 rockchip: rk1808: support mmc_gpio_init_direct()
Change-Id: Ib6f5818f3a38c88a38b9a4a9bba0aedd49f0247e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Joseph Chen 2aca71f9d9 rockchip: board: add mmc_dm_reinit() for mmc devices
There maybe something for the mmc devices to do after kernel dtb
dm setup, eg: regain the clock device binding from kernel dtb.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie52edd6a0b4e7f7d54bf5b00d7e97de1f1346230
2020-02-24 11:23:34 +08:00
Joseph Chen a794014552 rockchip: board: rename early_download_init to early_download
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia20430765fe55309650237dc2085d59d9ec41411
2020-02-21 16:55:56 +08:00
Joseph Chen 46f6140176 rockchip: board: move hotkey getc earlier
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5bdf84563f2aae957c707cb12633c4840e58afc0
2020-02-21 16:55:56 +08:00
Joseph Chen b173f38e43 rockchip: hotkey: add fdt dump
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9bb158f13b723decae01069f4324289c599e0e5f
2020-02-21 16:48:48 +08:00
Joseph Chen 9beff1069b rockchip: hotkey: disable interactive events
Allow other debug message hotkey.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If5c82922e1ce66283a00f7e675451b6104a503bc
2020-02-21 16:48:36 +08:00
Joseph Chen aa1eec08bb rockchip: make boot_rkimg.c as basic mandory code
boot_rkimg.c is the basic code for rockchip platforms, such as
get boot devtype, setup download mode and get kernel dtb, etc.

CONFIG_RKIMG_BOOTLOADER actually makes no sense for rockchip
features any more, but we still leave it to compatile code
compilation since there is a lot of code depends on it. but it
maybe dropped in the future.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iab922cbf3a70e7eb1444678d6e902b9d8e106dd1
2020-02-19 13:21:10 +08:00
Joseph Chen 64c9242ba7 sysmem: add FIT image memory block
The same feature with AVB memory block.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1aff5ef703d16852b4bc0a0887b037476464034c
2020-01-16 11:14:13 +08:00
Jon Lin 0afd346fb3 rockchip: spl-boot-order: compatible with BOOT_DEVICE_SPI case
Change-Id: Ia3a5506665ea98aa900f253fb703d825c1cf4929
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-13 10:41:40 +08:00
Joseph Chen 6d8afb5495 rockchip: remove rockchip crc file
These code have been moved into bootrkp.c.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I12c87b9f7dd7e8ce0c866105e4f5cecd0e6bcf21
2020-01-09 14:31:59 +08:00
Joseph Chen d04ada6cfd rockchip: clean boot_mode.c and boot_rkimg.c
Clean the code into where it belongs to.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia034b8c3d8b264796db72c7bf44bab95811ecb77
2020-01-09 14:27:25 +08:00
Joseph Chen 6f3562b04c rockchip: resource: remove rockchip_get_resource_file_offset()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5c468d69640f223a78dcff1b11981a0d36f3ad8a
2020-01-08 18:04:09 +08:00
Jon Lin cddfd2aeae dts: rk3308: change to add spi_flash to spl-boot-order list
"spi_nand" should in front of "spi_nor"

Change-Id: If57bee64de0cd44cefaa736325bb542ccb9ce83a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-08 17:53:15 +08:00
Jon Lin c9b995fdcc rockchip: spl-boot-order: adjust SPI flash dectecting strategy
Directly detect spi_flash node

Change-Id: Iafb691b28365b624cc2c4b15686cab3efc6da1d5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-08 17:53:15 +08:00
Kever Yang fccb2c59ff rockchip: rk3308: add alias for emmc/sdmmc
Add alias for mmc/sdmmc so that we can have a fix mmc number for emmc.

Change-Id: Ic282942ac994dbe015ddd70e5e5b0e34a7b9bd24
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-08 17:51:24 +08:00
Finley Xiao 1bbed24709 clk: rockchip: rk3308: Add support to set and get clk_rtc32k clock
Change-Id: Iea481af0c99a2b2ca9d6eff050e96e80845c8478
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-01-08 17:50:42 +08:00
Patrick Delaunay db704406b3 UPSTREAM: stm32mp1: add stusb1600 support for DK1 and DK2 board
The DK1 and DK2 boards use the USB Type-C controller STUSB1600.
This patch updates:
- the device tree to add the I2C node in the DT
- the board stm32mp1 to probe this I2C device and use this controller
  to check cable detection.
- the DWC2 driver to support a new dt property
  "u-boot,force-b-session-valid" which forces B session and
  device mode; it is a workaround because the VBUS sensing and
  ID detection isn't available with stusb1600.

Conflicts:
	arch/arm/dts/stm32mp157-pinctrl.dtsi
	arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
	arch/arm/dts/stm32mp157a-dk1.dts
	board/st/stm32mp1/stm32mp1.c

Change-Id: I73b62dce9c3e0661e6d2463b87389229cd3559a7
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 6fe7dd3327d552bacf4266d7f1ed074bf98ffb92)
2020-01-07 17:24:57 +08:00
Andrew F. Davis 09b32b41f2 UPSTREAM: spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU
The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same
meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT
to allow for cleaner use in code.

Conflicts:
	arch/arm/mach-zynqmp/spl.c
	common/Makefile
	common/spl/Kconfig
	common/spl/spl_ram.c

Change-Id: I93f09d5953284d511df135e6e71c03c0552719a2
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 6536ca4d6676bf38e50784298e713edc30b9cde9)
2020-01-07 17:24:56 +08:00
Jean-Jacques Hiblot eccca8a35d UPSTREAM: Kconfig: rename CONFIG_SPL_USB_GADGET as CONFIG_SPL_USB_GADGET
The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Conflicts:
	arch/arm/mach-imx/mx6/Kconfig
	arch/arm/mach-imx/spl.c
	configs/am335x_boneblack_vboot_defconfig
	configs/am335x_evm_usbspl_defconfig
	configs/am43xx_evm_defconfig
	configs/am43xx_hs_evm_defconfig
	configs/imx6q_logic_defconfig
	configs/mx6memcal_defconfig
	configs/mx6sabresd_defconfig
	configs/pico-hobbit-imx6ul_defconfig
	configs/pico-hobbit-imx7d_defconfig
	configs/pico-imx6ul_defconfig
	configs/pico-imx7d_defconfig
	configs/pico-pi-imx6ul_defconfig
	configs/pico-pi-imx7d_defconfig
	drivers/Makefile

Change-Id: I51305422f13cb7d743274f82c531000c0f93c144
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit f811e9763f4b6f6f5e3fe9c2fa30d2b6c62d289e)
2020-01-07 17:24:55 +08:00