diff options
author | Mark Brown <broonie@kernel.org> | 2025-05-07 14:12:38 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-05-07 14:12:38 +0900 |
commit | 0fa382a4f507e8cc835df43b331e0515d861e54d (patch) | |
tree | cc38d1a650e9b269f72e06bb3d5d50edb70507c7 /include/sound | |
parent | e6a40d5c9033fb98f3d83f88655bc2b963ef50eb (diff) | |
parent | 406fbc4d0fb34c16718551bb8f4c776710f63b55 (diff) |
Add support for CS35L63 Smart Amplifier
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>:
CS35L63 is a Mono Class-D PC Smart Amplifier, with Speaker Protection
and Audio Enhancement Algorithms.
CS35L63 uses a similar control interface to CS35L56 so support for
it can be added into the CS35L56 driver.
CS35L63 only has SoundWire and I2C control interfaces.
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/cs35l56.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index 5d653a3491d0..63f2c63f7c59 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -71,6 +71,8 @@ #define CS35L56_DSP_VIRTUAL1_MBOX_6 0x0011034 #define CS35L56_DSP_VIRTUAL1_MBOX_7 0x0011038 #define CS35L56_DSP_VIRTUAL1_MBOX_8 0x001103C +#define CS35L56_DIE_STS1 0x0017040 +#define CS35L56_DIE_STS2 0x0017044 #define CS35L56_DSP_RESTRICT_STS1 0x00190F0 #define CS35L56_DSP1_XMEM_PACKED_0 0x2000000 #define CS35L56_DSP1_XMEM_PACKED_6143 0x2005FFC @@ -104,6 +106,15 @@ #define CS35L56_DSP1_PMEM_0 0x3800000 #define CS35L56_DSP1_PMEM_5114 0x3804FE8 +#define CS35L63_DSP1_FW_VER CS35L56_DSP1_FW_VER +#define CS35L63_DSP1_HALO_STATE 0x280396C +#define CS35L63_DSP1_PM_CUR_STATE 0x28042C8 +#define CS35L63_PROTECTION_STATUS 0x340009C +#define CS35L63_TRANSDUCER_ACTUAL_PS 0x34000F4 +#define CS35L63_MAIN_RENDER_USER_MUTE 0x3400020 +#define CS35L63_MAIN_RENDER_USER_VOLUME 0x3400028 +#define CS35L63_MAIN_POSTURE_NUMBER 0x3400068 + /* DEVID */ #define CS35L56_DEVID_MASK 0x00FFFFFF @@ -267,6 +278,17 @@ struct cs35l56_spi_payload { } __packed; static_assert(sizeof(struct cs35l56_spi_payload) == 10); +struct cs35l56_fw_reg { + unsigned int fw_ver; + unsigned int halo_state; + unsigned int pm_cur_stat; + unsigned int prot_sts; + unsigned int transducer_actual_ps; + unsigned int user_mute; + unsigned int user_volume; + unsigned int posture_number; +}; + struct cs35l56_base { struct device *dev; struct regmap *regmap; @@ -283,6 +305,7 @@ struct cs35l56_base { struct cirrus_amp_cal_data cal_data; struct gpio_desc *reset_gpio; struct cs35l56_spi_payload *spi_payload_buf; + const struct cs35l56_fw_reg *fw_reg; }; static inline bool cs35l56_is_otp_register(unsigned int reg) @@ -310,6 +333,11 @@ static inline bool cs35l56_is_spi(struct cs35l56_base *cs35l56) extern const struct regmap_config cs35l56_regmap_i2c; extern const struct regmap_config cs35l56_regmap_spi; extern const struct regmap_config cs35l56_regmap_sdw; +extern const struct regmap_config cs35l63_regmap_i2c; +extern const struct regmap_config cs35l63_regmap_sdw; + +extern const struct cs35l56_fw_reg cs35l56_fw_reg; +extern const struct cs35l56_fw_reg cs35l63_fw_reg; extern const struct cirrus_amp_cal_controls cs35l56_calibration_controls; |