Skip to contentSkip to conversation

Fix AM335x-evm analog audio support

PATCH Applied [email protected] 12 participants 131 messages Sep 17, 2013 – Jan 8, 2014 15 messages not in the archive

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover Fix AM335x-evm analog audio support

From: Jyri Sarha <[email protected]>

The first version of patches can been found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066178.html

Changes for v2
- Dropped our "ASoC: davinci-mcasp: Add pinctrl support" since driver core is taking care of this now.
- Cleanup am33xx audio build
- Add regulators to tlv320aic3x DT binding document
- Remove dm365-voice-codec-audio DT support as it has never
been tested an probably does not work
- Add output pins and Line In connector to davinci-evm-audio DT binding doc
- Remove asp_chan_q and ram_chan_q properties from mcasp DT node in DT mode mcasp is hardcoded to event queue 0 (highest priority)
- Add pins to tlv320aic3x DT bindings document. If I misunderstood Marks comment and this patch is not needed, then just leave it out
Changes based on TI internal discussions
- Move system clock rate logic away from from evm_hw_params soc-op
- Remove unnecesary #if defined(CONFIG_OF) from davinci-evm.c
- Make dma property DT binding document more exact
- Add only "dma" reg location instead of separate "dma-tx" and "dma-rx"
- Primarily look for "mpu" reg property, but fall back to index 0 if not found
- Remove interrupt property from mcasp DT node as it is not used
- Remove #address-cells and #size-cells mcasp properties as they are not needed

This set of patches fixes the basic audio support for am335x-evm. It should also be relatively simple to add the necessary nodes to relevant dts files to get BeagleBone + AudioCape and am335x-evmsk working too.

The patch set depends on following patches:

[PATCH v11 4/8] ARM: dts: add AM33XX EDMA support

     https://lkml.org/lkml/2013/6/18/49

[PATCH v11 5/8] ARM: dts: add AM33XX SPI DMA support

     https://lkml.org/lkml/2013/6/18/55

[PATCH v2] ARM: EDMA: Fix clearing of unused list for DT DMA resources

     https://lkml.org/lkml/2013/7/22/441

I have tried my best not to break the existing support for older davinci boards, but since I do not have those boards I can not be sure.

Some commit comments refer to a dmaengine based davinci audio implementation which is planned for but nothing has been done yet.

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hebbar, Gururaja (2):
ASoC: davinci-evm: Add device tree binding
ASoC: davinci: Add support for AM33xx SoC Audio

Jyri Sarha (7):
ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
ASoC: davinci-mcasp: Add DMA register locations to DT
ASoC: davinci-mcasp: Extract DMA channels directly from DT
ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc
ASoC: tlv320aic3x: Add regulators to DT bindings document
ASoC: tlv320aic3x: Add codec pins to DT bindings document ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++
 .../bindings/sound/davinci-mcasp-audio.txt         |   15 +-
 .../devicetree/bindings/sound/tlv320aic3x.txt      |   26 +++
 arch/arm/boot/dts/am335x-evm.dts                   |   56 ++++++
 arch/arm/boot/dts/am33xx.dtsi                      |   25 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/Kconfig                          |   18 +-
 sound/soc/davinci/Makefile                         |    1 +
 sound/soc/davinci/davinci-evm.c                    |  184 +++++++++++++++++---
 sound/soc/davinci/davinci-mcasp.c                  |  106 +++++++----
 10 files changed, 428 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH v2 1/11 ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

From: Jyri Sarha <[email protected]>

The sysclk rate does not change runtime so it should be initialized at init time.

---
 sound/soc/davinci/davinci-evm.c |   64 +++++++++++++++++++++++++++------------
 1 file changed, 44 insertions(+), 20 deletions(-)
sound/soc/davinci/davinci-evm.c +44 -20
index fd7c45b..2f8161c 100644
@@ -27,6 +27,10 @@
 #include "davinci-i2s.h"
 #include "davinci-mcasp.h"
 
+struct snd_soc_card_drvdata_davinci {
+	unsigned sysclk;
+};
+
 #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
 		SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF)
 static int evm_hw_params(struct snd_pcm_substream *substream,
@@ -35,27 +39,11 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai *codec_dai = rtd->codec_dai;
 	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_card *soc_card = codec->card;
 	int ret = 0;
-	unsigned sysclk;
-
-	/* ASP1 on DM355 EVM is clocked by an external oscillator */
-	if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
-	    machine_is_davinci_dm365_evm())
-		sysclk = 27000000;
-
-	/* ASP0 in DM6446 EVM is clocked by U55, as configured by
-	 * board-dm644x-evm.c using GPIOs from U18.  There are six
-	 * options; here we "know" we use a 48 KHz sample rate.
-	 */
-	else if (machine_is_davinci_evm())
-		sysclk = 12288000;
-
-	else if (machine_is_davinci_da830_evm() ||
-				machine_is_davinci_da850_evm())
-		sysclk = 24576000;
-
-	else
-		return -EINVAL;
+	unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
+			   snd_soc_card_get_drvdata(soc_card))->sysclk;
 
 	/* set codec DAI configuration */
 	ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
@@ -243,35 +231,65 @@ static struct snd_soc_dai_link da850_evm_dai = {
 };
 
 /* davinci dm6446 evm audio machine driver */
+/*
+ * ASP0 in DM6446 EVM is clocked by U55, as configured by
+ * board-dm644x-evm.c using GPIOs from U18.  There are six
+ * options; here we "know" we use a 48 KHz sample rate.
+ */
+static struct snd_soc_card_drvdata_davinci dm6446_snd_soc_card_drvdata = {
+	.sysclk = 12288000,
+};
+
 static struct snd_soc_card dm6446_snd_soc_card_evm = {
 	.name = "DaVinci DM6446 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm6446_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm6446_snd_soc_card_drvdata,
 };
 
 /* davinci dm355 evm audio machine driver */
+/* ASP1 on DM355 EVM is clocked by an external oscillator */
+static struct snd_soc_card_drvdata_davinci dm355_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm355_snd_soc_card_evm = {
 	.name = "DaVinci DM355 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm355_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm355_snd_soc_card_drvdata,
 };
 
 /* davinci dm365 evm audio machine driver */
+static struct snd_soc_card_drvdata_davinci dm365_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm365_snd_soc_card_evm = {
 	.name = "DaVinci DM365 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm365_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm365_snd_soc_card_drvdata,
 };
 
 /* davinci dm6467 evm audio machine driver */
