1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef _OCTOPUS_CBI_SSFC__H_ 4 #define _OCTOPUS_CBI_SSFC__H_ 5 6 #include <inttypes.h> 7 8 /**************************************************************************** 9 * Octopus CBI Second Source Factory Cache 10 * 11 * SSFC was introduced after variants were MPed already so we can expect there 12 * can be devices in the field without SSFC field in the CBI. For devices 13 * without SSFC field in the CBI, the value of SSFC will be 0 set by get_ssfc() 14 * in the cbi_ssfc.c. 15 * 16 * On the other hand, taking audio codec as the example there are two sources - 17 * DA7219 and RT5682 used in the MPed devices before introducing SSFC. As a 18 * result, the value 0 of each bits group for a specific component is defined as 19 * DEFAULT and different variants should transform this DEFAULT to one of 20 * sources they used as the first sources. In the example here, either DA7219 or 21 * RT5682 should be transformed. 22 */ 23 24 /* 25 * Audio Codec (Bits 9-11) 26 * 27 */ 28 enum ssfc_audio_codec { 29 SSFC_AUDIO_CODEC_DEFAULT, 30 SSFC_AUDIO_CODEC_DA7219, 31 SSFC_AUDIO_CODEC_RT5682, 32 SSFC_AUDIO_CODEC_CS42L42, 33 SSFC_AUDIO_CODEC_RT5682_VS, 34 }; 35 #define SSFC_AUDIO_CODEC_OFFSET 9 36 #define SSFC_AUDIO_CODEC_MASK 0x7 37 38 enum ssfc_audio_codec ssfc_get_audio_codec(void); 39 40 #endif /* _OCTOPUS_CBI_SSFC__H_ */ 41