Commit 16610c8a authored by Pete Johanson's avatar Pete Johanson Committed by Alberto Escolar
Browse files

drivers: flash: Add MAX32 SPIXF NOR test/samples



Update common flash test and jesd216 samples to work on the
APARD32690-SL board which has MX25U6432FM2I02 on-board.

Signed-off-by: default avatarPete Johanson <pete.johanson@analog.com>
parent ecf7f846
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -308,3 +308,19 @@ pmod_spi: &spi4 {
		config-reg-vals = <0x801F>;
	};
};

&spixf {
	pinctrl-0 = <&spixf_sdio0_p0_1 &spixf_sdio2_p0_2 &spixf_sck_p0_3
		     &spixf_sdio3_p0_4 &spixf_sdio1_p0_5 &spixf_ss0_p0_6>;
	pinctrl-names = "default";

	mx25u64: mx25u6432f@0 {
		compatible = "adi,max32-spixf-nor";
		reg = <0x0 DT_SIZE_M(8)>; /* 64 Mbits */
		qspi-max-frequency = <80000000>;
		jedec-id = [c2 37 25];
		reset-cmd;
		spi-bus-width = <4>;
		writeoc = "PP_1_1_4";
	};
};
+13 −0
Original line number Diff line number Diff line
@@ -103,6 +103,19 @@
			reg = <0x200d0000 DT_SIZE_K(64)>;
		};

		spixf: spixf@40027000 {
			compatible = "adi,max32-spixf";
			reg = <0x40027000 0x1000>;

			#address-cells = <1>;
			#size-cells = <1>;
			interrupts = <38 0>;

			clocks = <&gcr ADI_MAX32_CLOCK_BUS0 30>, <&gcr ADI_MAX32_CLOCK_BUS0 31>;

			status = "disabled";
		};

		flc1: flash_controller@40029400 {
			compatible = "adi,max32-flash-controller";
			reg = <0x40029400 0x400>;
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(st_stm32_xspi_nor)
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_qspi_nor)
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nxp_s32_qspi_nor)
#elif DT_HAS_COMPAT_STATUS_OKAY(adi_max32_spixf_nor)
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(adi_max32_spixf_nor)
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_imx_flexspi_nor)
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nxp_imx_flexspi_nor)
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_ra_ospi_b_nor)
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Analog Devices, Inc
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&spixf {
	status = "okay";
};

&mx25u64 {
	status = "okay";
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		storage_partition: partition@0 {
			label = "storage";
			reg = <0x0 DT_SIZE_M(1)>;
		};
	};
};
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@ tests:
    extra_args: EXTRA_CONF_FILE=boards/nrf52840dk_nrf52840_qspi_nor.conf
    integration_platforms:
      - nrf52840dk/nrf52840
  drivers.flash.common.max32_spixf_nor:
    platform_allow: apard32690/max32690/m4
    extra_args: DTC_OVERLAY_FILE=boards/apard32690_max32690_m4_spixf_nor.overlay
    integration_platforms:
      - apard32690/max32690/m4
  drivers.flash.common.nrf_qspi_nor.size_in_bytes:
    platform_allow: nrf52840dk/nrf52840
    extra_args: