Add sdupdate variable to receive card function info from preloader atags.
If the sd card is updated-card, set sdupdate to bootargs. otherwise test
whether the sd cart is ROCKCHIP_SD_UPDATE_CARD or not by rkimgtest cmd.
Change-Id: I6c09ade4a31a2e4c8349245e9e345f735afd11e9
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
We should parse node name to identify the gpio port before
reading base address, it avoids to use miss match address.
Move out gpio_parse_base_address() from sub string parse is
better.
Set gpio as input mode before reading.
Change-Id: Iffd4ef7f3ceb1bb56a65680265af74ca50b14712
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Add cd-gpios to test the mmc device whether exit.
Change-Id: I8ab96fd5300da25d82005ac638e6d2b728ed82ce
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
After switch to io_vsel3 after system power on, we should release
GPIO0_A4 for other usage.
Change-Id: I16bc33fd976fe957b57cd3a0f90ff44659ca93f2
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
It is optional to use dtb from distro images to initialize
periph drivers when kernel dtb function is enabled.
Change-Id: I7119962ba61d84c5ccdf2e515e21bb347e50b91b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Use different name for the volume up key node, dm framework
can't support the same device node since kernel dtb is enabled.
Change-Id: Ia99c9b8fd46fea63949f9d06072c0ebec0e76a46
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Default boot from sdcard may fail in evb without sd.
Change-Id: Ifde49b6b28e7154a14f5e028d9863446f11cb59c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
RK3368 uart2 iomux config is not correct, fix it.
Change-Id: I992c4b0ae9d8c0a91c5ee1fb3e7850a1e94db206
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Enable the exception handler for async error so that we can get the
abort before kernel.
Change-Id: Ie0e7c89a0d03adf3b74b0d9ddf8c9117536dac6b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
TPL need dmc to init ddr sdram, and emmc, boot-order.
Change-Id: Ia783e1a47a7710bf618c556eefaf354b7097eacd
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
We always try to init stimer in case it's not init in previous stage,
but don't re-init if it already work.
Change-Id: I2133804560c6e31e51e6b2cb0a6e51b9544970d3
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The arch_cpu_init() should be done in SPL only.
Change-Id: If96bad9694dbcb0d9821433d1f2cbead4517633c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch_cpu_init() may use DM to get cru handler.
Change-Id: I5f2daa4718bcdcc5a4aa5601d26e9f4f31a01b69
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
- import memblk id to manage memory blocks;
- change "sysmem_property" to generic "memblock";
- use alloc instead of reserve for all memory blocks;
- clean up and fix some logic;
- add U-Boot cmd for sysmem;
Change-Id: I614223ce3bf97a7b3566412a9d1864fb30b68fd8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
use rockchip_setup_ddr_param to setup ddr parameter.
The dram_init() and dram_init_banksize() make use of
sdram common code.
Change-Id: Icfc6cbef9fcc128e3a835184b46b89b9b22aab16
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
The uart, dmc and grf device add "u-boot,dm-pre-reloc".
Before relocated, u-boot will analyse dram capacity which
is need the device of "u-boot,dm-pre-reloc" attribute.
Change-Id: I1d18b564b0c521b176a2293a03403139034ccc0b
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Add cd-gpios to test the mmc device whether exit.
Change-Id: I171f4c0d895baf1a1b54c971fc88370a0b10ce3a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Add cd-gpios to test the mmc device whether exit.
Change-Id: I6a07ff130e506678a20e5128ef4c8e608e0ec448
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Add cd-gpios to test the mmc device whether exit.
Change-Id: I3d4839180b36de22ce1e5f2b26c9090b0686a8a0
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Add cd-gpios to test the mmc device whether exit.
Change-Id: Ie1cfffe0f7826eae47fab705d3a3bb7d1a85f8ce
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Since atags is passed between so many pre-loader, it's better
add hash check for tag.
It compatibles with legacy code and tag data, because 'hash'
is reserved field in old tag data.
Change-Id: I18b4c46f75b2c5a50194c23576e6f1437c83ccf5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>