Skip to contentSkip to conversation

fsl-lsch3: Add FlexSPI address space in immap_lsch3

PATCH New Ashish Kumar 2 participants 5 messages Sep 26, 2018 – Nov 13, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fsl-lsch3: Add FlexSPI address space in immap_lsch3

---
v2:
1. Rename SYS_FSL_FSPI_ADDR SYS_NXP_FSPI_ADDR
2. Add mcaro for lutkey base addr and LUTa base addr

 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +6 -0
index b0cec74db0..a2aea18838 100644
@@ -19,7 +19,13 @@
 #define CONFIG_SYS_FSL_CH3_CLK_GRPA_ADDR	(CONFIG_SYS_IMMR + 0x00300000)
 #define CONFIG_SYS_FSL_CH3_CLK_GRPB_ADDR	(CONFIG_SYS_IMMR + 0x00310000)
 #define CONFIG_SYS_FSL_CH3_CLK_CTRL_ADDR	(CONFIG_SYS_IMMR + 0x00370000)
+#ifndef CONFIG_NXP_LSCH3_2
 #define SYS_FSL_QSPI_ADDR			(CONFIG_SYS_IMMR + 0x010c0000)
+#else
+#define SYS_NXP_FSPI_ADDR			(CONFIG_SYS_IMMR + 0x010c0000)
+#define SYS_NXP_FSPI_LUTKEY_BASE_ADDR		0x18
+#define SYS_NXP_FSPI_LUT_BASE_ADDR		0x200
+#endif
 #define CONFIG_SYS_FSL_ESDHC_ADDR		(CONFIG_SYS_IMMR + 0x01140000)
 #define CONFIG_SYS_IFC_ADDR			(CONFIG_SYS_IMMR + 0x01240000)
 #define CONFIG_SYS_NS16550_COM1			(CONFIG_SYS_IMMR + 0x011C0500)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Enable AHB support for Flexspi controller interface meaning memory can be accessed via md command using absolute addresses

---
v2:
1. Rename FSPI to FlexSPI in description and comments
2. s/cmd/command
3. Add macro and comments to improve readablity of code in soc.c
4. Add declaration in soc.h for fspi_ahb_init()

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig     | 10 +++++
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       | 44 +++++++++++++++++++
 .../arm/include/asm/arch-fsl-layerscape/soc.h |  7 +++
 3 files changed, 61 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +10 -0
index 5280d33ec8..70f26973e9 100644
@@ -327,6 +327,16 @@ config SYS_FSPI_AHB_INIT
 	  performed. Default LUT programmed in AHB mode is Fast Read command
 	  with 4-byte addressing enabled.
 
+config FSPI_AHB_EN_4BYTE
+	bool "Enable 4-byte Fast Read command for AHB mode"
+	depends on NXP_FSPI
+	default n
+	help
+	  The default setting for FlexSPI AHB bus just supports 3-byte addressing.
+	  But some FlexSPI flash sizes are up to 64MBytes.
+	  This flag enables fast read command for AHB mode and modifies required
+	  LUT to support full FlexSPI flash.
+
 config SYS_CCI400_OFFSET
 	hex "Offset for CCI400 base"
 	depends on SYS_FSL_HAS_CCI400
arch/arm/cpu/armv8/fsl-layerscape/soc.c +44 -0

56 lines not on this page · raw message

arch/arm/include/asm/arch-fsl-layerscape/soc.h +7 -0
index 61b6e4bf07..84450c76ed 100644
@@ -102,6 +102,13 @@ void init_pfe_scfg_dcfg_regs(void);
 int qspi_ahb_init(void);
 #endif
 
+#ifdef CONFIG_FSPI_AHB_EN_4BYTE
+#define SYS_NXP_FSPI_LUTCR_LOCK			0x00000001
+#define SYS_NXP_FSPI_LUTCR_UNLOCK		0x00000002
+#define SYS_NXP_FSPI_LUTKEY			0x5AF05AF0
+int fspi_ahb_init(void);
+#endif
+
 void cpu_name(char *name);
 #ifdef CONFIG_SYS_FSL_ERRATUM_A009635
 void erratum_a009635(void);
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 1/1 fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Quoted 23 lines · Ashish Kumar

Enable AHB support for Flexspi controller interface meaning memory can be accessed via md command using absolute addresses

---
v2:
1. Rename FSPI to FlexSPI in description and comments
2. s/cmd/command
3. Add macro and comments to improve readablity of code in soc.c
4. Add declaration in soc.h for fspi_ahb_init()

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig     | 10 +++++
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       | 44 +++++++++++++++++++
 .../arm/include/asm/arch-fsl-layerscape/soc.h |  7 +++
 3 files changed, 61 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
index 5280d33ec8..70f26973e9 100644

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 328

