Skip to content

Commit 749192a

Browse files
DINESHKUMARK1nashif
authored andcommitted
Board: amd : add board support for the Audio DSP on ACP_6_0 soc.
Create a acp_6_0_adsp board support for the Audio DSP on ACP soc. Signed-off-by: DineshKumar Kalva <[email protected]>
1 parent 173cc38 commit 749192a

File tree

13 files changed

+167
-230
lines changed

13 files changed

+167
-230
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) 2024 AMD
22
# SPDX-License-Identifier: Apache-2.0
33

4-
zephyr_include_directories(include)
4+
config BOARD_ACP_6_0_ADSP
5+
select SOC_ACP_6_0
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2024 AMD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <amd/acp_6_0.dtsi>
10+
11+
/ {
12+
model = "AMD ACP_6_0 Audio DSP";
13+
compatible = "acp_6_0";
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright 2024 AMD
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
identifier: acp_6_0_adsp/acp_6_0
8+
name: AMD ACP6.0 Audio DSP
9+
type: mcu
10+
arch: xtensa
11+
toolchain:
12+
- zephyr
13+
- xcc
14+
vendor: amd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_GEN_ISR_TABLES=y
4+
CONFIG_GEN_IRQ_VECTOR_TABLE=y
5+
CONFIG_XTENSA_RESET_VECTOR=y
6+
CONFIG_OUTPUT_SYMBOLS=y
7+
CONFIG_MULTI_LEVEL_INTERRUPTS=n
8+
CONFIG_2ND_LEVEL_INTERRUPTS=n
9+
CONFIG_DCACHE_LINE_SIZE_DETECT=n
10+
CONFIG_DCACHE_LINE_SIZE=128
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
board_set_flasher_ifnset(misc-flasher)
3+
board_finalize_runner_args(misc-flasher)
4+
board_set_rimage_target(rmb)

boards/amd/acp_6_0_adsp/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: acp_6_0_adsp
3+
full_name: ACP 6.0 Xtensa Audio DSP
4+
vendor: amd
5+
socs:
6+
- name: acp_6_0
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
.. zephyr:board:: acp_6_0_adsp
2+
3+
Overview
4+
********
5+
6+
ACP 6.0 is Audio co-processor in AMD SoC based on HiFi5 DSP Xtensa Architecture,
7+
Zephyr OS is ported to run various audio and speech use cases on
8+
the SOF based framework.
9+
10+
SOF can be built with either Zephyr or Cadence's proprietary
11+
Xtensa OS (XTOS) and run on a ACP 6.0 AMD platforms.
12+
13+
Hardware
14+
********
15+
16+
- Board features:
17+
18+
- RAM: 1.75MB HP SRAM & 512KB configurable IRAM/DRAM
19+
- Audio Interfaces:
20+
21+
- 1 x SP (I2S, PCM),
22+
- 1 x BT (I2S, PCM),
23+
- 1 x HS (I2S, PCM),
24+
- DMIC
25+
26+
Supported Features
27+
==================
28+
29+
The following hardware features are supported:
30+
31+
+-----------+------------+-------------------------------------+
32+
| Interface | Controller | Driver/Component |
33+
+===========+============+=====================================+
34+
| I2S | on-chip | I2S controller |
35+
+-----------+------------+-------------------------------------+
36+
| DMIC(PDM) | on-chip | PDM controller |
37+
+-----------+------------+-------------------------------------+
38+
39+
System Clock
40+
============
41+
42+
The ACP 6.0 SoC operates with an audio clock frequency ranging from 200 to 800 MHz.
43+
44+
System requirements
45+
*******************
46+
47+
Xtensa Toolchain (optional)
48+
===========================
49+
50+
The Zephyr SDK provides GCC-based toolchains necessary to build Zephyr for
51+
the AMD ACP boards. For users looking for higher optimization levels,
52+
building with the proprietary Xtensa toolchain from Cadence
53+
might be preferable.
54+
55+
The following instructions assume you have purchased and
56+
installed the toolchain(s) and core(s) for your board following
57+
instructions from Xtensa documentation.
58+
59+
If you choose to build with the Xtensa toolchain instead of the Zephyr SDK, set
60+
the following environment variables specific to the board in addition to the
61+
Xtensa toolchain environment variable listed below.
62+
63+
First, make sure, the necessary license is available from
64+
Cadence and set the license variables as per the instruction from Cadence.
65+
Next, set the following environment variables:
66+
67+
The bottom three variables are specific to acp_6_0.
68+
69+
.. code-block:: shell
70+
71+
export XTENSA_TOOLCHAIN_PATH="tools installed path"
72+
export XTENSA_BUILDS_DIR="user build directory path"
73+
export ZEPHYR_TOOLCHAIN_VARIANT=xcc
74+
export TOOLCHAIN_VER=RI-2019.1-linux
75+
export XTENSA_CORE=LX7_HiFi5_PROD
76+
77+
Programming and Debugging
78+
*************************
79+
80+
Building
81+
========
82+
83+
Build as usual.
84+
85+
.. zephyr-app-commands::
86+
:zephyr-app: samples/hello_world
87+
:board: acp_6_0_adsp/acp_6_0
88+
:goals: build
89+
90+
Flashing
91+
========
92+
93+
AMD supports only signed images flashing on ACP 6.0 platforms
94+
through ACP Linux Driver.
95+
96+
The following boot sequence messages can be observed in dmesg
97+
98+
- booting DSP firmware
99+
- ACP_DSP0_RUNSTALL : 0x0
100+
- ipc rx: 0x70000000
101+
- Firmware info: version 2:11:99-03a9d
102+
- Firmware: ABI 3:29:1 Kernel ABI 3:23:0
103+
- mailbox upstream 0x0 - size 0x400
104+
- mailbox downstream 0x400 - size 0x400
105+
- stream region 0x1000 - size 0x400
106+
- debug region 0x800 - size 0x400
107+
- fw_state change: 3 -> 6
108+
- ipc rx done: 0x70000000
109+
- firmware boot complete

soc/amd/acp_6_0/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
if(CONFIG_SOC_ACP_6_0)
2-
zephyr_include_directories(adsp)
3-
add_subdirectory(adsp)
41
# See detailed comments in soc/xtensa/intel_adsp/common/CMakeLists.txt
52
add_custom_target(zephyr.ri ALL
63
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
@@ -12,4 +9,3 @@ add_custom_command(
129
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
1310
)
1411
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/adsp/linker.ld CACHE INTERNAL "")
15-
endif()

soc/amd/acp_6_0/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33
config SOC_ACP_6_0
44
select XTENSA
5+
select XTENSA_GEN_HANDLERS
56
select XTENSA_HAL if ("$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xcc" && "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xt-clang")
67
select XTENSA_RESET_VECTOR
78
select ATOMIC_OPERATIONS_BUILTIN

soc/amd/acp_6_0/Kconfig.defconfig

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,23 @@
33

44
if SOC_ACP_6_0
55
config DCACHE_LINE_SIZE
6-
default 128
6+
default 128
77

88
config CACHE_MANAGEMENT
9-
default n
9+
default n
1010

1111
config XTENSA_TIMER
12-
default y
12+
default y
1313

1414
config SYS_CLOCK_HW_CYCLES_PER_SEC
15-
default 600000000 if XTENSA_TIMER
16-
17-
config KERNEL_ENTRY
18-
default "__start"
15+
default 600000000 if XTENSA_TIMER
1916

2017
config MULTI_LEVEL_INTERRUPTS
21-
default n
18+
default n
2219

2320
config 2ND_LEVEL_INTERRUPTS
24-
default n
21+
default n
2522

2623
config KERNEL_ENTRY
27-
default "__start"
24+
default "__start"
2825
endif

0 commit comments

Comments
 (0)