Merge tag 'u-boot-rockchip-20200501' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / include / configs / lx2160a_common.h
index 7adb31d..5ab9244 100644 (file)
@@ -187,11 +187,15 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
 
 /* Initial environment variables */
-#define XSPI_MC_INIT_CMD                       \
-       "env exists secureboot && "             \
-       "esbc_validate 0x20640000 && "          \
-       "esbc_validate 0x20680000 ;"            \
-       "fsl_mc start mc 0x20a00000 0x20e00000\0"
+#define XSPI_MC_INIT_CMD                               \
+       "sf probe 0:0 && "                              \
+       "sf read 0x80640000 0x640000 0x80000 && "       \
+       "env exists secureboot && "                     \
+       "esbc_validate 0x80640000 && "                  \
+       "esbc_validate 0x80680000; "                    \
+       "sf read 0x80a00000 0xa00000 0x300000 && "      \
+       "sf read 0x80e00000 0xe00000 0x100000; "        \
+       "fsl_mc start mc 0x80a00000 0x80e00000\0"
 
 #define SD_MC_INIT_CMD                         \
        "mmc read 0x80a00000 0x5000 0x1200;"    \
@@ -203,6 +207,16 @@ unsigned long get_board_ddr_clk(void);
        "esbc_validate 0x80680000 ;"            \
        "fsl_mc start mc 0x80a00000 0x80e00000\0"
 
+#define SD2_MC_INIT_CMD                                \
+       "mmc dev 1; mmc read 0x80a00000 0x5000 0x1200;" \
+       "mmc read 0x80e00000 0x7000 0x800;"     \
+       "env exists secureboot && "             \
+       "mmc read 0x80640000 0x3200 0x20 && "   \
+       "mmc read 0x80680000 0x3400 0x20 && "   \
+       "esbc_validate 0x80640000 && "          \
+       "esbc_validate 0x80680000 ;"            \
+       "fsl_mc start mc 0x80a00000 0x80e00000\0"
+
 #define EXTRA_ENV_SETTINGS                     \
        "hwconfig=fsl_ddr:bank_intlv=auto\0"    \
        "ramdisk_addr=0x800000\0"               \
@@ -249,10 +263,13 @@ unsigned long get_board_ddr_clk(void);
                "source ${scriptaddr}\0"
 
 #define XSPI_NOR_BOOTCOMMAND                                           \
-                       "env exists mcinitcmd && env exists secureboot "\
-                       "&& esbc_validate 0x206C0000; "                 \
+                       "sf probe 0:0; "                                \
+                       "sf read 0x806c0000 0x6c0000 0x40000; "         \
+                       "env exists mcinitcmd && env exists secureboot" \
+                       " && esbc_validate 0x806c0000; "                \
+                       "sf read 0x80d00000 0xd00000 0x100000; "        \
                        "env exists mcinitcmd && "                      \
-                       "fsl_mc lazyapply dpl 0x20d00000; "             \
+                       "fsl_mc lazyapply dpl 0x80d00000; "             \
                        "run distro_bootcmd;run xspi_bootcmd; "         \
                        "env exists secureboot && esbc_halt;"
 
@@ -267,11 +284,11 @@ unsigned long get_board_ddr_clk(void);
                "env exists secureboot && esbc_halt;"
 
 #define SD2_BOOTCOMMAND                                                \
-               "env exists mcinitcmd && mmcinfo; "             \
+               "mmc dev 1; env exists mcinitcmd && mmcinfo; "  \
                "mmc read 0x80d00000 0x6800 0x800; "            \
                "env exists mcinitcmd && env exists secureboot "        \
-               " && mmc read 0x80780000 0x3C00 0x20 "          \
-               "&& esbc_validate 0x80780000;env exists mcinitcmd "     \
+               " && mmc read 0x806C0000 0x3600 0x20 "          \
+               "&& esbc_validate 0x806C0000;env exists mcinitcmd "     \
                "&& fsl_mc lazyapply dpl 0x80d00000;"           \
                "run distro_bootcmd;run sd2_bootcmd;"           \
                "env exists secureboot && esbc_halt;"