For external data, FIT has a optional property "data-position" which
can set the external data to a fixed offset to FIT beginning.
Add the support for this property in SPL FIT.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: "Andrew F. Davis" <afd@ti.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: "tomas.melin@vaisala.com" <tomas.melin@vaisala.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: "Cooper Jr., Franklin" <fcooper@ti.com>
Cc: George McCollister <george.mccollister@gmail.com>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Rick Altherr <raltherr@google.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: York Sun <york.sun@nxp.com>
(cherry picked from commit a1be94b65410c7ebba5e7695478b6623579b410c)
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1cdcfe0358e5a39fed3dfcf0554a7ba0e16729b8
Change-Id: I44c3454addd85d70e6fba8e26b66a0278c5c1081
Available for caller to call misc_ioctl(...).
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibac22caf80968ecc7f952d04aa2a1a0f8ad3417a
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
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
There maybe some board routine before bootm common
flow. The board can override this __weak function.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6660f4ef27f3889d2dbc29594ad164a12ec6c934
There maybe some board routine before do_bootm_states().
The board can override this __weak function.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iab6a6742a02dae681e4d3221dc7cfffd2c3df98c
If the user can't make sure where the region is available
and safe for use, this command handles it.
Rename commands with prefix: sysmem_xxx.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I37ea76bf33a3fcb8c16baeecae3980d746775ec7
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>