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

intel_adsp: ace30: Bring up ACE 3.0 (PTL) #73540

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions boards/intel/adsp/Kconfig.intel_adsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ config BOARD_INTEL_ADSP
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
select SOC_INTEL_ACE30_PTL if BOARD_INTEL_ADSP_ACE30_PTL
8 changes: 8 additions & 0 deletions boards/intel/adsp/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ elseif(CONFIG_BOARD_INTEL_ADSP_ACE20_LNL)

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

elseif(CONFIG_BOARD_INTEL_ADSP_ACE30_PTL)

board_set_rimage_target(ptl)

set(RIMAGE_SIGN_KEY "otc_private_key.pem" CACHE STRING "default rimage key")

board_finalize_runner_args(intel_adsp)

endif()
1 change: 1 addition & 0 deletions boards/intel/adsp/board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ boards:
- name: 'tgph'
- name: ace15_mtpm
- name: ace20_lnl
- name: ace30_ptl
19 changes: 19 additions & 0 deletions boards/intel/adsp/intel_adsp_ace30_ptl.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <intel/intel_adsp_ace30_ptl.dtsi>

/ {
model = "intel_adsp_ace30_ptl";
compatible = "intel";

chosen {
zephyr,sram = &sram0;
zephyr,console = &mem_window3;
};
};
10 changes: 10 additions & 0 deletions boards/intel/adsp/intel_adsp_ace30_ptl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
identifier: intel_adsp/ace30_ptl
name: ACE 3.0 Panther Lake Audio DSP
type: mcu
arch: xtensa
toolchain:
- xcc-clang
testing:
ignore_tags:
- net
- bluetooth
12 changes: 12 additions & 0 deletions boards/intel/adsp/intel_adsp_ace30_ptl_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_MAIN_STACK_SIZE=4096

CONFIG_GEN_ISR_TABLES=y
CONFIG_GEN_IRQ_VECTOR_TABLE=n

CONFIG_BUILD_OUTPUT_BIN=n

CONFIG_DAI_SSP_HAS_POWER_CONTROL=y

CONFIG_DCACHE_LINE_SIZE=64
16 changes: 8 additions & 8 deletions drivers/dai/intel/dmic/dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static inline void dai_dmic_release_ownership(const struct dai_intel_dmic *dmic)

static inline uint32_t dai_dmic_base(const struct dai_intel_dmic *dmic)
{
#ifdef CONFIG_SOC_INTEL_ACE20_LNL
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
return dmic->hdamldmic_base;
#else
return dmic->shim_base;
Expand All @@ -172,7 +172,7 @@ static inline void dai_dmic_set_sync_period(uint32_t period, const struct dai_in
uint32_t val = CONFIG_DAI_DMIC_HW_IOCLK / period - 1;
uint32_t base = dai_dmic_base(dmic);
/* DMIC Change sync period */
#ifdef CONFIG_SOC_INTEL_ACE20_LNL
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
sys_write32(sys_read32(base + DMICSYNC_OFFSET) | FIELD_PREP(DMICSYNC_SYNCPRD, val),
base + DMICSYNC_OFFSET);
sys_write32(sys_read32(base + DMICSYNC_OFFSET) | DMICSYNC_SYNCPU,
Expand Down Expand Up @@ -286,7 +286,7 @@ static void dai_dmic_irq_handler(const void *data)
static inline void dai_dmic_dis_clk_gating(const struct dai_intel_dmic *dmic)
{
/* Disable DMIC clock gating */
#ifdef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL)
sys_write32((sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET) | DMICLVSCTL_DCGD),
dmic->vshim_base + DMICLVSCTL_OFFSET);
#else
Expand All @@ -298,10 +298,10 @@ static inline void dai_dmic_dis_clk_gating(const struct dai_intel_dmic *dmic)
static inline void dai_dmic_en_clk_gating(const struct dai_intel_dmic *dmic)
{
/* Enable DMIC clock gating */
#ifdef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL)
sys_write32((sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET) & ~DMICLVSCTL_DCGD),
dmic->vshim_base + DMICLVSCTL_OFFSET);
#else
#else /* All other CAVS and ACE platforms */
sys_write32((sys_read32(dmic->shim_base + DMICLCTL_OFFSET) & ~DMICLCTL_DCGD),
dmic->shim_base + DMICLCTL_OFFSET);
#endif
Expand All @@ -312,7 +312,7 @@ static inline void dai_dmic_program_channel_map(const struct dai_intel_dmic *dmi
const struct dai_config *cfg,
uint32_t index)
{
#ifdef CONFIG_SOC_INTEL_ACE20_LNL
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
uint16_t pcmsycm = cfg->link_config;
uint32_t reg_add = dmic->shim_base + DMICXPCMSyCM_OFFSET + 0x0004*index;

Expand All @@ -321,7 +321,7 @@ static inline void dai_dmic_program_channel_map(const struct dai_intel_dmic *dmi
ARG_UNUSED(dmic);
ARG_UNUSED(cfg);
ARG_UNUSED(index);
#endif /* defined(CONFIG_SOC_INTEL_ACE20_LNL) */
#endif /* defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL) */
}

static inline void dai_dmic_en_power(const struct dai_intel_dmic *dmic)
Expand All @@ -331,7 +331,7 @@ static inline void dai_dmic_en_power(const struct dai_intel_dmic *dmic)
sys_write32((sys_read32(base + DMICLCTL_OFFSET) | DMICLCTL_SPA),
base + DMICLCTL_OFFSET);

#ifdef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
while (!(sys_read32(base + DMICLCTL_OFFSET) & DMICLCTL_CPA)) {
k_sleep(K_USEC(100));
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/dai/intel/dmic/dmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ struct dai_intel_dmic {
/* hardware parameters */
uint32_t reg_base;
uint32_t shim_base;
#ifdef CONFIG_SOC_INTEL_ACE20_LNL
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
uint32_t hdamldmic_base;
uint32_t vshim_base;
#endif
Expand Down
6 changes: 3 additions & 3 deletions drivers/dai/intel/dmic/dmic_nhlt.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int dai_nhlt_dmic_dai_params_get(struct dai_intel_dmic *dmic, const int c
static inline void dai_dmic_clock_select_set(const struct dai_intel_dmic *dmic, uint32_t source)
{
uint32_t val;
#ifdef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL) /* ACE 2.0,3.0 */
val = sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET);
val &= ~DMICLVSCTL_MLCS;
val |= FIELD_PREP(DMICLVSCTL_MLCS, source);
Expand All @@ -300,7 +300,7 @@ static inline void dai_dmic_clock_select_set(const struct dai_intel_dmic *dmic,
static inline uint32_t dai_dmic_clock_select_get(const struct dai_intel_dmic *dmic)
{
uint32_t val;
#ifdef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL) /* ACE 2.0,3.0 */
val = sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET);
return FIELD_GET(DMICLVSCTL_MLCS, val);
#else
Expand All @@ -322,7 +322,7 @@ static int dai_dmic_set_clock(const struct dai_intel_dmic *dmic, const uint8_t c
return -ENOTSUP;
}

#ifndef CONFIG_SOC_INTEL_ACE20_LNL /* Ace 2.0 */
#if defined(CONFIG_SOC_INTEL_ACE15_MTPM)
if (clock_source && !(sys_read32(dmic->shim_base + DMICLCAP_OFFSET) & DMICLCAP_MLCS)) {
return -ENOTSUP;
}
Expand Down
Loading
Loading