All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot
@ 2019-06-10 10:17 Wasim Khan
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot Wasim Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wasim Khan @ 2019-06-10 10:17 UTC (permalink / raw)
  To: u-boot

Add bootcmd for IFC NOR boot and SD boot.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
---
Changes in v2:
	- Corrected Copyright info

 include/configs/ls2080aqds.h | 45 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 74c7dc4..11c6ffd 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2017 NXP
+ * Copyright 2017, 2019 NXP
  * Copyright 2015 Freescale Semiconductor
  */
 
@@ -378,8 +378,8 @@ unsigned long get_board_ddr_clk(void);
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"    \
 	"loadaddr=0x80100000\0"                 \
 	"loadaddr_sd=0x90100000\0"                 \
-	"kernel_addr=0x100000\0"                \
-	"kernel_addr_sd=0x800\0"                \
+	"kernel_addr=0x581000000\0"		          \
+	"kernel_addr_sd=0x8000\0"                \
 	"ramdisk_addr=0x800000\0"               \
 	"ramdisk_size=0x2000000\0"              \
 	"fdt_high=0xa0000000\0"                 \
@@ -389,9 +389,23 @@ unsigned long get_board_ddr_clk(void);
 	"kernel_load=0xa0000000\0"              \
 	"kernel_size=0x2800000\0"               \
 	"kernel_size_sd=0x14000\0"               \
-	"mcinitcmd=fsl_mc start mc 0x580a00000" \
-	" 0x580e00000 \0"			\
-	"mcmemsize=0x70000000 \0"
+	"load_addr=0xa0000000\0"		            \
+	"kernelheader_addr=0x580800000\0"	\
+	"kernelheader_addr_r=0x80200000\0"	\
+	"kernelheader_size=0x40000\0"		\
+	"BOARD=ls2088aqds\0" \
+	"mcmemsize=0x70000000 \0" \
+	IFC_MC_INIT_CMD				\
+	"nor_bootcmd=echo Trying load from nor..;"		\
+		"cp.b $kernel_addr $load_addr "			\
+		"$kernel_size ; env exists secureboot && "	\
+		"cp.b $kernelheader_addr $kernelheader_addr_r "	\
+		"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\
+		"bootm $load_addr#$BOARD\0"	\
+	"sd_bootcmd=echo Trying load from SD ..;" \
+	"mmcinfo; mmc read $load_addr "		\
+	"$kernel_addr_sd $kernel_size_sd && "	\
+	"bootm $load_addr#$BOARD\0"
 #elif defined(CONFIG_SD_BOOT)
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"    \
@@ -426,6 +440,25 @@ unsigned long get_board_ddr_clk(void);
 #endif /* CONFIG_TFABOOT */
 #endif /* CONFIG_SECURE_BOOT */
 
