mfd: madera: Update DT bindings to add additional CODECs
Charles Keepax
maintainerPATCH 1/3 mfd: madera: Update DT bindings to add additional CODECs
From: Richard Fitzgerald <[email protected]>
This adds the cs47l15, cs42l92, cs47l92 and cs47l93 to the list of compatible strings and updates some properties that need to note the new CODECs.
--- Documentation/devicetree/bindings/mfd/madera.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/madera.txt +6 -2
@@ -11,10 +11,14 @@ bindings/sound/madera.txt Required properties: - compatible : One of the following chip-specific strings: + "cirrus,cs47l15" "cirrus,cs47l35" "cirrus,cs47l85" "cirrus,cs47l90" "cirrus,cs47l91" + "cirrus,cs42l92" + "cirrus,cs47l92" + "cirrus,cs47l93" "cirrus,wm1840" - reg : I2C slave address when connected using I2C, chip select number when
@@ -22,7 +26,7 @@ Required properties: - DCVDD-supply : Power supply for the device as defined in bindings/regulator/regulator.txt - Mandatory on CS47L35, CS47L90, CS47L91 + Mandatory on CS47L15, CS47L35, CS47L90, CS47L91, CS42L92, CS47L92, CS47L93 Optional on CS47L85, WM1840 - AVDD-supply, DBVDD1-supply, DBVDD2-supply, CPVDD1-supply, CPVDD2-supply :
@@ -35,7 +39,7 @@ Required properties: (CS47L85, WM1840) - SPKVDD-supply : Power supply for the device - (CS47L35) + (CS47L15, CS47L35) - interrupt-controller : Indicates that this device is an interrupt controller
Signature · 1 line
2.11.0
Charles Keepax
maintainerPATCH 2/3 mfd: madera: Add Madera core support for CS47L15
From: Richard Fitzgerald <[email protected]>
This patch adds all the core support and defines for the Cirrus Logic CS47L15 smart audio CODEC.
Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs.
--- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l15-tables.c | 1301 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 44 ++ drivers/mfd/madera-i2c.c | 7 + drivers/mfd/madera-spi.c | 7 + drivers/mfd/madera.h | 6 + include/linux/mfd/madera/core.h | 2 + include/linux/mfd/madera/registers.h | 5 + 9 files changed, 1382 insertions(+) create mode 100644 drivers/mfd/cs47l15-tables.c
drivers/mfd/Kconfig +7 -0
@@ -260,6 +260,13 @@ config MFD_MADERA_SPI Support for the Cirrus Logic Madera platform audio SoC core functionality controlled via SPI. +config MFD_CS47L15 + bool "Cirrus Logic CS47L15" + select PINCTRL_CS47L15 + depends on MFD_MADERA + help + Support for Cirrus Logic CS47L15 Smart Codec + config MFD_CS47L35 bool "Cirrus Logic CS47L35" select PINCTRL_CS47L35
drivers/mfd/Makefile +3 -0
@@ -75,6 +75,9 @@ obj-$(CONFIG_MFD_WM8994) += wm8994.o obj-$(CONFIG_MFD_WM97xx) += wm97xx-core.o madera-objs := madera-core.o +ifeq ($(CONFIG_MFD_CS47L15),y) +madera-objs += cs47l15-tables.o +endif ifeq ($(CONFIG_MFD_CS47L35),y) madera-objs += cs47l35-tables.o endif
drivers/mfd/cs47l15-tables.c new file +1301 -0
1,301 lines not on this page · raw message
drivers/mfd/madera-core.c +44 -0
86 lines not on this page · raw message
drivers/mfd/madera-i2c.c +7 -0
@@ -39,6 +39,12 @@ static int madera_i2c_probe(struct i2c_client *i2c, type = id->driver_data;switch (type) { +case CS47L15 : +if (IS_ENABLED (CONFIG_MFD_CS47L15 )) { + regmap_16bit_config = &cs47l15_16bit_i2c_regmap; + regmap_32bit_config = &cs47l15_32bit_i2c_regmap; + } +break ;case CS47L35 :if (IS_ENABLED (CONFIG_MFD_CS47L35 )) { regmap_16bit_config = &cs47l35_16bit_i2c_regmap;
@@ -113,6 +119,7 @@ static int madera_i2c_remove(struct i2c_client *i2c) }static const struct i2c_device_id madera_i2c_id[] = { + {"cs47l15" ,CS47L15 }, {"cs47l35" ,CS47L35 }, {"cs47l85" ,CS47L85 }, {"cs47l90" ,CS47L90 },
drivers/mfd/madera-spi.c +7 -0
@@ -39,6 +39,12 @@ static int madera_spi_probe(struct spi_device *spi) type = id->driver_data;switch (type) { +case CS47L15 : +if (IS_ENABLED (CONFIG_MFD_CS47L15 )) { + regmap_16bit_config = &cs47l15_16bit_spi_regmap; + regmap_32bit_config = &cs47l15_32bit_spi_regmap; + } +break ;case CS47L35 :if (IS_ENABLED (CONFIG_MFD_CS47L35 )) { regmap_16bit_config = &cs47l35_16bit_spi_regmap;
@@ -112,6 +118,7 @@ static int madera_spi_remove(struct spi_device *spi) }static const struct spi_device_id madera_spi_ids[] = { + {"cs47l15" ,CS47L15 }, {"cs47l35" ,CS47L35 }, {"cs47l85" ,CS47L85 }, {"cs47l90" ,CS47L90 },
drivers/mfd/madera.h +6 -0
@@ -24,6 +24,12 @@ int madera_dev_exit(struct madera *madera);const char *madera_name_from_type (enum madera_type type); +extern const struct regmap_config cs47l15_16bit_spi_regmap; +extern const struct regmap_config cs47l15_32bit_spi_regmap; +extern const struct regmap_config cs47l15_16bit_i2c_regmap; +extern const struct regmap_config cs47l15_32bit_i2c_regmap; +int cs47l15_patch (struct madera *madera); +extern const struct regmap_config cs47l35_16bit_spi_regmap;extern const struct regmap_config cs47l35_32bit_spi_regmap;extern const struct regmap_config cs47l35_16bit_i2c_regmap;
include/linux/mfd/madera/core.h +2 -0
@@ -27,11 +27,13 @@ enum madera_type {CS47L90 =3 ,CS47L91 =4 ,WM1840 =7 , + CS47L15 = 8, };#define MADERA_MAX_CORE_SUPPLIES 2#define MADERA_MAX_GPIOS 40 +#define CS47L15_NUM_GPIOS 15#define CS47L35_NUM_GPIOS 16#define CS47L85_NUM_GPIOS 40#define CS47L90_NUM_GPIOS 38
include/linux/mfd/madera/registers.h +5 -0
@@ -244,6 +244,8 @@#define MADERA_IN6R_CONTROL 0x33C#define MADERA_ADC_DIGITAL_VOLUME_6R 0x33D#define MADERA_DMIC6R_CONTROL 0x33E +#define CS47L15_ADC_INT_BIAS 0x3A8 +#define CS47L15_PGA_BIAS_SEL 0x3C4#define MADERA_OUTPUT_ENABLES_1 0x400#define MADERA_OUTPUT_STATUS_1 0x401#define MADERA_RAW_OUTPUT_STATUS_1 0x406
@@ -1202,6 +1204,8 @@#define MADERA_GPIO1_CTRL_2 0x1701#define MADERA_GPIO2_CTRL_1 0x1702#define MADERA_GPIO2_CTRL_2 0x1703 +#define MADERA_GPIO15_CTRL_1 0x171C +#define MADERA_GPIO15_CTRL_2 0x171D#define MADERA_GPIO16_CTRL_1 0x171E#define MADERA_GPIO16_CTRL_2 0x171F#define MADERA_GPIO38_CTRL_1 0x174A
@@ -1232,6 +1236,7 @@#define MADERA_IRQ2_CTRL 0x1A82#define MADERA_INTERRUPT_RAW_STATUS_1 0x1AA0#define MADERA_WSEQ_SEQUENCE_1 0x3000 +#define MADERA_WSEQ_SEQUENCE_225 0x31C0#define MADERA_WSEQ_SEQUENCE_252 0x31F6#define CS47L35_OTP_HPDET_CAL_1 0x31F8#define CS47L35_OTP_HPDET_CAL_2 0x31FA
Signature · 1 line
2.11.0
Lee Jones
AppliedRe: [PATCH 2/3] mfd: madera: Add Madera core support for CS47L15
Quoted 12 lines · Charles Keepax
From: Richard Fitzgerald <[email protected]>
This patch adds all the core support and defines for the Cirrus Logic CS47L15 smart audio CODEC.
Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs.
Signed-off-by Richard Fitzgerald <[email protected]>Signed-off-by Charles Keepax <[email protected]>
Quoted 12 lines
--- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l15-tables.c | 1301 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 44 ++ drivers/mfd/madera-i2c.c | 7 + drivers/mfd/madera-spi.c | 7 + drivers/mfd/madera.h | 6 + include/linux/mfd/madera/core.h | 2 + include/linux/mfd/madera/registers.h | 5 + 9 files changed, 1382 insertions(+) create mode 100644 drivers/mfd/cs47l15-tables.c
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Charles Keepax
maintainerPATCH 3/3 mfd: madera: Add Madera core support for CS47L92
In reply to Charles KeepaxFrom: Richard Fitzgerald <[email protected]>
This patch adds all the core support and defines for the Cirrus Logic CS42L92, CS47L92 and CS47L93 smart audio CODECs.
Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs.
--- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l92-tables.c | 1948 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 58 + drivers/mfd/madera-i2c.c | 11 + drivers/mfd/madera-spi.c | 11 + drivers/mfd/madera.h | 7 + include/linux/mfd/madera/core.h | 4 + include/linux/mfd/madera/registers.h | 195 ++++ 9 files changed, 2244 insertions(+) create mode 100644 drivers/mfd/cs47l92-tables.c
drivers/mfd/Kconfig +7 -0
@@ -288,6 +288,13 @@ config MFD_CS47L90 help Support for Cirrus Logic CS47L90 and CS47L91 Smart Codecs +config MFD_CS47L92 + bool "Cirrus Logic CS47L92/93" + select PINCTRL_CS47L92 + depends on MFD_MADERA + help + Support for Cirrus Logic CS42L92, CS47L92 and CS47L93 Smart Codecs + config MFD_ASIC3 bool "Compaq ASIC3" depends on GPIOLIB && ARM
drivers/mfd/Makefile +3 -0
@@ -87,6 +87,9 @@ endif ifeq ($(CONFIG_MFD_CS47L90),y) madera-objs += cs47l90-tables.o endif +ifeq ($(CONFIG_MFD_CS47L92),y) +madera-objs += cs47l92-tables.o +endif obj-$(CONFIG_MFD_MADERA) += madera.o obj-$(CONFIG_MFD_MADERA_I2C) += madera-i2c.o obj-$(CONFIG_MFD_MADERA_SPI) += madera-spi.o
drivers/mfd/cs47l92-tables.c new file +1948 -0
1,948 lines not on this page · raw message
drivers/mfd/madera-core.c +58 -0
100 lines not on this page · raw message
drivers/mfd/madera-i2c.c +11 -0
@@ -65,6 +65,14 @@ static int madera_i2c_probe(struct i2c_client *i2c, regmap_32bit_config = &cs47l90_32bit_i2c_regmap; }break ; +case CS42L92 : +case CS47L92 : +case CS47L93 : +if (IS_ENABLED (CONFIG_MFD_CS47L92 )) { + regmap_16bit_config = &cs47l92_16bit_i2c_regmap; + regmap_32bit_config = &cs47l92_32bit_i2c_regmap; + } +break ;default :dev_err (&i2c->dev,"Unknown Madera I2C device type %ld\n" , type);
@@ -124,6 +132,9 @@ static const struct i2c_device_id madera_i2c_id[] = { { "cs47l85", CS47L85 }, { "cs47l90", CS47L90 }, { "cs47l91", CS47L91 }, + { "cs42l92", CS42L92 }, + { "cs47l92", CS47L92 }, + { "cs47l93", CS47L93 }, { "wm1840", WM1840 }, { } };
drivers/mfd/madera-spi.c +11 -0
@@ -65,6 +65,14 @@ static int madera_spi_probe(struct spi_device *spi) regmap_32bit_config = &cs47l90_32bit_spi_regmap; }break ; +case CS42L92 : +case CS47L92 : +case CS47L93 : +if (IS_ENABLED (CONFIG_MFD_CS47L92 )) { + regmap_16bit_config = &cs47l92_16bit_spi_regmap; + regmap_32bit_config = &cs47l92_32bit_spi_regmap; + } +break ;default :dev_err (&spi->dev,"Unknown Madera SPI device type %ld\n" , type);
@@ -123,6 +131,9 @@ static const struct spi_device_id madera_spi_ids[] = { { "cs47l85", CS47L85 }, { "cs47l90", CS47L90 }, { "cs47l91", CS47L91 }, + { "cs42l92", CS42L92 }, + { "cs47l92", CS47L92 }, + { "cs47l93", CS47L93 }, { "wm1840", WM1840 }, { } };
drivers/mfd/madera.h +7 -0
@@ -47,4 +47,11 @@ extern const struct regmap_config cs47l90_32bit_spi_regmap;extern const struct regmap_config cs47l90_16bit_i2c_regmap;extern const struct regmap_config cs47l90_32bit_i2c_regmap;int cs47l90_patch (struct madera *madera); + +extern const struct regmap_config cs47l92_16bit_spi_regmap; +extern const struct regmap_config cs47l92_32bit_spi_regmap; +extern const struct regmap_config cs47l92_16bit_i2c_regmap; +extern const struct regmap_config cs47l92_32bit_i2c_regmap; +int cs47l92_patch (struct madera *madera); +#endif
include/linux/mfd/madera/core.h +4 -0
@@ -26,8 +26,11 @@ enum madera_type {CS47L85 =2 ,CS47L90 =3 ,CS47L91 =4 , +CS47L92 =5 , +CS47L93 =6 ,WM1840 =7 ,CS47L15 =8 , + CS42L92 = 9, };#define MADERA_MAX_CORE_SUPPLIES 2
@@ -37,6 +40,7 @@ enum madera_type {#define CS47L35_NUM_GPIOS 16#define CS47L85_NUM_GPIOS 40#define CS47L90_NUM_GPIOS 38 +#define CS47L92_NUM_GPIOS 16#define MADERA_MAX_MICBIAS 4
include/linux/mfd/madera/registers.h +195 -0
299 lines not on this page · raw message
Signature · 1 line
2.11.0
Lee Jones
AppliedRe: [PATCH 3/3] mfd: madera: Add Madera core support for CS47L92
Quoted 13 lines · Charles Keepax
From: Richard Fitzgerald <[email protected]>
This patch adds all the core support and defines for the Cirrus Logic CS42L92, CS47L92 and CS47L93 smart audio CODECs.
Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs.
Signed-off-by Stuart Henderson <[email protected]>Signed-off-by Richard Fitzgerald <[email protected]>Signed-off-by Charles Keepax <[email protected]>
Quoted 12 lines
--- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l92-tables.c | 1948 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 58 + drivers/mfd/madera-i2c.c | 11 + drivers/mfd/madera-spi.c | 11 + drivers/mfd/madera.h | 7 + include/linux/mfd/madera/core.h | 4 + include/linux/mfd/madera/registers.h | 195 ++++ 9 files changed, 2244 insertions(+) create mode 100644 drivers/mfd/cs47l92-tables.c
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Lee Jones
AppliedQuoted 11 lines · Charles Keepax
From: Richard Fitzgerald <[email protected]>
This adds the cs47l15, cs42l92, cs47l92 and cs47l93 to the list of compatible strings and updates some properties that need to note the new CODECs.
Signed-off-by Richard Fitzgerald <[email protected]>Signed-off-by Charles Keepax <[email protected]>--- Documentation/devicetree/bindings/mfd/madera.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog