162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* register 1 */ 362306a36Sopenharmony_ci#define CS4398_REV_MASK 0x07 462306a36Sopenharmony_ci#define CS4398_PART_MASK 0xf8 562306a36Sopenharmony_ci#define CS4398_PART_CS4398 0x70 662306a36Sopenharmony_ci/* register 2 */ 762306a36Sopenharmony_ci#define CS4398_FM_MASK 0x03 862306a36Sopenharmony_ci#define CS4398_FM_SINGLE 0x00 962306a36Sopenharmony_ci#define CS4398_FM_DOUBLE 0x01 1062306a36Sopenharmony_ci#define CS4398_FM_QUAD 0x02 1162306a36Sopenharmony_ci#define CS4398_FM_DSD 0x03 1262306a36Sopenharmony_ci#define CS4398_DEM_MASK 0x0c 1362306a36Sopenharmony_ci#define CS4398_DEM_NONE 0x00 1462306a36Sopenharmony_ci#define CS4398_DEM_44100 0x04 1562306a36Sopenharmony_ci#define CS4398_DEM_48000 0x08 1662306a36Sopenharmony_ci#define CS4398_DEM_32000 0x0c 1762306a36Sopenharmony_ci#define CS4398_DIF_MASK 0x70 1862306a36Sopenharmony_ci#define CS4398_DIF_LJUST 0x00 1962306a36Sopenharmony_ci#define CS4398_DIF_I2S 0x10 2062306a36Sopenharmony_ci#define CS4398_DIF_RJUST_16 0x20 2162306a36Sopenharmony_ci#define CS4398_DIF_RJUST_24 0x30 2262306a36Sopenharmony_ci#define CS4398_DIF_RJUST_20 0x40 2362306a36Sopenharmony_ci#define CS4398_DIF_RJUST_18 0x50 2462306a36Sopenharmony_ci#define CS4398_DSD_SRC 0x80 2562306a36Sopenharmony_ci/* register 3 */ 2662306a36Sopenharmony_ci#define CS4398_ATAPI_MASK 0x1f 2762306a36Sopenharmony_ci#define CS4398_ATAPI_B_MUTE 0x00 2862306a36Sopenharmony_ci#define CS4398_ATAPI_B_R 0x01 2962306a36Sopenharmony_ci#define CS4398_ATAPI_B_L 0x02 3062306a36Sopenharmony_ci#define CS4398_ATAPI_B_LR 0x03 3162306a36Sopenharmony_ci#define CS4398_ATAPI_A_MUTE 0x00 3262306a36Sopenharmony_ci#define CS4398_ATAPI_A_R 0x04 3362306a36Sopenharmony_ci#define CS4398_ATAPI_A_L 0x08 3462306a36Sopenharmony_ci#define CS4398_ATAPI_A_LR 0x0c 3562306a36Sopenharmony_ci#define CS4398_ATAPI_MIX_LR_VOL 0x10 3662306a36Sopenharmony_ci#define CS4398_INVERT_B 0x20 3762306a36Sopenharmony_ci#define CS4398_INVERT_A 0x40 3862306a36Sopenharmony_ci#define CS4398_VOL_B_EQ_A 0x80 3962306a36Sopenharmony_ci/* register 4 */ 4062306a36Sopenharmony_ci#define CS4398_MUTEP_MASK 0x03 4162306a36Sopenharmony_ci#define CS4398_MUTEP_AUTO 0x00 4262306a36Sopenharmony_ci#define CS4398_MUTEP_LOW 0x02 4362306a36Sopenharmony_ci#define CS4398_MUTEP_HIGH 0x03 4462306a36Sopenharmony_ci#define CS4398_MUTE_B 0x08 4562306a36Sopenharmony_ci#define CS4398_MUTE_A 0x10 4662306a36Sopenharmony_ci#define CS4398_MUTEC_A_EQ_B 0x20 4762306a36Sopenharmony_ci#define CS4398_DAMUTE 0x40 4862306a36Sopenharmony_ci#define CS4398_PAMUTE 0x80 4962306a36Sopenharmony_ci/* register 5 */ 5062306a36Sopenharmony_ci#define CS4398_VOL_A_MASK 0xff 5162306a36Sopenharmony_ci/* register 6 */ 5262306a36Sopenharmony_ci#define CS4398_VOL_B_MASK 0xff 5362306a36Sopenharmony_ci/* register 7 */ 5462306a36Sopenharmony_ci#define CS4398_DIR_DSD 0x01 5562306a36Sopenharmony_ci#define CS4398_FILT_SEL 0x04 5662306a36Sopenharmony_ci#define CS4398_RMP_DN 0x10 5762306a36Sopenharmony_ci#define CS4398_RMP_UP 0x20 5862306a36Sopenharmony_ci#define CS4398_ZERO_CROSS 0x40 5962306a36Sopenharmony_ci#define CS4398_SOFT_RAMP 0x80 6062306a36Sopenharmony_ci/* register 8 */ 6162306a36Sopenharmony_ci#define CS4398_MCLKDIV3 0x08 6262306a36Sopenharmony_ci#define CS4398_MCLKDIV2 0x10 6362306a36Sopenharmony_ci#define CS4398_FREEZE 0x20 6462306a36Sopenharmony_ci#define CS4398_CPEN 0x40 6562306a36Sopenharmony_ci#define CS4398_PDN 0x80 6662306a36Sopenharmony_ci/* register 9 */ 6762306a36Sopenharmony_ci#define CS4398_DSD_PM_EN 0x01 6862306a36Sopenharmony_ci#define CS4398_DSD_PM_MODE 0x02 6962306a36Sopenharmony_ci#define CS4398_INVALID_DSD 0x04 7062306a36Sopenharmony_ci#define CS4398_STATIC_DSD 0x08 71