Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de9b1214 authored by Nicolin Chen's avatar Nicolin Chen Committed by Mark Brown
Browse files

ASoC: cs53l30: Add codec driver support for Cirrus CS53L30



CS53L30 is a Quad-Channel ADC from Cirrus Logic with an I2S/TDM DAI.
So this patch adds a codec driver for CS53L30 that includes 4-channel
24-bit recording and TDM mode supports.

Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a695a90
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
CS53L30 audio CODEC

Required properties:

  - compatible : "cirrus,cs53l30"

  - reg : the I2C address of the device

  - VA-supply, VP-supply : power supplies for the device,
    as covered in Documentation/devicetree/bindings/regulator/regulator.txt.

Optional properties:

  - reset-gpios : a GPIO spec for the reset pin.

  - cirrus,micbias-lvl : Set the output voltage level on the MICBIAS Pin.
			 0 = Hi-Z
			 1 = 1.80 V
			 2 = 2.75 V

  - cirrus,use-sdout2 : This is a boolean property. If present, it indicates
			the hardware design connects both SDOUT1 and SDOUT2
			pins to output data. Otherwise, it indicates that
			only SDOUT1 is connected for data output.
			* CS53l30 supports 4-channel data output in the same
			* frame using two different ways:
			* 1) Normal I2S mode on two data pins -- each SDOUT
			*    carries 2-channel data in the same time.
			* 2) TDM mode on one signle data pin -- SDOUT1 carries
			*    4-channel data per frame.

Example:

codec: cs53l30@48 {
	compatible = "cirrus,cs53l30";
	reg = <0x48>;
	reset-gpios = <&gpio 54 0>;
	VA-supply = <&cs53l30_va>;
	VP-supply = <&cs53l30_vp>;
};
+6 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_CS42XX8_I2C if I2C
	select SND_SOC_CS4349 if I2C
	select SND_SOC_CS47L24 if MFD_CS47L24
	select SND_SOC_CS53L30 if I2C
	select SND_SOC_CX20442 if TTY
	select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
	select SND_SOC_DA7213 if I2C
@@ -450,6 +451,11 @@ config SND_SOC_CS4349
config SND_SOC_CS47L24
	tristate

# Cirrus Logic Quad-Channel ADC
config SND_SOC_CS53L30
	tristate "Cirrus Logic CS53L30 CODEC"
	depends on I2C

config SND_SOC_CX20442
	tristate
	depends on TTY
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ snd-soc-cs42xx8-objs := cs42xx8.o
snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o
snd-soc-cs4349-objs := cs4349.o
snd-soc-cs47l24-objs := cs47l24.o
snd-soc-cs53l30-objs := cs53l30.o
snd-soc-cx20442-objs := cx20442.o
snd-soc-da7210-objs := da7210.o
snd-soc-da7213-objs := da7213.o
@@ -264,6 +265,7 @@ obj-$(CONFIG_SND_SOC_CS42XX8) += snd-soc-cs42xx8.o
obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o
obj-$(CONFIG_SND_SOC_CS4349)	+= snd-soc-cs4349.o
obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
obj-$(CONFIG_SND_SOC_CS53L30)	+= snd-soc-cs53l30.o
obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
obj-$(CONFIG_SND_SOC_DA7210)	+= snd-soc-da7210.o
obj-$(CONFIG_SND_SOC_DA7213)	+= snd-soc-da7213.o
+1097 −0

File added.

Preview size limit exceeded, changes collapsed.

+458 −0

File added.

Preview size limit exceeded, changes collapsed.