]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: SOF: amd: add ACP7.1 platform support
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Fri, 2 May 2025 15:42:42 +0000 (21:12 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 2 May 2025 23:16:40 +0000 (08:16 +0900)
Add SOF support for ACP7.1 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250502154445.3008598-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/amd/Kconfig
sound/soc/sof/amd/acp.c
sound/soc/sof/amd/acp.h
sound/soc/sof/amd/pci-acp70.c

index 3ea82fa72e353e120b5c72beeba5f486fc75a86d..984132f32a21adbc747affe3bc1726a4e47cf59b 100644 (file)
@@ -94,13 +94,13 @@ config SND_SOC_SOF_AMD_ACP63
          If unsure select "N".
 
 config SND_SOC_SOF_AMD_ACP70
-       tristate "SOF support for ACP7.0 platform"
+       tristate "SOF support for ACP7.0/ACP7.1 platforms"
        depends on SND_SOC_SOF_PCI
        depends on AMD_NODE
        select SND_SOC_SOF_AMD_COMMON
        help
          Select this option for SOF support on
-         AMD ACP7.0 version based platforms.
-         Say Y if you want to enable SOF on ACP7.0 based platform.
+         AMD ACP7.0/ACP7.1 version based platforms.
+         Say Y if you want to enable SOF on ACP7.0/ACP7.1 based platforms.
 
 endif
index 30c03a22151302cb88e8dad10724a63d6c610f4b..ead31aee5e6fa6a98cf744870756a5ad5dd62197 100644 (file)
@@ -58,6 +58,7 @@ static void init_dma_descriptor(struct acp_dev_data *adata)
 
        switch (acp_data->pci_rev) {
        case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
                acp_dma_desc_base_addr = ACP70_DMA_DESC_BASE_ADDR;
                acp_dma_desc_max_num_dscr = ACP70_DMA_DESC_MAX_NUM_DSCR;
                break;
@@ -97,6 +98,7 @@ static int config_dma_channel(struct acp_dev_data *adata, unsigned int ch,
 
        switch (acp_data->pci_rev) {
        case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
                acp_dma_cntl_0 = ACP70_DMA_CNTL_0;
                acp_dma_ch_rst_sts = ACP70_DMA_CH_RST_STS;
                acp_dma_dscr_err_sts_0 = ACP70_DMA_ERR_STS_0;
@@ -336,6 +338,7 @@ int acp_dma_status(struct acp_dev_data *adata, unsigned char ch)
 
        switch (adata->pci_rev) {
        case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
                acp_dma_ch_sts = ACP70_DMA_CH_STS;
                break;
        default:
@@ -486,6 +489,7 @@ static int acp_power_on(struct snd_sof_dev *sdev)
                acp_pgfsm_cntl_mask = ACP6X_PGFSM_CNTL_POWER_ON_MASK;
                break;
        case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
                acp_pgfsm_status_mask = ACP70_PGFSM_STATUS_MASK;
                acp_pgfsm_cntl_mask = ACP70_PGFSM_CNTL_POWER_ON_MASK;
                break;
@@ -616,8 +620,12 @@ int amd_sof_acp_suspend(struct snd_sof_dev *sdev, u32 target_state)
                dev_err(sdev->dev, "ACP Reset failed\n");
                return ret;
        }
-       if (acp_data->pci_rev == ACP70_PCI_ID)
+       switch (acp_data->pci_rev) {
+       case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
                enable = true;
+               break;
+       }
        snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_CONTROL, enable);
 
        return 0;
index d084db34eed8d237fe9bdbda72a771d3d88430ee..86acd43f707e418ef38123027c38c72d381f66ee 100644 (file)
@@ -74,6 +74,7 @@
 #define ACP_RMB_PCI_ID                         0x6F
 #define ACP63_PCI_ID                           0x63
 #define ACP70_PCI_ID                           0x70
+#define ACP71_PCI_ID                           0x71
 
 #define HOST_BRIDGE_CZN                                0x1630
 #define HOST_BRIDGE_VGH                                0x1645
index 9108f1139ff2dc4595d656c0da6f7737902250d0..8816c323d69e6f907006038a23b95df350345c0d 100644 (file)
@@ -71,8 +71,13 @@ static int acp70_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_
 {
        unsigned int flag;
 
-       if (pci->revision != ACP70_PCI_ID)
+       switch (pci->revision) {
+       case ACP70_PCI_ID:
+       case ACP71_PCI_ID:
+                       break;
+       default:
                return -ENODEV;
+       }
 
        flag = snd_amd_acp_find_config(pci);
        if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC)