Skip to content

Commit eebeff9

Browse files
ujfalusibardliao
authored andcommitted
ASoC: SOF: Intel: add initial support for NVL-S
Add support for Nova Lake S (NVL-S). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 657a0c0 commit eebeff9

8 files changed

Lines changed: 173 additions & 0 deletions

File tree

sound/soc/sof/intel/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,23 @@ config SND_SOC_SOF_PANTHERLAKE
300300
Say Y if you have such a device.
301301
If unsure select "N".
302302

303+
config SND_SOC_SOF_INTEL_NVL
304+
tristate
305+
select SND_SOC_SOF_HDA_COMMON
306+
select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE
307+
select SND_SOC_SOF_IPC4
308+
select SND_SOC_SOF_INTEL_PTL
309+
310+
config SND_SOC_SOF_NOVALAKE
311+
tristate "SOF support for Novalake"
312+
default SND_SOC_SOF_PCI
313+
select SND_SOC_SOF_INTEL_NVL
314+
help
315+
This adds support for Sound Open Firmware for Intel(R) platforms
316+
using the Novalake processors.
317+
Say Y if you have such a device.
318+
If unsure select "N".
319+
303320
config SND_SOC_SOF_HDA_COMMON
304321
tristate
305322

sound/soc/sof/intel/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ snd-sof-pci-intel-tgl-y := pci-tgl.o tgl.o
3939
snd-sof-pci-intel-mtl-y := pci-mtl.o mtl.o
4040
snd-sof-pci-intel-lnl-y := pci-lnl.o lnl.o
4141
snd-sof-pci-intel-ptl-y := pci-ptl.o ptl.o
42+
snd-sof-pci-intel-nvl-y := pci-nvl.o nvl.o
4243

4344
obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o
4445
obj-$(CONFIG_SND_SOC_SOF_INTEL_SKL) += snd-sof-pci-intel-skl.o
@@ -49,3 +50,4 @@ obj-$(CONFIG_SND_SOC_SOF_INTEL_TGL) += snd-sof-pci-intel-tgl.o
4950
obj-$(CONFIG_SND_SOC_SOF_INTEL_MTL) += snd-sof-pci-intel-mtl.o
5051
obj-$(CONFIG_SND_SOC_SOF_INTEL_LNL) += snd-sof-pci-intel-lnl.o
5152
obj-$(CONFIG_SND_SOC_SOF_INTEL_PTL) += snd-sof-pci-intel-ptl.o
53+
obj-$(CONFIG_SND_SOC_SOF_INTEL_NVL) += snd-sof-pci-intel-nvl.o

sound/soc/sof/intel/hda-dsp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static void hda_get_interfaces(struct snd_sof_dev *sdev, u32 *interface_mask)
7070
break;
7171
case SOF_INTEL_ACE_2_0:
7272
case SOF_INTEL_ACE_3_0:
73+
case SOF_INTEL_ACE_4_0:
7374
interface_mask[SOF_DAI_DSP_ACCESS] =
7475
BIT(SOF_DAI_INTEL_SSP) | BIT(SOF_DAI_INTEL_DMIC) |
7576
BIT(SOF_DAI_INTEL_HDA) | BIT(SOF_DAI_INTEL_ALH);

sound/soc/sof/intel/hda.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ extern const struct sof_intel_dsp_desc arl_s_chip_info;
936936
extern const struct sof_intel_dsp_desc lnl_chip_info;
937937
extern const struct sof_intel_dsp_desc ptl_chip_info;
938938
extern const struct sof_intel_dsp_desc wcl_chip_info;
939+
extern const struct sof_intel_dsp_desc nvl_s_chip_info;
939940

940941
/* Probes support */
941942
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_PROBES)

sound/soc/sof/intel/nvl.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2+
//
3+
// Copyright(c) 2025 Intel Corporation
4+
5+
/*
6+
* Hardware interface for audio DSP on NovaLake.
7+
*/
8+
9+
#include <sound/hda_register.h>
10+
#include <sound/hda-mlink.h>
11+
#include <sound/sof/ipc4/header.h>
12+
#include "../ipc4-priv.h"
13+
#include "../ops.h"
14+
#include "hda.h"
15+
#include "hda-ipc.h"
16+
#include "../sof-audio.h"
17+
#include "mtl.h"
18+
#include "lnl.h"
19+
#include "ptl.h"
20+
#include "nvl.h"
21+
22+
int sof_nvl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops)
23+
{
24+
/* Use PTL ops for NVL */
25+
return sof_ptl_set_ops(sdev, dsp_ops);
26+
};
27+
EXPORT_SYMBOL_NS(sof_nvl_set_ops, "SND_SOC_SOF_INTEL_NVL");
28+
29+
const struct sof_intel_dsp_desc nvl_s_chip_info = {
30+
.cores_num = 2,
31+
.init_core_mask = BIT(0),
32+
.host_managed_cores_mask = BIT(0),
33+
.ipc_req = MTL_DSP_REG_HFIPCXIDR,
34+
.ipc_req_mask = MTL_DSP_REG_HFIPCXIDR_BUSY,
35+
.ipc_ack = MTL_DSP_REG_HFIPCXIDA,
36+
.ipc_ack_mask = MTL_DSP_REG_HFIPCXIDA_DONE,
37+
.ipc_ctl = MTL_DSP_REG_HFIPCXCTL,
38+
.rom_status_reg = LNL_DSP_REG_HFDSC,
39+
.rom_init_timeout = 300,
40+
.ssp_count = MTL_SSP_COUNT,
41+
.d0i3_offset = MTL_HDA_VS_D0I3C,
42+
.read_sdw_lcount = hda_sdw_check_lcount_ext,
43+
.check_sdw_irq = lnl_dsp_check_sdw_irq,
44+
.check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq,
45+
.sdw_process_wakeen = hda_sdw_process_wakeen_common,
46+
.check_ipc_irq = mtl_dsp_check_ipc_irq,
47+
.cl_init = mtl_dsp_cl_init,
48+
.power_down_dsp = mtl_power_down_dsp,
49+
.disable_interrupts = lnl_dsp_disable_interrupts,
50+
.hw_ip_version = SOF_INTEL_ACE_4_0,
51+
};
52+
53+
MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_MTL");
54+
MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_LNL");
55+
MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_PTL");

