FLEXSPI erase and write issue on 2160A-TCD platform

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FLEXSPI erase and write issue on 2160A-TCD platform

1,011件の閲覧回数
andy_ueng
Contributor I

We encounter FLEXSPI erase and write issue. We use the following commands to test FLEXSPI read, write, and erase.
mtd_debug erase /dev/mtd2 0x0000000 0x10000
dd if=/dev/zero of=data.hex count=1 bs=65536
mtd_debug write /dev/mtd2 0x0000000 0x10000 data.hex
mtd_debug read /dev/mtd2 0x0000000 0x10000 dump

The contents of data.hex and dump files should be same. But unfortunately the contents of these two files are not identical.

P.S.
fsl-lx2160a-tcd.dts is dts file.
spi-nxp-fspi.c is FLEXSPI driver source file.
erase.PNG, read.PNG, and write.PNG are captured from Zeroplus logic analyzer.
Plese kindly give us your advice.
Thanks!

0 件の賞賛
3 返答(返信)

954件の閲覧回数
andy_ueng
Contributor I

I have fixed this issue by disabling erasing and writing protection from NOR flash register.

0 件の賞賛

988件の閲覧回数
andy_ueng
Contributor I
    Thanks for your reply. We use fspi section in fsl-lx2160a-tcd.dts. Do we need to modify the following fspi section?
&fspi {
status = "okay";
 
n25q128a0: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
m25p,fast-read;
spi-max-frequency = <20000000>;
reg = <0>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
 
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
 
partition@0 {
label = "BL2";
reg = <0 0x100000>;
};
partition@100000 {
label = "BL3";
reg = <0x100000 0x400000>;
};
partition@500000 {
label = "BootEnv";
reg = <0x500000 0x100000>;
};
partition@600000 {
label = "SecureBoot";
reg = <0x600000 0x200000>;
};
partition@800000 {
label = "DDRPHY";
reg = <0x800000 0x80000>;
};
partition@880000 {
label = "FuseHeader";
reg = <0x880000 0x80000>;
};
partition@900000 {
label = "DPAA1";
reg = <0x900000 0x80000>;
};
partition@980000 {
label = "ETHPHY";
reg = <0x980000 0x80000>;
};
partition@A00000 {
label = "DPAA2";
reg = <0xA00000 0x300000>;
};
partition@D00000 {
label = "DPAA2DPL";
reg = <0xD00000 0x100000>;
};
partition@E00000 {
label = "DPAA2DPC";
reg = <0xE00000 0x100000>;
};
partition@F00000 {
label = "DTB";
reg = <0xF00000 0x100000>;
};
};
};
 
The following URL is datasheet of NOR flash we use.
0 件の賞賛

995件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

In your dts file, please define FSPI flash device and configure "compatible" property according to the flash device on your target board. Please refer to the following example, please refer to SPI NOR flash driver drivers/mtd/spi-nor/spi-nor.c.

&fspi {
status = "okay";

mt35xu512aba0: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,m25p80";
m25p,fast-read;
spi-max-frequency = <50000000>;
reg = <0>;
spi-rx-bus-width = <8>;
spi-tx-bus-width = <8>;
};

mt35xu512aba1: flash@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,m25p80";
m25p,fast-read;
spi-max-frequency = <50000000>;
reg = <1>;
spi-rx-bus-width = <8>;
spi-tx-bus-width = <8>;
};
};

0 件の賞賛