Skip to content

Commit

Permalink
soc: intel: Change the soc from ace30_ptl to ace30
Browse files Browse the repository at this point in the history
Renamed soc from ace30_ptl to ace30.
We were previously using the wrong soc name.
The correct name is ace30.

There is only one ptl platform, but there can be several ace30 platforms.

Check the commit on the sof project repo:
Change the soc from ace30_ptl to ace30

Signed-off-by: Grzegorz Bernat <[email protected]>
  • Loading branch information
gbernatxintel committed Sep 18, 2024
1 parent 0bca195 commit 9e3c271
Show file tree
Hide file tree
Showing 33 changed files with 1,361 additions and 117 deletions.
4 changes: 2 additions & 2 deletions boards/intel/adsp/Kconfig.intel_adsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ config BOARD_INTEL_ADSP
select SOC_INTEL_ACE15_MTPM if BOARD_INTEL_ADSP_ACE15_MTPM_SIM
select SOC_INTEL_ACE20_LNL if BOARD_INTEL_ADSP_ACE20_LNL
select SOC_INTEL_ACE20_LNL if BOARD_INTEL_ADSP_ACE20_LNL_SIM
select SOC_INTEL_ACE30_PTL if BOARD_INTEL_ADSP_ACE30_PTL
select SOC_INTEL_ACE30_PTL if BOARD_INTEL_ADSP_ACE30_PTL_SIM
select SOC_ACE30 if BOARD_INTEL_ADSP_ACE30_PTL
select SOC_ACE30 if BOARD_INTEL_ADSP_ACE30_PTL_SIM
5 changes: 3 additions & 2 deletions boards/intel/adsp/board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ boards:
- name: ace20_lnl
variants:
- name: 'sim'
- name: ace30_ptl
- name: ace30
variants:
- name: 'sim'
- name: 'ptl'
- name: 'ptl_sim'
12 changes: 12 additions & 0 deletions boards/intel/adsp/intel_adsp_ace30_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
2 changes: 1 addition & 1 deletion boards/intel/adsp/intel_adsp_ace30_ptl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
identifier: intel_adsp/ace30_ptl
identifier: intel_adsp/ace30/ptl
name: ACE 3.0 Panther Lake Audio DSP
type: mcu
arch: xtensa
Expand Down
12 changes: 0 additions & 12 deletions boards/intel/adsp/intel_adsp_ace30_ptl_sim.yaml

This file was deleted.

14 changes: 7 additions & 7 deletions drivers/dai/intel/dmic/dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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)
{
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
return dmic->hdamldmic_base;
#else
return dmic->shim_base;
Expand All @@ -173,7 +173,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 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
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 @@ -287,7 +287,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 */
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL)
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30)
sys_write32((sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET) | DMICLVSCTL_DCGD),
dmic->vshim_base + DMICLVSCTL_OFFSET);
#else
Expand All @@ -299,7 +299,7 @@ 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 */
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL)
#if (CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30)
sys_write32((sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET) & ~DMICLVSCTL_DCGD),
dmic->vshim_base + DMICLVSCTL_OFFSET);
#else /* All other CAVS and ACE platforms */
Expand All @@ -313,7 +313,7 @@ static inline void dai_dmic_program_channel_map(const struct dai_intel_dmic *dmi
const struct dai_config *cfg,
uint32_t index)
{
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
uint16_t pcmsycm = cfg->link_config;
uint32_t reg_add = dmic->shim_base + DMICXPCMSyCM_OFFSET + 0x0004*index;

Expand All @@ -322,7 +322,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) || defined(CONFIG_SOC_INTEL_ACE30_PTL) */
#endif /* defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30) */
}

static inline void dai_dmic_en_power(const struct dai_intel_dmic *dmic)
Expand All @@ -332,7 +332,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);

#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
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;
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
uint32_t hdamldmic_base;
uint32_t vshim_base;
#endif
Expand Down
4 changes: 2 additions & 2 deletions drivers/dai/intel/dmic/dmic_nhlt.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,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;
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL) /* ACE 2.0,3.0 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30) /* ACE 2.0,3.0 */
val = sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET);
val &= ~DMICLVSCTL_MLCS;
val |= FIELD_PREP(DMICLVSCTL_MLCS, source);
Expand All @@ -303,7 +303,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;
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL) /* ACE 2.0,3.0 */
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30) /* ACE 2.0,3.0 */
val = sys_read32(dmic->vshim_base + DMICLVSCTL_OFFSET);
return FIELD_GET(DMICLVSCTL_MLCS, val);
#else
Expand Down
2 changes: 1 addition & 1 deletion drivers/dai/intel/ssp/dai-params-intel-ipc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ struct dai_intel_ipc4_ssp_mclk_config_2 {
} __packed;