sound/soc/sof/intel/nvl.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2+
/*
3+
* This file is provided under a dual BSD/GPLv2 license. When using or
4+
* redistributing this file, you may do so under either license.
5+
*
6+
* Copyright(c) 2025 Intel Corporation
7+
*/
8+
9+
#ifndef __SOF_INTEL_NVL_H
10+
#define __SOF_INTEL_NVL_H
11+
12+
int sof_nvl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops);
13+
14+
#endif /* __SOF_INTEL_NVL_H */

sound/soc/sof/intel/pci-nvl.c

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2+
//
3+
// This file is provided under a dual BSD/GPLv2 license. When using or
4+
// redistributing this file, you may do so under either license.
5+
//
6+
// Copyright(c) 2025 Intel Corporation.
7+
//
8+
9+
#include <linux/module.h>
10+
#include <linux/pci.h>
11+
#include <sound/soc-acpi.h>
12+
#include <sound/soc-acpi-intel-match.h>
13+
#include <sound/sof.h>
14+
#include "../ops.h"
15+
#include "../sof-pci-dev.h"
16+
17+
/* platform specific devices */
18+
#include "hda.h"
19+
#include "nvl.h"
20+
21+
/* PantherLake ops */
22+
static struct snd_sof_dsp_ops sof_nvl_ops;
23+
24+
static int sof_nvl_ops_init(struct snd_sof_dev *sdev)
25+
{
26+
return sof_nvl_set_ops(sdev, &sof_nvl_ops);
27+
}
28+
29+
static const struct sof_dev_desc nvl_s_desc = {
30+
.use_acpi_target_states = true,
31+
.machines = snd_soc_acpi_intel_nvl_machines,
32+
.alt_machines = snd_soc_acpi_intel_nvl_sdw_machines,
33+
.resindex_lpe_base = 0,
34+
.resindex_pcicfg_base = -1,
35+
.resindex_imr_base = -1,
36+
.irqindex_host_ipc = -1,
37+
.chip_info = &nvl_s_chip_info,
38+
.ipc_supported_mask = BIT(SOF_IPC_TYPE_4),
39+
.ipc_default = SOF_IPC_TYPE_4,
40+
.dspless_mode_supported = true,
41+
.default_fw_path = {
42+
[SOF_IPC_TYPE_4] = "intel/sof-ipc4/nvl-s",
43+
},
44+
.default_lib_path = {
45+
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/nvl-s",
46+
},
47+
.default_tplg_path = {
48+
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
49+
},
50+
.default_fw_filename = {
51+
[SOF_IPC_TYPE_4] = "sof-nvl-s.ri",
52+
},
53+
.nocodec_tplg_filename = "sof-nvl-nocodec.tplg",
54+
.ops = &sof_nvl_ops,
55+
.ops_init = sof_nvl_ops_init,
56+
};
57+
58+
/* PCI IDs */
59+
static const struct pci_device_id sof_pci_ids[] = {
60+
{ PCI_DEVICE_DATA(INTEL, HDA_NVL_S, &nvl_s_desc) }, /* NVL-S */
61+
{ 0, }
62+
};
63+
MODULE_DEVICE_TABLE(pci, sof_pci_ids);
64+
65+
/* pci_driver definition */
66+
static struct pci_driver snd_sof_pci_intel_nvl_driver = {
67+
.name = "sof-audio-pci-intel-nvl",
68+
.id_table = sof_pci_ids,
69+
.probe = hda_pci_intel_probe,
70+
.remove = sof_pci_remove,
71+
.shutdown = sof_pci_shutdown,
72+
.driver = {
73+
.pm = pm_ptr(&sof_pci_pm),
74+
},
75+
};
76+
module_pci_driver(snd_sof_pci_intel_nvl_driver);
77+
78+
MODULE_LICENSE("Dual BSD/GPL");
79+
MODULE_DESCRIPTION("SOF support for NovaLake platforms");
80+
MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_HDA_GENERIC");
81+
MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_HDA_COMMON");
82+
MODULE_IMPORT_NS("SND_SOC_SOF_PCI_DEV");

sound/soc/sof/intel/shim.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ enum sof_intel_hw_ip_version {
2323
SOF_INTEL_ACE_1_0, /* MeteorLake */
2424
SOF_INTEL_ACE_2_0, /* LunarLake */
2525
SOF_INTEL_ACE_3_0, /* PantherLake */
26+
SOF_INTEL_ACE_4_0, /* NovaLake */
2627
};
2728

2829
/*

0 commit comments

Comments
 (0)