1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/delete-node/ &mx25r64;
8
9&qspi {
10	status = "disabled";
11};
12
13/* The mx25, on nrf52840dk/nrf52840, uses pins for spi0, spi1, spi2 and spi3
14 * to provide quad-spi feature. In individual specifications each of the spi
15 * notes define own clock source (SCK), but spi2 shares the same clock source
16 * as qspi configuration, which is pin (0,19). That is why spi2 is used here
17 * to communicate with mx25, when qspi is not used, to avoid rerouting clock
18 * pin.
19 */
20&spi2 {
21	compatible = "nordic,nrf-spi";
22	status = "okay";
23	cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
24	pinctrl-0 = <&spi2_default>;
25	pinctrl-1 = <&spi2_sleep>;
26	pinctrl-names = "default", "sleep";
27	mx25r64: mx25r6435f@0 {
28		compatible = "jedec,spi-nor";
29		reg = <0>;
30		spi-max-frequency = <8000000>;
31		jedec-id = [c2 28 17];
32		sfdp-bfp = [
33			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
34			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
35			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
36			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
37		];
38		size = <67108864>;
39		has-dpd;
40		t-enter-dpd = <10000>;
41		t-exit-dpd = <35000>;
42	};
43};
44
45&mx25r64 {
46	partitions {
47		compatible = "fixed-partitions";
48		#address-cells = <1>;
49		#size-cells = <1>;
50
51		lfs1_partition: partition@0 {
52			label = "lfs1_partition";
53			reg = <0x00000000 0x00010000>;
54		};
55	};
56};
57
58/ {
59	fstab {
60		compatible = "zephyr,fstab";
61		lfs1: lfs1 {
62			compatible = "zephyr,fstab,littlefs";
63			mount-point = "/lfs1";
64			partition = <&lfs1_partition>;
65			automount;
66			read-size = <16>;
67			prog-size = <16>;
68			cache-size = <64>;
69			lookahead-size = <32>;
70			block-cycles = <512>;
71		};
72	};
73};
74