struct dai_intel_ipc4_ssp_driver_config {
#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
struct dai_intel_ipc4_ssp_config_ver_3_0 i2s_config;
#else
struct dai_intel_ipc4_ssp_config i2s_config;
Expand Down
30 changes: 15 additions & 15 deletions drivers/dai/intel/ssp/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static void dai_ssp_pm_runtime_en_ssp_power(struct dai_intel_ssp *dp, uint32_t s
ret = dai_ssp_poll_for_register_delay(dai_ip_base(dp) + I2SLCTL_OFFSET,
I2SLCTL_CPA(ssp_index), I2SLCTL_CPA(ssp_index),
DAI_INTEL_SSP_MAX_SEND_TIME_PER_SAMPLE);
#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL
#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30
sys_write32(sys_read32(dai_hdamlssp_base(dp) + I2SLCTL_OFFSET) |
I2SLCTL_SPA(ssp_index),
dai_hdamlssp_base(dp) + I2SLCTL_OFFSET);
Expand Down Expand Up @@ -835,7 +835,7 @@ static void dai_ssp_pm_runtime_dis_ssp_power(struct dai_intel_ssp *dp, uint32_t
I2SLCTL_CPA(ssp_index), 0,
DAI_INTEL_SSP_MAX_SEND_TIME_PER_SAMPLE);

#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL
#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30
sys_write32(sys_read32(dai_hdamlssp_base(dp) + I2SLCTL_OFFSET) & (~I2SLCTL_SPA(ssp_index)),
dai_hdamlssp_base(dp) + I2SLCTL_OFFSET);

Expand Down Expand Up @@ -873,7 +873,7 @@ static void dai_ssp_program_channel_map(struct dai_intel_ssp *dp,
/* Program HDA input stream parameters */
sys_write16((pcmsycm & 0xffff), reg_add);
}
#elif defined(CONFIG_SOC_INTEL_ACE30_PTL)
#elif defined(CONFIG_SOC_ACE30)
const struct dai_intel_ipc4_ssp_configuration_blob_ver_3_0 *blob30 = spec_config;
const struct dai_intel_ipc4_ssp_configuration_blob *blob = spec_config;
uint64_t time_slot_map = 0;
Expand Down Expand Up @@ -930,7 +930,7 @@ static void dai_ssp_empty_tx_fifo(struct dai_intel_ssp *dp)
* SSSR_TNF is cleared when TX FIFO is empty or full,
* so wait for set TNF then for TFL zero - order matter.
*/
#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
ret = dai_ssp_poll_for_register_delay(dai_base(dp) + SSMODyCS(dp->tdm_slot_group),
SSMODyCS_TNF, SSMODyCS_TNF,
DAI_INTEL_SSP_MAX_SEND_TIME_PER_SAMPLE);
Expand Down Expand Up @@ -959,7 +959,7 @@ static void dai_ssp_empty_tx_fifo(struct dai_intel_ssp *dp)
}
}

