1/*
2 * Copyright (c) 2018, NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include "mimxrt1060_evk.dtsi"
8
9/ {
10	chosen {
11		zephyr,flash-controller = &s26ks512s0;
12		zephyr,flash = &s26ks512s0;
13		zephyr,code-partition = &slot0_partition;
14	};
15};
16
17&flexspi {
18	status = "okay";
19	ahb-prefetch;
20	ahb-read-addr-opt;
21	ahb-bufferable;
22	ahb-cacheable;
23	sck-differential-clock;
24	combination-mode;
25	rx-clock-source = <3>;
26	reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(64)>;
27	s26ks512s0: s26ks512s@0 {
28		compatible = "nxp,imx-flexspi-hyperflash";
29		size = <DT_SIZE_M(64*8)>;
30		reg = <0>;
31		spi-max-frequency = <166000000>;
32		word-addressable;
33		cs-interval-unit = <1>;
34		cs-interval = <2>;
35		cs-hold-time = <0>;
36		cs-setup-time = <3>;
37		data-valid-time = <1>;
38		column-space = <3>;
39		ahb-write-wait-unit = <2>;
40		ahb-write-wait-interval = <20>;
41		status = "okay";
42		erase-block-size = <DT_SIZE_K(256)>;
43		write-block-size = <16>;
44
45		partitions {
46			compatible = "fixed-partitions";
47			#address-cells = <1>;
48			#size-cells = <1>;
49			boot_partition: partition@0 {
50				label = "mcuboot";
51				reg = <0x00000000 DT_SIZE_K(256)>;
52			};
53			/* The MCUBoot swap-move algorithm uses the last 2 sectors
54			 * of the primary slot0 for swap status and move.
55			 */
56			slot0_partition: partition@40000 {
57				label = "image-0";
58				reg = <0x00040000 (DT_SIZE_M(3) + DT_SIZE_K(512))>;
59			};
60			slot1_partition: partition@3C0000 {
61				label = "image-1";
62				reg = <0x003C0000 DT_SIZE_M(3)>;
63			};
64			storage_partition: partition@6C0000 {
65				label = "storage";
66				reg = <0x006C0000 (DT_SIZE_M(58) - DT_SIZE_K(768))>;
67			};
68		};
69	};
70};
71