Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwmv2: intel_adsp: Port to HWMv2 #68412

Merged
merged 18 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
845fb3a
soc: xtensa: intel_adsp: move and convert to HWMv2
golowanow Feb 6, 2024
83884b7
soc: xtensa: intel_adsp: HWMv2 workaround for SOF config
golowanow Feb 7, 2024
8a3baad
boards: xtensa: intel_adsp_cavs25: move and convert to HWMv2
golowanow Feb 6, 2024
689cc2b
boards: xtensa: intel_adsp_cavs25_tgph: change to board variant
golowanow Feb 6, 2024
87dd953
boards: xtensa: intel_adsp_ace15_mtpm: move and convert to HWMv2
golowanow Feb 6, 2024
e4af371
boards: xtensa: intel_adsp_ace20_lnl: move and convert to HWMv2
golowanow Feb 6, 2024
95a94d1
scripts: west: runners: intel_adsp: Adjust path to HWMv2
golowanow Feb 13, 2024
43069dd
soc: boards: xtensa: intel_adsp_cavs25: Rename with HWMv2
golowanow Feb 13, 2024
a236ebb
boards: xtensa: intel_adsp_cavs25: Rename board with HWMv2
golowanow Feb 14, 2024
28c5fd3
tests: samples: boards: intel_adsp_cavs25: Rename with HWMv2
golowanow Feb 14, 2024
abff69a
doc: soc: boards: intel_adsp_cavs25: Rename with HWMv2
golowanow Feb 14, 2024
bcf87e1
soc: boards: xtensa: intel_adsp_ace: Rename with HWMv2
golowanow Feb 17, 2024
b30f4c0
hwmv2: boards: intel_adsp: Overhaul board configurations
golowanow Feb 17, 2024
cafc135
hwmv2: tests: boards: intel_adsp: Adjust board names
golowanow Feb 17, 2024
5766c00
soc: intel_adsp: tools: pylint compliance workaround
golowanow Feb 17, 2024
6748ee9
MAINTAINERS: intel_adsp: Adjust to HWMv2 move
golowanow Feb 16, 2024
d143b2b
doc: boards: intel_adsp: Re-order pages
golowanow Feb 17, 2024
9823a6b
hwmv2: sof: intel_adsp: submanifest provisional link
golowanow Feb 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3209,8 +3209,8 @@ Intel Platforms (Xtensa):
- jxstelter
- marcinszkudlinski
files:
- boards/xtensa/intel_*/
- soc/xtensa/intel_*/
- boards/intel/intel_adsp/
- soc/intel/intel_adsp/
- dts/xtensa/intel/
- tests/boards/intel_adsp/
- samples/boards/intel_adsp/
Expand Down

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions boards/boards_legacy/xtensa/intel_adsp_ace15_mtpm/board.cmake

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions boards/boards_legacy/xtensa/intel_adsp_ace20_lnl/Kconfig.defconfig

This file was deleted.

7 changes: 0 additions & 7 deletions boards/boards_legacy/xtensa/intel_adsp_ace20_lnl/board.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions boards/boards_legacy/xtensa/intel_adsp_cavs25/Kconfig.board

This file was deleted.

20 changes: 0 additions & 20 deletions boards/boards_legacy/xtensa/intel_adsp_cavs25/Kconfig.defconfig

This file was deleted.

20 changes: 0 additions & 20 deletions boards/boards_legacy/xtensa/intel_adsp_cavs25/board.cmake

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions boards/intel/intel_adsp/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2020-2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

if DAI_INTEL_SSP

config DAI_SSP_HAS_POWER_CONTROL
def_bool y

endif
8 changes: 8 additions & 0 deletions boards/intel/intel_adsp/Kconfig.intel_adsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD_INTEL_ADSP
select SOC_INTEL_CAVS_V25 if BOARD_INTEL_ADSP_CAVS25
select SOC_INTEL_CAVS_V25 if BOARD_INTEL_ADSP_CAVS25_TGPH
select SOC_INTEL_ACE15_MTPM if BOARD_INTEL_ADSP_ACE15_MTPM
select SOC_INTEL_ACE20_LNL if BOARD_INTEL_ADSP_ACE20_LNL
42 changes: 42 additions & 0 deletions boards/intel/intel_adsp/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2022-2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_BOARD_INTEL_ADSP_CAVS25 OR CONFIG_BOARD_INTEL_ADSP_CAVS25_TGPH)
golowanow marked this conversation as resolved.
Show resolved Hide resolved