#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
static void ssp_empty_rx_fifo_on_start(struct dai_intel_ssp *dp)
{
uint32_t retry = DAI_INTEL_SSP_RX_FLUSH_RETRY_MAX;
Expand Down Expand Up @@ -1191,7 +1191,7 @@ static int dai_ssp_bclk_prepare_enable(struct dai_intel_ssp *dp)
mdiv = ft[DAI_INTEL_SSP_DEFAULT_IDX].freq / ssp_plat_data->params.bclk_rate;
#endif

#ifndef CONFIG_SOC_INTEL_ACE30_PTL
#ifndef CONFIG_SOC_ACE30
if (need_ecs) {
sscr0 |= SSCR0_ECS;
}
Expand Down Expand Up @@ -1724,7 +1724,7 @@ static int dai_ssp_set_config_tplg(struct dai_intel_ssp *dp, const struct dai_co
sys_write32(sspsp2, dai_base(dp) + SSPSP2);
sys_write32(ssioc, dai_base(dp) + SSIOC);
sys_write32(ssto, dai_base(dp) + SSTO);
#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
for (uint32_t idx = 0; idx < I2SIPCMC; ++idx) {
sys_write64(sstsa, dai_base(dp) + SSMODyTSA(idx));
}
Expand Down Expand Up @@ -1777,7 +1777,7 @@ static int dai_ssp_set_config_tplg(struct dai_intel_ssp *dp, const struct dai_co
ssp_plat_data->clk_active |= SSP_CLK_BCLK_ES_REQ;

if (enable_sse) {
#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
dai_ssp_update_bits(dp, SSMIDyCS(dp->tdm_slot_group),
SSMIDyCS_RSRE, SSMIDyCS_RSRE);
dai_ssp_update_bits(dp, SSMODyCS(dp->tdm_slot_group),
Expand Down Expand Up @@ -1806,7 +1806,7 @@ static int dai_ssp_set_config_tplg(struct dai_intel_ssp *dp, const struct dai_co
LOG_INF("hw_free stage: releasing BCLK clocks for SSP%d...",
dp->dai_index);
if (ssp_plat_data->clk_active & SSP_CLK_BCLK_ACTIVE) {
#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
for (uint32_t idx = 0; idx < I2SOPCMC; ++idx) {
dai_ssp_update_bits(dp, SSMODyCS(idx), SSMODyCS_TSRE, 0);
}
Expand Down Expand Up @@ -1985,7 +1985,7 @@ static int dai_ssp_parse_tlv(struct dai_intel_ssp *dp, const uint8_t *aux_ptr, s
~I2CLCTL_MLCS(0x7)) |
I2CLCTL_MLCS(link->clock_source), dai_ip_base(dp) +
I2SLCTL_OFFSET);
#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL
#elif CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30
sys_write32((sys_read32(dai_i2svss_base(dp) + I2SLCTL_OFFSET) &
~I2CLCTL_MLCS(0x7)) |
I2CLCTL_MLCS(link->clock_source),
Expand Down Expand Up @@ -2065,7 +2065,7 @@ static int dai_ssp_set_clock_control_ver_1(struct dai_intel_ssp *dp,
return 0;
}

#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
static void dai_ssp_set_reg_config(struct dai_intel_ssp *dp, const struct dai_config *cfg,
const void *spec_config)
{
Expand Down Expand Up @@ -2184,7 +2184,7 @@ static int dai_ssp_set_config_blob(struct dai_intel_ssp *dp, const struct dai_co
struct dai_intel_ssp_plat_data *ssp_plat_data = dai_get_plat_data(dp);
int err;

#ifdef CONFIG_SOC_INTEL_ACE30_PTL
#ifdef CONFIG_SOC_ACE30
dp->tdm_slot_group = cfg->tdm_slot_group;
#endif

Expand Down Expand Up @@ -2322,7 +2322,7 @@ static void dai_ssp_start(struct dai_intel_ssp *dp, int direction)


/* enable DMA */
#if CONFIG_SOC_INTEL_ACE30_PTL
#if CONFIG_SOC_ACE30
if (direction == DAI_DIR_PLAYBACK) {
dai_ssp_update_bits(dp, SSMODyCS(dp->tdm_slot_group),
SSMODyCS_TSRE, SSMODyCS_TSRE);
Expand Down Expand Up @@ -2392,7 +2392,7 @@ static void dai_ssp_stop(struct dai_intel_ssp *dp, int direction)
if (direction == DAI_DIR_CAPTURE &&
dp->state[DAI_DIR_CAPTURE] != DAI_STATE_PRE_RUNNING) {
LOG_INF("SSP%d RX", dp->dai_index);
#if CONFIG_SOC_INTEL_ACE30_PTL
#if CONFIG_SOC_ACE30
dai_ssp_update_bits(dp, SSMIDyCS(dp->tdm_slot_group), SSMIDyCS_RXEN, 0);
dai_ssp_update_bits(dp, SSMIDyCS(dp->tdm_slot_group), SSMIDyCS_RSRE, 0);
#else
Expand All @@ -2407,7 +2407,7 @@ static void dai_ssp_stop(struct dai_intel_ssp *dp, int direction)
if (direction == DAI_DIR_PLAYBACK &&
dp->state[DAI_DIR_PLAYBACK] != DAI_STATE_PRE_RUNNING) {
LOG_INF("SSP%d TX", dp->dai_index);
#if CONFIG_SOC_INTEL_ACE30_PTL
#if CONFIG_SOC_ACE30
dai_ssp_update_bits(dp, SSMODyCS(dp->tdm_slot_group), SSMODyCS_TSRE, 0);
dai_ssp_empty_tx_fifo(dp);
dai_ssp_update_bits(dp, SSMODyCS(dp->tdm_slot_group), SSMODyCS_TXEN, 0);
Expand Down
4 changes: 2 additions & 2 deletions drivers/dai/intel/ssp/ssp.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "ssp_regs_v1.h"
#elif defined(CONFIG_SOC_INTEL_ACE20_LNL)
#include "ssp_regs_v2.h"
#elif defined(CONFIG_SOC_INTEL_ACE30_PTL)
#elif defined(CONFIG_SOC_ACE30)
#include "ssp_regs_v3.h"
#else
#error "Missing ssp definitions"
Expand Down Expand Up @@ -116,7 +116,7 @@ struct dai_intel_ssp_plat_data {
uint32_t base;
uint32_t ip_base;
uint32_t shim_base;
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30_PTL)
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_ACE30)
uint32_t hdamlssp_base;
uint32_t i2svss_base;
#endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_intel_adsp_hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int intel_adsp_hda_dma_status(const struct device *dev, uint32_t channel,
stat->pending_length = used;
stat->free = unused;

#if CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_INTEL_ACE30_PTL
#if CONFIG_SOC_INTEL_ACE20_LNL || CONFIG_SOC_ACE30
/* Linear Link Position via HDA-DMA is only supported on ACE2 or newer */
if (cfg->direction == MEMORY_TO_PERIPHERAL || cfg->direction == PERIPHERAL_TO_MEMORY) {
uint32_t tmp;
Expand Down
Loading

0 comments on commit 9e3c271

Please sign in to comment.