Skip to content
Snippets Groups Projects
Commit 98d9aa40 authored by Gong Qianyu's avatar Gong Qianyu Committed by York Sun
Browse files

freescale/qixis: Add support for booting from SD/QSPI


1.Use "qixis_reset sd" to boot from SD
2.Use "qixis_reset sd_qspi" to boot from SD with QSPI support
3.Use "qixis_reset qspi" to boot from QSPI flash

On some SoCs such as LS1021A and LS1043A, IFC and QSPI could be
pin-multiplexed. So the switches are different between SD boot with
IFC support and SD boot with QSPI support. The default booting from
SD is with IFC support.

Once QSPI is enabled(IFC disabled), only use I2C to access QIXIS.

Signed-off-by: default avatarGong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 58e4ad1d
No related branches found
No related tags found
No related merge requests found
...@@ -215,6 +215,39 @@ int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ...@@ -215,6 +215,39 @@ int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
QIXIS_WRITE(rcfg_ctl, 0x21); QIXIS_WRITE(rcfg_ctl, 0x21);
#else #else
printf("Not implemented\n"); printf("Not implemented\n");
#endif
} else if (strcmp(argv[1], "sd") == 0) {
#ifdef QIXIS_LBMAP_SD
QIXIS_WRITE(rst_ctl, 0x30);
QIXIS_WRITE(rcfg_ctl, 0);
set_lbmap(QIXIS_LBMAP_SD);
set_rcw_src(QIXIS_RCW_SRC_SD);
QIXIS_WRITE(rcfg_ctl, 0x20);
QIXIS_WRITE(rcfg_ctl, 0x21);
#else
printf("Not implemented\n");
#endif
} else if (strcmp(argv[1], "sd_qspi") == 0) {
#ifdef QIXIS_LBMAP_SD_QSPI
QIXIS_WRITE(rst_ctl, 0x30);
QIXIS_WRITE(rcfg_ctl, 0);
set_lbmap(QIXIS_LBMAP_SD_QSPI);
set_rcw_src(QIXIS_RCW_SRC_SD);
qixis_write_i2c(offsetof(struct qixis, rcfg_ctl), 0x20);
qixis_write_i2c(offsetof(struct qixis, rcfg_ctl), 0x21);
#else
printf("Not implemented\n");
#endif
} else if (strcmp(argv[1], "qspi") == 0) {
#ifdef QIXIS_LBMAP_QSPI
QIXIS_WRITE(rst_ctl, 0x30);
QIXIS_WRITE(rcfg_ctl, 0);
set_lbmap(QIXIS_LBMAP_QSPI);
set_rcw_src(QIXIS_RCW_SRC_QSPI);
qixis_write_i2c(offsetof(struct qixis, rcfg_ctl), 0x20);
qixis_write_i2c(offsetof(struct qixis, rcfg_ctl), 0x21);
#else
printf("Not implemented\n");
#endif #endif
} else if (strcmp(argv[1], "watchdog") == 0) { } else if (strcmp(argv[1], "watchdog") == 0) {
static char *period[9] = {"2s", "4s", "8s", "16s", "32s", static char *period[9] = {"2s", "4s", "8s", "16s", "32s",
...@@ -255,6 +288,9 @@ U_BOOT_CMD( ...@@ -255,6 +288,9 @@ U_BOOT_CMD(
"- hard reset to default bank\n" "- hard reset to default bank\n"
"qixis_reset altbank - reset to alternate bank\n" "qixis_reset altbank - reset to alternate bank\n"
"qixis_reset nand - reset to nand\n" "qixis_reset nand - reset to nand\n"
"qixis_reset sd - reset to sd\n"
"qixis_reset sd_qspi - reset to sd with qspi support\n"
"qixis_reset qspi - reset to qspi\n"
"qixis watchdog <watchdog_period> - set the watchdog period\n" "qixis watchdog <watchdog_period> - set the watchdog period\n"
" period: 1s 2s 4s 8s 16s 32s 1min 2min 4min 8min\n" " period: 1s 2s 4s 8s 16s 32s 1min 2min 4min 8min\n"
"qixis_reset dump - display the QIXIS registers\n" "qixis_reset dump - display the QIXIS registers\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment