The arch_cpu_init() should be called for cpu early init
for tpl.
Change-Id: I3aad0f284089d8523710a2d24daab44995fa148d
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
kernel FDT is for U-Boot if there is not valid one from images,
ie: resource.img, boot.img or recovery.img. It is put right
after U-Boot FDT.
This is used for U-disk bing up.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iab1ddbbf3978a6b2fc08316bb136c43c0d2eef60
Simply check cru node to verify if this kernel dtb
is belong to current platform.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8c0b2181a2ca3cada72a9e18788de0bfdc9ba3c5
Special handle:
Once the BCB offset changes, reinitialize "boot_mode".
Background:
1. there are two Android BCB at the 0x00 and 0x20 offset in
misc.img to compatible legacy(0x20) SDK.
2. android_bcb_msg_sector_offset() is for android image:
return 0x20 if image version < 10, otherwise 0x00.
3. If not android image, BCB at 0x20 is the valid one.
U-Boot can support booting both FIT & Android image, if FIT
boot flow enters here early than Android, the "boot_mode" is
set as BOOT_MODE_RECOVERY according to BCB at 0x20 offset.
After that, this function always return static variable "boot_mode"
as BOOT_MODE_RECOVERY even android(>=10) boot flow enter here.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0ed05ba1b18447a58d3faff37ac50ecc79fab374
error: ‘CRU_SOFTRST_CON02’ undeclared (first use in this function)
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I64935d50646a1ca7d228308c11f2f95a2e2378bb
In this mode, uart debug is initialized depends on
configuration from pre-loader or CONFIG_UART_DEBUG_.
The serial is not care about dts "stdout-path" and
not register into console framework any more. It's
nice to use pre-loader serial and make serial easy
to configure.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If4c68229d76b6f1710a35e3ef9a2a91cb306fa9c
There is not SPL for ramboot, let's init QoS for it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib6221122c44702cb4f287bad721316751478be71
When perform idle operation, corresponding clock can
be opened or gated automatically.
Change-Id: Ib33115024b3f85f1f8bcabf2548caf3b13b0361f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Should use debug_uart_init() which include board_debug_uart_init().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib3479aed3e874ac11da3ebb8f8868a6f43218ef8
Android Header v3 and vendor boot partition are introduced
from Android-11(R).
Header populate:
Header v3 is no longer compatible with v0/1/2 header, we
add populate_andr_img_hdr() to merge boot and vendor_boot
partition header into struct andr_img_hdr in order to
compatible with v0/1/2 header.
resource.img:
The second_addr and second_size fields are removed in v3,
so we require resource partition to restore resource.img.
A/B system:
If not A/B system, the boot.img header version is 3 and
recovery header is version 2.
AVB load image:
- If allow verification error: the image is loaded by
ops->get_preloaded_partition() which auto populates
boot_img_hdr_v3.
- If not allow verification error: the image is full loaded
by ops->read_from_partition() which doesn't populate
boot_img_hdr_v3, we need to fix it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2afce53c43d782fc57baa01acf9c05518b580840
Use CONFIG_SPL_KERNEL_BOOT for thunder boot to stay the same with SPL.
Change-Id: I0d2f0a91a5f628233de1cb848519fd76b692a2af
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
GPIO0_D6 pull down in default, but it's needed for SPI Flash with
WP# pin pull up.
Change-Id: I80a79e0072f1fff49673bbe834f51603e10283dc
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Moving current configurations into SPL boot stage except
something belongs to USBPLUG.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I64ec47f7c0c3cef57854a72af86e9ef1bebbcaed
The SPL without thunder-boot or U-Boot needs it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie2d8b59e35fbc2056cfbc910dae94419afcbfc09
Update led_set_on to led_set_state since it has been changed.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0a42776c4c5453631093dbc64b8bf0dec2439a59
The cache fixup is for the data coherence when communication
between U-Boot and OP-TEE. And data abort exception appeares on
OP-TEE V1 32bit platform due to unknown reason.
So only the share memory need be mapped as dcache enabled.
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I92b62ef5fbdf47adc0328a14034a5861e8e77fed
Checking file size in case of "./make.sh --no-uboot ...".
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9fd89a4b02e0afab7622f375af580e94e32b5309
For all 32-bit platforms, op-tee require dcache enabled
from now on.
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I2cd67457c7d441d35e8e0b191c8dfc89f5e4e541
Implement board_fit_image_post_process() to handle it.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Idc89d88894e115d0b627c411248434848714b53d
Get boot or recovery partition according to boot mode.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5b5806985f166cd37382b1d4df32c9eaf7508c7a
RV1126 decompress module access data without dcache.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iee3eb077912e1222fcceab4615f872706cd3d43f
There are too many product assortments of defconfig
and ini file on some platform, so we have to add
options to bind ini file with defconfig.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4876489d2af99b43ba3fa214a16b2d65919ed138
Fallback to maskrom download mode if rockusb command failed.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iccfa8745aeac800b1e048e0301147424cd2e9478
Call panic() here since there is not a return value
accepted in the top caller.
Reading rollback index failed is already not allowed.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic5235f01dc7e9791d8ebe546724078dbab91f993
support vendor storage with mtd devices, the mtd partition
name is "vnvm".
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I6a895140df8ba12ef093acf9805f44bb436f7b29
- Call make_fit_args.sh script to process all args.
- Clean up code.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icfa04c4fc2ab4f64dfd389f71309776d924e9ebd
It's common for all rockchip platform to make its file.
Process args for all rockchip fit generator script, and
providing variables for it's caller.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If9d741d16e397234d265f4ae32739514bfd7a5d1
The high speed spi nor's max frequency is about 133MHz and the
IO interface rate is about 100MHz, so enlarge spi-max-frequency
to 100MHz.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I9ef7e459dece5e70eefd72024264a94a672636d1
None-zero gd->rollback_index value should be written into
trusty.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib964c5883e5083a3f9828415ee05819960d20139
Implement __weak functions in this file.
Move fit_board_verify_required_sigs() to here.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4d748f7bfe4cbc9a8f2f96f30978d3e64b73b9aa
Being convenient for other functions to be called.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibfa3f30a50befa8773cc8729a5359f7a36e8180d
Being convenient for other functions to be called.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1a02a150cf66ccf3dfc4be3621ad62829c3e6eb5
If CONFIG_ROCKCHIP_THUNDER_BOOT=y, it will enable ddr fast boot.
Change-Id: Ia43039dd1247ebb937aaa8b6d9a9103df2dfe1f5
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
According to the description of GRF_IO_VSEL, the voltage of
VCCIO6(which is the concern of emmc/flash/sfc controller) will
indicate by GPIO0_B6 or io_vsel6. The SOC defaults use GPIO0_B6
to indicate power supply voltage for VCCIO6 by hardware, then
we can switch to io_vsel6 after system power on, and release
GPIO0_B6 for other usage.
Change-Id: I9c8339e357a7328d9ffeb711ba5d0bdd41971101
Signed-off-by: Liang Chen <cl@rock-chips.com>
The propery is brought by CONFIG_OF_U_BOOT_REMOVE_PROPS
required from GMAC.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib85ec0678a0a0404eb4cda5974c52076bf0a1e37
It's possible that USB is disabled due to developer needs
a critial size of u-boot.bin.
Disabling USB makes vbus can't be detected any more, so that
we add menu key and the events trigger are changed:
- rockusb mode(fallback to bootrom mode):
"recovery key pressed + vbus=1" => "menu key pressed"
- recovery mode:
"recovery key pressed + vbus=0" => "recovery key pressed"
At the most time, USB is enabled and this feature is not applied.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9da8f17987742cea3267dbb35ee88d57a00c578a
CONFIG_ROCKCHIP_UART_MUX_SEL is used for selecting uart multiplexer
in board_debug_uart_init.
Change-Id: I75fb8eab76e4db8cd171d8d6c4462abe52ed168e
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Add clk_valid() to check for optional clocks are valid.
Call clk_valid() in test/dm/clk.c and add relevant test routine to
sandbox clk tests.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I78b1edea1f8ef54d3aa3f7610d39d79dd994d1bf
Fixes warning from rv1126-usbplug_defconfig:
......
warning: (ROCKCHIP_RV1126) selects ROCKCHIP_GPIO_V2 which has unmet direct dependencies (ROCKCHIP_GPIO)
warning: (ROCKCHIP_RV1126) selects ROCKCHIP_GPIO_V2 which has unmet direct dependencies (ROCKCHIP_GPIO)
......
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2c7d64e9cdd03f3e8dcbbb948d747a67d7dff4da
The v2 gpio controller add write enable bit for some register,
such as data register, data direction register and so on.
This patch support v2 gpio controller by redefine the read and
write operation functions.
Change-Id: I2adbcca06a37c48e6f494b89833cd034ba0dae29
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>