+#ifdef CONFIG_TFABOOT
+#define SD_BOOTCOMMAND						\
+			"env exists mcinitcmd && env exists secureboot "\
+			"&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
+			"&& esbc_validate $load_addr; "			\
+			"env exists mcinitcmd && run mcinitcmd "	\
+			"&& mmc read 0x88000000 0x6800 0x800 "		\
+			"&& fsl_mc lazyapply dpl 0x88000000; "		\
+			"run sd_bootcmd; "		\
+			"env exists secureboot && esbc_halt;"
+
+#define IFC_NOR_BOOTCOMMAND						\
+			"env exists mcinitcmd && env exists secureboot "\
+			"&& esbc_validate 0x580780000; env exists mcinitcmd "\
+			"&& fsl_mc lazyapply dpl 0x580d00000;"		\
+			"run nor_bootcmd; "		\
+			"env exists secureboot && esbc_halt;"
+#endif
+
 #if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 #define CONFIG_FSL_MEMAC
 #define CONFIG_PHYLIB_10G
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot
  2019-06-10 10:17 [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Wasim Khan
@ 2019-06-10 10:17 ` Wasim Khan
  2019-06-19 11:43   ` Prabhakar Kushwaha
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: " Wasim Khan
  2019-06-19 11:43 ` [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Prabhakar Kushwaha
  2 siblings, 1 reply; 6+ messages in thread
From: Wasim Khan @ 2019-06-10 10:17 UTC (permalink / raw)
  To: u-boot

During SD boot, MC firmware and DPC are copied from SD card to DDR.
Size reserved between MC and DPC firmware on DDR is 1MB.
If the size of MC firmware(load address 0x80000000) is more than 1 MB
then part of MC firmware will be overwritten by DPC firmware (load
address 0x80100000).

Fix: Update the MC/DPL/DPC firmware's DDR address as per their
respective addresses in SD card.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
---
Changes in v2:
	- No Change.

 include/configs/ls2080aqds.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 11c6ffd..18f30b5 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -368,9 +368,9 @@ unsigned long get_board_ddr_clk(void);
 #else
 #ifdef CONFIG_TFABOOT
 #define SD_MC_INIT_CMD				\
-	"mmcinfo;mmc read 0x80000000 0x5000 0x800;"  \
-	"mmc read 0x80100000 0x7000 0x800;" \
-	"fsl_mc start mc 0x80000000 0x80100000\0"
+	"mmcinfo;mmc read 0x80a00000 0x5000 0x1200;"  \
+	"mmc read 0x80e00000 0x7000 0x800;" \
+	"fsl_mc start mc 0x80a00000 0x80e00000\0"
 #define IFC_MC_INIT_CMD				\
 	"fsl_mc start mc 0x580a00000" \
 	" 0x580e00000 \0"
@@ -446,8 +446,8 @@ unsigned long get_board_ddr_clk(void);
 			"&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
 			"&& esbc_validate $load_addr; "			\
 			"env exists mcinitcmd && run mcinitcmd "	\
-			"&& mmc read 0x88000000 0x6800 0x800 "		\
-			"&& fsl_mc lazyapply dpl 0x88000000; "		\
+			"&& mmc read 0x80d00000 0x6800 0x800 "		\
+			"&& fsl_mc lazyapply dpl 0x80d00000; "		\
 			"run sd_bootcmd; "		\
 			"env exists secureboot && esbc_halt;"
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: Fix MC firmware loading during SD boot
  2019-06-10 10:17 [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Wasim Khan
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot Wasim Khan
@ 2019-06-10 10:17 ` Wasim Khan
  2019-06-19 11:43   ` Prabhakar Kushwaha
  2019-06-19 11:43 ` [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Prabhakar Kushwaha
  2 siblings, 1 reply; 6+ messages in thread
From: Wasim Khan @ 2019-06-10 10:17 UTC (permalink / raw)
  To: u-boot

During SD boot, MC firmware and DPC are copied from SD card to DDR.
Size reserved between MC and DPC firmware on DDR is 1MB.
If the size of MC firmware(load address 0x80000000) is more than 1 MB
then part of MC firmware will be overwritten by DPC firmware (load
address 0x80100000).

Fix: Update the MC/DPL/DPC firmware's DDR address as per their
respective addresses in SD card.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
---
Changes in v2:
	- Corrected Copyright info

 include/configs/ls2080ardb.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 2e8a8bb..bfb54be 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2017 NXP
+ * Copyright 2017, 2019 NXP
  * Copyright 2015 Freescale Semiconductor
  */
 
@@ -342,14 +342,14 @@ unsigned long get_board_sys_clk(void);
 	"esbc_validate 0x20740000;"		\
 	"fsl_mc start mc 0x20a00000 0x20e00000 \0"
 #define SD_MC_INIT_CMD				\
-	"mmcinfo;mmc read 0x80000000 0x5000 0x800;" \
-	"mmc read 0x80100000 0x7000 0x800;"	\
+	"mmcinfo;mmc read 0x80a00000 0x5000 0x1200;" \
+	"mmc read 0x80e00000 0x7000 0x800;"	\
 	"env exists secureboot && "		\
 	"mmc read 0x80700000 0x3800 0x10 && "	\
 	"mmc read 0x80740000 0x3A00 0x10 && "	\
 	"esbc_validate 0x80700000 && "		\
 	"esbc_validate 0x80740000 ;"		\
-	"fsl_mc start mc 0x80000000 0x80100000\0"
+	"fsl_mc start mc 0x80a00000 0x80e00000\0"
 #define IFC_MC_INIT_CMD				\
 	"env exists secureboot && "	\
 	"esbc_validate 0x580700000 && "		\
@@ -528,8 +528,8 @@ unsigned long get_board_sys_clk(void);
 			"&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
 			"&& esbc_validate $load_addr; "			\
 			"env exists mcinitcmd && run mcinitcmd "	\
-			"&& mmc read 0x88000000 0x6800 0x800 "		\
-			"&& fsl_mc lazyapply dpl 0x88000000; "		\
+			"&& mmc read 0x80d00000 0x6800 0x800 "		\
+			"&& fsl_mc lazyapply dpl 0x80d00000; "		\
 			"run distro_bootcmd;run sd_bootcmd; "		\
 			"env exists secureboot && esbc_halt;"
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: Fix MC firmware loading during SD boot
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: " Wasim Khan
@ 2019-06-19 11:43   ` Prabhakar Kushwaha
  0 siblings, 0 replies; 6+ messages in thread
From: Prabhakar Kushwaha @ 2019-06-19 11:43 UTC (permalink / raw)
  To: u-boot


> -----Original Message-----
> From: Wasim Khan
> Sent: Monday, June 10, 2019 3:47 PM
> To: u-boot at lists.denx.de; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>
> Cc: Wasim Khan <wasim.khan@nxp.com>
> Subject: [PATCH v2 3/3] armv8: ls2088ardb: Fix MC firmware loading during SD
> boot
> 
> During SD boot, MC firmware and DPC are copied from SD card to DDR.
> Size reserved between MC and DPC firmware on DDR is 1MB.
> If the size of MC firmware(load address 0x80000000) is more than 1 MB then
> part of MC firmware will be overwritten by DPC firmware (load address
> 0x80100000).
> 
> Fix: Update the MC/DPL/DPC firmware's DDR address as per their respective
> addresses in SD card.
> 
> Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
> ---

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot Wasim Khan
@ 2019-06-19 11:43   ` Prabhakar Kushwaha
  0 siblings, 0 replies; 6+ messages in thread
From: Prabhakar Kushwaha @ 2019-06-19 11:43 UTC (permalink / raw)
  To: u-boot


> -----Original Message-----
> From: Wasim Khan
> Sent: Monday, June 10, 2019 3:47 PM
> To: u-boot at lists.denx.de; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>
> Cc: Wasim Khan <wasim.khan@nxp.com>
> Subject: [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD
> boot
> 
> During SD boot, MC firmware and DPC are copied from SD card to DDR.
> Size reserved between MC and DPC firmware on DDR is 1MB.
> If the size of MC firmware(load address 0x80000000) is more than 1 MB then
> part of MC firmware will be overwritten by DPC firmware (load address
> 0x80100000).
> 
> Fix: Update the MC/DPL/DPC firmware's DDR address as per their respective
> addresses in SD card.
> 

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot
  2019-06-10 10:17 [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Wasim Khan
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot Wasim Khan
  2019-06-10 10:17 ` [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: " Wasim Khan
@ 2019-06-19 11:43 ` Prabhakar Kushwaha
  2 siblings, 0 replies; 6+ messages in thread
From: Prabhakar Kushwaha @ 2019-06-19 11:43 UTC (permalink / raw)
  To: u-boot


> -----Original Message-----
> From: Wasim Khan
> Sent: Monday, June 10, 2019 3:47 PM
> To: u-boot at lists.denx.de; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>
> Cc: Wasim Khan <wasim.khan@nxp.com>
> Subject: [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot
> 
> Add bootcmd for IFC NOR boot and SD boot.
> 
> Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
> ---

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-19 11:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10 10:17 [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Wasim Khan
2019-06-10 10:17 ` [U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot Wasim Khan
2019-06-19 11:43   ` Prabhakar Kushwaha
2019-06-10 10:17 ` [U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: " Wasim Khan
2019-06-19 11:43   ` Prabhakar Kushwaha
2019-06-19 11:43 ` [U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot Prabhakar Kushwaha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.