+static struct snd_soc_card_drvdata_davinci dm6467_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm6467_snd_soc_card_evm = {
 	.name = "DaVinci DM6467 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = dm6467_evm_dai,
 	.num_links = ARRAY_SIZE(dm6467_evm_dai),
+	.drvdata = &dm6467_snd_soc_card_drvdata,
+};
+
+static struct snd_soc_card_drvdata_davinci da830_snd_soc_card_drvdata = {
+	.sysclk = 24576000,
 };
 
 static struct snd_soc_card da830_snd_soc_card = {
@@ -279,6 +297,11 @@ static struct snd_soc_card da830_snd_soc_card = {
 	.owner = THIS_MODULE,
 	.dai_link = &da830_evm_dai,
 	.num_links = 1,
+	.drvdata = &da830_snd_soc_card_drvdata,
+};
+
+static struct snd_soc_card_drvdata_davinci da850_snd_soc_card_drvdata = {
+	.sysclk = 24576000,
 };
 
 static struct snd_soc_card da850_snd_soc_card = {
@@ -286,6 +309,7 @@ static struct snd_soc_card da850_snd_soc_card = {
 	.owner = THIS_MODULE,
 	.dai_link = &da850_evm_dai,
 	.num_links = 1,
+	.drvdata = &da850_snd_soc_card_drvdata,
 };
 
 static struct platform_device *evm_snd_device;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#3 lore raw

Re: [PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

Quoted 4 lines · On Tue, Sep 17, 2013 at 12:26:00PM +0300, [email protected] wrote:

From: Jyri Sarha <[email protected]>

The sysclk rate does not change runtime so it should be initialized at init time.

Applied, thanks.

#4 lore raw

PATCH v2 2/11 ASoC: davinci-evm: Add device tree binding

In reply to a message not in the archive

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card, codec, dai interface details (like the card name, DAPM routing map, phandle for the audio components described in the dts file, codec mclk speed). The card will be set up based on this information. Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.

---
 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++++++
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++++-
 2 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +58 -0
new file mode 100644
index 0000000..e6b61ff
@@ -0,0 +1,58 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-routing : A list of the connections between audio components.
+  Each entry is a pair of strings, the first being the connection's sink,
+  the second being the connection's source. Valid names for sources and
+  sinks are the codec's pins, and the jacks on the board:
+
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+  Board connectors:
+
+  * Headphone Jack
+  * Line Out
+  * Mic Jack
+  * Line In
+
+
+Example:
+
+sound {
+	compatible = "ti,da830-evm-audio";
+	ti,model = "DA830 EVM";
+	ti,audio-codec = <&tlv320aic3x>;
+	ti,mcasp-controller = <&mcasp1>;
+	ti,codec-clock-rate = <12000000>;
+	ti,audio-routing =
+		"Headphone Jack",       "HPLOUT",
+		"Headphone Jack",       "HPROUT",
+		"Line Out",             "LLOUT",
+		"Line Out",             "RLOUT",
+		"MIC3L",                "Mic Bias 2V",
+		"MIC3R",                "Mic Bias 2V",
+		"Mic Bias 2V",          "Mic Jack",
+		"LINE1L",               "Line In",
+		"LINE2L",               "Line In",
+		"LINE1R",               "Line In",
+		"LINE2R",               "Line In";
+};
sound/soc/davinci/davinci-evm.c +118 -2

161 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): b94659fe6bb26dd457c6c6d542db912896f327b0.1379409268.git.jsarha-l0cyMroinI0@public.gmane.org

#6 lore raw

Re: [alsa-devel] [PATCH v2 02/11] ASoC: davinci-evm: Add device tree binding

Quoted 5 lines · On Tue, Sep 17, 2013 at 12:26:01PM +0300, [email protected]…
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +5 -0
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT

Documentation/devicetree/bindings/sound/davinci-evm-audio.txt line 28

Quoted 10 lines
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +10 -0
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R

These should be in the CODEC DT bindings. You should also be CCing the DT maintainers directly, they're a bit overloaded so tend not to read things that only go to the list :/

Otherwise this looks good.

#7 lore raw

PATCH v2 3/11 ASoC: davinci-mcasp: Add DMA register locations to DT

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

This patch adds DMA register location to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, which is not accessible by the DMA controller, so McASP data port is mapped trough L3 to a different location.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    8 ++-
 sound/soc/davinci/davinci-mcasp.c                  |   59 +++++++++++++-------
 2 files changed, 46 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +6 -2
index 374e145..63b67ae 100644
@@ -6,7 +6,11 @@ Required properties:
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
 	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
-- reg : Should contain McASP registers offset and length
+- reg : Should contain McASP registers address and length for mpu and
+	optionally for dma controller access.
+- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
+	      reg-range must be named "dma". For backward compatibility it is
+	      good to keep "mpu" first in the list.
 - interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
@@ -15,7 +19,6 @@ Required properties:
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-
 Optional properties:
 
 - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
+	reg-names "mpu";
 	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
sound/soc/davinci/davinci-mcasp.c +40 -19

113 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#8 lore raw

Re: [PATCH v2 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 6 lines · On Tue, Sep 17, 2013 at 12:26:02PM +0300, [email protected] wrote:

From: Jyri Sarha <[email protected]>

This patch adds DMA register location to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, which is not accessible by the DMA controller, so McASP data port is mapped trough L3 to a different location.

Looks good to me but again you ought to CC the DT maintainers directly.

#9 lore raw

PATCH v2 4/11 ASoC: davinci-mcasp: Extract DMA channels directly from DT

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    5 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/davinci-mcasp.c                  |   47 +++++++++++++-------
 3 files changed, 39 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +5 -0
index 63b67ae..68e0f47 100644
@@ -18,6 +18,11 @@ Required properties:
 - serial-dir : A list of serializer pin mode. The list number should be equal
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- dmas: two element list of DMA controller phandles and DMA request line
+        ordered pairs.
+- dma-names: identifier string for each DMA request line in the dmas property.
+	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
+	     identifiers must be "rx" and "tx".
 
 Optional properties:
 
include/linux/platform_data/davinci_asp.h +2 -0
index 8db5ae0..689a856 100644
@@ -84,6 +84,8 @@ struct snd_platform_data {
 	u8 version;
 	u8 txnumevt;
 	u8 rxnumevt;
+	int tx_dma_channel;
+	int rx_dma_channel;
 };
 
 enum {
sound/soc/davinci/davinci-mcasp.c +32 -15

79 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): dc7012e1c2ae59c35eedd9328139f1060048b395.1379409268.git.jsarha-l0cyMroinI0@public.gmane.org

#11 lore raw

Re: [alsa-devel] [PATCH v2 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT

Quoted 5 lines · On Tue, Sep 17, 2013 at 12:26:03PM +0300, [email protected]…

From: Jyri Sarha <[email protected]>

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

Looks good to me but again should get the DT maintainers to check out this lot.

#12 lore raw

PATCH v2 5/11 ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    2 --
 1 file changed, 2 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -2
index 68e0f47..b5e7b78 100644
@@ -11,7 +11,6 @@ Required properties:
 - reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
 	      reg-range must be named "dma". For backward compatibility it is
 	      good to keep "mpu" first in the list.
-- interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
 - num-serializer : Serializers used by McASP.
@@ -40,7 +39,6 @@ mcasp0: mcasp0@1d00000 {
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
-	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1b47734e397bfac8846dcfc194fd1ab63f320d1a.1379409268.git.jsarha-l0cyMroinI0@public.gmane.org

#14 lore raw

Re: [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

Quoted 3 lines · On Tuesday 17 September 2013 02:56 PM, [email protected]…

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

s/does use/does not use

Quoted 20 lines
---
 .../bindings/sound/davinci-mcasp-audio.txt         |    2 --
 1 file changed, 2 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
index 68e0f47..b5e7b78 100644
@@ -11,7 +11,6 @@ Required properties:
 - reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
 	      reg-range must be named "dma". For backward compatibility it is
 	      good to keep "mpu" first in the list.
-- interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
 - num-serializer : Serializers used by McASP.

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt mcasp0: mcasp0@1d00000 { · line 44

Quoted 7 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
@@ -40,7 +39,6 @@ mcasp0: mcasp0@1d00000 {
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
-	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw

Re: [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

Quoted 7 lines · Gururaja Hebbar
Quoted 3 lines · On Tuesday 17 September 2013 02:56 PM, [email protected] wrote:

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

s/does use/does not use

I'll fix that.

Thanks,
Jyri

#16 lore raw

Re: [alsa-devel] [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

In reply to a message not in the archive
Quoted 3 lines · On Tue, Sep 17, 2013 at 12:26:04PM +0300, [email protected]…

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

How about moving these to optional instead of removing them completely (or just leaving them alone)? That way if the driver does want to start using them people will have hooked them up already so no updates will be required.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#18 lore raw

Re: [alsa-devel] [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

Quoted 10 lines · Mark Brown
Quoted 3 lines · On Tue, Sep 17, 2013 at 12:26:04PM +0300, [email protected]…

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

How about moving these to optional instead of removing them completely (or just leaving them alone)? That way if the driver does want to start using them people will have hooked them up already so no updates will be required.

the definitions as they stand now make no sense as the ordering of the interrupts are undefined - example is the first index RX or TX? the alternative will be PIO McASP driver, which might be nice, but having a vague binding with 0 code behind is of no use for anyone right?

Signature · 6 lines
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#20 lore raw

Re: [alsa-devel] [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

Quoted 11 lines · Nishanth Menon
Quoted 4 lines · Mark Brown

How about moving these to optional instead of removing them completely (or just leaving them alone)? That way if the driver does want to start using them people will have hooked them up already so no updates will be required.

the definitions as they stand now make no sense as the ordering of the interrupts are undefined - example is the first index RX or TX? the alternative will be PIO McASP driver, which might be nice, but having a vague binding with 0 code behind is of no use for anyone right?

So the sensible fix seems to be to specify the order rather than remove them then...

#21 lore raw

Re: [PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindings doc

In reply to a message not in the archive
Quoted 5 lines · On 09/17/2013 12:26 PM, [email protected] wrote:

From: Jyri Sarha <[email protected]>

Davinci McASP driver does use interrupts for anything ATM.

Do not remove the interrupts. Even if they are not used they need to be described in DT so in the future if we want we can use them. The DT describes the HW and not the Linux implementation for the HW...

Quoted 25 lines
---
 .../bindings/sound/davinci-mcasp-audio.txt         |    2 --
 1 file changed, 2 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -2
index 68e0f47..b5e7b78 100644
@@ -11,7 +11,6 @@ Required properties:
 - reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
 	      reg-range must be named "dma". For backward compatibility it is
 	      good to keep "mpu" first in the list.
-- interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
 - num-serializer : Serializers used by McASP.
@@ -40,7 +39,6 @@ mcasp0: mcasp0@1d00000 {
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
-	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#22 lore raw

PATCH v2 6/11 ASoC: davinci: Add support for AM33xx SoC Audio

In reply to a message not in the archive

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

---
 sound/soc/davinci/Kconfig  |   18 +++++++++++++++---
 sound/soc/davinci/Makefile |    1 +
 2 files changed, 16 insertions(+), 3 deletions(-)
sound/soc/davinci/Kconfig +15 -3
index c82f89c..6c8e687 100644
@@ -1,9 +1,10 @@
 config SND_DAVINCI_SOC
-	tristate "SoC Audio for the TI DAVINCI chip"
-	depends on ARCH_DAVINCI
+	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
+	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
+	  Machine driver for DAVINCI audio.
 	  Say Y or M if you want to add support for codecs attached to
-	  the DAVINCI AC97 or I2S interface. You will also need
+	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
 
 config SND_DAVINCI_SOC_I2S
@@ -15,6 +16,17 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_AM33XX_SOC_EVM
+	tristate "SoC Audio for the AM33XX chip based boards"
+	select SND_DAVINCI_SOC
+	select SND_SOC_TLV320AIC3X
+	select SND_DAVINCI_SOC_MCASP
+	help
+	  Say Y or M if you want to add support for SoC audio on AM33XX
+	  boards using McASP and TLV320AIC3X codec. For example AM335X-EVM,
+	  AM335X-EVMSK, and BeagelBone with AudioCape boards have this
+	  setup.
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
sound/soc/davinci/Makefile +1 -0
index a396ab6..bc81e79 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
 snd-soc-evm-objs := davinci-evm.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
+obj-$(CONFIG_SND_AM33XX_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): c59efc1524b19f50dc37606bfa246dde9c20d312.1379409268.git.jsarha-l0cyMroinI0@public.gmane.org

Applied
#24 lore raw

Re: [alsa-devel] [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

Quoted 4 lines · On Tue, Sep 17, 2013 at 12:26:05PM +0300, [email protected]…

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

Applied, thanks.

maintainer
#25 lore raw

Re: [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

Quoted 7 lines · Mark Brown
Quoted 4 lines · On Tue, Sep 17, 2013 at 12:26:05PM +0300, [email protected] wrote:

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

Applied, thanks.

Dropped since this breaks x86 builds due to dma_alloc_writecombine() not being defined (our DMA APIs really aren't wonderful...).

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#27 lore raw

Re: [alsa-devel] [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

Quoted 4 lines · Mark Brown
Quoted 3 lines · Mark Brown
Quoted 2 lines · On Tue, Sep 17, 2013 at 12:26:05PM +0300, [email protected]…

From: "Hebbar, Gururaja" <[email protected]>

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

Applied, thanks.

Dropped since this breaks x86 builds due to dma_alloc_writecombine() not being defined (our DMA APIs really aren't wonderful...).

I added SOC_AM33XX-dependency to SND_AM33XX_SOC_EVM config and it appears to fix at least the "warning: (SND_AM33XX_SOC_EVM) selects ..."-problem. I'll send an updated patch series (this time with maintainers in CC) shortly after/if my

% make ARCH=x86_64 allmodconfig && make -j 4

finishes without errors. Sorry for not testing that myself first time around.

Best regards,
Jyri
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#28 lore raw

Re: [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

In reply to a message not in the archive
Quoted 18 lines · On 09/17/2013 12:26 PM, [email protected] wrote:

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

---
 sound/soc/davinci/Kconfig  |   18 +++++++++++++++---
 sound/soc/davinci/Makefile |    1 +
 2 files changed, 16 insertions(+), 3 deletions(-)
sound/soc/davinci/Kconfig +0 -0
index c82f89c..6c8e687 100644

sound/soc/davinci/Kconfig line 5

Quoted 7 lines
sound/soc/davinci/Kconfig +3 -2
@@ -1,9 +1,10 @@
 config SND_DAVINCI_SOC
-	tristate "SoC Audio for the TI DAVINCI chip"
-	depends on ARCH_DAVINCI
+	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
+	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
+	  Machine driver for DAVINCI audio.

Should be:
+ Platform driver for daVinci or AM33xx

But I would just remove the help section as such, the prompt gives enough information what is this.

sound/soc/davinci/Kconfig config SND_DAVINCI_SOC_MCASP · line 20

Quoted 12 lines
sound/soc/davinci/Kconfig +3 -1
 	  Say Y or M if you want to add support for codecs attached to
-	  the DAVINCI AC97 or I2S interface. You will also need
+	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
 
 config SND_DAVINCI_SOC_I2S
@@ -15,6 +16,17 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_AM33XX_SOC_EVM
+	tristate "SoC Audio for the AM33XX chip based boards"

+ depneds on SND_DAVINCI_SOC && SOC_AM33XX

sound/soc/davinci/Kconfig config SND_DAVINCI_SOC_MCASP · line 21

Quoted 1 line
sound/soc/davinci/Kconfig +1 -0
+	select SND_DAVINCI_SOC

Do not select the platform support from here.

Quoted 24 lines
sound/soc/davinci/Kconfig +8 -0
+	select SND_SOC_TLV320AIC3X
+	select SND_DAVINCI_SOC_MCASP
+	help
+	  Say Y or M if you want to add support for SoC audio on AM33XX
+	  boards using McASP and TLV320AIC3X codec. For example AM335X-EVM,
+	  AM335X-EVMSK, and BeagelBone with AudioCape boards have this
+	  setup.
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
sound/soc/davinci/Makefile +1 -0
index a396ab6..bc81e79 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
 snd-soc-evm-objs := davinci-evm.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
+obj-$(CONFIG_SND_AM33XX_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#29 lore raw

PATCH v2 7/11 ASoC: tlv320aic3x: Add regulators to DT bindings document

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

Add regulator properties to tlv320aic3x DT bindings document.

---
 .../devicetree/bindings/sound/tlv320aic3x.txt      |    7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/sound/tlv320aic3x.txt +7 -0
index f47c3f5..11e24b2 100644
@@ -17,10 +17,17 @@ Optional properties:
 	3 - MICBIAS output is connected to AVDD,
 	If this node is not mentioned or if the value is incorrect, then MicBias
 	is powered down.
+- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
+  device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
 Example:
 
 tlv320aic3x: tlv320aic3x@1b {
 	compatible = "ti,tlv320aic3x";
 	reg = <0x1b>;
+
+	AVDD-supply = <&regulator>;
+	IOVDD-supply = <&regulator>;
+	DRVDD-supply = <&regulator>;
+	DVDD-supply = <&regulator>;
 };
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 5281fbfa7e5a2090a2949c7b3941debbbc5ac397.1379409268.git.jsarha-l0cyMroinI0@public.gmane.org

Applied
#31 lore raw

Re: [alsa-devel] [PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document

Quoted 3 lines · On Tue, Sep 17, 2013 at 12:26:06PM +0300, [email protected]…

From: Jyri Sarha <[email protected]>

Add regulator properties to tlv320aic3x DT bindings document.

Applied, thanks.

#32 lore raw

PATCH v2 8/11 ASoC: tlv320aic3x: Add codec pins to DT bindings document

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

Add list of codec pins to tlv320aic3x DT bindings document.

---
 .../devicetree/bindings/sound/tlv320aic3x.txt      |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Documentation/devicetree/bindings/sound/tlv320aic3x.txt +19 -0
index 11e24b2..2b76c81 100644
@@ -20,6 +20,25 @@ Optional properties:
 - AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
   device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
+CODEC output pins:
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+
+CODEC input pins:
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+The pins can be used in referring sound node's audio-routing property.
+
 Example:
 
 tlv320aic3x: tlv320aic3x@1b {
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#33 lore raw

Re: [PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document

Quoted 3 lines · On Tue, Sep 17, 2013 at 12:26:07PM +0300, [email protected] wrote:

From: Jyri Sarha <[email protected]>

Add list of codec pins to tlv320aic3x DT bindings document.

Applied, thanks.

#34 lore raw

PATCH v2 9/11 ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

In reply to a message not in the archive

From: Pantelis Antoniou <panto-wVdstyuyKrO8r51toPun2/[email protected]>

Add missing mcasp entries in the am33xx.dtsi include file.

---
 arch/arm/boot/dts/am33xx.dtsi |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +15 -0
index 0fdb949..bba302a 100644
@@ -552,5 +552,20 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		mcasp0: mcasp@48038000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp0";
+			reg = <0x48038000 0x2000>;
+			status = "disabled";
+		};
+
+		mcasp1: mcasp@4803C000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp1";
+			reg = <0x4803C000 0x2000>;
+			status = "disabled";
+		};
+
 	};
 };
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#35 lore raw

PATCH v2 10/11 ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

In reply to a message not in the archive

From: Jyri Sarha <[email protected]>

This patch adds an optional address range to reg property. The range describes the register location for DMA controller on am33xx. The both address ranges are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +12 -2
index bba302a..07e69e8 100644
@@ -556,15 +556,25 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			status = "disabled";
+			dmas = <&edma 8
+				&edma 9>;
+			dma-names = "tx", "rx";
 		};
 
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			status = "disabled";
+			dmas = <&edma 10
+				&edma 11>;
+			dma-names = "tx", "rx";
 		};
 
 	};
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#36 lore raw

PATCH v2 11/11 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

In reply to a message not in the archive

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3x, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +56 -0
index 3aee1a4..4a49229 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -215,6 +225,19 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3x: tlv320aic3x@1b {
+				compatible = "ti,tlv320aic3x";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
+
 		};
 
 		elm: elm@48080000 {
@@ -311,6 +334,20 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "DA830 EVM";
+			ti,audio-codec = <&tlv320aic3x>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
+
 	};
 
 	vbat: fixedregulator@0 {
@@ -378,6 +415,25 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		num-serializer = <16>;
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#38 lore raw
Quoted 1 line · Mark Brown

Please remember to always CC maintainers on patches.

Oops, sorry. Too long CC-list to handle.

So far I've received one typo fix comment. Guess I could fix that, rebase to v3.12-rc1 and push v3 patch set. This time putting you in CC too.

Best regards,
Jyri

maintainer
#39 lore raw
Quoted 3 lines · Jyri Sarha

So far I've received one typo fix comment. Guess I could fix that, rebase to v3.12-rc1 and push v3 patch set. This time putting you in CC too.

Well, I also applied one of the patches. I was going to go through this set but if you want to rebase onto v3.12-rc1 that'd be good.

#40 lore raw
Quoted 9 lines · Mark Brown
Quoted 3 lines · Jyri Sarha

So far I've received one typo fix comment. Guess I could fix that, rebase to v3.12-rc1 and push v3 patch set. This time putting you in CC too.

Well, I also applied one of the patches. I was going to go through this set but if you want to rebase onto v3.12-rc1 that'd be good.

There were no conflicts and everything worked out of the box, so rebasing does not make much difference. If you are ready to check the patches v2 now, please do so. I'll wait for your comments before pushing v3 set of patches out.

maintainer
#41 lore raw
Quoted 4 lines · Jyri Sarha

There were no conflicts and everything worked out of the box, so rebasing does not make much difference. If you are ready to check the patches v2 now, please do so. I'll wait for your comments before pushing v3 set of patches out.

OK, it'll be later today or perhaps tomorrow before I'm able to do this.

#42 lore raw
Quoted 9 lines · Mark Brown
Quoted 4 lines · Jyri Sarha

There were no conflicts and everything worked out of the box, so rebasing does not make much difference. If you are ready to check the patches v2 now, please do so. I'll wait for your comments before pushing v3 set of patches out.

OK, it'll be later today or perhaps tomorrow before I'm able to do this.

That would be great!

Best regards,
Jyri

author
#43 lore raw

v3 cover Fix AM335x-evm analog audio support

In reply to a message not in the archive

The RFC version of patches can been found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066178.html
The v2 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066379.html

Changes since v2
[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- no change
[PATCH v2 02/11] ASoC: davinci-evm: Add device tree binding
- no change
[PATCH v2 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT
- no change
[PATCH v2 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT
- no change
[PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindin
- restore binding but make it optional and add interrupt-names property
[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- SND_DAVINCI_SOC help "Machine driver for ..." -> "Platform driver for ..."
- SND_AM33XX_SOC_EVM depends on SND_DAVINCI_SOC && SOC_AM33XX
- SND_AM33XX_SOC_EVM does not selcet SND_DAVINCI_SOC
[PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- no change
[PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- no change
[PATCH v2 09/11] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- restore interrupt property and add interrupt-names property
[PATCH v2 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property
- no change
[PATCH v2 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- no change

Changes from RFC to v2
- Dropped out "ASoC: davinci-mcasp: Add pinctrl support" since driver core is taking care of this now.
- Cleanup am33xx audio build
- Add regulators to tlv320aic3x DT binding document
- Remove dm365-voice-codec-audio DT support as it has never
been tested an probably does not work
- Add output pins and Line In connector to davinci-evm-audio DT binding doc
- Remove asp_chan_q and ram_chan_q properties from mcasp DT node in DT mode mcasp is hardcoded to event queue 0 (highest priority)
- Add pins to tlv320aic3x DT bindings document. If I misunderstood Marks comment and this patch is not needed, then just leave it out
Changes based on TI internal discussions
- Move system clock rate logic away from from evm_hw_params soc-op
- Remove unnecesary #if defined(CONFIG_OF) from davinci-evm.c
- Make dma property DT binding document more exact
- Add only "dma" reg location instead of separate "dma-tx" and "dma-rx"
- Primarily look for "mpu" reg property, but fall back to index 0 if not found
- Remove interrupt property from mcasp DT node as it is not used
- Remove #address-cells and #size-cells mcasp properties as they are not needed

This set of patches fixes the basic audio support for am335x-evm. It should also be relatively simple to add the necessary nodes to relevant dts files to get BeagleBone + AudioCape and am335x-evmsk working too.

The patch set depends on following patches:

[PATCH v11 4/8] ARM: dts: add AM33XX EDMA support

     https://lkml.org/lkml/2013/6/18/49

[PATCH v11 5/8] ARM: dts: add AM33XX SPI DMA support

     https://lkml.org/lkml/2013/6/18/55

[PATCH v2] ARM: EDMA: Fix clearing of unused list for DT DMA resources

     https://lkml.org/lkml/2013/7/22/441

I have tried my best not to break the existing support for older davinci boards, but since I do not have those boards I can not be sure.

Some commit comments refer to a dmaengine based davinci audio implementation which is planned for but nothing has been done yet.

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hebbar, Gururaja (2):
ASoC: davinci-evm: Add device tree binding
ASoC: davinci: Add support for AM33xx SoC Audio

Jyri Sarha (7):
ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
ASoC: davinci-mcasp: Add DMA register locations to DT
ASoC: davinci-mcasp: Extract DMA channels directly from DT
ASoC: davinci-mcasp: Interrupts property to optional and add
interrupt-names
ASoC: tlv320aic3x: Add regulators to DT bindings document
ASoC: tlv320aic3x: Add codec pins to DT bindings document ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++
 .../bindings/sound/davinci-mcasp-audio.txt         |   17 +-
 .../devicetree/bindings/sound/tlv320aic3x.txt      |   26 +++
 arch/arm/boot/dts/am335x-evm.dts                   |   56 ++++++
 arch/arm/boot/dts/am33xx.dtsi                      |   29 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/Kconfig                          |   18 +-
 sound/soc/davinci/Makefile                         |    1 +
 sound/soc/davinci/davinci-evm.c                    |  184 +++++++++++++++++---
 sound/soc/davinci/davinci-mcasp.c                  |  106 +++++++----
 10 files changed, 435 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#45 lore raw

PATCH v3 1/11 ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

The sysclk rate does not change runtime so it should be initialized at init time.

---
 sound/soc/davinci/davinci-evm.c |   64 +++++++++++++++++++++++++++------------
 1 file changed, 44 insertions(+), 20 deletions(-)
sound/soc/davinci/davinci-evm.c +44 -20
index fd7c45b..2f8161c 100644
@@ -27,6 +27,10 @@
 #include "davinci-i2s.h"
 #include "davinci-mcasp.h"
 
+struct snd_soc_card_drvdata_davinci {
+	unsigned sysclk;
+};
+
 #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
 		SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF)
 static int evm_hw_params(struct snd_pcm_substream *substream,
@@ -35,27 +39,11 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai *codec_dai = rtd->codec_dai;
 	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_card *soc_card = codec->card;
 	int ret = 0;
-	unsigned sysclk;
-
-	/* ASP1 on DM355 EVM is clocked by an external oscillator */
-	if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
-	    machine_is_davinci_dm365_evm())
-		sysclk = 27000000;
-
-	/* ASP0 in DM6446 EVM is clocked by U55, as configured by
-	 * board-dm644x-evm.c using GPIOs from U18.  There are six
-	 * options; here we "know" we use a 48 KHz sample rate.
-	 */
-	else if (machine_is_davinci_evm())
-		sysclk = 12288000;
-
-	else if (machine_is_davinci_da830_evm() ||
-				machine_is_davinci_da850_evm())
-		sysclk = 24576000;
-
-	else
-		return -EINVAL;
+	unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
+			   snd_soc_card_get_drvdata(soc_card))->sysclk;
 
 	/* set codec DAI configuration */
 	ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
@@ -243,35 +231,65 @@ static struct snd_soc_dai_link da850_evm_dai = {
 };
 
 /* davinci dm6446 evm audio machine driver */
+/*
+ * ASP0 in DM6446 EVM is clocked by U55, as configured by
+ * board-dm644x-evm.c using GPIOs from U18.  There are six
+ * options; here we "know" we use a 48 KHz sample rate.
+ */
+static struct snd_soc_card_drvdata_davinci dm6446_snd_soc_card_drvdata = {
+	.sysclk = 12288000,
+};
+
 static struct snd_soc_card dm6446_snd_soc_card_evm = {
 	.name = "DaVinci DM6446 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm6446_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm6446_snd_soc_card_drvdata,
 };
 
 /* davinci dm355 evm audio machine driver */
+/* ASP1 on DM355 EVM is clocked by an external oscillator */
+static struct snd_soc_card_drvdata_davinci dm355_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm355_snd_soc_card_evm = {
 	.name = "DaVinci DM355 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm355_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm355_snd_soc_card_drvdata,
 };
 
 /* davinci dm365 evm audio machine driver */
+static struct snd_soc_card_drvdata_davinci dm365_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm365_snd_soc_card_evm = {
 	.name = "DaVinci DM365 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = &dm365_evm_dai,
 	.num_links = 1,
+	.drvdata = &dm365_snd_soc_card_drvdata,
 };
 
 /* davinci dm6467 evm audio machine driver */
+static struct snd_soc_card_drvdata_davinci dm6467_snd_soc_card_drvdata = {
+	.sysclk = 27000000,
+};
+
 static struct snd_soc_card dm6467_snd_soc_card_evm = {
 	.name = "DaVinci DM6467 EVM",
 	.owner = THIS_MODULE,
 	.dai_link = dm6467_evm_dai,
 	.num_links = ARRAY_SIZE(dm6467_evm_dai),
+	.drvdata = &dm6467_snd_soc_card_drvdata,
+};
+
+static struct snd_soc_card_drvdata_davinci da830_snd_soc_card_drvdata = {
+	.sysclk = 24576000,
 };
 
 static struct snd_soc_card da830_snd_soc_card = {
@@ -279,6 +297,11 @@ static struct snd_soc_card da830_snd_soc_card = {
 	.owner = THIS_MODULE,
 	.dai_link = &da830_evm_dai,
 	.num_links = 1,
+	.drvdata = &da830_snd_soc_card_drvdata,
+};
+
+static struct snd_soc_card_drvdata_davinci da850_snd_soc_card_drvdata = {
+	.sysclk = 24576000,
 };
 
 static struct snd_soc_card da850_snd_soc_card = {
@@ -286,6 +309,7 @@ static struct snd_soc_card da850_snd_soc_card = {
 	.owner = THIS_MODULE,
 	.dai_link = &da850_evm_dai,
 	.num_links = 1,
+	.drvdata = &da850_snd_soc_card_drvdata,
 };
 
 static struct platform_device *evm_snd_device;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#46 lore raw

Re: [PATCH v3 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

Quoted 2 lines · Jyri Sarha

The sysclk rate does not change runtime so it should be initialized at init time.

Are there any updates from the version already applied (I only dropped the patch to allow the extra builds, not this one).

#47 lore raw

RE: [PATCH v3 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

As I described in cover letter on these patches did change:

[PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindin
- restore binding but make it optional and add interrupt-names property
[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- SND_DAVINCI_SOC help "Machine driver for ..." -> "Platform driver for ..."
- SND_AM33XX_SOC_EVM depends on SND_DAVINCI_SOC && SOC_AM33XX
- SND_AM33XX_SOC_EVM does not selcet SND_DAVINCI_SOC
[PATCH v2 09/11] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- restore interrupt property and add interrupt-names property----

Best regards,
Jyri

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

________________________________________
From: Mark Brown [[email protected]]
Sent: Thursday, September 19, 2013 4:23 PM
To: Sarha, Jyri
Cc: [email protected]; [email protected]; [email protected]; Ujfalusi, Peter; [email protected]; [email protected]; [email protected]; Fernandes, Joel
Subject: Re: [PATCH v3 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

Quoted 2 lines · Jyri Sarha

The sysclk rate does not change runtime so it should be initialized at init time.

Are there any updates from the version already applied (I only dropped the patch to allow the extra builds, not this one).

maintainer
#48 lore raw

Re: [RESEND PATCH v3 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

In reply to Jyri Sarha
Quoted 2 lines · Jyri Sarha

The sysclk rate does not change runtime so it should be initialized at init time.

If you want the DT maintainers to review this stuff you probably need to send it to them rather than spam the ASoC maintainers again.

author
#49 lore raw

PATCH v3 2/11 ASoC: davinci-evm: Add device tree binding

In reply to a message not in the archive

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card, codec, dai interface details (like the card name, DAPM routing map, phandle for the audio components described in the dts file, codec mclk speed). The card will be set up based on this information. Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.

---
 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++++++
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++++-
 2 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +58 -0
new file mode 100644
index 0000000..e6b61ff
@@ -0,0 +1,58 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-routing : A list of the connections between audio components.
+  Each entry is a pair of strings, the first being the connection's sink,
+  the second being the connection's source. Valid names for sources and
+  sinks are the codec's pins, and the jacks on the board:
+
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+  Board connectors:
+
+  * Headphone Jack
+  * Line Out
+  * Mic Jack
+  * Line In
+
+
+Example:
+
+sound {
+	compatible = "ti,da830-evm-audio";
+	ti,model = "DA830 EVM";
+	ti,audio-codec = <&tlv320aic3x>;
+	ti,mcasp-controller = <&mcasp1>;
+	ti,codec-clock-rate = <12000000>;
+	ti,audio-routing =
+		"Headphone Jack",       "HPLOUT",
+		"Headphone Jack",       "HPROUT",
+		"Line Out",             "LLOUT",
+		"Line Out",             "RLOUT",
+		"MIC3L",                "Mic Bias 2V",
+		"MIC3R",                "Mic Bias 2V",
+		"Mic Bias 2V",          "Mic Jack",
+		"LINE1L",               "Line In",
+		"LINE2L",               "Line In",
+		"LINE1R",               "Line In",
+		"LINE2R",               "Line In";
+};
sound/soc/davinci/davinci-evm.c +118 -2

161 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#50 lore raw

PATCH v3 3/11 ASoC: davinci-mcasp: Add DMA register locations to DT

In reply to a message not in the archive

This patch adds DMA register location to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, which is not accessible by the DMA controller, so McASP data port is mapped trough L3 to a different location.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    8 ++-
 sound/soc/davinci/davinci-mcasp.c                  |   59 +++++++++++++-------
 2 files changed, 46 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +6 -2
index 374e145..63b67ae 100644
@@ -6,7 +6,11 @@ Required properties:
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
 	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
-- reg : Should contain McASP registers offset and length
+- reg : Should contain McASP registers address and length for mpu and
+	optionally for dma controller access.
+- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
+	      reg-range must be named "dma". For backward compatibility it is
+	      good to keep "mpu" first in the list.
 - interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
@@ -15,7 +19,6 @@ Required properties:
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-
 Optional properties:
 
 - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
+	reg-names "mpu";
 	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
sound/soc/davinci/davinci-mcasp.c +40 -19

113 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#51 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Hello,

Quoted 18 lines · Jyri Sarha

This patch adds DMA register location to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, which is not accessible by the DMA controller, so McASP data port is mapped trough L3 to a different location.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    8 ++-
 sound/soc/davinci/davinci-mcasp.c                  |   59 +++++++++++++-------
 2 files changed, 46 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
index 374e145..63b67ae 100644

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 13

Quoted 9 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +5 -1
@@ -6,7 +6,11 @@ Required properties:
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
 	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
-- reg : Should contain McASP registers offset and length
+- reg : Should contain McASP registers address and length for mpu and
+	optionally for dma controller access.
+- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
+	      reg-range must be named "dma". For backward compatibility it is
+	      good to keep "mpu" first in the list.

I've never heard the term "reg-range" before. The should probably be something like "reg entry". How about something like the following instead:

- reg: Should contain reg specifiers for the entries in the reg-names property.

- reg-names: Should contain:
* "mpu" for the main registers (required). For compatibility with existing software, it is recommended this is the first entry.
* "dma" for the DMA registers (optional).

That way we don't end up describing each reg entry twice.

I have some questions however. I took a look at the McASP (TMS320C6000) reference guide, and the registers appeared to all be in one contiguous bank, and "mpu" and "dma" don't appear to be names of particular registers or names of banks of particular registers. Am I looking in the wrong place? Is there up-to-date documentation I can look at?

Why are these split across two reg entries, and which particular registers do they actually cover?

I have some concern about the description of other properties too. If we're going to amend the binding, they should be fixed up too.

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 14

Quoted 1 line
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
 - interrupts : Interrupt number for McASP

The device also seems to be able to generate multiple interrupts -- which interrupt does this actually cover?

The driver doesn't seem to use it (by a grep of irq|interrupt). Have I missed something?

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 15

Quoted 1 line
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
 - op-mode : I2S/DIT ops mode.

What type is this?

What are valid values?

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 16

Quoted 1 line
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
 - tdm-slots : Slots for TDM operation.

Here too. This description is completely opaque.

Taking a look at the version in kernel sources this appears to be a list of values, in groups of four?

What is the format of this property?

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt mcasp0: mcasp0@1d00000 { · line 35

Quoted 11 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
@@ -15,7 +19,6 @@ Required properties:
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-
 Optional properties:
 
 - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
 	#address-cells = <1>;
 	#size-cells = <0>;

Why does this have #address-cells and #size-cells? There are no children in the example.

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt mcasp0: mcasp0@1d00000 { · line 40

Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +1 -0
 	reg = <0x100000 0x3000>;
+	reg-names "mpu";
 	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;

A few questions from a brief skim of the documentation:

There seem to be external clocks (AHCLKR and ACLKR), but they aren't described. Are we always able to use an internal clock instead? Is no external reference clock needed?

The err_release_clk label in the error path confuses me -- which clock(s) does the preceding pm_runtime_get ensure remains active? One internal to the McASP?

It looks like some pins can be used as GPIO -- is there not a need for something like pinctrl for configuring this?

Cheers,
Mark.

Quoted 131 lines
sound/soc/davinci/davinci-mcasp.c +40 -19
index 32ddb7f..a056fc5 100644
@@ -1001,18 +1001,40 @@ static const struct snd_soc_component_driver davinci_mcasp_component = {
 	.name		= "davinci-mcasp",
 };
 
+/* Some HW specific values and defaults. The rest is filled in from DT. */
+static struct snd_platform_data dm646x_mcasp_pdata = {
+	.tx_dma_offset = 0x400,
+	.rx_dma_offset = 0x400,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_1,
+};
+
+static struct snd_platform_data da830_mcasp_pdata = {
+	.tx_dma_offset = 0x2000,
+	.rx_dma_offset = 0x2000,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_2,
+};
+
+static struct snd_platform_data omap2_mcasp_pdata = {
+	.tx_dma_offset = 0,
+	.rx_dma_offset = 0,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_3,
+};
+
 static const struct of_device_id mcasp_dt_ids[] = {
 	{
 		.compatible = "ti,dm646x-mcasp-audio",
-		.data = (void *)MCASP_VERSION_1,
+		.data = &dm646x_mcasp_pdata,
 	},
 	{
 		.compatible = "ti,da830-mcasp-audio",
-		.data = (void *)MCASP_VERSION_2,
+		.data = &da830_mcasp_pdata,
 	},
 	{
 		.compatible = "ti,omap2-mcasp-audio",
-		.data = (void *)MCASP_VERSION_3,
+		.data = &omap2_mcasp_pdata,
 	},
 	{ /* sentinel */ }
 };
@@ -1035,20 +1057,13 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 		pdata = pdev->dev.platform_data;
 		return pdata;
 	} else if (match) {
-		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-		if (!pdata) {
-			ret = -ENOMEM;
-			goto nodata;
-		}
+		pdata = (struct snd_platform_data *) match->data;
 	} else {
 		/* control shouldn't reach here. something is wrong */
 		ret = -EINVAL;
 		goto nodata;
 	}
 
-	if (match->data)
-		pdata->version = (u8)((int)match->data);
-
 	ret = of_property_read_u32(np, "op-mode", &val);
 	if (ret >= 0)
 		pdata->op_mode = val;
@@ -1145,10 +1160,15 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
 	if (!mem) {
-		dev_err(&pdev->dev, "no mem resource?\n");
-		return -ENODEV;
+		dev_warn(dev->dev,
+			 "\"mpu\" mem resource not found, using index 0\n");
+		mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		if (!mem) {
+			dev_err(&pdev->dev, "no mem resource?\n");
+			return -ENODEV;
+		}
 	}
 
 	ioarea = devm_request_mem_region(&pdev->dev, mem->start,
@@ -1182,13 +1202,16 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 	dev->rxnumevt = pdata->rxnumevt;
 	dev->dev = &pdev->dev;
 
+	dma = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
+	if (!dma)
+		dma = mem;
+
 	dma_data = &dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK];
 	dma_data->asp_chan_q = pdata->asp_chan_q;
 	dma_data->ram_chan_q = pdata->ram_chan_q;
 	dma_data->sram_pool = pdata->sram_pool;
 	dma_data->sram_size = pdata->sram_size_playback;
-	dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
-							mem->start);
+	dma_data->dma_addr = dma->start + pdata->tx_dma_offset;
 
 	/* first TX, then RX */
 	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
@@ -1205,8 +1228,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 	dma_data->ram_chan_q = pdata->ram_chan_q;
 	dma_data->sram_pool = pdata->sram_pool;
 	dma_data->sram_size = pdata->sram_size_capture;
-	dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
-							mem->start);
+	dma_data->dma_addr = dma->start + pdata->rx_dma_offset;
 
 	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
 	if (!res) {
@@ -1266,4 +1288,3 @@ module_platform_driver(davinci_mcasp_driver);
 MODULE_AUTHOR("Steve Chen");
 MODULE_DESCRIPTION("TI DAVINCI McASP SoC Interface");
 MODULE_LICENSE("GPL");
-
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#52 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 9 lines · Mark Rutland
Quoted 1 line · Jyri Sarha

- interrupts : Interrupt number for McASP

The device also seems to be able to generate multiple interrupts -- which interrupt does this actually cover?

The driver doesn't seem to use it (by a grep of irq|interrupt). Have I missed something?

No, they're not actually of much practical use to us at the minute but it was generally felt better to include the information and not use it so that if someone does come up with a use for them then the trees for deployed systems already have the information.

#53 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 8 lines · Mark Brown
Quoted 6 lines · Mark Rutland
Quoted 1 line · Jyri Sarha

- interrupts : Interrupt number for McASP

The device also seems to be able to generate multiple interrupts -- which interrupt does this actually cover?

Quoted 7 lines
Quoted 2 lines

The driver doesn't seem to use it (by a grep of irq|interrupt). Have I missed something?

No, they're not actually of much practical use to us at the minute but it was generally felt better to include the information and not use it so that if someone does come up with a use for them then the trees for deployed systems already have the information.

Sure, but if this device can generate multiple interrupts, we should make it possible to describe all of them, unambiguously.

Thanks,
Mark.

#54 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 7 lines · Mark Rutland
Quoted 4 lines

No, they're not actually of much practical use to us at the minute but it was generally felt better to include the information and not use it so that if someone does come up with a use for them then the trees for deployed systems already have the information.

Sure, but if this device can generate multiple interrupts, we should make it possible to describe all of them, unambiguously.

This is why Jyri added them to the DT. They are not used by the Linux driver, but the HW have interrupt lines (two of them: TX and RX).

Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#55 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 11 lines · Peter Ujfalusi
Quoted 7 lines · Mark Rutland
Quoted 4 lines

No, they're not actually of much practical use to us at the minute but it was generally felt better to include the information and not use it so that if someone does come up with a use for them then the trees for deployed systems already have the information.

Sure, but if this device can generate multiple interrupts, we should make it possible to describe all of them, unambiguously.

This is why Jyri added them to the DT. They are not used by the Linux driver, but the HW have interrupt lines (two of them: TX and RX).

The binding only describes a single interrupt, and even if multiple interrupts were listed, there's no way to disambiguate them (e.g. interrupt-names).

It would be nice to remedy this.

Cheers,
Mark.

#56 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Quoted 10 lines · Mark Rutland
Quoted 9 lines · Peter Ujfalusi
Quoted 7 lines · Mark Rutland
Quoted 4 lines

No, they're not actually of much practical use to us at the minute but it was generally felt better to include the information and not use it so that if someone does come up with a use for them then the trees for deployed systems already have the information.

Sure, but if this device can generate multiple interrupts, we should make it possible to describe all of them, unambiguously.

Quoted 9 lines
Quoted 2 lines

This is why Jyri added them to the DT. They are not used by the Linux driver, but the HW have interrupt lines (two of them: TX and RX).

The binding only describes a single interrupt, and even if multiple interrupts were listed, there's no way to disambiguate them (e.g. interrupt-names).

It would be nice to remedy this.

This has been fixed in a later patch in the same series here:

[RESEND PATCH v3 05/11] ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066732.html

However the v3 series is already obsolete. The latest posted series is v4. There the patch patch bellow inculdes interrupt names, plus some other improvements based on your comments earlier:

[PATCH v4 05/10] ASoC: davinci-mcasp: Improve DT bindings document
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067100.html

There is already couple of updates even to v4 series of the patches, here:

[PATCH v4.1 08/10] ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067125.html

[PATCH v4.2 09/10] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067133.html

[PATCH v4.2 10/10] ARM/dts: am335x-evmsk: Audio support http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067140.html

Best regards,
Jyri

#57 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

In reply to Mark Rutland
Quoted 1 line · Mark Rutland

Hello,

Hi!
I am not the author of this driver so my knowledge may have gaps, when it comes to details I have not touched yet. Anyway, I do my best to address your comments.

...

Quoted 10 lines

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 13

Quoted 6 lines

-- reg : Should contain McASP registers offset and length +- reg : Should contain McASP registers address and length for mpu and

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +4 -0
+	optionally for dma controller access.
+- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
+	      reg-range must be named "dma". For backward compatibility it is
+	      good to keep "mpu" first in the list.

I've never heard the term "reg-range" before. The should probably be something like "reg entry". How about something like the following instead:

Well, an address and length describes a "range", but if it is not commonly used term, there is no need to use it here either.

Quoted 8 lines

- reg: Should contain reg specifiers for the entries in the reg-names property.

- reg-names: Should contain:
* "mpu" for the main registers (required). For compatibility with existing software, it is recommended this is the first entry.
* "dma" for the DMA registers (optional).

That way we don't end up describing each reg entry twice.

The both contain the same information, but your version is certainly easier to read. I'll take it. Thanks!

Quoted 9 lines

I have some questions however. I took a look at the McASP (TMS320C6000) reference guide, and the registers appeared to all be in one contiguous bank, and "mpu" and "dma" don't appear to be names of particular registers or names of banks of particular registers. Am I looking in the wrong place? Is there up-to-date documentation I can look at?

Why are these split across two reg entries, and which particular registers do they actually cover?

The need for two different register properties does not come from McASP IP, but from SoC design. On AM33XX the McASP registers are mapped for MPU through L4 bus, which is no accessible to the DMA controller. The McASP data port registers are mapped trough L3 buss to a different address for DMA controller. Maybe the second register property could be called to "dat" instead of "dma" since only data port registers are mapped trough that address.

Quoted 4 lines

I have some concern about the description of other properties too. If we're going to amend the binding, they should be fixed up too.

Quoted 8 lines
Quoted 1 line

- interrupts : Interrupt number for McASP

The device also seems to be able to generate multiple interrupts -- which interrupt does this actually cover?

The driver doesn't seem to use it (by a grep of irq|interrupt). Have I missed something?

No you have not. A later patch in this set make the interrupt property optional and adds "tx" and "rx" interrupt-names:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066732.html

Quoted 3 lines
Quoted 1 line

- op-mode : I2S/DIT ops mode.

What type is this?

That property selects whether McASP is working in I2S mode or in Integrated Digital audio interface Transmitter (DIT) mode for S/PDIF, IEC60958-1, AES-3 formats.

Quoted 2 lines

What are valid values?

0 and 1. I'll document those. Thanks.

Quoted 4 lines
Quoted 1 line

- tdm-slots : Slots for TDM operation.

Here too. This description is completely opaque.

I am not absolutely sure here. I'll check the details and try to come up with a better description.

Talking about num-serializer and serial-dir property here...

Quoted 10 lines

Taking a look at the version in kernel sources this appears to be a list of values, in groups of four?

What is the format of this property?

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 18

Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
@@ -15,7 +19,6 @@ Required properties:
  		to "num-serializer" parameter. Each entry is a number indication
  		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-

The McASP can have up to 16 serializers for selecting data pin usage. The numbers have been grouped into 4x4 matrix only for better readability. BTW, the num-serializers property is redundant and it will be removed in the next version of the patch series.

Quoted 10 lines

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt mcasp0: mcasp0@1d00000 { · line 35

Quoted 6 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
  Optional properties:
 
  - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
  	#address-cells = <1>;
  	#size-cells = <0>;

Why does this have #address-cells and #size-cells? There are no children in the example.

I removed those from the actual dts file, but forgot to do so here. I'll fix that. Thanks!

Quoted 11 lines

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt mcasp0: mcasp0@1d00000 { · line 40

Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +1 -0
  	reg = <0x100000 0x3000>;
+	reg-names "mpu";
  	interrupts = <82 83>;
  	op-mode = <0>;		/* MCASP_IIS_MODE */
  	tdm-slots = <2>;

A few questions from a brief skim of the documentation:

There seem to be external clocks (AHCLKR and ACLKR), but they aren't described. Are we always able to use an internal clock instead? Is no external reference clock needed?

As far as I understand the choice is to use either McASP internal clock or codec provided clock. The selection is made by the machine/platform driver by calling snd_soc_dai_set_fmt() and applying the required bits in SND_SOC_DAIFMT_MASTER_MASK. I guess the choice may not always be HW specific.

Quoted 4 lines

The err_release_clk label in the error path confuses me -- which clock(s) does the preceding pm_runtime_get ensure remains active? One internal to the McASP?

I guess that is really up to machine/platform driver that configures dapm.

Quoted 3 lines

It looks like some pins can be used as GPIO -- is there not a need for something like pinctrl for configuring this?

That is true, but since driver does not support it and there is no example of GPIO usage, no guess work has been done about the required DT properties.

Quoted 134 lines

Cheers,
Mark.

Quoted 131 lines
sound/soc/davinci/davinci-mcasp.c +40 -20
index 32ddb7f..a056fc5 100644
@@ -1001,18 +1001,40 @@ static const struct snd_soc_component_driver davinci_mcasp_component = {
  	.name		= "davinci-mcasp",
  };
 
+/* Some HW specific values and defaults. The rest is filled in from DT. */
+static struct snd_platform_data dm646x_mcasp_pdata = {
+	.tx_dma_offset = 0x400,
+	.rx_dma_offset = 0x400,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_1,
+};
+
+static struct snd_platform_data da830_mcasp_pdata = {
+	.tx_dma_offset = 0x2000,
+	.rx_dma_offset = 0x2000,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_2,
+};
+
+static struct snd_platform_data omap2_mcasp_pdata = {
+	.tx_dma_offset = 0,
+	.rx_dma_offset = 0,
+	.asp_chan_q = EVENTQ_0,
+	.version = MCASP_VERSION_3,
+};
+
  static const struct of_device_id mcasp_dt_ids[] = {
  	{
  		.compatible = "ti,dm646x-mcasp-audio",
-		.data = (void *)MCASP_VERSION_1,
+		.data = &dm646x_mcasp_pdata,
  	},
  	{
  		.compatible = "ti,da830-mcasp-audio",
-		.data = (void *)MCASP_VERSION_2,
+		.data = &da830_mcasp_pdata,
  	},
  	{
  		.compatible = "ti,omap2-mcasp-audio",
-		.data = (void *)MCASP_VERSION_3,
+		.data = &omap2_mcasp_pdata,
  	},
  	{ /* sentinel */ }
  };
@@ -1035,20 +1057,13 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
  		pdata = pdev->dev.platform_data;
  		return pdata;
  	} else if (match) {
-		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-		if (!pdata) {
-			ret = -ENOMEM;
-			goto nodata;
-		}
+		pdata = (struct snd_platform_data *) match->data;
  	} else {
  		/* control shouldn't reach here. something is wrong */
  		ret = -EINVAL;
  		goto nodata;
  	}
 
-	if (match->data)
-		pdata->version = (u8)((int)match->data);
-
  	ret = of_property_read_u32(np, "op-mode", &val);
  	if (ret >= 0)
  		pdata->op_mode = val;
@@ -1145,10 +1160,15 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
  		return -EINVAL;
  	}
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
  	if (!mem) {
-		dev_err(&pdev->dev, "no mem resource?\n");
-		return -ENODEV;
+		dev_warn(dev->dev,
+			 "\"mpu\" mem resource not found, using index 0\n");
+		mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		if (!mem) {
+			dev_err(&pdev->dev, "no mem resource?\n");
+			return -ENODEV;
+		}
  	}
 
  	ioarea = devm_request_mem_region(&pdev->dev, mem->start,
@@ -1182,13 +1202,16 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
  	dev->rxnumevt = pdata->rxnumevt;
  	dev->dev = &pdev->dev;
 
+	dma = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
+	if (!dma)
+		dma = mem;
+
  	dma_data = &dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK];
  	dma_data->asp_chan_q = pdata->asp_chan_q;
  	dma_data->ram_chan_q = pdata->ram_chan_q;
  	dma_data->sram_pool = pdata->sram_pool;
  	dma_data->sram_size = pdata->sram_size_playback;
-	dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
-							mem->start);
+	dma_data->dma_addr = dma->start + pdata->tx_dma_offset;
 
  	/* first TX, then RX */
  	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
@@ -1205,8 +1228,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
  	dma_data->ram_chan_q = pdata->ram_chan_q;
  	dma_data->sram_pool = pdata->sram_pool;
  	dma_data->sram_size = pdata->sram_size_capture;
-	dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
-							mem->start);
+	dma_data->dma_addr = dma->start + pdata->rx_dma_offset;
 
  	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
  	if (!res) {
@@ -1266,4 +1288,3 @@ module_platform_driver(davinci_mcasp_driver);
  MODULE_AUTHOR("Steve Chen");
  MODULE_DESCRIPTION("TI DAVINCI McASP SoC Interface");
  MODULE_LICENSE("GPL");
-
--

1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#58 lore raw

Re: [RESEND PATCH v3 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT

Hi,

Quoted 9 lines · Jyri Sarha
Quoted 8 lines

I have some questions however. I took a look at the McASP (TMS320C6000) reference guide, and the registers appeared to all be in one contiguous bank, and "mpu" and "dma" don't appear to be names of particular registers or names of banks of particular registers. Am I looking in the wrong place? Is there up-to-date documentation I can look at?

Why are these split across two reg entries, and which particular registers do they actually cover?

Quoted 7 lines

The need for two different register properties does not come from McASP IP, but from SoC design. On AM33XX the McASP registers are mapped for MPU through L4 bus, which is no accessible to the DMA controller. The McASP data port registers are mapped trough L3 buss to a different address for DMA controller. Maybe the second register property could be called to "dat" instead of "dma" since only data port registers are mapped trough that address.

We have discussed this with Jyri and we are going to use 'dat' for the data port address. The driver can configure the IP via the 'mpu' area but it is preferred to use the 'dat' or data port of McASP when it comes to data. It is possible to use the transmit/receive buffer registers in the 'mpu' area but it get's complicated when more than one serializer is used.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

- op-mode : I2S/DIT ops mode.

What type is this?

That property selects whether McASP is working in I2S mode or in Integrated Digital audio interface Transmitter (DIT) mode for S/PDIF, IEC60958-1, AES-3 formats.

Not sure but we might be able to handle this via standard ASoC way, via the da_fmt so the machine driver will tell the mcasp driver what is the format it needs to send the data. Adding SND_SOC_DAIFMT_SPDIF/IEC60958/AES3 to core will be needed.

Quoted 6 lines
Quoted 3 lines

What are valid values?

0 and 1. I'll document those. Thanks.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

- tdm-slots : Slots for TDM operation.

Here too. This description is completely opaque.

I am not absolutely sure here. I'll check the details and try to come up with a better description.

Not sure about this either, my interpretation of what it means:
number of channels to be sent via one serializer.
as an example:
We have 3 stereo codecs in the design
all of them are connected to the same McASP instance but to be fed via different serializer:
AXR0 - codec0
AXR1 - codec1
AXR2 - codec2

Since the codecs are stereo -> tdm-slots = <2>; two channels/serializer

If the stream is stereo we only ouput to codec0 via AXR0.
If the stream is 4 channel, the first 2 channels will be via AXR0 to codec0 the next 2 channles will be sent to codec1 via AXR1. and so on.

I think it would be possible to extract this information from the serial-dir property + machine driver configured DAI_FMT and from the coming stream. I2S, L/R justified is stereo, in DSP modes we can have more channels. In the serial-dir array we could count the AXR directions. Basically all the information which is needed to make this redundant are there.
But we have the legacy davinci users at the same time and we do not want to break eisting users.

I think Daniel Mack (CCd) can clarify my understanding of the tdm-slots.

Quoted 7 lines
Quoted 3 lines

It looks like some pins can be used as GPIO -- is there not a need for something like pinctrl for configuring this?

That is true, but since driver does not support it and there is no example of GPIO usage, no guess work has been done about the required DT properties.

This is kind of complicated issue. Any of the McASP pins (CLK, FS, AXR, etc) can be configured to be used as McASP pins or GPIO pins. This configuration is McASP IP specific, need to be done within McASP.
pinctrl is overkill for this IMHO but we would need a gpio driver for McASP. If some driver requests a gpio in McASP we can just switch that pin to GPIO mode, however this brings up quite a bit of questions:
- embedd the gpio driver into the dai driver?
- if the system does not have audio -> no GPIO driver for the rest?
- separate driver for gpio functionality?
- Sanity cheks all over the place on which pin is GPIO or McASP.

and so forth.

Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#59 lore raw

PATCH v3 5/11 ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names

In reply to a message not in the archive

Makes interrupts property optional as the interrupts are not currently used by the driver and adds interrupt-names property to name listed interrupts. Currently know interrupt names are "tx" and "rx".

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +3 -1
index 68e0f47..2fd0bf2 100644
@@ -11,7 +11,6 @@ Required properties:
 - reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
 	      reg-range must be named "dma". For backward compatibility it is
 	      good to keep "mpu" first in the list.
-- interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
 - num-serializer : Serializers used by McASP.
@@ -31,6 +30,8 @@ Optional properties:
 - rx-num-evt : FIFO levels.
 - sram-size-playback : size of sram to be allocated during playback
 - sram-size-capture  : size of sram to be allocated during capture
+- interrupts : Interrupt numbers for McASP, currently not used by the driver
+- interrupt-names : Known interrupt names are "tx" and "rx"
 
 Example:
 
@@ -41,6 +42,7 @@ mcasp0: mcasp0@1d00000 {
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
 	interrupts = <82 83>;
+	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#60 lore raw

Re: [RESEND PATCH v3 05/11] ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names

Quoted 22 lines · Jyri Sarha

Makes interrupts property optional as the interrupts are not currently used by the driver and adds interrupt-names property to name listed interrupts. Currently know interrupt names are "tx" and "rx".

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
index 68e0f47..2fd0bf2 100644
@@ -11,7 +11,6 @@ Required properties:
 - reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
 	      reg-range must be named "dma". For backward compatibility it is
 	      good to keep "mpu" first in the list.
-- interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
 - num-serializer : Serializers used by McASP.

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Optional properties: · line 34

Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +2 -0
@@ -31,6 +30,8 @@ Optional properties:
 - rx-num-evt : FIFO levels.
 - sram-size-playback : size of sram to be allocated during playback
 - sram-size-capture  : size of sram to be allocated during capture
+- interrupts : Interrupt numbers for McASP, currently not used by the driver
+- interrupt-names : Known interrupt names are "tx" and "rx"

Are these _all_ the interrupts the McASP may generate? I was under the impression there were also separate interrupts for errors.

Cheers,
Mark.

Quoted 19 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +1 -0
 Example:
 
@@ -41,6 +42,7 @@ mcasp0: mcasp0@1d00000 {
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
 	interrupts = <82 83>;
+	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#61 lore raw

Re: [RESEND PATCH v3 05/11] ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names

Quoted 5 lines · Mark Rutland
Quoted 2 lines · Jyri Sarha

+- interrupts : Interrupt numbers for McASP, currently not used by the driver

Quoted 1 line

+- interrupt-names : Known interrupt names are "tx" and "rx"

Are these_all_ the interrupts the McASP may generate? I was under the impression there were also separate interrupts for errors.

Those were all I could find from AM335X TRM.

Cheers,
Jyri

author
#62 lore raw

PATCH v3 8/11 ASoC: tlv320aic3x: Add codec pins to DT bindings document

In reply to a message not in the archive

Add list of codec pins to tlv320aic3x DT bindings document.

---
 .../devicetree/bindings/sound/tlv320aic3x.txt      |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Documentation/devicetree/bindings/sound/tlv320aic3x.txt +19 -0
index 11e24b2..2b76c81 100644
@@ -20,6 +20,25 @@ Optional properties:
 - AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
   device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
+CODEC output pins:
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+
+CODEC input pins:
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+The pins can be used in referring sound node's audio-routing property.
+
 Example:
 
 tlv320aic3x: tlv320aic3x@1b {
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#63 lore raw

PATCH v3 10/11 ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

In reply to a message not in the archive

This patch adds an optional address range to reg property. The range describes the register location for DMA controller on am33xx. The both address ranges are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +12 -2
index fe53ce0..4dc388a 100644
@@ -556,19 +556,29 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			interrupts = <80 81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
+			dmas = <&edma 8
+				&edma 9>;
+			dma-names = "tx", "rx";
 		};
 
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			interrupts = <82 83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
+			dmas = <&edma 10
+				&edma 11>;
+			dma-names = "tx", "rx";
 		};
 
 	};
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#64 lore raw

Re: [RESEND PATCH v3 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

Quoted 18 lines · Jyri Sarha

This patch adds an optional address range to reg property. The range describes the register location for DMA controller on am33xx. The both address ranges are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +0 -0
index fe53ce0..4dc388a 100644
@@ -556,19 +556,29 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";

arch/arm/boot/dts/am33xx.dtsi line 566

Quoted 10 lines
arch/arm/boot/dts/am33xx.dtsi +5 -1
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			interrupts = <80 81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
+			dmas = <&edma 8
+				&edma 9>;

For consistency with reg and other composite value properties, I'd prefer that each entry in the list were individually bracketed:

			dmas = <&edma 8>,
			       <&edma 9>;

It would also be nice if interrupts were written this way.

Quoted 5 lines
arch/arm/boot/dts/am33xx.dtsi +1 -0
+			dma-names = "tx", "rx";
 		};
 
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";

arch/arm/boot/dts/am33xx.dtsi line 580

Quoted 10 lines
arch/arm/boot/dts/am33xx.dtsi +5 -1
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dma";
 			interrupts = <82 83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
+			dmas = <&edma 10
+				&edma 11>;

Similarly here.

Cheers,
Mark.

#65 lore raw

Re: [RESEND PATCH v3 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property

Quoted 6 lines · Mark Rutland

For consistency with reg and other composite value properties, I'd prefer that each entry in the list were individually bracketed:

			dmas = <&edma 8>,
			       <&edma 9>;

Makes sense. I'll do that. Thanks!

Quoted 1 line

It would also be nice if interrupts were written this way.

I'll change that too.

Cheers,
Jyri

author
#66 lore raw

PATCH v3 11/11 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

In reply to a message not in the archive

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3x, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +56 -0
index 3aee1a4..4a49229 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -215,6 +225,19 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3x: tlv320aic3x@1b {
+				compatible = "ti,tlv320aic3x";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
+
 		};
 
 		elm: elm@48080000 {
@@ -311,6 +334,20 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "DA830 EVM";
+			ti,audio-codec = <&tlv320aic3x>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
+
 	};
 
 	vbat: fixedregulator@0 {
@@ -378,6 +415,25 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		num-serializer = <16>;
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#67 lore raw

Re: [RESEND PATCH v3 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Quoted 74 lines · Jyri Sarha

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3x, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +37 -0
index 3aee1a4..4a49229 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -215,6 +225,19 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3x: tlv320aic3x@1b {
+				compatible = "ti,tlv320aic3x";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
+
 		};
 
 		elm: elm@48080000 {
@@ -311,6 +334,20 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "DA830 EVM";
+			ti,audio-codec = <&tlv320aic3x>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
+
 	};
 
 	vbat: fixedregulator@0 {

arch/arm/boot/dts/am335x-evm.dts line 420

Quoted 6 lines
arch/arm/boot/dts/am335x-evm.dts +3 -0
@@ -378,6 +415,25 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;

I didn't see mention of pinctrl added to the binding. It should be.

Thanks,
Mark.

Quoted 27 lines
arch/arm/boot/dts/am335x-evm.dts +16 -0
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		num-serializer = <16>;
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#68 lore raw

Re: [RESEND PATCH v3 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Quoted 4 lines · Mark Rutland
Quoted 3 lines

+&mcasp1 {

arch/arm/boot/dts/am335x-evm.dts line 420

Quoted 2 lines
arch/arm/boot/dts/am335x-evm.dts +2 -0
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;

I didn't see mention of pinctrl added to the binding. It should be.

I'll add that. Thanks!

Cheers,
Jyri

#69 lore raw

PATCH v3 4/11 ASoC: davinci-mcasp: Extract DMA channels directly from DT

In reply to Jyri Sarha

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    5 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/davinci-mcasp.c                  |   47 +++++++++++++-------
 3 files changed, 39 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +5 -0
index 63b67ae..68e0f47 100644
@@ -18,6 +18,11 @@ Required properties:
 - serial-dir : A list of serializer pin mode. The list number should be equal
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- dmas: two element list of DMA controller phandles and DMA request line
+        ordered pairs.
+- dma-names: identifier string for each DMA request line in the dmas property.
+	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
+	     identifiers must be "rx" and "tx".
 
 Optional properties:
 
include/linux/platform_data/davinci_asp.h +2 -0
index 8db5ae0..689a856 100644
@@ -84,6 +84,8 @@ struct snd_platform_data {
 	u8 version;
 	u8 txnumevt;
 	u8 rxnumevt;
+	int tx_dma_channel;
+	int rx_dma_channel;
 };
 
 enum {
sound/soc/davinci/davinci-mcasp.c +32 -15

79 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#70 lore raw

Re: [RESEND PATCH v3 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT

Quoted 3 lines · Jyri Sarha

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

How long will this conversion take?

Quoted 13 lines
---
 .../bindings/sound/davinci-mcasp-audio.txt         |    5 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/davinci-mcasp.c                  |   47 +++++++++++++-------
 3 files changed, 39 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
index 63b67ae..68e0f47 100644

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 22

Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +2 -0
@@ -18,6 +18,11 @@ Required properties:
 - serial-dir : A list of serializer pin mode. The list number should be equal
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- dmas: two element list of DMA controller phandles and DMA request line
+        ordered pairs.

Please describe this in terms of dma-names. That makes it clear that elements cannot be retrieved consistently by index, and prevents duplicate descriptions.

I'd prefer for the sake of consistent terminology that these were referred to as phandles + dma-specifiers rather than phandles and DMA request lines -- #dma-cells may be an arbitrary number of cells and encode arbitrary information for some abstract DMA engine.

Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt Required properties: · line 25

Quoted 3 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +3 -0
+- dma-names: identifier string for each DMA request line in the dmas property.
+	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
+	     identifiers must be "rx" and "tx".

For consistency and future expandability:

s/must be/should contain/

Cheers,
Mark.

Quoted 112 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -0
 Optional properties:
 
include/linux/platform_data/davinci_asp.h +2 -0
index 8db5ae0..689a856 100644
@@ -84,6 +84,8 @@ struct snd_platform_data {
 	u8 version;
 	u8 txnumevt;
 	u8 rxnumevt;
+	int tx_dma_channel;
+	int rx_dma_channel;
 };
 
 enum {
sound/soc/davinci/davinci-mcasp.c +32 -15
index a056fc5..acbf5f8 100644
@@ -1047,6 +1047,7 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 	struct snd_platform_data *pdata = NULL;
 	const struct of_device_id *match =
 			of_match_device(mcasp_dt_ids, &pdev->dev);
+	struct of_phandle_args dma_spec;
 
 	const u32 *of_serial_dir32;
 	u8 *of_serial_dir;
@@ -1109,6 +1110,28 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 		pdata->serial_dir = of_serial_dir;
 	}
 
+	ret = of_property_match_string(np, "dma-names", "tx");
+	if (ret < 0)
+		goto nodata;
+
+	ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", ret,
+					 &dma_spec);
+	if (ret < 0)
+		goto nodata;
+
+	pdata->tx_dma_channel = dma_spec.args[0];
+
+	ret = of_property_match_string(np, "dma-names", "rx");
+	if (ret < 0)
+		goto nodata;
+
+	ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", ret,
+					 &dma_spec);
+	if (ret < 0)
+		goto nodata;
+
+	pdata->rx_dma_channel = dma_spec.args[0];
+
 	ret = of_property_read_u32(np, "tx-num-evt", &val);
 	if (ret >= 0)
 		pdata->txnumevt = val;
@@ -1139,7 +1162,7 @@ nodata:
 static int davinci_mcasp_probe(struct platform_device *pdev)
 {
 	struct davinci_pcm_dma_params *dma_data;
-	struct resource *mem, *ioarea, *res;
+	struct resource *mem, *ioarea, *res, *dma;
 	struct snd_platform_data *pdata;
 	struct davinci_audio_dev *dev;
 	int ret;
@@ -1213,15 +1236,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 	dma_data->sram_size = pdata->sram_size_playback;
 	dma_data->dma_addr = dma->start + pdata->tx_dma_offset;
 
-	/* first TX, then RX */
 	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no DMA resource\n");
-		ret = -ENODEV;
-		goto err_release_clk;
-	}
-
-	dma_data->channel = res->start;
+	if (res)
+		dma_data->channel = res->start;
+	else
+		dma_data->channel = pdata->tx_dma_channel;
 
 	dma_data = &dev->dma_params[SNDRV_PCM_STREAM_CAPTURE];
 	dma_data->asp_chan_q = pdata->asp_chan_q;
@@ -1231,13 +1250,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 	dma_data->dma_addr = dma->start + pdata->rx_dma_offset;
 
 	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
-	if (!res) {
-		dev_err(&pdev->dev, "no DMA resource\n");
-		ret = -ENODEV;
-		goto err_release_clk;
-	}
+	if (res)
+		dma_data->channel = res->start;
+	else
+		dma_data->channel = pdata->rx_dma_channel;
 
-	dma_data->channel = res->start;
 	dev_set_drvdata(&pdev->dev, dev);
 	ret = snd_soc_register_component(&pdev->dev, &davinci_mcasp_component,
 					 &davinci_mcasp_dai[pdata->op_mode], 1);
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#71 lore raw

Re: [RESEND PATCH v3 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT

Quoted 6 lines · Mark Rutland
Quoted 3 lines · Jyri Sarha
Quoted 3 lines

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

How long will this conversion take?

That is uncertain, definitely not in time for v3.13.

Best regards,
Jyri

#72 lore raw

PATCH v3 6/11 ASoC: davinci: Add support for AM33xx SoC Audio

In reply to Jyri Sarha

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

---
 sound/soc/davinci/Kconfig  |   18 +++++++++++++++---
 sound/soc/davinci/Makefile |    1 +
 2 files changed, 16 insertions(+), 3 deletions(-)
sound/soc/davinci/Kconfig +15 -3
index c82f89c..95970f5 100644
@@ -1,9 +1,10 @@
 config SND_DAVINCI_SOC
-	tristate "SoC Audio for the TI DAVINCI chip"
-	depends on ARCH_DAVINCI
+	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
+	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
+	  Platform driver for daVinci or AM33xx
 	  Say Y or M if you want to add support for codecs attached to
-	  the DAVINCI AC97 or I2S interface. You will also need
+	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
 
 config SND_DAVINCI_SOC_I2S
@@ -15,6 +16,17 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_AM33XX_SOC_EVM
+	tristate "SoC Audio for the AM33XX chip based boards"
+	depends on SND_DAVINCI_SOC && SOC_AM33XX
+	select SND_SOC_TLV320AIC3X
+	select SND_DAVINCI_SOC_MCASP
+	help
+	  Say Y or M if you want to add support for SoC audio on AM33XX
+	  boards using McASP and TLV320AIC3X codec. For example AM335X-EVM,
+	  AM335X-EVMSK, and BeagelBone with AudioCape boards have this
+	  setup.
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
sound/soc/davinci/Makefile +1 -0
index a396ab6..bc81e79 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
 snd-soc-evm-objs := davinci-evm.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
+obj-$(CONFIG_SND_AM33XX_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
Signature · 1 line
1.7.9.5
#73 lore raw

PATCH v3 7/11 ASoC: tlv320aic3x: Add regulators to DT bindings document

In reply to Jyri Sarha

Add regulator properties to tlv320aic3x DT bindings document.

---
 .../devicetree/bindings/sound/tlv320aic3x.txt      |    7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/sound/tlv320aic3x.txt +7 -0
index f47c3f5..11e24b2 100644
@@ -17,10 +17,17 @@ Optional properties:
 	3 - MICBIAS output is connected to AVDD,
 	If this node is not mentioned or if the value is incorrect, then MicBias
 	is powered down.
+- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
+  device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
 Example:
 
 tlv320aic3x: tlv320aic3x@1b {
 	compatible = "ti,tlv320aic3x";
 	reg = <0x1b>;
+
+	AVDD-supply = <&regulator>;
+	IOVDD-supply = <&regulator>;
+	DRVDD-supply = <&regulator>;
+	DVDD-supply = <&regulator>;
 };
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1b88bfa3793d807ff6e325df1bbff6cb4eb976e6.1379590036.git.jsarha-l0cyMroinI0@public.gmane.org

#75 lore raw

Re: [PATCH v3 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document

Quoted 1 line · Jyri Sarha

Add regulator properties to tlv320aic3x DT bindings document.

Similarly for this and the other CODEC patch, are these changed?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#77 lore raw

RE: [PATCH v3 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document

No change here either.

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

________________________________________
From: [email protected] [[email protected]] on behalf of Mark Brown [[email protected]]
Sent: Thursday, September 19, 2013 4:29 PM
To: Sarha, Jyri
Cc: alsa-devel-K7yf7f+aM1XWsZ/[email protected]; [email protected]; [email protected]; Ujfalusi, Peter; liam.r.girdwood-VuQAYsv1563Yd54FQh9/[email protected]; [email protected]; rob.herring-bsGFqQB8/[email protected]; Fernandes, Joel
Subject: Re: [PATCH v3 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document

Quoted 1 line · Jyri Sarha

Add regulator properties to tlv320aic3x DT bindings document.

Similarly for this and the other CODEC patch, are these changed?

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#78 lore raw

PATCH v3 9/11 ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

In reply to Jyri Sarha

From: Pantelis Antoniou <[email protected]>

Add missing mcasp entries in the am33xx.dtsi include file.

---
 arch/arm/boot/dts/am33xx.dtsi |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +19 -0
index 0fdb949..fe53ce0 100644
@@ -552,5 +552,24 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		mcasp0: mcasp@48038000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp0";
+			reg = <0x48038000 0x2000>;
+			interrupts = <80 81>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+		};
+
+		mcasp1: mcasp@4803C000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp1";
+			reg = <0x4803C000 0x2000>;
+			interrupts = <82 83>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+		};
+
 	};
 };
Signature · 1 line
1.7.9.5
#80 lore raw

v4 cover Fix AM335x-evm analog audio support

In reply to [email protected]

The v3 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066728.html
The v2 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066379.html
The RFC version of patches can been found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066178.html

Changes since v3
- Rebased on top of v3.12-rc4
- Drop already applied patches:
- [PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- [PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- [PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- Add: ASoC: davinci: Fix AM33xx SoC Audio support
- Contains the fixes from Peter:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066448.html
- Contents of this patch were squashed to "[PATCH v3 06/11] ASoC:
davinci: Add support for AM33xx SoC Audio", but since the patch v2 was already applied the changes are here as a separate patch.
- Add: ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter
- Change: ASoC: davinci-mcasp: Add DMA register locations to DT
to: ASoC: davinci-mcasp: Add location for data port registers to DT
- Use more accurate name for data port register location
- Improve commit message
- Change: ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names
to: ASoC: davinci-mcasp: Improve DT bindings document
- Remove #address-cells and #size-cells
- Bracket named interrupts tuples
- Add missing "for" to serial-dir description
- Improve tdm-slots description
- Improve op-mode description
- Add pinctrl-names and pinctrl-0 descriptions
- Change: ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- Use board specific name 'AM335x-EVM' for the soundcard.
- Use the board specific tlv320aic3106 codec. Use this name instead of generic tlv320aic3x.
- Remove num-serializer property from mcasp node
- Remove blank lines
- Change: ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- Bracket all named property tuples
- Add: ARM/dts: am335x-evmsk: Audio support
- The other patches in the set not mentioned here are identical to their earlier version

Changes since v2
[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- no change
[PATCH v2 02/11] ASoC: davinci-evm: Add device tree binding
- no change
[PATCH v2 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT
- no change
[PATCH v2 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT
- no change
[PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindin
- restore binding but make it optional and add interrupt-names property
[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- SND_DAVINCI_SOC help "Machine driver for ..." -> "Platform driver for ..."
- SND_AM33XX_SOC_EVM depends on SND_DAVINCI_SOC && SOC_AM33XX
- SND_AM33XX_SOC_EVM does not selcet SND_DAVINCI_SOC
[PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- no change
[PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- no change
[PATCH v2 09/11] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- restore interrupt property and add interrupt-names property
[PATCH v2 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property
- no change
[PATCH v2 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- no change

Changes from RFC to v2
- Dropped out "ASoC: davinci-mcasp: Add pinctrl support" since driver core is taking care of this now.
- Cleanup am33xx audio build
- Add regulators to tlv320aic3x DT binding document
- Remove dm365-voice-codec-audio DT support as it has never
been tested an probably does not work
- Add output pins and Line In connector to davinci-evm-audio DT binding doc
- Remove asp_chan_q and ram_chan_q properties from mcasp DT node in DT mode mcasp is hardcoded to event queue 0 (highest priority)
- Add pins to tlv320aic3x DT bindings document. If I misunderstood Marks comment and this patch is not needed, then just leave it out
Changes based on TI internal discussions
- Move system clock rate logic away from from evm_hw_params soc-op
- Remove unnecesary #if defined(CONFIG_OF) from davinci-evm.c
- Make dma property DT binding document more exact
- Add only "dma" reg location instead of separate "dma-tx" and "dma-rx"
- Primarily look for "mpu" reg property, but fall back to index 0 if not found
- Remove interrupt property from mcasp DT node as it is not used
- Remove #address-cells and #size-cells mcasp properties as they are not needed

The patch set depends on following patches:

[PATCH v11 4/8] ARM: dts: add AM33XX EDMA support

     https://lkml.org/lkml/2013/6/18/49

[PATCH v11 5/8] ARM: dts: add AM33XX SPI DMA support

     https://lkml.org/lkml/2013/6/18/55

[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

     http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066381.html

[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

     http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066385.html

This set of patches fixes the basic audio support for am335x-evm and am335x-evmsk. It should be relatively simple to add the necessary nodes to relevant dts files to get BeagleBone + AudioCape working too.

I have tried my best not to break the existing support for older davinci boards, but since I do not have those boards I can not be sure.

Some commit comments refer to a dmaengine based davinci audio implementation which is planned for but nothing has been done yet.

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hebbar, Gururaja (1):
ASoC: davinci-evm: Add device tree binding

Jyri Sarha (5):
ASoC: davinci: Fix AM33xx SoC Audio support
ASoC: davinci-mcasp: Add location for data port registers to DT
ASoC: davinci-mcasp: Extract DMA channels directly from DT
ASoC: davinci-mcasp: Improve DT bindings document ARM/dts: am33xx: mcasp: Add location for data port registers to
reg-property

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

Peter Ujfalusi (2):
ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter ARM/dts: am335x-evmsk: Audio support

 .../bindings/sound/davinci-evm-audio.txt           |   58 +++++++++
 .../bindings/sound/davinci-mcasp-audio.txt         |   38 ++++--
 arch/arm/boot/dts/am335x-evm.dts                   |   54 +++++++++
 arch/arm/boot/dts/am335x-evmsk.dts                 |   51 ++++++++
 arch/arm/boot/dts/am33xx.dtsi                      |   29 +++++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/Kconfig                          |    4 +-
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++-
 sound/soc/davinci/davinci-mcasp.c                  |  128 ++++++++++++--------
 9 files changed, 417 insertions(+), 67 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Signature · 1 line
1.7.9.5
#81 lore raw

PATCH v4 1/10 ASoC: davinci: Fix AM33xx SoC Audio support

SND_DAVINCI_SOC is a platform driver for Davinci and AM33XX SoCs, not a machine driver. Make SND_AM33XX_SOC_EVM dependent of SND_DAVINCI_SOC instead of selecting it and add dependecy to SOC_AM33XX.

---
 sound/soc/davinci/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/davinci/Kconfig +2 -2
index 6c8e687..95970f5 100644
@@ -2,7 +2,7 @@ config SND_DAVINCI_SOC
 	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
 	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
-	  Machine driver for DAVINCI audio.
+	  Platform driver for daVinci or AM33xx
 	  Say Y or M if you want to add support for codecs attached to
 	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
@@ -18,7 +18,7 @@ config SND_DAVINCI_SOC_VCIF
 
 config SND_AM33XX_SOC_EVM
 	tristate "SoC Audio for the AM33XX chip based boards"
-	select SND_DAVINCI_SOC
+	depends on SND_DAVINCI_SOC && SOC_AM33XX
 	select SND_SOC_TLV320AIC3X
 	select SND_DAVINCI_SOC_MCASP
 	help
Signature · 1 line
1.7.9.5
#82 lore raw

PATCH v4 2/10 ASoC: davinci-evm: Add device tree binding

In reply to Jyri Sarha

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card, codec, dai interface details (like the card name, DAPM routing map, phandle for the audio components described in the dts file, codec mclk speed). The card will be set up based on this information. Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.

---
 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++++++
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++++-
 2 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +58 -0
new file mode 100644
index 0000000..e6b61ff
@@ -0,0 +1,58 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-routing : A list of the connections between audio components.
+  Each entry is a pair of strings, the first being the connection's sink,
+  the second being the connection's source. Valid names for sources and
+  sinks are the codec's pins, and the jacks on the board:
+
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+  Board connectors:
+
+  * Headphone Jack
+  * Line Out
+  * Mic Jack
+  * Line In
+
+
+Example:
+
+sound {
+	compatible = "ti,da830-evm-audio";
+	ti,model = "DA830 EVM";
+	ti,audio-codec = <&tlv320aic3x>;
+	ti,mcasp-controller = <&mcasp1>;
+	ti,codec-clock-rate = <12000000>;
+	ti,audio-routing =
+		"Headphone Jack",       "HPLOUT",
+		"Headphone Jack",       "HPROUT",
+		"Line Out",             "LLOUT",
+		"Line Out",             "RLOUT",
+		"MIC3L",                "Mic Bias 2V",
+		"MIC3R",                "Mic Bias 2V",
+		"Mic Bias 2V",          "Mic Jack",
+		"LINE1L",               "Line In",
+		"LINE2L",               "Line In",
+		"LINE1R",               "Line In",
+		"LINE2R",               "Line In";
+};
sound/soc/davinci/davinci-evm.c +118 -2

161 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#83 lore raw

PATCH v4 3/10 ASoC: davinci-mcasp: Add location for data port registers to DT

In reply to Jyri Sarha

This patch adds a separate register location for data port registers to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, but data port registers are also mapped trough L3 bus to a different memory location.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    8 ++-
 sound/soc/davinci/davinci-mcasp.c                  |   61 +++++++++++++-------
 2 files changed, 47 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +6 -2
index 374e145..c2ab869 100644
@@ -6,7 +6,11 @@ Required properties:
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
 	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
-- reg : Should contain McASP registers offset and length
+- reg : Should contain reg specifiers for the entries in the reg-names property.
+- reg-names : Should contain:
+         * "mpu" for the main registers (required). For compatibility with
+           existing software, it is recommended this is the first entry.
+         * "dat" for separate data port register access (optional).
 - interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
@@ -15,7 +19,6 @@ Required properties:
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-
 Optional properties:
 
 - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
+	reg-names "mpu";
 	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
sound/soc/davinci/davinci-mcasp.c +41 -20

121 lines not on this page · raw message

Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#85 lore raw

PATCH v4 4/10 ASoC: davinci-mcasp: Extract DMA channels directly from DT

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    5 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/davinci-mcasp.c                  |   45 ++++++++++++++------
 3 files changed, 38 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +5 -0
index c2ab869..c3ccde7 100644
@@ -18,6 +18,11 @@ Required properties:
 - serial-dir : A list of serializer pin mode. The list number should be equal
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- dmas: two element list of DMA controller phandles and DMA request line
+        ordered pairs.
+- dma-names: identifier string for each DMA request line in the dmas property.
+	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
+	     identifiers must be "rx" and "tx".
 
 Optional properties:
 
include/linux/platform_data/davinci_asp.h +2 -0
index 8db5ae0..689a856 100644
@@ -84,6 +84,8 @@ struct snd_platform_data {
 	u8 version;
 	u8 txnumevt;
 	u8 rxnumevt;
+	int tx_dma_channel;
+	int rx_dma_channel;
 };
 
 enum {
sound/soc/davinci/davinci-mcasp.c +31 -14

71 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#86 lore raw

PATCH v4 6/10 ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter

In reply to a message not in the archive

From: Peter Ujfalusi <[email protected]>

The serial-dir array gives this information so there is no need to have the num-serializer property in DT description.
Just ignore the property in the driver the DTS files can be updated separately without regression.
Update the documentation at the same time for davinci-mcasp

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 -
 sound/soc/davinci/davinci-mcasp.c                  |   22 +++++---------------
 2 files changed, 5 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
index ab2af66..b350cd9 100644
@@ -49,7 +49,6 @@ mcasp0: mcasp0@1d00000 {
 	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
-	num-serializer = <16>;
 	serial-dir = <
 			0 0 0 0	/* 0: INACTIVE, 1: TX, 2: RX */
 			0 0 0 0
sound/soc/davinci/davinci-mcasp.c +5 -17
index 2583802..03a1199 100644
@@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 	struct of_phandle_args dma_spec;
 
 	const u32 *of_serial_dir32;
-	u8 *of_serial_dir;
 	u32 val;
 	int i, ret = 0;
 
@@ -1081,32 +1080,21 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 		pdata->tdm_slots = val;
 	}
 
-	ret = of_property_read_u32(np, "num-serializer", &val);
-	if (ret >= 0)
-		pdata->num_serializer = val;
-
 	of_serial_dir32 = of_get_property(np, "serial-dir", &val);
 	val /= sizeof(u32);
-	if (val != pdata->num_serializer) {
-		dev_err(&pdev->dev,
-				"num-serializer(%d) != serial-dir size(%d)\n",
-				pdata->num_serializer, val);
-		ret = -EINVAL;
-		goto nodata;
-	}
-
 	if (of_serial_dir32) {
-		of_serial_dir = devm_kzalloc(&pdev->dev,
-						(sizeof(*of_serial_dir) * val),
-						GFP_KERNEL);
+		u8 *of_serial_dir = devm_kzalloc(&pdev->dev,
+						 (sizeof(*of_serial_dir) * val),
+						 GFP_KERNEL);
 		if (!of_serial_dir) {
 			ret = -ENOMEM;
 			goto nodata;
 		}
 
-		for (i = 0; i < pdata->num_serializer; i++)
+		for (i = 0; i < val; i++)
 			of_serial_dir[i] = be32_to_cpup(&of_serial_dir32[i]);
 
+		pdata->num_serializer = val;
 		pdata->serial_dir = of_serial_dir;
 	}
 
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#87 lore raw

PATCH v4 5/10 ASoC: davinci-mcasp: Improve DT bindings document

In reply to Jyri Sarha

Makes interrupts property optional as the interrupts are not currently used by the driver and adds interrupt-names property to name listed interrupts. Currently know interrupt names are "tx" and "rx".

- Improve tdm-slots propery description

- Improve op-mode property description

- Add pinctrl-names and pinctrl-0 properties

- Remove #address-cells and #size-cells as they are not needed.

- Bracket named interrupts property tuples for uniformity.

- Add missing "for" to serial-dir prop in DT bindings doc.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |   24 ++++++++++++--------
 1 file changed, 15 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +15 -9
index c3ccde7..ab2af66 100644
@@ -11,13 +11,14 @@ Required properties:
          * "mpu" for the main registers (required). For compatibility with
            existing software, it is recommended this is the first entry.
          * "dat" for separate data port register access (optional).
-- interrupts : Interrupt number for McASP
-- op-mode : I2S/DIT ops mode.
-- tdm-slots : Slots for TDM operation.
+- op-mode : I2S/DIT ops mode. 0 for I2S mode. 1 for DIT mode used for S/PDIF,
+  	    IEC60958-1, and AES-3 formats.
+- tdm-slots : Slots for TDM operation. Indicates number of channels transmitted
+  	      or received over one serializer.
 - num-serializer : Serializers used by McASP.
-- serial-dir : A list of serializer pin mode. The list number should be equal
-		to "num-serializer" parameter. Each entry is a number indication
-		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- serial-dir : A list of serializer configuration. Each entry is a number
+               indication for serializer pin direction.
+               (0 - INACTIVE, 1 - TX, 2 - RX)
 - dmas: two element list of DMA controller phandles and DMA request line
         ordered pairs.
 - dma-names: identifier string for each DMA request line in the dmas property.
@@ -31,16 +32,21 @@ Optional properties:
 - rx-num-evt : FIFO levels.
 - sram-size-playback : size of sram to be allocated during playback
 - sram-size-capture  : size of sram to be allocated during capture
+- interrupts : Interrupt numbers for McASP, currently not used by the driver
+- interrupt-names : Known interrupt names are "tx" and "rx"
+- pinctrl-0: Should specify pin control group used for this controller.
+- pinctrl-names: Should contain only one value - "default", for more details
+  		 please refer to pinctrl-bindings.txt
+  
 
 Example:
 
 mcasp0: mcasp0@1d00000 {
 	compatible = "ti,da830-mcasp-audio";
-	#address-cells = <1>;
-	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
-	interrupts = <82 83>;
+	interrupts = <82>, <83>;
+	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 1 line
1.7.9.5
#88 lore raw

PATCH v4 7/10 ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

In reply to Jyri Sarha

From: Pantelis Antoniou <[email protected]>

Add missing mcasp entries in the am33xx.dtsi include file.

---
 arch/arm/boot/dts/am33xx.dtsi |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +25 -0
index 9ce85e5..22659e7 100644
@@ -667,5 +667,30 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		mcasp0: mcasp@48038000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp0";
+			reg = <0x48038000 0x2000>;
+			interrupts = <80>, <81>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 8>,
+				<&edma 9>;
+			dma-names = "tx", "rx";
+		};
+
+		mcasp1: mcasp@4803C000 {
+			compatible = "ti,omap2-mcasp-audio";
+			ti,hwmods = "mcasp1";
+			reg = <0x4803C000 0x2000>;
+			interrupts = <82>, <83>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 10>,
+				<&edma 11>;
+			dma-names = "tx", "rx";
+		};
+
 	};
 };
Signature · 1 line
1.7.9.5
#89 lore raw

PATCH v4 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Jyri Sarha

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..c8ba19e 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5
#90 lore raw

Re: [PATCH v4 08/10] ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

Quoted 17 lines · Jyri Sarha

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +0 -0
index 22659e7..c8ba19e 100644

arch/arm/boot/dts/am33xx.dtsi line 675

Quoted 6 lines
arch/arm/boot/dts/am33xx.dtsi +2 -1
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46400000 0x400000>;

mcasp0 data port is at 0x46000000. 0x46400000 is for mcasp1.

Quoted 16 lines
arch/arm/boot/dts/am33xx.dtsi +4 -1
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#91 lore raw

PATCH 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

From: Jyri Sarha <[email protected]>

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..4a86762 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5
#92 lore raw

PATCH 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Peter Ujfalusi

From: Jyri Sarha <[email protected]>

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..4a86762 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): [email protected]

#94 lore raw

PATCH 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

From: Jyri Sarha <[email protected]>

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..4a86762 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#95 lore raw

PATCH 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Peter Ujfalusi

From: Jyri Sarha <[email protected]>

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..4a86762 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 6 lines
1.7.9.5

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#96 lore raw

PATCH 8/10 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Peter Ujfalusi

From: Jyri Sarha <[email protected]>

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 22659e7..4a86762 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,omap2-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5
#97 lore raw

PATCH v4 9/10 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

In reply to Jyri Sarha

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3106, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   54 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +54 -0
index e8ec875..1fbae4c 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -244,6 +254,18 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		elm: elm@48080000 {
@@ -340,6 +362,19 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVM";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -407,6 +442,25 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 16 serializer */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 1 line
1.7.9.5
#98 lore raw

Re: [PATCH v4 09/10] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hi Jyri,

Quoted 9 lines · Jyri Sarha
arch/arm/boot/dts/am335x-evm.dts +5 -0
@@ -407,6 +442,25 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";

arch/arm/boot/dts/am335x-evm.dts line 459

Quoted 10 lines
arch/arm/boot/dts/am335x-evm.dts +10 -0
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 16 serializer */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;

The McASP on AM335x have only 4 serializers.

Quoted 8 lines
arch/arm/boot/dts/am335x-evm.dts +4 -0
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#99 lore raw

PATCH v4 9/10 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3106, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   51 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +51 -0
index e8ec875..0057d89 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -244,6 +254,18 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		elm: elm@48080000 {
@@ -340,6 +362,19 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVM";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -407,6 +442,22 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 16 serializer */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 1 line
1.7.9.5
#100 lore raw

PATCH v4 9/10 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3106, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   51 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +51 -0
index e8ec875..814b3e9 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -244,6 +254,18 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		elm: elm@48080000 {
@@ -340,6 +362,19 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVM";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -407,6 +442,22 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 1 line
1.7.9.5
#101 lore raw

v5 cover Fix AM335x-evm analog audio support

In reply to Peter Ujfalusi

The v4 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067098.html
The v3 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066728.html
The v2 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066379.html
The RFC version of patches can been found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066178.html

Changes since v4
- Rebased on top of Lunux 3.12-rc5
- Fix mcasp0 dat address in reg propery.
- Comment: http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067116.html
- Changes:
- [PATCH v4 08/10] ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property
- Fix number of serializers for am335x based boards
- Comment: http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067113.html
- Changes:
- [PATCH v4 09/10] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- [PATCH v4 10/10] ARM/dts: am335x-evmsk: Audio support
- Change davinci-mcasp compatible property model to a more accurate one
- Add: [PATCH v5 05/12] arm: omap2plus_defconfig: enable AM33xx SOC EVM audio
- Changes:
- [PATCH v4 07/10] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- Enable AM33xx SOC EVM audio in omap2plus_defconfig
- Add: [PATCH v5 12/12] arm: omap2plus_defconfig: enable AM33xx SOC EVM audio
- The patch numbers 5-10 have been shifted to 6-11

Changes since v3
- Rebased on top of v3.12-rc4
- Drop already applied patches:
- [PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- [PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- [PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- Add: ASoC: davinci: Fix AM33xx SoC Audio support
- Contains the fixes from Peter:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066448.html
- Contents of this patch were squashed to "[PATCH v3 06/11] ASoC:
davinci: Add support for AM33xx SoC Audio", but since the patch v2 was already applied the changes are here as a separate patch.
- Add: ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter
- Change: ASoC: davinci-mcasp: Add DMA register locations to DT
to: ASoC: davinci-mcasp: Add location for data port registers to DT
- Use more accurate name for data port register location
- Improve commit message
- Change: ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names
to: ASoC: davinci-mcasp: Improve DT bindings document
- Remove #address-cells and #size-cells
- Bracket named interrupts tuples
- Add missing "for" to serial-dir description
- Improve tdm-slots description
- Improve op-mode description
- Add pinctrl-names and pinctrl-0 descriptions
- Change: ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- Use board specific name 'AM335x-EVM' for the soundcard.
- Use the board specific tlv320aic3106 codec. Use this name instead of generic tlv320aic3x.
- Remove num-serializer property from mcasp node
- Remove blank lines
- Change: ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- Bracket all named property tuples
- Add: ARM/dts: am335x-evmsk: Audio support
- The other patches in the set not mentioned here are identical to their earlier version

Changes since v2
[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- no change
[PATCH v2 02/11] ASoC: davinci-evm: Add device tree binding
- no change
[PATCH v2 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT
- no change
[PATCH v2 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT
- no change
[PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindin
- restore binding but make it optional and add interrupt-names property
[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- SND_DAVINCI_SOC help "Machine driver for ..." -> "Platform driver for ..."
- SND_AM33XX_SOC_EVM depends on SND_DAVINCI_SOC && SOC_AM33XX
- SND_AM33XX_SOC_EVM does not selcet SND_DAVINCI_SOC
[PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- no change
[PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- no change
[PATCH v2 09/11] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- restore interrupt property and add interrupt-names property
[PATCH v2 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property
- no change
[PATCH v2 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- no change

Changes from RFC to v2
- Dropped out "ASoC: davinci-mcasp: Add pinctrl support" since driver core is taking care of this now.
- Cleanup am33xx audio build
- Add regulators to tlv320aic3x DT binding document
- Remove dm365-voice-codec-audio DT support as it has never
been tested an probably does not work
- Add output pins and Line In connector to davinci-evm-audio DT binding doc
- Remove asp_chan_q and ram_chan_q properties from mcasp DT node in DT mode mcasp is hardcoded to event queue 0 (highest priority)
- Add pins to tlv320aic3x DT bindings document. If I misunderstood Marks comment and this patch is not needed, then just leave it out
Changes based on TI internal discussions
- Move system clock rate logic away from from evm_hw_params soc-op
- Remove unnecesary #if defined(CONFIG_OF) from davinci-evm.c
- Make dma property DT binding document more exact
- Add only "dma" reg location instead of separate "dma-tx" and "dma-rx"
- Primarily look for "mpu" reg property, but fall back to index 0 if not found
- Remove interrupt property from mcasp DT node as it is not used
- Remove #address-cells and #size-cells mcasp properties as they are not needed

The patch set depends on following patches:

[PATCH v11 4/8] ARM: dts: add AM33XX EDMA support

     https://lkml.org/lkml/2013/6/18/49

[PATCH v11 5/8] ARM: dts: add AM33XX SPI DMA support

     https://lkml.org/lkml/2013/6/18/55

[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

     http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066381.html

[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

     http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066385.html

This set of patches fixes the basic audio support for am335x-evm and am335x-evmsk. It should be relatively simple to add the necessary nodes to relevant dts files to get BeagleBone + AudioCape working too.

I have tried my best not to break the existing support for older davinci boards, but since I do not have those boards I can not be sure.

Some commit comments refer to a dmaengine based davinci audio implementation which is planned for but nothing has been done yet.

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hebbar, Gururaja (1):
ASoC: davinci-evm: Add device tree binding

Jyri Sarha (7):
ASoC: davinci: Fix AM33xx SoC Audio support
ASoC: davinci-mcasp: Add location for data port registers to DT
ASoC: davinci-mcasp: Extract DMA channels directly from DT
ASoC: davinci-mcasp: Change compatible property model to more
accurate
ASoC: davinci-mcasp: Improve DT bindings document ARM/dts: am33xx: mcasp: Add location for data port registers to
reg-property
arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

Peter Ujfalusi (2):
ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter ARM/dts: am335x-evmsk: Audio support

 .../bindings/sound/davinci-evm-audio.txt           |   58 +++++++++
 .../bindings/sound/davinci-mcasp-audio.txt         |   40 ++++--
 arch/arm/boot/dts/am335x-evm.dts                   |   51 ++++++++
 arch/arm/boot/dts/am335x-evmsk.dts                 |   48 ++++++++
 arch/arm/boot/dts/am33xx.dtsi                      |   29 +++++
 arch/arm/configs/omap2plus_defconfig               |    2 +
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/Kconfig                          |    4 +-
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++-
 sound/soc/davinci/davinci-mcasp.c                  |  130 ++++++++++++--------
 10 files changed, 415 insertions(+), 69 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Signature · 1 line
1.7.9.5
#102 lore raw

PATCH v5 1/12 ASoC: davinci: Fix AM33xx SoC Audio support

SND_DAVINCI_SOC is a platform driver for Davinci and AM33XX SoCs, not a machine driver. Make SND_AM33XX_SOC_EVM dependent of SND_DAVINCI_SOC instead of selecting it and add dependecy to SOC_AM33XX.

---
 sound/soc/davinci/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/davinci/Kconfig +2 -2
index 6c8e687..95970f5 100644
@@ -2,7 +2,7 @@ config SND_DAVINCI_SOC
 	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
 	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
-	  Machine driver for DAVINCI audio.
+	  Platform driver for daVinci or AM33xx
 	  Say Y or M if you want to add support for codecs attached to
 	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
@@ -18,7 +18,7 @@ config SND_DAVINCI_SOC_VCIF
 
 config SND_AM33XX_SOC_EVM
 	tristate "SoC Audio for the AM33XX chip based boards"
-	select SND_DAVINCI_SOC
+	depends on SND_DAVINCI_SOC && SOC_AM33XX
 	select SND_SOC_TLV320AIC3X
 	select SND_DAVINCI_SOC_MCASP
 	help
Signature · 1 line
1.7.9.5
maintainer
#103 lore raw

Re: [PATCH v5 01/12] ASoC: davinci: Fix AM33xx SoC Audio support

Quoted 3 lines · Jyri Sarha

SND_DAVINCI_SOC is a platform driver for Davinci and AM33XX SoCs, not a machine driver. Make SND_AM33XX_SOC_EVM dependent of SND_DAVINCI_SOC instead of selecting it and add dependecy to SOC_AM33XX.

This doesn't apply against topic/davinci or -next - can you please check?

#104 lore raw

Re: [PATCH v5 01/12] ASoC: davinci: Fix AM33xx SoC Audio support

Quoted 8 lines · Mark Brown
Quoted 3 lines · Jyri Sarha

SND_DAVINCI_SOC is a platform driver for Davinci and AM33XX SoCs, not a machine driver. Make SND_AM33XX_SOC_EVM dependent of SND_DAVINCI_SOC instead of selecting it and add dependecy to SOC_AM33XX.

This doesn't apply against topic/davinci or -next - can you please check?

It seems the "ASoC: davinci: Add support for AM33xx SoC Audio"-patch is missing from the tree. I dropped it from the set because I tought you merged it earlier.

I'll restore the "ASoC: davinci: Add support for AM33xx SoC Audio" -patch to next version of the set and squash this one in to it.

Best regards,
Jyri

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#106 lore raw

PATCH v5 2/12 ASoC: davinci-evm: Add device tree binding

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card, codec, dai interface details (like the card name, DAPM routing map, phandle for the audio components described in the dts file, codec mclk speed). The card will be set up based on this information. Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.

---
 .../bindings/sound/davinci-evm-audio.txt           |   58 ++++++++++
 sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++++-
 2 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +58 -0
new file mode 100644
index 0000000..e6b61ff
@@ -0,0 +1,58 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-routing : A list of the connections between audio components.
+  Each entry is a pair of strings, the first being the connection's sink,
+  the second being the connection's source. Valid names for sources and
+  sinks are the codec's pins, and the jacks on the board:
+
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R
+
+  Board connectors:
+
+  * Headphone Jack
+  * Line Out
+  * Mic Jack
+  * Line In
+
+
+Example:
+
+sound {
+	compatible = "ti,da830-evm-audio";
+	ti,model = "DA830 EVM";
+	ti,audio-codec = <&tlv320aic3x>;
+	ti,mcasp-controller = <&mcasp1>;
+	ti,codec-clock-rate = <12000000>;
+	ti,audio-routing =
+		"Headphone Jack",       "HPLOUT",
+		"Headphone Jack",       "HPROUT",
+		"Line Out",             "LLOUT",
+		"Line Out",             "RLOUT",
+		"MIC3L",                "Mic Bias 2V",
+		"MIC3R",                "Mic Bias 2V",
+		"Mic Bias 2V",          "Mic Jack",
+		"LINE1L",               "Line In",
+		"LINE2L",               "Line In",
+		"LINE1R",               "Line In",
+		"LINE2R",               "Line In";
+};
sound/soc/davinci/davinci-evm.c +118 -2

161 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#107 lore raw

Re: [PATCH v5 02/12] ASoC: davinci-evm: Add device tree binding

Quoted 5 lines · Jyri Sarha
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +5 -0
+  TLV320AIC3X pins:
+
+  * LLOUT
+  * RLOUT
+  * MONO_LOUT

Documentation/devicetree/bindings/sound/davinci-evm-audio.txt line 28

Quoted 10 lines
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +10 -0
+  * HPLOUT
+  * HPROUT
+  * HPLCOM
+  * HPRCOM
+  * MIC3L
+  * MIC3R
+  * LINE1L
+  * LINE2L
+  * LINE1R
+  * LINE2R

These should be documented in the CODEC binding and not in the card driver, that way this doesn't need to be replicated in every machine and any future software compatible devices can just work with the existing binding.

sound/soc/davinci/davinci-evm.c static struct snd_soc_card da850_snd_soc_card = { · line 391

Quoted 1 line
sound/soc/davinci/davinci-evm.c +1 -0
+	ret = snd_soc_register_card(&evm_soc_card);

This should be using devm_snd_soc_register_card().

sound/soc/davinci/davinci-evm.c static int __init evm_init(void) · line 433

Quoted 7 lines
sound/soc/davinci/davinci-evm.c +7 -0
+	/*
+	 * If dtb is there, the devices will be created dynamically.
+	 * Only register platfrom driver structure.
+	 */
+	if (of_have_populated_dt())
+		return platform_driver_register(&davinci_evm_driver);
+

Why not register the driver unconditionally?

#108 lore raw

Re: [PATCH v5 02/12] ASoC: davinci-evm: Add device tree binding

Quoted 3 lines · Mark Brown
Quoted 1 line · Jyri Sarha

+ TLV320AIC3X pins:

...

Quoted 6 lines

These should be documented in the CODEC binding and not in the card driver, that way this doesn't need to be replicated in every machine and any future software compatible devices can just work with the existing binding.

Ok, I'll remove the codec pins.

Quoted 4 lines

sound/soc/davinci/davinci-evm.c static struct snd_soc_card da850_snd_soc_card = { · line 391

Quoted 1 line
sound/soc/davinci/davinci-evm.c +1 -0
+	ret = snd_soc_register_card(&evm_soc_card);

This should be using devm_snd_soc_register_card().

Ok, I'll move on top of your for-next branch and change it.

Quoted 10 lines

sound/soc/davinci/davinci-evm.c static int __init evm_init(void) · line 433

Quoted 7 lines
sound/soc/davinci/davinci-evm.c +7 -0
+	/*
+	 * If dtb is there, the devices will be created dynamically.
+	 * Only register platfrom driver structure.
+	 */
+	if (of_have_populated_dt())
+		return platform_driver_register(&davinci_evm_driver);
+

Why not register the driver unconditionally?

I am just trying touch the legacy davinci audio support as little as possible. Would registering the driver in non DT mode do some good?

Best regards,
Jyri

maintainer
#109 lore raw

Re: [PATCH v5 02/12] ASoC: davinci-evm: Add device tree binding

Quoted 11 lines · Jyri Sarha
Quoted 8 lines · Mark Brown

sound/soc/davinci/davinci-evm.c static int __init evm_init(void) · line 432

Quoted 6 lines
sound/soc/davinci/davinci-evm.c +6 -0
+	/*
+	 * If dtb is there, the devices will be created dynamically.
+	 * Only register platfrom driver structure.
+	 */
+	if (of_have_populated_dt())
+		return platform_driver_register(&davinci_evm_driver);

Why not register the driver unconditionally?

Quoted 2 lines

I am just trying touch the legacy davinci audio support as little as possible. Would registering the driver in non DT mode do some good?

It would look a good deal less odd which is useful in itself; the best thing would be if they could both use the same driver which uses both platform and DT data.

#110 lore raw

Re: [PATCH v5 02/12] ASoC: davinci-evm: Add device tree binding

Quoted 3 lines · Mark Brown

It would look a good deal less odd which is useful in itself; the best thing would be if they could both use the same driver which uses both platform and DT data.

I see. To be honest the whole non DT part looks pretty hairy to me too, but I can not clean it up because I do not have access to the relevant HW.

Would it look better to you if I would use module_platform_driver() macro inside #ifdef CONFIG_OF and put the module_init() and module_exit() into #else branch?

Best regards,
Jyri

author
#111 lore raw

PATCH v5 4/12 ASoC: davinci-mcasp: Extract DMA channels directly from DT

In reply to a message not in the archive

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    5 +++
 include/linux/platform_data/davinci_asp.h          |    2 +
 sound/soc/davinci/davinci-mcasp.c                  |   45 ++++++++++++++------
 3 files changed, 38 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +5 -0
index c2ab869..c3ccde7 100644
@@ -18,6 +18,11 @@ Required properties:
 - serial-dir : A list of serializer pin mode. The list number should be equal
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- dmas: two element list of DMA controller phandles and DMA request line
+        ordered pairs.
+- dma-names: identifier string for each DMA request line in the dmas property.
+	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
+	     identifiers must be "rx" and "tx".
 
 Optional properties:
 
include/linux/platform_data/davinci_asp.h +2 -0
index 8db5ae0..689a856 100644
@@ -84,6 +84,8 @@ struct snd_platform_data {
 	u8 version;
 	u8 txnumevt;
 	u8 rxnumevt;
+	int tx_dma_channel;
+	int rx_dma_channel;
 };
 
 enum {
sound/soc/davinci/davinci-mcasp.c +31 -14

71 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#112 lore raw

Re: [PATCH v5 04/12] ASoC: davinci-mcasp: Extract DMA channels directly from DT

Quoted 3 lines · Jyri Sarha

Extract DMA channels directly from DT as they can not be found from platform resources anymore. This is a work-around until davinci audio driver is updated to use dmaengine.

Applied, thanks.

#113 lore raw

PATCH v5 3/12 ASoC: davinci-mcasp: Add location for data port registers to DT

In reply to Jyri Sarha

This patch adds a separate register location for data port registers to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, but data port registers are also mapped trough L3 bus to a different memory location.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    8 ++-
 sound/soc/davinci/davinci-mcasp.c                  |   61 +++++++++++++-------
 2 files changed, 47 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +6 -2
index 374e145..c2ab869 100644
@@ -6,7 +6,11 @@ Required properties:
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
 	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
-- reg : Should contain McASP registers offset and length
+- reg : Should contain reg specifiers for the entries in the reg-names property.
+- reg-names : Should contain:
+         * "mpu" for the main registers (required). For compatibility with
+           existing software, it is recommended this is the first entry.
+         * "dat" for separate data port register access (optional).
 - interrupts : Interrupt number for McASP
 - op-mode : I2S/DIT ops mode.
 - tdm-slots : Slots for TDM operation.
@@ -15,7 +19,6 @@ Required properties:
 		to "num-serializer" parameter. Each entry is a number indication
 		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
 
-
 Optional properties:
 
 - ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
+	reg-names "mpu";
 	interrupts = <82 83>;
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
sound/soc/davinci/davinci-mcasp.c +41 -20

121 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer Applied
#114 lore raw

Re: [PATCH v5 03/12] ASoC: davinci-mcasp: Add location for data port registers to DT

Quoted 4 lines · Jyri Sarha

This patch adds a separate register location for data port registers to mcasp DT bindings. On am33xx SoCs the McASP registers are mapped trough L4 interconnect, but data port registers are also mapped trough L3 bus to a different memory location.

Applied, thanks.

#115 lore raw

PATCH v5 5/12 ASoC: davinci-mcasp: Change compatible property model to more accurate

In reply to Jyri Sarha

Change the model omap2-mcasp-audio in compatible property to am33xx-mcasp-audio as omap2 does not have mcasp.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    2 +-
 sound/soc/davinci/davinci-mcasp.c                  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +1 -1
index c3ccde7..1945aec 100644
@@ -4,7 +4,7 @@ Required properties:
 - compatible :
 	"ti,dm646x-mcasp-audio"	: for DM646x platforms
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
-	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
+	"ti,am33xx-mcasp-audio"	: for AM33xx platforms (AM33xx, TI81xx)
 
 - reg : Should contain reg specifiers for the entries in the reg-names property.
 - reg-names : Should contain:
sound/soc/davinci/davinci-mcasp.c +1 -1
index 2583802..08cceaf 100644
@@ -1033,7 +1033,7 @@ static const struct of_device_id mcasp_dt_ids[] = {
 		.data = &da830_mcasp_pdata,
 	},
 	{
-		.compatible = "ti,omap2-mcasp-audio",
+		.compatible = "ti,am33xx-mcasp-audio",
 		.data = &omap2_mcasp_pdata,
 	},
 	{ /* sentinel */ }
Signature · 1 line
1.7.9.5
maintainer Applied
#116 lore raw

Re: [PATCH v5 05/12] ASoC: davinci-mcasp: Change compatible property model to more accurate

Quoted 2 lines · Jyri Sarha

Change the model omap2-mcasp-audio in compatible property to am33xx-mcasp-audio as omap2 does not have mcasp.

Applied, thanks.

#117 lore raw

PATCH v5 6/12 ASoC: davinci-mcasp: Improve DT bindings document

In reply to Jyri Sarha

Makes interrupts property optional as the interrupts are not currently used by the driver and adds interrupt-names property to name listed interrupts. Currently know interrupt names are "tx" and "rx".

- Improve tdm-slots propery description

- Improve op-mode property description

- Add pinctrl-names and pinctrl-0 properties

- Remove #address-cells and #size-cells as they are not needed.

- Bracket named interrupts property tuples for uniformity.

- Add missing "for" to serial-dir prop in DT bindings doc.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |   24 ++++++++++++--------
 1 file changed, 15 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +15 -9
index 1945aec..b925bf9 100644
@@ -11,13 +11,14 @@ Required properties:
          * "mpu" for the main registers (required). For compatibility with
            existing software, it is recommended this is the first entry.
          * "dat" for separate data port register access (optional).
-- interrupts : Interrupt number for McASP
-- op-mode : I2S/DIT ops mode.
-- tdm-slots : Slots for TDM operation.
+- op-mode : I2S/DIT ops mode. 0 for I2S mode. 1 for DIT mode used for S/PDIF,
+  	    IEC60958-1, and AES-3 formats.
+- tdm-slots : Slots for TDM operation. Indicates number of channels transmitted
+  	      or received over one serializer.
 - num-serializer : Serializers used by McASP.
-- serial-dir : A list of serializer pin mode. The list number should be equal
-		to "num-serializer" parameter. Each entry is a number indication
-		serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
+- serial-dir : A list of serializer configuration. Each entry is a number
+               indication for serializer pin direction.
+               (0 - INACTIVE, 1 - TX, 2 - RX)
 - dmas: two element list of DMA controller phandles and DMA request line
         ordered pairs.
 - dma-names: identifier string for each DMA request line in the dmas property.
@@ -31,16 +32,21 @@ Optional properties:
 - rx-num-evt : FIFO levels.
 - sram-size-playback : size of sram to be allocated during playback
 - sram-size-capture  : size of sram to be allocated during capture
+- interrupts : Interrupt numbers for McASP, currently not used by the driver
+- interrupt-names : Known interrupt names are "tx" and "rx"
+- pinctrl-0: Should specify pin control group used for this controller.
+- pinctrl-names: Should contain only one value - "default", for more details
+  		 please refer to pinctrl-bindings.txt
+  
 
 Example:
 
 mcasp0: mcasp0@1d00000 {
 	compatible = "ti,da830-mcasp-audio";
-	#address-cells = <1>;
-	#size-cells = <0>;
 	reg = <0x100000 0x3000>;
 	reg-names "mpu";
-	interrupts = <82 83>;
+	interrupts = <82>, <83>;
+	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
 	num-serializer = <16>;
Signature · 1 line
1.7.9.5
maintainer Applied
#118 lore raw

Re: [PATCH v5 06/12] ASoC: davinci-mcasp: Improve DT bindings document

Quoted 3 lines · Jyri Sarha

Makes interrupts property optional as the interrupts are not currently used by the driver and adds interrupt-names property to name listed interrupts. Currently know interrupt names are "tx" and "rx".

Applied, thanks.

#119 lore raw

PATCH v5 7/12 ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter

In reply to Jyri Sarha

From: Peter Ujfalusi <[email protected]>

The serial-dir array gives this information so there is no need to have the num-serializer property in DT description.
Just ignore the property in the driver the DTS files can be updated separately without regression.
Update the documentation at the same time for davinci-mcasp

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 -
 sound/soc/davinci/davinci-mcasp.c                  |   22 +++++---------------
 2 files changed, 5 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
index b925bf9..0aa416b 100644
@@ -49,7 +49,6 @@ mcasp0: mcasp0@1d00000 {
 	interrupts-names = "tx", "rx";
 	op-mode = <0>;		/* MCASP_IIS_MODE */
 	tdm-slots = <2>;
-	num-serializer = <16>;
 	serial-dir = <
 			0 0 0 0	/* 0: INACTIVE, 1: TX, 2: RX */
 			0 0 0 0
sound/soc/davinci/davinci-mcasp.c +5 -17
index 08cceaf..8869cac 100644
@@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 	struct of_phandle_args dma_spec;
 
 	const u32 *of_serial_dir32;
-	u8 *of_serial_dir;
 	u32 val;
 	int i, ret = 0;
 
@@ -1081,32 +1080,21 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
 		pdata->tdm_slots = val;
 	}
 
-	ret = of_property_read_u32(np, "num-serializer", &val);
-	if (ret >= 0)
-		pdata->num_serializer = val;
-
 	of_serial_dir32 = of_get_property(np, "serial-dir", &val);
 	val /= sizeof(u32);
-	if (val != pdata->num_serializer) {
-		dev_err(&pdev->dev,
-				"num-serializer(%d) != serial-dir size(%d)\n",
-				pdata->num_serializer, val);
-		ret = -EINVAL;
-		goto nodata;
-	}
-
 	if (of_serial_dir32) {
-		of_serial_dir = devm_kzalloc(&pdev->dev,
-						(sizeof(*of_serial_dir) * val),
-						GFP_KERNEL);
+		u8 *of_serial_dir = devm_kzalloc(&pdev->dev,
+						 (sizeof(*of_serial_dir) * val),
+						 GFP_KERNEL);
 		if (!of_serial_dir) {
 			ret = -ENOMEM;
 			goto nodata;
 		}
 
-		for (i = 0; i < pdata->num_serializer; i++)
+		for (i = 0; i < val; i++)
 			of_serial_dir[i] = be32_to_cpup(&of_serial_dir32[i]);
 
+		pdata->num_serializer = val;
 		pdata->serial_dir = of_serial_dir;
 	}
 
Signature · 1 line
1.7.9.5
maintainer Applied
#120 lore raw

Re: [PATCH v5 07/12] ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter

Quoted 7 lines · Jyri Sarha

From: Peter Ujfalusi <[email protected]>

The serial-dir array gives this information so there is no need to have the num-serializer property in DT description.
Just ignore the property in the driver the DTS files can be updated separately without regression.
Update the documentation at the same time for davinci-mcasp

Applied, thanks.

#121 lore raw

PATCH v5 8/12 ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

In reply to Jyri Sarha

From: Pantelis Antoniou <[email protected]>

Add missing mcasp entries in the am33xx.dtsi include file.

---
 arch/arm/boot/dts/am33xx.dtsi |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +25 -0
index 9ce85e5..72c416d 100644
@@ -667,5 +667,30 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		mcasp0: mcasp@48038000 {
+			compatible = "ti,am33xx-mcasp-audio";
+			ti,hwmods = "mcasp0";
+			reg = <0x48038000 0x2000>;
+			interrupts = <80>, <81>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 8>,
+				<&edma 9>;
+			dma-names = "tx", "rx";
+		};
+
+		mcasp1: mcasp@4803C000 {
+			compatible = "ti,am33xx-mcasp-audio";
+			ti,hwmods = "mcasp1";
+			reg = <0x4803C000 0x2000>;
+			interrupts = <82>, <83>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 10>,
+				<&edma 11>;
+			dma-names = "tx", "rx";
+		};
+
 	};
 };
Signature · 1 line
1.7.9.5
#122 lore raw

PATCH v5 9/12 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Jyri Sarha

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 72c416d..b1d2d3f 100644
@@ -671,7 +671,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,am33xx-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -683,7 +685,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,am33xx-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5
#123 lore raw

PATCH v5 10/12 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

In reply to Jyri Sarha

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3106, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   51 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +51 -0
index e8ec875..814b3e9 100644
@@ -149,6 +149,16 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		am335x_evm_audio_pins: am335x_evm_audio_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
+
 	};
 
 	ocp {
@@ -244,6 +254,18 @@
 				compatible = "ti,tmp275";
 				reg = <0x48>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		elm: elm@48080000 {
@@ -340,6 +362,19 @@
 				};
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVM";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <12000000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT",
+				"LINE1L",               "Line In",
+				"LINE1R",               "Line In";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -407,6 +442,22 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 1 line
1.7.9.5
#124 lore raw

PATCH v5 11/12 ARM/dts: am335x-evmsk: Audio support

In reply to Jyri Sarha

From: Peter Ujfalusi <[email protected]>

AM335x EVM-SK have only support for audio playback (stereo jack on the board) via tlv320aic3106 codec connected to McASP1.
Enable the support for audio playback on the board:
- McASP1 configuration
- tlv320aic3106 configuration
- Machine driver.

---
 arch/arm/boot/dts/am335x-evmsk.dts |   48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +48 -0
index 4f339fa..9e570fb 100644
@@ -158,6 +158,15 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		mcasp1_pins: mcasp1_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
 	};
 
 	ocp {
@@ -206,6 +215,18 @@
 				st,max-limit-y = <550>;
 				st,max-limit-z = <750>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		musb: usb@47400000 {
@@ -233,6 +254,17 @@
 				pinctrl-0 = <&ecap2_pins>;
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVMSK";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <24576000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -419,3 +451,19 @@
 	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rgmii-txid";
 };
+
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcasp1_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
Signature · 1 line
1.7.9.5
#125 lore raw

PATCH v5 12/12 arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

In reply to Jyri Sarha

Modifying the omap2plus_defconfig to enable the audio support for AM335x EVM and other AM33xx based devices with TLV320AIC3X connected to McASP.

---
 arch/arm/configs/omap2plus_defconfig |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
index 254cf05..4443b92 100644
@@ -210,6 +210,8 @@ CONFIG_SND_DEBUG=y
 CONFIG_SND_USB_AUDIO=m
 CONFIG_SND_SOC=m
 CONFIG_SND_OMAP_SOC=m
+CONFIG_SND_AM33XX_SOC_EVM=m
+CONFIG_SND_DAVINCI_SOC=m
 CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
 CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
 CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
Signature · 1 line
1.7.9.5
#126 lore raw
In reply to Jyri Sarha

+ Tony

Hi Jyri,

The DTS part looks fine to me, but does not apply at all on my branch,

Could you rebase it and repost it without the driver part to avoid any issue during the driver merge?

Thanks,
Benoit

Quoted 179 lines · Jyri Sarha

The v4 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067098.html
The v3 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066728.html
The v2 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066379.html
The RFC version of patches can been found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066178.html

Changes since v4
- Rebased on top of Lunux 3.12-rc5
- Fix mcasp0 dat address in reg propery.
- Comment: http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067116.html
- Changes:
- [PATCH v4 08/10] ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property
- Fix number of serializers for am335x based boards
- Comment: http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067113.html
- Changes:
- [PATCH v4 09/10] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- [PATCH v4 10/10] ARM/dts: am335x-evmsk: Audio support
- Change davinci-mcasp compatible property model to a more accurate one
- Add: [PATCH v5 05/12] arm: omap2plus_defconfig: enable AM33xx SOC EVM audio
- Changes:
- [PATCH v4 07/10] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- Enable AM33xx SOC EVM audio in omap2plus_defconfig
- Add: [PATCH v5 12/12] arm: omap2plus_defconfig: enable AM33xx SOC EVM audio
- The patch numbers 5-10 have been shifted to 6-11

Changes since v3
- Rebased on top of v3.12-rc4
- Drop already applied patches:
- [PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- [PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- [PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- [PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- Add: ASoC: davinci: Fix AM33xx SoC Audio support
- Contains the fixes from Peter:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066448.html
- Contents of this patch were squashed to "[PATCH v3 06/11] ASoC:
davinci: Add support for AM33xx SoC Audio", but since the patch v2 was already applied the changes are here as a separate patch.
- Add: ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter
- Change: ASoC: davinci-mcasp: Add DMA register locations to DT
to: ASoC: davinci-mcasp: Add location for data port registers to DT
- Use more accurate name for data port register location
- Improve commit message
- Change: ASoC: davinci-mcasp: Interrupts property to optional and add interrupt-names
to: ASoC: davinci-mcasp: Improve DT bindings document
- Remove #address-cells and #size-cells
- Bracket named interrupts tuples
- Add missing "for" to serial-dir description
- Improve tdm-slots description
- Improve op-mode description
- Add pinctrl-names and pinctrl-0 descriptions
- Change: ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- Use board specific name 'AM335x-EVM' for the soundcard.
- Use the board specific tlv320aic3106 codec. Use this name instead of generic tlv320aic3x.
- Remove num-serializer property from mcasp node
- Remove blank lines
- Change: ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- Bracket all named property tuples
- Add: ARM/dts: am335x-evmsk: Audio support
- The other patches in the set not mentioned here are identical to their earlier version

Changes since v2
[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
- no change
[PATCH v2 02/11] ASoC: davinci-evm: Add device tree binding
- no change
[PATCH v2 03/11] ASoC: davinci-mcasp: Add DMA register locations to DT
- no change
[PATCH v2 04/11] ASoC: davinci-mcasp: Extract DMA channels directly from DT
- no change
[PATCH v2 05/11] ASoC: davinci-mcasp: Remove interrupt property from DT bindin
- restore binding but make it optional and add interrupt-names property
[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio
- SND_DAVINCI_SOC help "Machine driver for ..." -> "Platform driver for ..."
- SND_AM33XX_SOC_EVM depends on SND_DAVINCI_SOC && SOC_AM33XX
- SND_AM33XX_SOC_EVM does not selcet SND_DAVINCI_SOC
[PATCH v2 07/11] ASoC: tlv320aic3x: Add regulators to DT bindings document
- no change
[PATCH v2 08/11] ASoC: tlv320aic3x: Add codec pins to DT bindings document
- no change
[PATCH v2 09/11] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries
- restore interrupt property and add interrupt-names property
[PATCH v2 10/11] ARM/dts: am33xx: mcasp: Add new dma register location to reg-property
- no change
[PATCH v2 11/11] ARM/dts: am335x-evm: Add audio support for am335x-evm.dts
- no change

Changes from RFC to v2
- Dropped out "ASoC: davinci-mcasp: Add pinctrl support" since driver core is taking care of this now.
- Cleanup am33xx audio build
- Add regulators to tlv320aic3x DT binding document
- Remove dm365-voice-codec-audio DT support as it has never
been tested an probably does not work
- Add output pins and Line In connector to davinci-evm-audio DT binding doc
- Remove asp_chan_q and ram_chan_q properties from mcasp DT node in DT mode mcasp is hardcoded to event queue 0 (highest priority)
- Add pins to tlv320aic3x DT bindings document. If I misunderstood Marks comment and this patch is not needed, then just leave it out
Changes based on TI internal discussions
- Move system clock rate logic away from from evm_hw_params soc-op
- Remove unnecesary #if defined(CONFIG_OF) from davinci-evm.c
- Make dma property DT binding document more exact
- Add only "dma" reg location instead of separate "dma-tx" and "dma-rx"
- Primarily look for "mpu" reg property, but fall back to index 0 if not found
- Remove interrupt property from mcasp DT node as it is not used
- Remove #address-cells and #size-cells mcasp properties as they are not needed

The patch set depends on following patches:

[PATCH v11 4/8] ARM: dts: add AM33XX EDMA support

      https://lkml.org/lkml/2013/6/18/49

[PATCH v11 5/8] ARM: dts: add AM33XX SPI DMA support

      https://lkml.org/lkml/2013/6/18/55

[PATCH v2 01/11] ASoC: davinci-evm: Move sysclk logic away from evm_hw_params

      http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066381.html

[PATCH v2 06/11] ASoC: davinci: Add support for AM33xx SoC Audio

      http://mailman.alsa-project.org/pipermail/alsa-devel/2013-September/066385.html

This set of patches fixes the basic audio support for am335x-evm and am335x-evmsk. It should be relatively simple to add the necessary nodes to relevant dts files to get BeagleBone + AudioCape working too.

I have tried my best not to break the existing support for older davinci boards, but since I do not have those boards I can not be sure.

Some commit comments refer to a dmaengine based davinci audio implementation which is planned for but nothing has been done yet.

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Hebbar, Gururaja (1):
ASoC: davinci-evm: Add device tree binding

Jyri Sarha (7):
ASoC: davinci: Fix AM33xx SoC Audio support
ASoC: davinci-mcasp: Add location for data port registers to DT
ASoC: davinci-mcasp: Extract DMA channels directly from DT
ASoC: davinci-mcasp: Change compatible property model to more
accurate
ASoC: davinci-mcasp: Improve DT bindings document ARM/dts: am33xx: mcasp: Add location for data port registers to
reg-property
arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

Peter Ujfalusi (2):
ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter ARM/dts: am335x-evmsk: Audio support

  .../bindings/sound/davinci-evm-audio.txt           |   58 +++++++++
  .../bindings/sound/davinci-mcasp-audio.txt         |   40 ++++--
  arch/arm/boot/dts/am335x-evm.dts                   |   51 ++++++++
  arch/arm/boot/dts/am335x-evmsk.dts                 |   48 ++++++++
  arch/arm/boot/dts/am33xx.dtsi                      |   29 +++++
  arch/arm/configs/omap2plus_defconfig               |    2 +
  include/linux/platform_data/davinci_asp.h          |    2 +
  sound/soc/davinci/Kconfig                          |    4 +-
  sound/soc/davinci/davinci-evm.c                    |  120 +++++++++++++++++-
  sound/soc/davinci/davinci-mcasp.c                  |  130 ++++++++++++--------
  10 files changed, 415 insertions(+), 69 deletions(-)

create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt

Signature · 8 lines
Benoît Cousson
BayLibre
Embedded Linux Technology Lab
www.baylibre.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#127 lore raw

v5 cover Fix AM335x-evm analog audio support

Hi Benoit,
I rebased the DTS patches on top of
git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
for_3.13/dts -branch
and tested the result. Hope that was the right branch.

The DTS patches can also be pulled from:
git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
for_bcousson/for_3.13/dts -branch

The non DTS patches rebased on top of v3.12-rc5 can be pulled from here:
git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
v3.12-rc5-am33xx-audio-patch-v5-no-dts -branch

The the full patch series can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067443.html

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Jyri Sarha (1):
ARM/dts: am33xx: mcasp: Add location for data port registers to
reg-property

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

Peter Ujfalusi (1):
ARM/dts: am335x-evmsk: Audio support

 arch/arm/boot/dts/am335x-evm.dts   |   50 ++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/am335x-evmsk.dts |   48 ++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/am33xx.dtsi      |   28 ++++++++++++++++++++
 3 files changed, 126 insertions(+)
Signature · 1 line
1.7.9.5
#128 lore raw

PATCH v5 1/4 ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

From: Pantelis Antoniou <[email protected]>

Add missing mcasp entries in the am33xx.dtsi include file.

---
 arch/arm/boot/dts/am33xx.dtsi |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +24 -0
index 58cf5b9..861382f 100644
@@ -742,5 +742,29 @@
 			       <&edma 5>;
 			dma-names = "tx", "rx";
 		};
+
+		mcasp0: mcasp@48038000 {
+			compatible = "ti,am33xx-mcasp-audio";
+			ti,hwmods = "mcasp0";
+			reg = <0x48038000 0x2000>;
+			interrupts = <80>, <81>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 8>,
+				<&edma 9>;
+			dma-names = "tx", "rx";
+		};
+
+		mcasp1: mcasp@4803C000 {
+			compatible = "ti,am33xx-mcasp-audio";
+			ti,hwmods = "mcasp1";
+			reg = <0x4803C000 0x2000>;
+			interrupts = <82>, <83>;
+			interrupts-names = "tx", "rx";
+			status = "disabled";
+			dmas = <&edma 10>,
+				<&edma 11>;
+			dma-names = "tx", "rx";
+		};
 	};
 };
Signature · 1 line
1.7.9.5
#129 lore raw

PATCH v5 2/4 ARM/dts: am33xx: mcasp: Add location for data port registers to reg-property

In reply to Jyri Sarha

This patch adds a second tuple to reg property. The new property tuple describes the memory location for data port registers mapped trough L3 bus on am33xx. The both property tuples are named accordingly in the reg-names property.

---
 arch/arm/boot/dts/am33xx.dtsi |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +6 -2
index 861382f..3465d4b 100644
@@ -746,7 +746,9 @@
 		mcasp0: mcasp@48038000 {
 			compatible = "ti,am33xx-mcasp-audio";
 			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>;
+			reg = <0x48038000 0x2000>,
+			      <0x46000000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <80>, <81>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
@@ -758,7 +760,9 @@
 		mcasp1: mcasp@4803C000 {
 			compatible = "ti,am33xx-mcasp-audio";
 			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>;
+			reg = <0x4803C000 0x2000>,
+			      <0x46400000 0x400000>;
+			reg-names = "mpu", "dat";
 			interrupts = <82>, <83>;
 			interrupts-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
1.7.9.5
#130 lore raw

PATCH v5 3/4 ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

In reply to Jyri Sarha

From: Darren Etheridge <[email protected]>

Adds sound, tlv320aic3106, mcasp1, and am335x_evm_audio_pin nodes.

---
 arch/arm/boot/dts/am335x-evm.dts |   50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +50 -0
index eabacf9..9874294 100644
@@ -119,6 +119,19 @@
 			};
 		};
 	};
+
+	sound {
+		compatible = "ti,da830-evm-audio";
+		ti,model = "AM335x-EVM";
+		ti,audio-codec = <&tlv320aic3106>;
+		ti,mcasp-controller = <&mcasp1>;
+		ti,codec-clock-rate = <12000000>;
+		ti,audio-routing =
+			"Headphone Jack",       "HPLOUT",
+			"Headphone Jack",       "HPROUT",
+			"LINE1L",               "Line In",
+			"LINE1R",               "Line In";
+	};
 };
 
 &am33xx_pinmux {
@@ -279,6 +292,15 @@
 			0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
 		>;
 	};
+
+	am335x_evm_audio_pins: am335x_evm_audio_pins {
+		pinctrl-single,pins = <
+			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
+			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
+			0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+		>;
+	};
 };
 
 &uart0 {
@@ -373,6 +395,18 @@
 		compatible = "ti,tmp275";
 		reg = <0x48>;
 	};
+
+	tlv320aic3106: tlv320aic3106@1b {
+		compatible = "ti,tlv320aic3106";
+		reg = <0x1b>;
+		status = "okay";
+
+		/* Regulators */
+		AVDD-supply = <&vaux2_reg>;
+		IOVDD-supply = <&vaux2_reg>;
+		DRVDD-supply = <&vaux2_reg>;
+		DVDD-supply = <&vbat>;
+	};
 };
 
 &lcdc {
@@ -476,6 +510,22 @@
 
 #include "tps65910.dtsi"
 
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&am335x_evm_audio_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
+
 &tps {
 	vcc1-supply = <&vbat>;
 	vcc2-supply = <&vbat>;
Signature · 1 line
1.7.9.5
#131 lore raw

PATCH v5 4/4 ARM/dts: am335x-evmsk: Audio support

In reply to Jyri Sarha

From: Peter Ujfalusi <[email protected]>

AM335x EVM-SK have only support for audio playback (stereo jack on the board) via tlv320aic3106 codec connected to McASP1.
Enable the support for audio playback on the board:
- McASP1 configuration
- tlv320aic3106 configuration
- Machine driver.

---
 arch/arm/boot/dts/am335x-evmsk.dts |   48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +48 -0
index 1a7e0d9..03febf8 100644
@@ -115,6 +115,17 @@
 		brightness-levels = <0 58 61 66 75 90 125 170 255>;
 		default-brightness-level = <8>;
 	};
+
+	sound {
+		compatible = "ti,da830-evm-audio";
+		ti,model = "AM335x-EVMSK";
+		ti,audio-codec = <&tlv320aic3106>;
+		ti,mcasp-controller = <&mcasp1>;
+		ti,codec-clock-rate = <24576000>;
+		ti,audio-routing =
+			"Headphone Jack",       "HPLOUT",
+			"Headphone Jack",       "HPROUT";
+	};
 };
 
 &am33xx_pinmux {
@@ -244,6 +255,15 @@
 			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 		>;
 	};
+
+	mcasp1_pins: mcasp1_pins {
+		pinctrl-single,pins = <
+			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+			0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+		>;
+	};
 };
 
 &uart0 {
@@ -291,6 +311,18 @@
 		st,max-limit-y = <550>;
 		st,max-limit-z = <750>;
 	};
+
+	tlv320aic3106: tlv320aic3106@1b {
+		compatible = "ti,tlv320aic3106";
+		reg = <0x1b>;
+		status = "okay";
+
+		/* Regulators */
+		AVDD-supply = <&vaux2_reg>;
+		IOVDD-supply = <&vaux2_reg>;
+		DRVDD-supply = <&vaux2_reg>;
+		DVDD-supply = <&vbat>;
+	};
 };
 
 &usb {
@@ -437,3 +469,19 @@
 &gpio0 {
 	ti,no-reset-on-init;
 };
+
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcasp1_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
Signature · 1 line
1.7.9.5
#132 lore raw
In reply to Jyri Sarha

Hi Jyri,

Quoted 5 lines · Jyri Sarha

Hi Benoit,
I rebased the DTS patches on top of
git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git
for_3.13/dts -branch
and tested the result. Hope that was the right branch.

Yes, thanks for the update.

I've just applied the patches.

Regards,
Benoit

Quoted 33 lines

The DTS patches can also be pulled from:
git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
for_bcousson/for_3.13/dts -branch

The non DTS patches rebased on top of v3.12-rc5 can be pulled from here:
git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
v3.12-rc5-am33xx-audio-patch-v5-no-dts -branch

The the full patch series can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067443.html

Best regards,
Jyri

Darren Etheridge (1):
ARM/dts: am335x-evm: Add audio support for am335x-evm.dts

Jyri Sarha (1):
ARM/dts: am33xx: mcasp: Add location for data port registers to
reg-property

Pantelis Antoniou (1):
ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree entries

Peter Ujfalusi (1):
ARM/dts: am335x-evmsk: Audio support

  arch/arm/boot/dts/am335x-evm.dts   |   50 ++++++++++++++++++++++++++++++++++++
  arch/arm/boot/dts/am335x-evmsk.dts |   48 ++++++++++++++++++++++++++++++++++
  arch/arm/boot/dts/am33xx.dtsi      |   28 ++++++++++++++++++++
  3 files changed, 126 insertions(+)
Signature · 8 lines
Benoît Cousson
BayLibre
Embedded Linux Technology Lab
www.baylibre.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#133 lore raw

PATCH v4 10/10 ARM/dts: am335x-evmsk: Audio support

In reply to Jyri Sarha

From: Peter Ujfalusi <[email protected]>

AM335x EVM-SK have only support for audio playback (stereo jack on the board) via tlv320aic3106 codec connected to McASP1.
Enable the support for audio playback on the board:
- McASP1 configuration
- tlv320aic3106 configuration
- Machine driver.

---
 arch/arm/boot/dts/am335x-evmsk.dts |   51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +51 -0
index 4f339fa..27aa42f 100644
@@ -158,6 +158,15 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		mcasp1_pins: mcasp1_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
 	};
 
 	ocp {
@@ -206,6 +215,18 @@
 				st,max-limit-y = <550>;
 				st,max-limit-z = <750>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		musb: usb@47400000 {
@@ -233,6 +254,17 @@
 				pinctrl-0 = <&ecap2_pins>;
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVMSK";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <24576000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -419,3 +451,22 @@
 	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rgmii-txid";
 };
+
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcasp1_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 16 serializer */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+			0 0 0 0
+			0 0 0 0
+			0 0 0 0
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
Signature · 1 line
1.7.9.5
#134 lore raw

PATCH v4 10/10 ARM/dts: am335x-evmsk: Audio support

From: Peter Ujfalusi <[email protected]>

AM335x EVM-SK have only support for audio playback (stereo jack on the board) via tlv320aic3106 codec connected to McASP1.
Enable the support for audio playback on the board:
- McASP1 configuration
- tlv320aic3106 configuration
- Machine driver.

---
 arch/arm/boot/dts/am335x-evmsk.dts |   48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +48 -0
index 4f339fa..9e570fb 100644
@@ -158,6 +158,15 @@
 				0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			>;
 		};
+
+		mcasp1_pins: mcasp1_pins {
+			pinctrl-single,pins = <
+				0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+				0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+				0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+				0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+			>;
+		};
 	};
 
 	ocp {
@@ -206,6 +215,18 @@
 				st,max-limit-y = <550>;
 				st,max-limit-z = <750>;
 			};
+
+			tlv320aic3106: tlv320aic3106@1b {
+				compatible = "ti,tlv320aic3106";
+				reg = <0x1b>;
+				status = "okay";
+
+				/* Regulators */
+				AVDD-supply = <&vaux2_reg>;
+				IOVDD-supply = <&vaux2_reg>;
+				DRVDD-supply = <&vaux2_reg>;
+				DVDD-supply = <&vbat>;
+			};
 		};
 
 		musb: usb@47400000 {
@@ -233,6 +254,17 @@
 				pinctrl-0 = <&ecap2_pins>;
 			};
 		};
+
+		sound {
+			compatible = "ti,da830-evm-audio";
+			ti,model = "AM335x-EVMSK";
+			ti,audio-codec = <&tlv320aic3106>;
+			ti,mcasp-controller = <&mcasp1>;
+			ti,codec-clock-rate = <24576000>;
+			ti,audio-routing =
+				"Headphone Jack",       "HPLOUT",
+				"Headphone Jack",       "HPROUT";
+		};
 	};
 
 	vbat: fixedregulator@0 {
@@ -419,3 +451,19 @@
 	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rgmii-txid";
 };
+
+&mcasp1 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcasp1_pins>;
+
+		status = "okay";
+
+		op-mode = <0>;          /* MCASP_IIS_MODE */
+		tdm-slots = <2>;
+		/* 4 serializers */
+		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+			0 0 1 2
+		>;
+		tx-num-evt = <1>;
+		rx-num-evt = <1>;
+};
Signature · 1 line
1.7.9.5
#135 lore raw

v6 cover Fix AM335x-evm analog audio support

In reply to [email protected]

The v5 version of patches can be found here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067443.html

Changes since v5
- Rebase on top of 3685646e from:
- git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound topic/davinci
- Drop patches already applied to Benoit Cousson's for_3.13/dts branch:
- [PATCH v5 08/12] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree
- [PATCH v5 09/12] ARM/dts: am33xx: mcasp: Add location for data port
- [PATCH v5 10/12] ARM/dts: am335x-evm: Add audio support for
- [PATCH v5 11/12] ARM/dts: am335x-evmsk: Audio support
- Drop patches already applied to Mark Brown's topic/davinci branch:
- [PATCH v5 03/12] ASoC: davinci-mcasp: Add location for data port
- [PATCH v5 04/12] ASoC: davinci-mcasp: Extract DMA channels directly
- [PATCH v5 05/12] ASoC: davinci-mcasp: Change compatible property
- [PATCH v5 06/12] ASoC: davinci-mcasp: Improve DT bindings document
- [PATCH v5 07/12] ASoC: davinci-mcasp: Remove redundant num-serializer DT
- Restore patch [PATCH v3 03/11] and squash [PATCH v5 01/12] into it
- Adds: ASoC: davinci-mcasp: Add DMA register locations to DT
- Drops: [PATCH v5 01/12] ASoC: davinci: Fix AM33xx SoC Audio support
- Change: [PATCH v5 02/12] ASoC: davinci-evm: Add device tree binding
- Remove TLV320AIC3X pins from davinci-evm-audio binding document
- Use devm_snd_soc_register_card in davinci-evm.c
- Restore if defined(CONFIG_OF) #endif inside evm_init() and evm_exit() in davinci-evm.c to prevent compile failure if building without CONFIG_OF
- Add: ASoC: davinci-mcasp: Remove last reference to num-serializer in DT doc

The patches were tested by merging the topic/davinci branch and patches on top of for-next branch. The patches do not compile on topic/davinci because of devm_snd_soc_register_card() usage.

Best regards,
Jyri

Hebbar, Gururaja (2):
ASoC: davinci: Add support for AM33xx SoC Audio
ASoC: davinci-evm: Add device tree binding

Jyri Sarha (2):
ASoC: davinci-mcasp: Remove last reference to num-serializer in DT
doc
arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

 .../bindings/sound/davinci-evm-audio.txt           |   42 +++++++
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 -
 arch/arm/configs/omap2plus_defconfig               |    2 +
 sound/soc/davinci/Kconfig                          |   18 ++-
 sound/soc/davinci/Makefile                         |    1 +
 sound/soc/davinci/davinci-evm.c                    |  124 +++++++++++++++++++-
 6 files changed, 182 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Signature · 1 line
1.7.9.5
#136 lore raw

PATCH v6 1/4 ASoC: davinci: Add support for AM33xx SoC Audio

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

---
 sound/soc/davinci/Kconfig  |   18 +++++++++++++++---
 sound/soc/davinci/Makefile |    1 +
 2 files changed, 16 insertions(+), 3 deletions(-)
sound/soc/davinci/Kconfig +15 -3
index c82f89c..95970f5 100644
@@ -1,9 +1,10 @@
 config SND_DAVINCI_SOC
-	tristate "SoC Audio for the TI DAVINCI chip"
-	depends on ARCH_DAVINCI
+	tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
+	depends on ARCH_DAVINCI || SOC_AM33XX
 	help
+	  Platform driver for daVinci or AM33xx
 	  Say Y or M if you want to add support for codecs attached to
-	  the DAVINCI AC97 or I2S interface. You will also need
+	  the DAVINCI AC97, I2S, or McASP interface. You will also need
 	  to select the audio interfaces to support below.
 
 config SND_DAVINCI_SOC_I2S
@@ -15,6 +16,17 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_AM33XX_SOC_EVM
+	tristate "SoC Audio for the AM33XX chip based boards"
+	depends on SND_DAVINCI_SOC && SOC_AM33XX
+	select SND_SOC_TLV320AIC3X
+	select SND_DAVINCI_SOC_MCASP
+	help
+	  Say Y or M if you want to add support for SoC audio on AM33XX
+	  boards using McASP and TLV320AIC3X codec. For example AM335X-EVM,
+	  AM335X-EVMSK, and BeagelBone with AudioCape boards have this
+	  setup.
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
sound/soc/davinci/Makefile +1 -0
index a396ab6..bc81e79 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
 snd-soc-evm-objs := davinci-evm.o
 
 obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
+obj-$(CONFIG_SND_AM33XX_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
 obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
Signature · 1 line
1.7.9.5
maintainer Applied
#137 lore raw

Re: [PATCH v6 1/4] ASoC: davinci: Add support for AM33xx SoC Audio

Quoted 4 lines · Jyri Sarha

From: "Hebbar, Gururaja" <[email protected]>

AM33xx uses same McASP IP as the Davinci Platform. This patch updates Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

Applied, thanks.

#138 lore raw

PATCH v6 2/4 ASoC: davinci-evm: Add device tree binding

In reply to Jyri Sarha

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card, codec, dai interface details (like the card name, DAPM routing map, phandle for the audio components described in the dts file, codec mclk speed). The card will be set up based on this information. Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.

---
 .../bindings/sound/davinci-evm-audio.txt           |   42 +++++++
 sound/soc/davinci/davinci-evm.c                    |  124 +++++++++++++++++++-
 2 files changed, 164 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt new file +42 -0
new file mode 100644
index 0000000..865178d
@@ -0,0 +1,42 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-routing : A list of the connections between audio components.
+  Each entry is a pair of strings, the first being the connection's sink,
+  the second being the connection's source. Valid names for sources and
+  sinks are the codec's pins, and the jacks on the board:
+
+  Board connectors:
+
+  * Headphone Jack
+  * Line Out
+  * Mic Jack
+  * Line In
+
+
+Example:
+
+sound {
+	compatible = "ti,da830-evm-audio";
+	ti,model = "DA830 EVM";
+	ti,audio-codec = <&tlv320aic3x>;
+	ti,mcasp-controller = <&mcasp1>;
+	ti,codec-clock-rate = <12000000>;
+	ti,audio-routing =
+		"Headphone Jack",       "HPLOUT",
+		"Headphone Jack",       "HPROUT",
+		"Line Out",             "LLOUT",
+		"Line Out",             "RLOUT",
+		"MIC3L",                "Mic Bias 2V",
+		"MIC3R",                "Mic Bias 2V",
+		"Mic Bias 2V",          "Mic Jack",
+		"LINE1L",               "Line In",
+		"LINE2L",               "Line In",
+		"LINE1R",               "Line In",
+		"LINE2R",               "Line In";
+};
sound/soc/davinci/davinci-evm.c +122 -2

165 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer Applied
#139 lore raw

Re: [PATCH v6 2/4] ASoC: davinci-evm: Add device tree binding

Quoted 3 lines · Jyri Sarha

From: "Hebbar, Gururaja" <[email protected]>

Device tree support for Davinci Machine driver

Applied, thanks.

#140 lore raw

PATCH v6 3/4 ASoC: davinci-mcasp: Remove last reference to num-serializer in DT doc

In reply to Jyri Sarha

Remove last reference to num-serializer in davinci-mcasp devicetree binding document.

---
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 -
 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +0 -1
index 0aa416b..ed785b3 100644
@@ -15,7 +15,6 @@ Required properties:
   	    IEC60958-1, and AES-3 formats.
 - tdm-slots : Slots for TDM operation. Indicates number of channels transmitted
   	      or received over one serializer.
-- num-serializer : Serializers used by McASP.
 - serial-dir : A list of serializer configuration. Each entry is a number
                indication for serializer pin direction.
                (0 - INACTIVE, 1 - TX, 2 - RX)
Signature · 1 line
1.7.9.5
maintainer Applied
#141 lore raw

Re: [PATCH v6 3/4] ASoC: davinci-mcasp: Remove last reference to num-serializer in DT doc

Quoted 2 lines · Jyri Sarha

Remove last reference to num-serializer in davinci-mcasp devicetree binding document.

Applied, thanks.

#142 lore raw

PATCH v6 4/4 arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

In reply to Jyri Sarha

Modifying the omap2plus_defconfig to enable the audio support for AM335x EVM and other AM33xx based devices with TLV320AIC3X connected to McASP.

---
 arch/arm/configs/omap2plus_defconfig |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
index 254cf05..4443b92 100644
@@ -210,6 +210,8 @@ CONFIG_SND_DEBUG=y
 CONFIG_SND_USB_AUDIO=m
 CONFIG_SND_SOC=m
 CONFIG_SND_OMAP_SOC=m
+CONFIG_SND_AM33XX_SOC_EVM=m
+CONFIG_SND_DAVINCI_SOC=m
 CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
 CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
 CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
Signature · 1 line
1.7.9.5
#144 lore raw

PATCH RESEND 1/1 arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

Modifying the omap2plus_defconfig to enable the audio support for AM335x EVM and other AM33xx based devices with TLV320AIC3X connected to McASP.

---
 arch/arm/configs/omap2plus_defconfig |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
index 254cf05..4443b92 100644
@@ -210,6 +210,8 @@ CONFIG_SND_DEBUG=y
 CONFIG_SND_USB_AUDIO=m
 CONFIG_SND_SOC=m
 CONFIG_SND_OMAP_SOC=m
+CONFIG_SND_AM33XX_SOC_EVM=m
+CONFIG_SND_DAVINCI_SOC=m
 CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
 CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
 CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
Signature · 1 line
1.7.9.5
maintainer
#145 lore raw

Re: [PATCH RESEND] arm: omap2plus_defconfig: enable AM33xx SOC EVM audio

Quoted 5 lines · Jyri Sarha

Modifying the omap2plus_defconfig to enable the audio support for AM335x EVM and other AM33xx based devices with TLV320AIC3X connected to McASP.

Thanks applying into omap-for-v3.14/fixes-not-urgent.

Tony

Quoted 18 lines
---
 arch/arm/configs/omap2plus_defconfig |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
index 254cf05..4443b92 100644
@@ -210,6 +210,8 @@ CONFIG_SND_DEBUG=y
 CONFIG_SND_USB_AUDIO=m
 CONFIG_SND_SOC=m
 CONFIG_SND_OMAP_SOC=m
+CONFIG_SND_AM33XX_SOC_EVM=m
+CONFIG_SND_DAVINCI_SOC=m
 CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
 CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
 CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m