I built the zephyr/samples/drivers/spi_flash without issues but when I tried
west build -b nrf9160dk_nrf9160
the build fails unknown flash
I compared the circuitdojo_feather_nrf9160_common.dts and nrf9160dk_nrf9160_common.dts
and found the nrf9160dk_nrf9160 was/is missing:
w25q16jv: w25q16jv@0 {
compatible = “jedec,spi-nor”;
label = “W25Q16JV”;
reg = <0>;
spi-max-frequency = <40000000>;
wp-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
hold-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
size = <0×1000000>;
has-dpd;
t-enter-dpd = <4000>;
t-exit-dpd = <25000>;
jedec-id = [ef 40 15];
}; (from circuitdojo)

I built one for the DK:
mx25r6435f: mx25r6435f@0 {
compatible = “jedec,spi-nor”;
label = “mx25r6435f”;
reg = <0>;
spi-max-frequency = <40000000>;
size = <0×4000000>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
jedec-id = [c2 28 17];
}

Where did you find the information to build this?
Any idea why Nordic left it out of the nrf9160 but have it in the nrf5340:

mx25r64: mx25r6435f@0 {
compatible = “nordic,qspi-nor”;
reg = <0>;
/* MX24R64 supports only pp and pp4io /
writeoc = “pp4io”;
/
MX24R64 supports all readoc options */
readoc = “read4io”;
sck-frequency = <8000000>;
label = “MX25R64”;
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>;
};

Not a good way to kill a Sunday… The good part was the feather code building without issues!


    K2AAE which board are you using? The flash definition should be include in the board definitions in NCS.

    The latest section should look like this for the nRF9160 Feather:

    &spi3 {
    	compatible = "nordic,nrf-spim";
    	status = "okay";
    	sck-pin = <11>;
    	mosi-pin = <9>;
    	miso-pin = <28>;
    	cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
    	w25q32jv: w25q32jv@0 {
    		compatible = "jedec,spi-nor";
    		label = "W25Q32JV";
    		reg = <0>;
    		spi-max-frequency = <40000000>;
    		wp-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
    		hold-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
    		size = <0x2000000>;
    		has-dpd;
    		t-enter-dpd = <3000>;
    		t-exit-dpd = <30000>;
    		jedec-id = [ ef 40 16  ];
    	};
    };
    Terms and Conditions | Privacy Policy