From e35f5ad6a965de5d301ca5957a1c48c53fe366fb Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Wed, 15 May 2019 15:18:56 +0200 Subject: ASoC: meson: add tohdmitx DT bindings Add the bindings and the related documentation for the audio hdmitx control glue of the Amlogic g12a SoC family Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown --- include/dt-bindings/sound/meson-g12a-tohdmitx.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/dt-bindings/sound/meson-g12a-tohdmitx.h (limited to 'include/dt-bindings') diff --git a/include/dt-bindings/sound/meson-g12a-tohdmitx.h b/include/dt-bindings/sound/meson-g12a-tohdmitx.h new file mode 100644 index 000000000000..c5e1f48d30d0 --- /dev/null +++ b/include/dt-bindings/sound/meson-g12a-tohdmitx.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_MESON_G12A_TOHDMITX_H +#define __DT_MESON_G12A_TOHDMITX_H + +#define TOHDMITX_I2S_IN_A 0 +#define TOHDMITX_I2S_IN_B 1 +#define TOHDMITX_I2S_IN_C 2 +#define TOHDMITX_I2S_OUT 3 +#define TOHDMITX_SPDIF_IN_A 4 +#define TOHDMITX_SPDIF_IN_B 5 +#define TOHDMITX_SPDIF_OUT 6 + +#endif /* __DT_MESON_G12A_TOHDMITX_H */ -- cgit v1.2.3 From f0b1f5f08dfbc043fb3759a3ed6d0a249d55e8ec Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Wed, 19 Jun 2019 14:41:55 +0100 Subject: ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/madera.txt | 67 ++++++++++++++++++++++ MAINTAINERS | 1 + include/dt-bindings/sound/madera.h | 29 ++++++++++ 3 files changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/madera.txt create mode 100644 include/dt-bindings/sound/madera.h (limited to 'include/dt-bindings') diff --git a/Documentation/devicetree/bindings/sound/madera.txt b/Documentation/devicetree/bindings/sound/madera.txt new file mode 100644 index 000000000000..5e669ce552f4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/madera.txt @@ -0,0 +1,67 @@ +Cirrus Logic Madera class audio codecs + +This describes audio configuration bindings for these codecs. + +See also the core bindings for the parent MFD driver: +See Documentation/devicetree/bindings/mfd/madera.txt + +and defines for values used in these bindings: +include/dt-bindings/sound/madera.h + +These properties are all contained in the parent MFD node. + +Optional properties: + - cirrus,dmic-ref : Indicates how the MICBIAS pins have been externally + connected to DMICs on each input, one cell per input. + + A value of 0 indicates MICVDD and is the default, other values depend on the + codec: + For CS47L35 one of the CS47L35_DMIC_REF_xxx values + For all other codecs one of the MADERA_DMIC_REF_xxx values + Also see the datasheet for a description of the INn_DMIC_SUP field. + + - cirrus,inmode : A list of input mode settings for each input. A maximum of + 16 cells, with four cells per input in the order INnAL, INnAR INnBL INnBR. + For non-muxed inputs the first two cells for that input set the mode for + the left and right channel and the second two cells must be 0. + For muxed inputs the first two cells for that input set the mode of the + left and right A inputs and the second two cells set the mode of the left + and right B inputs. + Valid mode values are one of the MADERA_INMODE_xxx. If the array is shorter + than the number of inputs the unspecified inputs default to + MADERA_INMODE_DIFF. + + - cirrus,out-mono : Mono bit for each output, maximum of six cells if the + array is shorter outputs will be set to stereo. + + - cirrus,max-channels-clocked : Maximum number of channels that I2S clocks + will be generated for. Useful when clock master for systems where the I2S + bus has multiple data lines. + One cell for each AIF, use a value of zero for AIFs that should be handled + normally. + + - cirrus,pdm-fmt : PDM speaker data format, must contain 2 cells + (OUT5 and OUT6). See the PDM_SPKn_FMT field in the datasheet for a + description of this value. + The second cell is ignored for codecs that do not have OUT6. + + - cirrus,pdm-mute : PDM mute format, must contain 2 cells + (OUT5 and OUT6). See the PDM_SPKn_CTRL_1 register in the datasheet for a + description of this value. + The second cell is ignored for codecs that do not have OUT6. + +Example: + +cs47l35@0 { + compatible = "cirrus,cs47l35"; + + cirrus,dmic-ref = <0 0 CS47L35_DMIC_REF_MICBIAS1B 0>; + cirrus,inmode = < + MADERA_INMODE_DMIC MADERA_INMODE_DMIC /* IN1A digital */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN1B single-ended */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2 differential */ + 0 0 /* not used on this codec */ + >; + cirrus,out-mono = <0 0 0 0 0 0>; + cirrus,max-channels-clocked = <2 0 0>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index b3d686fba562..c35d1f72bc73 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3915,6 +3915,7 @@ W: https://github.com/CirrusLogic/linux-drivers/wiki S: Supported F: Documentation/devicetree/bindings/mfd/madera.txt F: Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt +F: include/dt-bindings/sound/madera* F: include/linux/irqchip/irq-madera* F: include/linux/mfd/madera/* F: drivers/gpio/gpio-madera* diff --git a/include/dt-bindings/sound/madera.h b/include/dt-bindings/sound/madera.h new file mode 100644 index 000000000000..9ff4eae5259b --- /dev/null +++ b/include/dt-bindings/sound/madera.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Device Tree defines for Madera codecs + * + * Copyright (C) 2016-2017 Cirrus Logic, Inc. and + * Cirrus Logic International Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef DT_BINDINGS_SOUND_MADERA_H +#define DT_BINDINGS_SOUND_MADERA_H + +#define MADERA_INMODE_DIFF 0 +#define MADERA_INMODE_SE 1 +#define MADERA_INMODE_DMIC 2 + +#define MADERA_DMIC_REF_MICVDD 0 +#define MADERA_DMIC_REF_MICBIAS1 1 +#define MADERA_DMIC_REF_MICBIAS2 2 +#define MADERA_DMIC_REF_MICBIAS3 3 + +#define CS47L35_DMIC_REF_MICBIAS1B 1 +#define CS47L35_DMIC_REF_MICBIAS2A 2 +#define CS47L35_DMIC_REF_MICBIAS2B 3 + +#endif -- cgit v1.2.3 From 472e5df0137e10fbaed0eef38c9bdf99e088ff13 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Tue, 25 Jun 2019 16:37:27 +0100 Subject: ASoC: madera: Update SPDX headers The madera driver was merged too late to catch Thomas Gleixner's cleanup of the SPDX headers tree wide. Update the headers to match what was done in that patch. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- include/dt-bindings/sound/madera.h | 6 +----- include/sound/madera-pdata.h | 6 +----- sound/soc/codecs/cs47l35.c | 6 +----- sound/soc/codecs/cs47l85.c | 6 +----- sound/soc/codecs/cs47l90.c | 6 +----- sound/soc/codecs/madera.c | 6 +----- sound/soc/codecs/madera.h | 6 +----- 7 files changed, 7 insertions(+), 35 deletions(-) (limited to 'include/dt-bindings') diff --git a/include/dt-bindings/sound/madera.h b/include/dt-bindings/sound/madera.h index 9ff4eae5259b..d0096d5eb0da 100644 --- a/include/dt-bindings/sound/madera.h +++ b/include/dt-bindings/sound/madera.h @@ -1,13 +1,9 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Device Tree defines for Madera codecs * * Copyright (C) 2016-2017 Cirrus Logic, Inc. and * Cirrus Logic International Semiconductor Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #ifndef DT_BINDINGS_SOUND_MADERA_H diff --git a/include/sound/madera-pdata.h b/include/sound/madera-pdata.h index 441decefb7f3..e3060f48f108 100644 --- a/include/sound/madera-pdata.h +++ b/include/sound/madera-pdata.h @@ -1,13 +1,9 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Platform data for Madera codec driver * * Copyright (C) 2016-2019 Cirrus Logic, Inc. and * Cirrus Logic International Semiconductor Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #ifndef MADERA_CODEC_PDATA_H diff --git a/sound/soc/codecs/cs47l35.c b/sound/soc/codecs/cs47l35.c index 02f193dadd41..511d0d6fa962 100644 --- a/sound/soc/codecs/cs47l35.c +++ b/sound/soc/codecs/cs47l35.c @@ -1,14 +1,10 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only // // ALSA SoC Audio driver for CS47L35 codec // // Copyright (C) 2015-2019 Cirrus Logic, Inc. and // Cirrus Logic International Semiconductor Ltd. // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by the -// Free Software Foundation; version 2. -// #include #include diff --git a/sound/soc/codecs/cs47l85.c b/sound/soc/codecs/cs47l85.c index 4c4bae6e2c57..32fe7ffb7526 100644 --- a/sound/soc/codecs/cs47l85.c +++ b/sound/soc/codecs/cs47l85.c @@ -1,14 +1,10 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only // // ALSA SoC Audio driver for CS47L85 codec // // Copyright (C) 2015-2019 Cirrus Logic, Inc. and // Cirrus Logic International Semiconductor Ltd. // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by the -// Free Software Foundation; version 2. -// #include #include diff --git a/sound/soc/codecs/cs47l90.c b/sound/soc/codecs/cs47l90.c index 83c4e4628bde..c4ecb0e6911a 100644 --- a/sound/soc/codecs/cs47l90.c +++ b/sound/soc/codecs/cs47l90.c @@ -1,14 +1,10 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only // // ALSA SoC Audio driver for CS47L90 codec // // Copyright (C) 2015-2019 Cirrus Logic, Inc. and // Cirrus Logic International Semiconductor Ltd. // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by the -// Free Software Foundation; version 2. -// #include #include diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c index 6146c7a070cb..1b1be19a2f99 100644 --- a/sound/soc/codecs/madera.c +++ b/sound/soc/codecs/madera.c @@ -1,14 +1,10 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only // // Cirrus Logic Madera class codecs common support // // Copyright (C) 2015-2019 Cirrus Logic, Inc. and // Cirrus Logic International Semiconductor Ltd. // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by the -// Free Software Foundation; version 2. -// #include #include diff --git a/sound/soc/codecs/madera.h b/sound/soc/codecs/madera.h index aa2db156582b..0af66f280770 100644 --- a/sound/soc/codecs/madera.h +++ b/sound/soc/codecs/madera.h @@ -1,13 +1,9 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Cirrus Logic Madera class codecs common support * * Copyright (C) 2015-2018 Cirrus Logic, Inc. and * Cirrus Logic International Semiconductor Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by the - * Free Software Foundation; version 2. */ #ifndef ASOC_MADERA_H -- cgit v1.2.3