if($ENV{CAVS_OLD_FLASHER})
board_set_flasher_ifnset(misc-flasher)
board_finalize_runner_args(misc-flasher)
endif()

board_set_flasher_ifnset(intel_adsp)

set(RIMAGE_SIGN_KEY "otc_private_key_3k.pem" CACHE STRING "default in cavs25/board.cmake")

if(CONFIG_BOARD_INTEL_ADSP_CAVS25)
board_set_rimage_target(tgl)
endif()

if(CONFIG_BOARD_INTEL_ADSP_CAVS25_TGPH)
board_set_rimage_target(tgl-h)
endif()

board_finalize_runner_args(intel_adsp)

elseif(CONFIG_BOARD_INTEL_ADSP_ACE15_MTPM)

board_set_rimage_target(mtl)

set(RIMAGE_SIGN_KEY "otc_private_key_3k.pem" CACHE STRING "default in ace15_mtpm/board.cmake")

board_finalize_runner_args(intel_adsp)

elseif(CONFIG_BOARD_INTEL_ADSP_ACE20_LNL)

set(SUPPORTED_EMU_PLATFORMS acesim)

board_set_rimage_target(lnl)

set(RIMAGE_SIGN_KEY "otc_private_key_3k.pem" CACHE STRING "default in ace20_lnl/board.cmake")

endif()
9 changes: 9 additions & 0 deletions boards/intel/intel_adsp/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
boards:
- name: intel_adsp
vendor: intel
socs:
- name: cavs25
variants:
- name: 'tgph'
- name: ace15_mtpm
- name: ace20_lnl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

.. _zephyr-audio-dsp-development-on-chromebooks:

Zephyr Audio DSP Development on Chromebooks
Expand Down Expand Up @@ -366,7 +364,7 @@ the Crouton environment installed above. Copy them:

.. code-block:: console

dev$ scp soc/xtensa/intel_adsp/tools/cavstool.py user@crouton:
dev$ scp soc/intel/intel_adsp/tools/cavstool.py user@crouton:

Then start the service in the Crouton environment:

Expand All @@ -386,7 +384,7 @@ a "zephyr.ri" file to be copied to the device.

.. code-block:: console

dev$ west build -b intel_adsp_cavs25 samples/hello_world
dev$ west build -b intel_adsp/cavs25 samples/hello_world
dev$ west sign --tool-data=~/rimage/config -t ~/rimage/rimage -- \
-k $ZEPHYR_BASE/../modules/audio/sof/keys/otc_private_key_3k.pem

Expand All @@ -401,7 +399,7 @@ the logging script.
.. code-block:: console

dev$ west flash --remote-host crouton
Hello World! intel_adsp_cavs25
Hello World! intel_adsp

Misc References
***************
Expand Down
11 changes: 11 additions & 0 deletions boards/intel/intel_adsp/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _boards-intel-adsp:

Intel ADSP
##########

.. toctree::

intel_adsp_generic
chromebooks_adsp
intel_adsp_cavs25
intel_adsp_ace15_mtpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:orphan:

.. _intel_adsp_generic:

Intel ADSP cAVS and ACE
Expand Down Expand Up @@ -115,7 +113,7 @@ Build as usual.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: intel_adsp_cavs25
:board: intel_adsp/cavs25
:goals: build

Signing
Expand All @@ -141,7 +139,7 @@ undocumented rimage precedence rules it's best to use only one way at a time.

- For board-specific needs you can define WEST_SIGN_OPTS in
``boards/my/board/board.cmake``, see example in
``soc/xtensa/intel_adsp/common/CMakeLists.txt``
``soc/intel/intel_adsp/common/CMakeLists.txt``

Starting with Zephyr 3.6.0, ``west flash`` does not invoke ``west sign``
anymore and you cannot pass rimage parameters to ``west flash`` anymore. To
Expand All @@ -162,24 +160,24 @@ this point onward, we will refer to the board as the "remote host" and your
development machine as the "local host".

Copy the below scripts to the cAVS board.
:zephyr_file:`soc/xtensa/intel_adsp/tools/remote-fw-service.py` will receive
:zephyr_file:`soc/intel/intel_adsp/tools/remote-fw-service.py` will receive
the binary sent over the network by West and invoke
:zephyr_file:`soc/xtensa/intel_adsp/tools/cavstool.py` (referred to as the
:zephyr_file:`soc/intel/intel_adsp/tools/cavstool.py` (referred to as the
"cAVS tool"), which performs the flash and captures the log. Start
:file:`remote-fw-service.py`.

.. code-block:: console

scp -r $ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/cavstool.py username@remotehostname
scp -r $ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/remote-fw-service.py username@remotehostname
scp -r $ZEPHYR_BASE/soc/intel/intel_adsp/tools/cavstool.py username@remotehostname
scp -r $ZEPHYR_BASE/soc/intel/intel_adsp/tools/remote-fw-service.py username@remotehostname
ssh username@remotehostname
sudo ./remote-fw-service.py

:file:`remote-fw-service.py` uses ports 9999 and 10000 on the remote host to
communicate. It forwards logs collected by :file:`cavstool.py` on port 9999
(referred to as its "log port") and services requests on port 10000
(its "requests port"). When you run West or Twister on your local host,
it sends requests using the :zephyr_file:`soc/xtensa/intel_adsp/tools/cavstool_client.py`
it sends requests using the :zephyr_file:`soc/intel/intel_adsp/tools/cavstool_client.py`
script (referred to as "cAVS tool client"). It also uses ports 9999 and 10000 on
your local host, so be sure those ports are free.

Expand All @@ -193,7 +191,7 @@ Running tests with Twister is slightly more complicated.

.. code-block:: console

twister -p intel_adsp_cavs25 --device-testing --device-serial-pty="$ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/cavstool_client.py,-s,remotehostname,-l" --west-flash="--remote-host=remotehostname" -T samples/hello_world
twister -p intel_adsp/cavs25 --device-testing --device-serial-pty="$ZEPHYR_BASE/soc/intel/intel_adsp/tools/cavstool_client.py,-s,remotehostname,-l" --west-flash="--remote-host=remotehostname" -T samples/hello_world

If your network is set up such that the TCP connection from
:file:`cavstool_client.py` to :file:`remote-fw-service.py` is forwarded through
Expand All @@ -204,25 +202,25 @@ the port numbers to the intermediate host name.
.. code-block:: console

west flash --remote-host intermediatehost:reqport --pty remotehostname:logport
twister -p intel_adsp_cavs25 --device-testing --device-serial-pty="$ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/cavstool_client.py,-s,remotehostname:logport,-l" --west-flash="--remote-host=remotehostname:reqport" -T samples/hello_world
twister -p intel_adsp/cavs25 --device-testing --device-serial-pty="$ZEPHYR_BASE/soc/intel/intel_adsp/tools/cavstool_client.py,-s,remotehostname:logport,-l" --west-flash="--remote-host=remotehostname:reqport" -T samples/hello_world

You can also save this information to a hardware map file and pass that to
Twister.

.. code-block:: console

twister -p intel_adsp_cavs25 --hardware-map cavs.map --device-testing -T samples/hello_world
twister -p intel_adsp/cavs25 --hardware-map cavs.map --device-testing -T samples/hello_world

Here's a sample ``cavs.map``:

.. code-block:: console

- connected: true
id: None
platform: intel_adsp_cavs25
platform: intel_adsp/cavs25
product: None
runner: intel_adsp
serial_pty: "/home/zephyrus/zephyrproject/zephyr/soc/xtensa/intel_adsp/tools/cavstool_client.py,-s,remotehostname:logport,-l"
serial_pty: "/home/zephyrus/zephyrproject/zephyr/soc/intel/intel_adsp/tools/cavstool_client.py,-s,remotehostname:logport,-l"
runner_params:
- --remote-host=remotehostname:reqport

Expand All @@ -247,7 +245,7 @@ You should see the following at the end of the log if you are successful:
.. code-block:: console

***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! intel_adsp_cavs25
Hello World! intel_adsp

Flashing to ACE-based ADSP
--------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
identifier: intel_adsp_ace15_mtpm
identifier: intel_adsp/ace15_mtpm
name: ACE 1.5 MTL M Audio DSP
type: mcu
arch: xtensa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

CONFIG_MAIN_STACK_SIZE=2048

CONFIG_SOC_SERIES_INTEL_ACE=y
CONFIG_SOC_INTEL_ACE15_MTPM=y
CONFIG_BOARD_INTEL_ADSP_ACE15_MTPM=y

CONFIG_GEN_ISR_TABLES=y
CONFIG_GEN_IRQ_VECTOR_TABLE=n

Expand Down
Loading
Loading