1*cb8ea62eSVijendar Mukunda /* SPDX-License-Identifier: GPL-2.0-only 2*cb8ea62eSVijendar Mukunda * Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved 3*cb8ea62eSVijendar Mukunda */ 4*cb8ea62eSVijendar Mukunda 5*cb8ea62eSVijendar Mukunda /* 6*cb8ea62eSVijendar Mukunda * soc_amd_sdw_common.h - prototypes for common helpers 7*cb8ea62eSVijendar Mukunda */ 8*cb8ea62eSVijendar Mukunda 9*cb8ea62eSVijendar Mukunda #ifndef SOC_AMD_SDW_COMMON_H 10*cb8ea62eSVijendar Mukunda #define SOC_AMD_SDW_COMMON_H 11*cb8ea62eSVijendar Mukunda 12*cb8ea62eSVijendar Mukunda #include <linux/bits.h> 13*cb8ea62eSVijendar Mukunda #include <linux/types.h> 14*cb8ea62eSVijendar Mukunda #include <sound/soc.h> 15*cb8ea62eSVijendar Mukunda #include <sound/soc_sdw_utils.h> 16*cb8ea62eSVijendar Mukunda 17*cb8ea62eSVijendar Mukunda #define ACP63_SDW_MAX_CPU_DAIS 8 18*cb8ea62eSVijendar Mukunda #define ACP63_SDW_MAX_LINKS 2 19*cb8ea62eSVijendar Mukunda 20*cb8ea62eSVijendar Mukunda #define AMD_SDW_MAX_GROUPS 9 21*cb8ea62eSVijendar Mukunda #define ACP63_PCI_REV 0x63 22*cb8ea62eSVijendar Mukunda #define SOC_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) 23*cb8ea62eSVijendar Mukunda #define ASOC_SDW_FOUR_SPK BIT(4) 24*cb8ea62eSVijendar Mukunda #define ASOC_SDW_ACP_DMIC BIT(5) 25*cb8ea62eSVijendar Mukunda 26*cb8ea62eSVijendar Mukunda #define AMD_SDW0 0 27*cb8ea62eSVijendar Mukunda #define AMD_SDW1 1 28*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO0_TX 0 29*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO1_TX 1 30*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO2_TX 2 31*cb8ea62eSVijendar Mukunda 32*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO0_RX 3 33*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO1_RX 4 34*cb8ea62eSVijendar Mukunda #define ACP63_SW0_AUDIO2_RX 5 35*cb8ea62eSVijendar Mukunda 36*cb8ea62eSVijendar Mukunda #define ACP63_SW1_AUDIO0_TX 0 37*cb8ea62eSVijendar Mukunda #define ACP63_SW1_AUDIO0_RX 1 38*cb8ea62eSVijendar Mukunda 39*cb8ea62eSVijendar Mukunda struct amd_mc_ctx { 40*cb8ea62eSVijendar Mukunda unsigned int acp_rev; 41*cb8ea62eSVijendar Mukunda unsigned int max_sdw_links; 42*cb8ea62eSVijendar Mukunda }; 43*cb8ea62eSVijendar Mukunda 44*cb8ea62eSVijendar Mukunda #endif 45