diff mbox

[U-Boot,09/12] armv8: ls2080aqds: Enable QSPI boot support

Message ID 1456914723-33160-10-git-send-email-yao.yuan@freescale.com
State Superseded
Headers show

Commit Message

Yao Yuan March 2, 2016, 10:32 a.m. UTC
From: Yuan Yao <yao.yuan@nxp.com>

This patch adds QSPI boot support for LS2080AQDS board.
The QSPI boot image need to be programmed into the QSPI flash
first. Then the booting will start from QSPI memory space.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
---
 configs/ls2080aqds_qspi_defconfig | 10 ++++++++++
 include/configs/ls2080a_common.h  |  2 ++
 include/configs/ls2080aqds.h      | 12 +++++++++++-
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 configs/ls2080aqds_qspi_defconfig

Comments

York Sun March 2, 2016, 4:55 p.m. UTC | #1
On 03/02/2016 02:41 AM, Yuan Yao wrote:
> From: Yuan Yao <yao.yuan@nxp.com>
> 
> This patch adds QSPI boot support for LS2080AQDS board.
> The QSPI boot image need to be programmed into the QSPI flash
> first. Then the booting will start from QSPI memory space.
> 
> Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
> ---

Please update the README file to include procedure to deply QSPI image.

York
yao yuan March 3, 2016, 2:30 a.m. UTC | #2
On 03/03/2016 12:52 AM, York Sun wrote:
> On 03/02/2016 02:41 AM, Yuan Yao wrote:
> > From: Yuan Yao <yao.yuan@nxp.com>
> >
> > This patch adds QSPI boot support for LS2080AQDS board.
> > The QSPI boot image need to be programmed into the QSPI flash first.
> > Then the booting will start from QSPI memory space.
> >
> > Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
> > ---
> 
> Please update the README file to include procedure to deply QSPI image.
> 
> York

Hi York,

Thanks for your review.
So where should I put the README file?
York Sun March 3, 2016, 4:48 p.m. UTC | #3
On 03/02/2016 06:30 PM, Yao Yuan wrote:
> On 03/03/2016 12:52 AM, York Sun wrote:
>> On 03/02/2016 02:41 AM, Yuan Yao wrote:
>>> From: Yuan Yao <yao.yuan@nxp.com>
>>>
>>> This patch adds QSPI boot support for LS2080AQDS board.
>>> The QSPI boot image need to be programmed into the QSPI flash first.
>>> Then the booting will start from QSPI memory space.
>>>
>>> Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
>>> ---
>>
>> Please update the README file to include procedure to deply QSPI image.
>>
>> York
> 
> Hi York,
> 
> Thanks for your review.
> So where should I put the README file? 
> 

board/freescale/ls2080aqds/README

York
yao yuan March 7, 2016, 6:09 a.m. UTC | #4
On 03/04/2016 12:49 AM, York Sun wrote:
> On 03/02/2016 06:30 PM, Yao Yuan wrote:
> > On 03/03/2016 12:52 AM, York Sun wrote:
> >> On 03/02/2016 02:41 AM, Yuan Yao wrote:
> >>> From: Yuan Yao <yao.yuan@nxp.com>
> >>>
> >>> This patch adds QSPI boot support for LS2080AQDS board.
> >>> The QSPI boot image need to be programmed into the QSPI flash first.
> >>> Then the booting will start from QSPI memory space.
> >>>
> >>> Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
> >>> ---
> >>
> >> Please update the README file to include procedure to deply QSPI image.
> >>
> >> York
> >
> > Hi York,
> >
> > Thanks for your review.
> > So where should I put the README file?
> >
> 
> board/freescale/ls2080aqds/README
> 
> York

Hi York,

Do you know is there any example exist in uboot that I can take reference?
Or is there any format and content requirement for the procedure to deply QSPI image?

