Hi,
I am using a custom board based on nrf5340. I have an external QSPI flash that is different from the one defined by default dtsi file of nrf5340.
My overlay file throws no error if the default node and the alias are commented out from the actual nrf5340 board dtsi file
Default alias:
spi-flash0 = &mx25r64;
Default node:
&qspi {
status = "";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
mx25r64: mx25r6435f@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
/* MX25R64 supports only pp and pp4io */
writeoc = "pp4io";
/* MX25R64 supports all readoc options */
readoc = "read4io";
sck-frequency = <8000000>;
jedec-id = [c2 28 17];
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 ff
];
size = <67108864>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
};
};
Custom overlay alias
qspi-flash0 = &en25qh64a;
overlay
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
en25qh64a: en25qh64a@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
/* EN25QH64A supports pp and pp4io */
writeoc = "pp4io";
/* EN25QH64A supports all readoc options */
readoc = "read4io";
sck-frequency = <8000000>;
jedec-id = [c2 28 17];
// 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 ff
// ];
size = <67108864>; /* 64 Mbit = 8 MB */
has-dpd;
t-enter-dpd = <10000>; /* 10 µs in nanoseconds */
t-exit-dpd = <30000>; /* 30 µs in nanoseconds */
};
};
If the default qspi is not commented out, I am getting undefined reference to `__device_dts_ord_133' error
If the default qpsi is commented out, the custom overlay and alias works with no error.
If the default qpsi is commented out, the custom overlay and alias works with no error.
The whole point of an overlay file is that SDK need not be modified, but in my case i am modifying the SDK.
Am I missing out anything?
Thanks in advance
Am I missing out anything?
Thanks in advance