Quoted 2 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
@@ -327,6 +327,16 @@ config SYS_FSPI_AHB_INIT
 	  performed. Default LUT programmed in AHB mode is Fast Read command
 	  with 4-byte addressing enabled.

SYS_FSPI_AHB_INIT doesn't exist yet.

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 339

Quoted 11 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +10 -0
+config FSPI_AHB_EN_4BYTE
+	bool "Enable 4-byte Fast Read command for AHB mode"
+	depends on NXP_FSPI
+	default n
+	help
+	  The default setting for FlexSPI AHB bus just supports 3-byte addressing.
+	  But some FlexSPI flash sizes are up to 64MBytes.
+	  This flag enables fast read command for AHB mode and modifies required
+	  LUT to support full FlexSPI flash.
+

NXP_FSPI doesn't exist yet.

Do you have dependency I missed?

York

#3 lore raw

PATCH v2 1/1 fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Quoted 43 lines · York Sun
Quoted 23 lines · Ashish Kumar

Enable AHB support for Flexspi controller interface meaning memory can be accessed via md command using absolute addresses

---
v2:
1. Rename FSPI to FlexSPI in description and comments
2. s/cmd/command
3. Add macro and comments to improve readablity of code in soc.c
4. Add declaration in soc.h for fspi_ahb_init()

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig     | 10 +++++
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       | 44 +++++++++++++++++++
 .../arm/include/asm/arch-fsl-layerscape/soc.h |  7 +++
 3 files changed, 61 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
index 5280d33ec8..70f26973e9 100644

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 328

Quoted 2 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
@@ -327,6 +327,16 @@ config SYS_FSPI_AHB_INIT
 	  performed. Default LUT programmed in AHB mode is Fast Read command
 	  with 4-byte addressing enabled.

SYS_FSPI_AHB_INIT doesn't exist yet.

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 339

Quoted 11 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +10 -0
+config FSPI_AHB_EN_4BYTE
+	bool "Enable 4-byte Fast Read command for AHB mode"
+	depends on NXP_FSPI
+	default n
+	help
+	  The default setting for FlexSPI AHB bus just supports 3-byte addressing.
+	  But some FlexSPI flash sizes are up to 64MBytes.
+	  This flag enables fast read command for AHB mode and modifies required
+	  LUT to support full FlexSPI flash.
+

NXP_FSPI doesn't exist yet.

Quoted 2 lines

Do you have dependency I missed?

Please fix your patch asap.

York

#4 lore raw

PATCH v2 1/1 fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Quoted 58 lines

-----Original Message-----
From: York Sun
Sent: Tuesday, November 13, 2018 3:34 AM
To: Ashish Kumar <[email protected]>
Cc: u-boot at lists.denx.de; Rajat Srivastava <[email protected]>; Yogesh Narayan Gaur <[email protected]>
Subject: Re: [PATCH v2] fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Quoted 18 lines · York Sun
Quoted 17 lines · Ashish Kumar

Enable AHB support for Flexspi controller interface meaning memory can be accessed via md command using absolute addresses

---
v2:
1. Rename FSPI to FlexSPI in description and comments 2.
s/cmd/command 3. Add macro and comments to improve readablity of code in soc.c 4. Add declaration in soc.h for fspi_ahb_init()

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig     | 10 +++++
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       | 44 +++++++++++++++++++
 .../arm/include/asm/arch-fsl-layerscape/soc.h |  7 +++
 3 files changed, 61 insertions(+)
Quoted 7 lines

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 327

Quoted 7 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
index 5280d33ec8..70f26973e9 100644
@@ -327,6 +327,16 @@ config SYS_FSPI_AHB_INIT
 	  performed. Default LUT programmed in AHB mode is Fast Read

command

Quoted 11 lines

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 328

Quoted 1 line
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0 -0
 	  with 4-byte addressing enabled.

SYS_FSPI_AHB_INIT doesn't exist yet.

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT

Quoted 7 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +6 -0
+config FSPI_AHB_EN_4BYTE
+	bool "Enable 4-byte Fast Read command for AHB mode"
+	depends on NXP_FSPI
+	default n
+	help
+	  The default setting for FlexSPI AHB bus just supports 3-byte

addressing.

Quoted 2 lines

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 336

Quoted 2 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +2 -0
+	  But some FlexSPI flash sizes are up to 64MBytes.
+	  This flag enables fast read command for AHB mode and modifies

required

Quoted 5 lines

arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_FSPI_AHB_INIT · line 339

Quoted 2 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +2 -0
+	  LUT to support full FlexSPI flash.
+

NXP_FSPI doesn't exist yet.

Quoted 4 lines
Quoted 2 lines

Do you have dependency I missed?

Please fix your patch asap.

I have created v3[http://patchwork.ozlabs.org/patch/996846/] adding dependency patch information.

Regards
Ashish

Quoted 2 lines

York