Hi Jared,
thanks for the answer and kind welcome.
What you suggest is exactly what I did try at the beginning and eventually it works. But I was curious about that SFDP parameters, so besides reading datasheets - which some of them has pieces of actual jesd216 standard - I also tried to read the actual data, but with not much success, as I explained in my original post.
However lately I discovered that SFDP pointer from SFDP header is not interpreted correctly, and after little fix I was able to read actual SFDP parameters from my flash memory!
index 64367d673a..35362ddf22 100644
--- a/drivers/flash/jesd216.h
+++ b/drivers/flash/jesd216.h
@@ -51,7 +51,7 @@ static inline uint32_t jesd216_param_addr(const struct jesd216_param_header *hp)
{
return ((hp->ptp[2] << 16)
| (hp->ptp[1] << 8)
- | (hp->ptp[0] << 0));
+ | (hp->ptp[0] << 0)) << 2;
}
https://github.com/zephyrproject-rtos/zephyr/issues/47970
Here is the part of my .dts with the actual SFDP parameter table on Spansion S25FL127S device:
s25fl127: s25fl127@0 {
compatible = "jedec,spi-nor";
reg = <0>;
label = "S25FL127";
/* size in Megabits! */
size = <0x8000000>;
spi-max-frequency = <1000000>;
enter-4byte-addr = <0>;
jedec-id = [01 20 18];
sfdp-bfp = [
ff ff f3 ff ff ff ff 07
44 eb 08 6b 08 3b 80 bb
e6 ff ff ff ff ff ff ff
ff ff ff ff 0c 20 10 d8
00 ff 00 ff
];
status = "okay";
};