mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver
The FS2104/5S are FourSemi digital audio amplifiers with I2C control. They are Inductor-Less, Stereo, Closed-Loop, Digital Input Class-D Power Amplifiers with Enhanced Signal Processing. Signed-off-by: Nick Li <nick.li@foursemi.com> Link: https://patch.msgid.link/75A0F7CC495E9662+20250811104610.8993-5-nick.li@foursemi.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -125,6 +125,7 @@ config SND_SOC_ALL_CODECS
|
||||
imply SND_SOC_ES7134
|
||||
imply SND_SOC_ES7241
|
||||
imply SND_SOC_FRAMER
|
||||
imply SND_SOC_FS210X
|
||||
imply SND_SOC_GTM601
|
||||
imply SND_SOC_HDAC_HDMI
|
||||
imply SND_SOC_HDAC_HDA
|
||||
@@ -1236,6 +1237,18 @@ config SND_SOC_FS_AMP_LIB
|
||||
select CRC16
|
||||
tristate
|
||||
|
||||
config SND_SOC_FS210X
|
||||
tristate 'FourSemi FS2104/5S digital audio amplifier'
|
||||
depends on I2C
|
||||
select GPIOLIB
|
||||
select REGMAP_I2C
|
||||
select SND_SOC_FS_AMP_LIB
|
||||
help
|
||||
Enable support for FourSemi FS2104/5S digital audio amplifier.
|
||||
The FS2104/5S are Inductor-Less, Stereo, Closed-Loop,
|
||||
Digital Input Class-D Power Amplifiers with Enhanced Signal Processing.
|
||||
The amplifiers support I2C and I2S/TDM.
|
||||
|
||||
config SND_SOC_GTM601
|
||||
tristate 'GTM601 UMTS modem audio codec'
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ snd-soc-es8375-y := es8375.o
|
||||
snd-soc-es8389-y := es8389.o
|
||||
snd-soc-framer-y := framer-codec.o
|
||||
snd-soc-fs-amp-lib-y := fs-amp-lib.o
|
||||
snd-soc-fs210x-y := fs210x.o
|
||||
snd-soc-gtm601-y := gtm601.o
|
||||
snd-soc-hdac-hdmi-y := hdac_hdmi.o
|
||||
snd-soc-hdac-hda-y := hdac_hda.o
|
||||
@@ -564,6 +565,7 @@ obj-$(CONFIG_SND_SOC_ES8375) += snd-soc-es8375.o
|
||||
obj-$(CONFIG_SND_SOC_ES8389) += snd-soc-es8389.o
|
||||
obj-$(CONFIG_SND_SOC_FRAMER) += snd-soc-framer.o
|
||||
obj-$(CONFIG_SND_SOC_FS_AMP_LIB)+= snd-soc-fs-amp-lib.o
|
||||
obj-$(CONFIG_SND_SOC_FS210X) += snd-soc-fs210x.o
|
||||
obj-$(CONFIG_SND_SOC_GTM601) += snd-soc-gtm601.o
|
||||
obj-$(CONFIG_SND_SOC_HDAC_HDMI) += snd-soc-hdac-hdmi.o
|
||||
obj-$(CONFIG_SND_SOC_HDAC_HDA) += snd-soc-hdac-hda.o
|
||||
|
||||
1583
sound/soc/codecs/fs210x.c
Normal file
1583
sound/soc/codecs/fs210x.c
Normal file
File diff suppressed because it is too large
Load Diff
75
sound/soc/codecs/fs210x.h
Normal file
75
sound/soc/codecs/fs210x.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* fs210x.h -- Driver for the FS2104/5S Audio Amplifier
|
||||
*
|
||||
* Copyright (C) 2016-2025 Shanghai FourSemi Semiconductor Co.,Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __FS210X_H__
|
||||
#define __FS210X_H__
|
||||
|
||||
#define FS210X_00H_STATUS 0x00
|
||||
#define FS210X_03H_DEVID 0x03
|
||||
#define FS210X_05H_ANASTAT 0x05
|
||||
#define FS210X_06H_DIGSTAT 0x06
|
||||
#define FS210X_0BH_ACCKEY 0x0B
|
||||
#define FS210X_0FH_I2CADDR 0x0F
|
||||
#define FS210X_10H_PWRCTRL 0x10
|
||||
#define FS210X_11H_SYSCTRL 0x11
|
||||
#define FS210X_17H_I2SCTRL 0x17
|
||||
#define FS210X_30H_DACCTRL 0x30
|
||||
#define FS210X_39H_LVOLCTRL 0x39
|
||||
#define FS210X_3AH_RVOLCTRL 0x3A
|
||||
#define FS210X_42H_DACEQWL 0x42
|
||||
#define FS210X_46H_DACEQA 0x46
|
||||
#define FS210X_A1H_PLLCTRL1 0xA1
|
||||
#define FS210X_A2H_PLLCTRL2 0xA2
|
||||
#define FS210X_A3H_PLLCTRL3 0xA3
|
||||
#define FS210X_ABH_INTSTAT 0xAB
|
||||
#define FS210X_ACH_INTSTATR 0xAC
|
||||
|
||||
#define FS210X_05H_PVDD_SHIFT 14
|
||||
#define FS210X_05H_PVDD_MASK BIT(14)
|
||||
#define FS210X_05H_OCDL_SHIFT 13
|
||||
#define FS210X_05H_OCDL_MASK BIT(13)
|
||||
#define FS210X_05H_UVDL_SHIFT 12
|
||||
#define FS210X_05H_UVDL_MASK BIT(12)
|
||||
#define FS210X_05H_OVDL_SHIFT 11
|
||||
#define FS210X_05H_OVDL_MASK BIT(11)
|
||||
#define FS210X_05H_OTPDL_SHIFT 10
|
||||
#define FS210X_05H_OTPDL_MASK BIT(10)
|
||||
#define FS210X_05H_OCRDL_SHIFT 9
|
||||
#define FS210X_05H_OCRDL_MASK BIT(9)
|
||||
#define FS210X_05H_OCLDL_SHIFT 8
|
||||
#define FS210X_05H_OCLDL_MASK BIT(8)
|
||||
#define FS210X_05H_DCRDL_SHIFT 7
|
||||
#define FS210X_05H_DCRDL_MASK BIT(7)
|
||||
#define FS210X_05H_DCLDL_SHIFT 6
|
||||
#define FS210X_05H_DCLDL_MASK BIT(6)
|
||||
#define FS210X_05H_SRDL_SHIFT 5
|
||||
#define FS210X_05H_SRDL_MASK BIT(5)
|
||||
#define FS210X_05H_OTWDL_SHIFT 4
|
||||
#define FS210X_05H_OTWDL_MASK BIT(4)
|
||||
#define FS210X_05H_AMPS_SHIFT 3
|
||||
#define FS210X_05H_AMPS_MASK BIT(3)
|
||||
#define FS210X_05H_PLLS_SHIFT 1
|
||||
#define FS210X_05H_PLLS_MASK BIT(1)
|
||||
#define FS210X_05H_ANAS_SHIFT 0
|
||||
#define FS210X_05H_ANAS_MASK BIT(0)
|
||||
#define FS210X_17H_I2SSR_SHIFT 12
|
||||
#define FS210X_17H_I2SSR_MASK GENMASK(15, 12)
|
||||
#define FS210X_30H_RMUTE_SHIFT 8
|
||||
#define FS210X_30H_LMUTE_SHIFT 4
|
||||
|
||||
#define FS210X_0BH_ACCKEY_ON 0x0091
|
||||
#define FS210X_0BH_ACCKEY_OFF 0x0000
|
||||
#define FS210X_10H_I2C_RESET 0x0002
|
||||
#define FS210X_11H_DPS_HIZ 0x0100
|
||||
#define FS210X_11H_DPS_PWDN 0x0000
|
||||
#define FS210X_11H_DPS_PLAY 0x0300
|
||||
#define FS210X_46H_CAM_BURST_L 0x8000
|
||||
#define FS210X_46H_CAM_BURST_R 0x8200
|
||||
#define FS2105S_46H_CAM_BURST_W 0x8400
|
||||
#define FS210X_46H_CAM_CLEAR 0x0000
|
||||
|
||||
#endif /* __FS210X_H__ */
|
||||
Reference in New Issue
Block a user