I am using QSPI NOR flash (MX25R6435F / MX25L51245G) with nRF5340. I am trying to enable 4-byte address mode using the SFDP BFP table in the device tree overlay.
When I include the SFDP BFP table in the overlay, the flash does not enter 4-byte address mode.
However, if I remove the SFDP table and manually specify:
address-size-32;
enter-4byte-addr = <0x01>;
then the flash enters 4-byte address mode, but the read/write data becomes corrupted, and file system mount failing.
Below is my overlay configuration:
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
mx25r64: mx25r6435f@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
sck-frequency = <32000000>;
jedec-id = [ c2 20 1a ];
sfdp-bfp = [ e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff 85 ];
size = <536870912>; /* 512 Mbit = 64 MByte */
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
raw_rec_part: partition@0 {
label = "raw_rec";
reg = <0x00000000 0x00800000>;
};
fatfs_part: partition@800000 {
label = "fatfs";
reg = <0x00800000 0x03800000>;
};
};
};
};
Issue:
-
With SFDP BFP table → Flash does not enter 4-byte address mode
-
Without SFDP BFP table → Flash enters 4-byte mode but data is corrupted
Questions:
-
Is the SFDP BFP table format correct for enabling 4-byte address mode?
-
Does the nordic,qspi-nor driver automatically detect 4-byte mode from SFDP, or do we still need to explicitly specify
address-size-32? -
Is there any additional configuration required in the SFDP BFP DWORDs for 4-byte addressing?

