diff --git a/samples/drivers/jesd216/boards/apollo3p_evb.conf b/samples/drivers/jesd216/boards/apollo3p_evb.conf new file mode 100644 index 00000000000000..e3c0311ec6f466 --- /dev/null +++ b/samples/drivers/jesd216/boards/apollo3p_evb.conf @@ -0,0 +1,9 @@ +# Copyright (c) 2024 Ambiq Micro Inc. +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_FLASH_MSPI_ATXP032=y +CONFIG_MSPI_INIT_PRIORITY=40 +CONFIG_FLASH_INIT_PRIORITY=50 +CONFIG_PM_DEVICE=y +CONFIG_SPI=n +CONFIG_SPI_NOR=n diff --git a/samples/drivers/jesd216/boards/apollo3p_evb.overlay b/samples/drivers/jesd216/boards/apollo3p_evb.overlay new file mode 100644 index 00000000000000..cef3bf322ed627 --- /dev/null +++ b/samples/drivers/jesd216/boards/apollo3p_evb.overlay @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 Ambiq Micro Inc. + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + mspi0 = &mspi1; + }; +}; + +&gpio32_63 { + status = "okay"; +}; + +&mspi1 { + + compatible = "ambiq,mspi-controller"; + pinctrl-0 = <&mspi1_default>; + pinctrl-1 = <&mspi1_sleep>; + pinctrl-2 = <&mspi1_flash>; + pinctrl-names = "default","sleep","flash"; + status = "okay"; + + ce-gpios = <&gpio32_63 18 GPIO_ACTIVE_LOW>; + + cmdq-buffer-location = ".mspi_buff"; + cmdq-buffer-size = <256>; + + atxp032: atxp032@0 { + compatible = "ambiq,mspi-device", "mspi-atxp032"; + size = ; + reg = <0>; + status = "okay"; + mspi-max-frequency = <48000000>; + mspi-io-mode = "MSPI_IO_MODE_OCTAL"; + mspi-data-rate = "MSPI_DATA_RATE_SINGLE"; + mspi-hardware-ce-num = <0>; + read-command = <0x0B>; + write-command = <0x02>; + command-length = "INSTR_1_BYTE"; + address-length = "ADDR_4_BYTE"; + rx-dummy = <8>; + tx-dummy = <0>; + xip-config = <1 0 0 0>; + ce-break-config = <0 0>; + ambiq,timing-config-mask = <3>; + ambiq,timing-config = <0 8 0 0 0 0 0 0>; + }; + +}; + +&pinctrl { + + mspi1_sleep: mspi1_sleep{ + group1 { + pinmux = , + , + , + , + , + , + , + , + , + , + ; + }; + }; + + mspi1_flash: mspi1_flash{ + + group1 { + pinmux = , + , + , + , + , + , + , + ; + drive-strength = "0.75"; + ambiq,iom-mspi = <0>; + ambiq,iom-num = <1>; + }; + + group2 { + pinmux = ; + drive-strength = "0.75"; + ambiq,iom-mspi = <0>; + ambiq,iom-num = <2>; + }; + + group3 { + pinmux = ; + drive-strength = "1.0"; + ambiq,iom-mspi = <0>; + ambiq,iom-num = <1>; + }; + + group4 { + pinmux = ; + }; + + }; + +}; diff --git a/samples/drivers/jesd216/src/main.c b/samples/drivers/jesd216/src/main.c index 480649397b6b24..bcf3c779ff834e 100644 --- a/samples/drivers/jesd216/src/main.c +++ b/samples/drivers/jesd216/src/main.c @@ -26,6 +26,8 @@ #define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nxp_s32_qspi_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(mspi_atxp032) +#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(mspi_atxp032) #else #error Unsupported flash driver #define FLASH_NODE DT_INVALID_NODE