Commit 18c0af94 authored by Ryan Lee's avatar Ryan Lee Committed by Mark Brown

ASoC: max98363: add soundwire amplifier driver

Added Analog Devices MAX98363 SoundWire Amplifier Driver.
The MAX98363 is a SoundWire peripheral device that supports
MIPI SoundWire v1.2-compatible digital interface for audio and
control data.
Signed-off-by: default avatarRyan Lee <ryans.lee@analog.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230330234319.6841-1-ryan.lee.analog@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cfad8170
......@@ -133,6 +133,7 @@ config SND_SOC_ALL_CODECS
imply SND_SOC_MAX98925
imply SND_SOC_MAX98926
imply SND_SOC_MAX98927
imply SND_SOC_MAX98363
imply SND_SOC_MAX98373_I2C
imply SND_SOC_MAX98373_SDW
imply SND_SOC_MAX98390
......@@ -1133,6 +1134,16 @@ config SND_SOC_MAX98520
To compile this driver as a module, choose M here.
config SND_SOC_MAX98363
tristate "Analog Devices MAX98363 Soundwire Speaker Amplifier"
depends on SOUNDWIRE
select REGMAP_SOUNDWIRE
help
Enable support for Analog Devices MAX98363 Soundwire
amplifier. MAX98363 supports the MIPI SoundWire v1.2
compatible interface for audio and control data.
This amplifier does not support I2C and I2S.
config SND_SOC_MAX98373
tristate
......
......@@ -148,6 +148,7 @@ snd-soc-max98925-objs := max98925.o
snd-soc-max98926-objs := max98926.o
snd-soc-max98927-objs := max98927.o
snd-soc-max98520-objs := max98520.o
snd-soc-max98363-objs := max98363.o
snd-soc-max98373-objs := max98373.o
snd-soc-max98373-i2c-objs := max98373-i2c.o
snd-soc-max98373-sdw-objs := max98373-sdw.o
......@@ -515,6 +516,7 @@ obj-$(CONFIG_SND_SOC_MAX98925) += snd-soc-max98925.o
obj-$(CONFIG_SND_SOC_MAX98926) += snd-soc-max98926.o
obj-$(CONFIG_SND_SOC_MAX98927) += snd-soc-max98927.o
obj-$(CONFIG_SND_SOC_MAX98520) += snd-soc-max98520.o
obj-$(CONFIG_SND_SOC_MAX98363) += snd-soc-max98363.o
obj-$(CONFIG_SND_SOC_MAX98373) += snd-soc-max98373.o
obj-$(CONFIG_SND_SOC_MAX98373_I2C) += snd-soc-max98373-i2c.o
obj-$(CONFIG_SND_SOC_MAX98373_SDW) += snd-soc-max98373-sdw.o
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2022 Analog Devices Inc. */
#ifndef _MAX98363_H
#define _MAX98363_H
#define MAX98363_R2000_SW_RESET 0x2000
#define MAX98363_R2001_INTR_RAW 0x2001
#define MAX98363_R2003_INTR_STATE 0x2003
#define MAX98363_R2005_INTR_FALG 0x2005
#define MAX98363_R2007_INTR_EN 0x2007
#define MAX98363_R2009_INTR_CLR 0x2009
#define MAX98363_R2021_ERR_MON_CTRL 0x2021
#define MAX98363_R2022_SPK_MON_THRESH 0x2022
#define MAX98363_R2023_SPK_MON_DURATION 0x2023
#define MAX98363_R2030_TONE_GEN_CFG 0x2030
#define MAX98363_R203F_TONE_GEN_EN 0x203F
#define MAX98363_R2040_AMP_VOL 0x2040
#define MAX98363_R2041_AMP_GAIN 0x2041
#define MAX98363_R2042_DSP_CFG 0x2042
#define MAX98363_R21FF_REV_ID 0x21FF
/* MAX98363_R2021_ERR_MON_CTRL */
#define MAX98363_SPKMON_SHIFT (3)
#define MAX98363_CLOCK_MON_SHIFT (0)
/* MAX98363_R2042_DSP_CFG */
#define MAX98363_AMP_DSP_CFG_RMP_SHIFT (3)
struct max98363_priv {
struct regmap *regmap;
struct sdw_slave *slave;
bool hw_init;
bool first_hw_init;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment