Saving it for late use, eg: fit verified boot process.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6643fb643f2fd88795d80fc5bd21025b62dc6943
Error when CONFIG_ROCKCHIP_RESOURCE_IMAGE is disabled
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3e6dd7c5528409c37ad8fbdcf1cc7f5178253bb2
Let move 8/16-bit UTMI+ interface initialization into DWC3 core init
that is convenient for both DM_USB and u-boot traditional process.
Change-Id: I7fe45af396098749b2acf4a885dff875dcbc6f63
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit,
which specifies whether the USB2.0 PHY provides a free-running
PHY clock, which is active when the clock control input is active.
Refer to commit 27f83eeb6b42("usb: dwc3: add dis_u2_freeclk_exists_quirk")
in Linux Rockchip Kernel.
Change-Id: Id90ac25a7e82bbf7918cc9658797c23008871852
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls
whether the PHY receives the suspend signal from the controller.
Refer to commit ec791d149bca("usb: dwc3: Add dis_enblslpm_quirk")
in Linux Kernel.
Change-Id: If8bffb5a8dc1b02e4b3100dc722d14a3d9b74992
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This fixes the Coverity Defect CID 175348 when dev_count_phandle_with_args()
returns a negative value.
Change-Id: I3572567e0dce19548a970ecf4e446ff9b23b895f
Fixes: 0c28233903b5 ("reset: Add get/assert/deassert/release for bulk of reset signals")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 895a82ce90278130828b26c230da99331a33e729)
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)
Storage env or kernel dtb load depends on bootdev, while bootdev
depends on env varname: devtype, devnum and rkimg_bootdev, etc.
So we have to use nowhere env firstly and cover the storage env
after it is loaded.
Providing a minimum and necessary nowhere env for board init to
avoid covering the other varnames in storage env.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8362c24376e7530f15335f26197a7cddbcae579c
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
with these config, rk1808/rk1806 support SPL boot kernel.
Change-Id: I8efcb93d03d12adbefbe7b16dd1f25ee8d4fb0ee
Signed-off-by: Lin Huang <hl@rock-chips.com>
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>
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>
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>
Sometimes we need to reconfigure the eMMC gpio state in spl without
pinctrl driver. So add func mmc_gpio_init_direct to initialize the
eMMC gpio in different platform.
Change-Id: I22500f8865a9e29e59be6ff224001bad899cec48
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Load kernel through android format, then jump to kernel through ATF.
Change-Id: Idc77461bae0e4300c146c68f6a7e4e157c29db7f
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
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
Set CONFIG_SPL_SYS_MALLOC_F_LEN enough to promise the tlb buffer
can be malloc, actually this is a way to compatible all the current
boards without adding a new configure option.
I-cache has been setup at early assembly code by default.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7e973299eddc358cd4c15846c5de154050bf9547
Some boards need a SPL DTB as smaller as possible to save dm scan
time and space. It provides a SPL DTB only include the node with
property "u-boot,dm-spl". The property "u-boot,pre-reloc" doesn't
work any more.
This feature is disabled by default to compatible current boards,
only the board really cares about boot time needs it.
Fix "/chosen" is deleted for TPL DTB.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I743d7b734daff6e0508e01f534078663d809952f
Our purpose is replacing the u-boot.dtb with u-boot-spl.dtb
when kernel dtb feature is enabled. The current logic is too
complicated and not easy to extend new features.
The best way is to generate but not replace a u-boot.dtb the
same as u-boot-spl.dtb during DTB compile process.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I678ec7c60c91ecc6f6f0a935e50a691c52c94162
Assume that no battery node means the board is always supplied with
adapter, so set 2000mA input curren to make board have enough power.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9d66c02682cc3ff66a2d8e365837fc66bf991933
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
default image mkimage conflicts with fit mkimage on param: -T "flat_dt"
and failed to build fdt uImage.
error message:
"./tools/mkimage: Can't set header for FIT Image support: Success"
It's fine to drop that since the fdt_check_header() follows it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I50554765bac7cc75df7ab5920e94cafe78d14bdc
It seems the U-Boot proper fit code misses this.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1e5255e20f4f309c083e601e6c2d0e37869bac20