LS1046ARDB use QSPI emulator

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1046ARDB use QSPI emulator

658 Views
srechermann
Contributor III

Hi,

I want to use the QSPI emulator port (J23) to connect the board to a SPI device. I'm using an extended version of the core-image-minimal. On the Reference Design Board Reference Manual I found this description of figure 14 in the document "The LS1046ARDB supports three 2:1 switches (NX3DV221TK: U41, U42, and U43), which drive the QSPI chip-select signals to
one of the two QSPI NOR flash memories or the QSPI emulator". However I don't know how to configure these switches as I did not found them in the documentation. I can see these are not dip switches like SW3, SW4 and SW5. Do I need to configure them in the RCW or in the device tree or somewhere else? I'm booting from SD card so not beeing able to access the two QSPI flash modules would not matter.

I guess what I have to do at least is to add a node for the emulator in the device tree as the /build/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/5.15.71+gitAUTOINC+95448dd0dc-r0/git/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts file only contains two nodes for the flash modules:

 

&qspi {
	status = "okay";

	s25fs512s0: flash@0 {
		compatible = "jedec,spi-nor";
		#address-cells = <1>;
		#size-cells = <1>;
		spi-max-frequency = <50000000>;
		spi-rx-bus-width = <1>;
		spi-tx-bus-width = <1>;
		reg = <0>;
	};

	s25fs512s1: flash@1 {
		compatible = "jedec,spi-nor";
		#address-cells = <1>;
		#size-cells = <1>;
		spi-max-frequency = <50000000>;
		spi-rx-bus-width = <1>;
		spi-tx-bus-width = <1>;
		reg = <1>;
	};
};

 

How do I have to modify the device tree? And do I need to change the RCW or any additional components like the kernel config?

Tags (2)
0 Kudos
Reply
3 Replies

599 Views
srechermann
Contributor III

Thanks for you answer. I'm using the yocto version kirkstone. So here is the exact u-boot-qoriq version I'm using, taken from the recipe: sources/meta-qoriq/recipes-bsp/u-boot/u-boot-qoriq_2022.04.bb

UBOOT_BRANCH ?= "lf_v2022.04"
UBOOT_SRC ?= "git://github.com/nxp-qoriq/u-boot.git;protocol=https"
SRC_URI = "${UBOOT_SRC};branch=${UBOOT_BRANCH}"
SRCREV = "181859317bfafef1da79c59a4498650168ad9df6"

Unfortunately this u-boot version does not contain a drivers/mtd/spi/sf_params.c file.

Do you know what I have to change here?

0 Kudos
Reply

606 Views
yipingwang
NXP TechSupport
NXP TechSupport

switch settings" of LS1046ARDBRM (Rev3).   SW3[3:5] = 100       Emulator access

Please modify u-boot and Linux Kernel dts(you mentioned)

&qspi {
status = "okay";

s25fs512s0: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
reg = <0>;
};

s25fs512s1: flash@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
reg = <1>;
};
};

In addition, please refer to the following patch in u-boot.

Date: Mon, 25 Apr 2016 16:05:36 +0530
Subject: [PATCH] driver: mtd: spi: Adding support for QSPI Emulator

Serial number and vendor id are added for The QSPI Emulator

---
drivers/mtd/spi/sf_params.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c
index 4f37e33eb0..1424f2a8f9 100644
--- a/drivers/mtd/spi/sf_params.c
+++ b/drivers/mtd/spi/sf_params.c
@@ -67,6 +67,7 @@ const struct spi_flash_params spi_flash_params_table[] = {
{"S25FL128S_64K", 0x012018, 0x4d01, 64 * 1024, 256, RD_FULL, WR_QPP},
{"S25FL256S_256K", 0x010219, 0x4d00, 256 * 1024, 128, RD_FULL, WR_QPP},
{"S25FL256S_64K", 0x010219, 0x4d01, 64 * 1024, 512, RD_FULL, WR_QPP},
+ {"S25FS512S", 0x010220, 0x0102, 256 * 1024, 256, RD_FULL, WR_QPP},
{"S25FL512S_256K", 0x010220, 0x4d00, 256 * 1024, 256, RD_FULL, WR_QPP},
{"S25FL512S_64K", 0x010220, 0x4d01, 64 * 1024, 1024, RD_FULL, WR_QPP},
{"S25FL512S_512K", 0x010220, 0x4f00, 256 * 1024, 256, RD_FULL, WR_QPP},
--
2.17.1

 

0 Kudos
Reply

553 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to drivers/mtd/spi/spi-nor-ids.c.

0 Kudos
Reply