tests: mspi: Add apollo3p_evb board to flash test
The apollo3p_evb board has a ATXP032 NOR flash and driver is tested in mspi/flash test. Signed-off-by: Swift Tian <swift.tian@ambiq.com>
This commit is contained in:
parent
ece0c9b0d3
commit
2b103137ab
3 changed files with 118 additions and 2 deletions
7
tests/drivers/mspi/flash/boards/apollo3p_evb.conf
Normal file
7
tests/drivers/mspi/flash/boards/apollo3p_evb.conf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
|
||||
# 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
|
||||
107
tests/drivers/mspi/flash/boards/apollo3p_evb.overlay
Normal file
107
tests/drivers/mspi/flash/boards/apollo3p_evb.overlay
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
|
||||
* 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 = "mspi-atxp032";
|
||||
size = <DT_SIZE_M(32)>;
|
||||
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 = <GPIO_P51>,
|
||||
<GPIO_P52>,
|
||||
<GPIO_P53>,
|
||||
<GPIO_P54>,
|
||||
<GPIO_P55>,
|
||||
<GPIO_P56>,
|
||||
<GPIO_P57>,
|
||||
<GPIO_P58>,
|
||||
<GPIO_P59>,
|
||||
<GPIO_P69>,
|
||||
<GPIO_P50>;
|
||||
};
|
||||
};
|
||||
|
||||
mspi1_flash: mspi1_flash{
|
||||
|
||||
group1 {
|
||||
pinmux = <MSPI1_0_P51>,
|
||||
<MSPI1_1_P52>,
|
||||
<MSPI1_2_P53>,
|
||||
<MSPI1_3_P54>,
|
||||
<MSPI1_4_P55>,
|
||||
<MSPI1_5_P56>,
|
||||
<MSPI1_6_P57>,
|
||||
<MSPI1_7_P58>;
|
||||
drive-strength = "0.75";
|
||||
ambiq,iom-mspi = <0>;
|
||||
ambiq,iom-num = <1>;
|
||||
};
|
||||
|
||||
group2 {
|
||||
pinmux = <MSPI1_8_P59>;
|
||||
drive-strength = "0.75";
|
||||
ambiq,iom-mspi = <0>;
|
||||
ambiq,iom-num = <2>;
|
||||
};
|
||||
|
||||
group3 {
|
||||
pinmux = <NCE50_P50>;
|
||||
drive-strength = "1.0";
|
||||
ambiq,iom-mspi = <0>;
|
||||
ambiq,iom-num = <1>;
|
||||
};
|
||||
|
||||
group4 {
|
||||
pinmux = <GPIO_P69>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
@ -7,10 +7,12 @@ tests:
|
|||
- drivers
|
||||
- mspi
|
||||
- flash
|
||||
filter: dt_compat_enabled("zephyr,mspi-emul-controller")
|
||||
and dt_compat_enabled("zephyr,mspi-emul-flash")
|
||||
filter: dt_compat_enabled("zephyr,mspi-emul-flash") or
|
||||
dt_compat_enabled("mspi-atxp032")
|
||||
harness: ztest
|
||||
platform_allow:
|
||||
- native_sim
|
||||
- apollo3p_evb
|
||||
integration_platforms:
|
||||
- native_sim
|
||||
- apollo3p_evb
|
||||
|
|
|
|||
Loading…
Reference in a new issue