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