Thanks.
York Sun March 7, 2016, 5:13 p.m. UTC | #5
On 03/06/2016 10:09 PM, Yao Yuan wrote:
> On 03/04/2016 12:49 AM, York Sun wrote:
>> On 03/02/2016 06:30 PM, Yao Yuan wrote:
>>> On 03/03/2016 12:52 AM, York Sun wrote:
>>>> On 03/02/2016 02:41 AM, Yuan Yao wrote:
>>>>> From: Yuan Yao <yao.yuan@nxp.com>
>>>>>
>>>>> This patch adds QSPI boot support for LS2080AQDS board.
>>>>> The QSPI boot image need to be programmed into the QSPI flash first.
>>>>> Then the booting will start from QSPI memory space.
>>>>>
>>>>> Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
>>>>> ---
>>>>
>>>> Please update the README file to include procedure to deply QSPI image.
>>>>
>>>> York
>>>
>>> Hi York,
>>>
>>> Thanks for your review.
>>> So where should I put the README file?
>>>
>>
>> board/freescale/ls2080aqds/README
>>
>> York
> 
> Hi York,
> 
> Do you know is there any example exist in uboot that I can take reference?
> Or is there any format and content requirement for the procedure to deply QSPI image?
> 

Yuan,

There are some README files with similar information, for example

doc/README.pblimage
board/freescale/t102xqds/README

York
diff mbox

Patch

diff --git a/configs/ls2080aqds_qspi_defconfig b/configs/ls2080aqds_qspi_defconfig
new file mode 100644
index 0000000..8f84b23
--- /dev/null
+++ b/configs/ls2080aqds_qspi_defconfig
@@ -0,0 +1,10 @@ 
+CONFIG_ARM=y
+CONFIG_TARGET_LS2080AQDS=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,QSPI_BOOT,LS2080A"
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_DM_SPI=y
+CONFIG_SYS_NS16550=y
+CONFIG_FSL_QSPI=y
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 8048753..c131441 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -29,11 +29,13 @@ 
 #define CONFIG_ARCH_MISC_INIT
 
 /* Link Definitions */
+#ifndef CONFIG_QSPI_BOOT
 #ifdef CONFIG_SPL
 #define CONFIG_SYS_TEXT_BASE		0x80400000
 #else
 #define CONFIG_SYS_TEXT_BASE		0x30100000
 #endif
+#endif
 
 #ifdef CONFIG_EMU
 #define CONFIG_SYS_NO_FLASH
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index eaca55c..513a2e3 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -17,8 +17,16 @@  unsigned long get_board_ddr_clk(void);
 #endif
 
 #define CONFIG_SYS_FSL_CLK
+#ifdef CONFIG_QSPI_BOOT
+#define CONFIG_SYS_TEXT_BASE		0x20010000
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SIZE			0x2000          /* 8KB */
+#define CONFIG_ENV_OFFSET		0x100000        /* 1MB */
+#define CONFIG_ENV_SECT_SIZE		0x10000
+#endif
 
-#ifdef CONFIG_FSL_QSPI
+#if defined(CONFIG_QSPI_BOOT) || \
+	(defined(CONFIG_NAND) && defined(CONFIG_FSL_QSPI))
 #define CONFIG_SYS_NO_FLASH
 #undef CONFIG_CMD_IMLS
 #define CONFIG_SYS_CLK_FREQ		100000000
@@ -270,11 +278,13 @@  unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_CS2_FTIM2		CONFIG_SYS_NAND_FTIM2
 #define CONFIG_SYS_CS2_FTIM3		CONFIG_SYS_NAND_FTIM3
 
+#ifndef CONFIG_QSPI_BOOT
 #define CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_ENV_ADDR			(CONFIG_SYS_FLASH_BASE + 0x200000)
 #define CONFIG_ENV_SECT_SIZE		0x20000
 #define CONFIG_ENV_SIZE			0x2000
 #endif
+#endif
 
 /* Debug Server firmware */
 #define CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR