[PATCH v1 11/23] board: nbxv3: enable FlexSPI boot NOR (GD55LB02GF) and FIT boot

Vincent Jardin <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
Enable the SPI controllers used on the module and attach the boot NOR:

 - &fspi (FlexSPI) supports the 256 MiB GigaDevice GD55LB02GF boot NOR
 - &dspi0 (lx2160a DSPI1, on module management SPI, already carrying the
   ZL30733 DPLL) and &dspi2 (DSPI3, it is the carrier general purpose SPI)
   are enabled.

SPI bus alias map, so the boot NOR is always `sf probe 3:0`:
 spi0 = &dspi0,
 spi2 = &dspi2,
 spi3 = &fspi.

defconfig: add the needed dependencies for loading FIT images.

Signed-off-by: Vincent Jardin <[email protected]>
---

 arch/arm/dts/fsl-lx2160a-nbxv3.dts | 23 +++++++++++++++++++++++
 configs/nbxv3_tfa_defconfig        |  8 ++++++++
 2 files changed, 31 insertions(+)

diff --git a/arch/arm/dts/fsl-lx2160a-nbxv3.dts b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
index 9b79d2c3253..fad6e3c292a 100644
--- a/arch/arm/dts/fsl-lx2160a-nbxv3.dts
+++ b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
@@ -16,6 +16,9 @@
 
 	aliases {
 		serial0 = &uart0;
+		spi0 = &dspi0;
+		spi2 = &dspi2;
+		spi3 = &fspi;
 	};
 };
 
@@ -79,9 +82,29 @@
 };
 
 &dspi0 { /* DSPI1: on module management SPI */
+	status = "okay";
+
 	dpll@0 {
 		compatible = "microchip,zl30733";
 		reg = <0>;
 		spi-max-frequency = <12500000>;
 	};
 };
+
+&fspi {
+	status = "okay";
+
+	flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "gigadevice,gd55lb02gf", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <150000000>;
+		spi-rx-bus-width = <1>;
+		spi-tx-bus-width = <1>;
+	};
+};
+
+&dspi2 {
+	status = "okay";
+};
diff --git a/configs/nbxv3_tfa_defconfig b/configs/nbxv3_tfa_defconfig
index 6d55a808a76..9cdf11b9975 100644
--- a/configs/nbxv3_tfa_defconfig
+++ b/configs/nbxv3_tfa_defconfig
@@ -10,6 +10,7 @@ CONFIG_NR_DRAM_BANKS=3
 CONFIG_ENV_SIZE=0x4000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-nbxv3"
+CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_SYS_MONITOR_LEN=958464
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
@@ -19,6 +20,7 @@ CONFIG_REMAKE_ELF=y
 CONFIG_MP=y
 CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 # CONFIG_EFI_LOADER is not set
+CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_PBSIZE=532
@@ -26,6 +28,7 @@ CONFIG_SYS_PBSIZE=532
 CONFIG_RESET_PHY_R=y
 CONFIG_CMDLINE_PS_SUPPORT=y
 CONFIG_CMD_HISTORY=y
+CONFIG_CMD_SPI=y
 CONFIG_CMD_LOG=y
 CONFIG_OF_CONTROL=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
@@ -33,10 +36,15 @@ CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_FSL_DDR_INTLV_256B=y
 CONFIG_DM_I2C=y
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_SYS_MEMAC_LITTLE_ENDIAN=y
 CONFIG_DM_SERIAL=y
 CONFIG_PL01X_SERIAL=y
+CONFIG_NXP_FSPI=y
 CONFIG_WDT=y
 CONFIG_WDT_SBSA=y
+CONFIG_ZSTD=y
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.