Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-27 Thread Mark Brown
On Wed, Dec 26, 2012 at 04:21:58PM +0530, Padma Venkat wrote:
 Hi,
 
 On Mon, Dec 24, 2012 at 9:33 AM, Padma Venkat padma@gmail.com wrote:
  Hi,

You should always delete irrelevant text from mails, it makes it much
easier for people to find whatever content you've added.

  I agree with using version here but we need some consensus about that.

 Any suggestions on i2s compatible name or samsung,i2s-v5 is okay?

I think that's fine.


signature.asc
Description: Digital signature


Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-26 Thread Padma Venkat
Hi,

On Mon, Dec 24, 2012 at 9:33 AM, Padma Venkat padma@gmail.com wrote:
 Hi,

 On Sat, Dec 22, 2012 at 12:32 AM, Kukjin Kim kgene@samsung.com wrote:
 Padma Venkat wrote:

 Hi,

 On Wed, Dec 19, 2012 at 10:39 PM, Mark Brown
 broo...@opensource.wolfsonmicro.com wrote:
  On Wed, Dec 19, 2012 at 01:24:14PM +, Grant Likely wrote:
  On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna
 padm...@samsung.com wrote:
 
   +- compatible : samsung,samsung-i2s
 
  Isn't that kind of redundant?  :-)
 
  The format of the compatible strings should be vendor,part-
 number-i2s.
  Please be specific about the part number that you're doing the binding
  for. For example; use samsung,exynos4210-i2s instead of
 samsung,exynos-i2s.
 
  There are actually versioned IPs here (where the versions are used
  publically in a few places) but it's not clearly documented which is
  which.  It would be reasonable to use the IP versions here I think.

 Samsung has three i2s drivers one for s3c24xx, one for s3c2412 and one
 for rest of the platforms. The above mentioned other platforms has
 Version 3/4/5 of i2s controllers. This dt binding is for for the i2s

 Where is the version defined such as 3, 4, 5? So, what is the
 sound/soc/Samsung/s3c-i2s-v2.[ch]?

 Versions 3, 4, 5 are defined in dev-audio.c file of corresponding platforms.
 s3c-i2s-v2 is used in s3c2412 platform.


 driver that has support for Version 3/4/5 of i2s controller. So
 samsung,i2s-v5 is okay as compatible name? Please suggest me.

 I agree with using version here but we need some consensus about that.

Any suggestions on i2s compatible name or samsung,i2s-v5 is okay?


 - Kukjin

 --
 To unsubscribe from this list: send the line unsubscribe linux-samsung-soc 
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

 Thanks
 Padma

Thanks
Padma
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-23 Thread Kukjin Kim
Kukjin Kim wrote:
 
Re-sending due to e-mail client problem :(

 Padma Venkat wrote:
 
  Hi,
 
  On Wed, Dec 19, 2012 at 10:39 PM, Mark Brown
  broo...@opensource.wolfsonmicro.com wrote:
   On Wed, Dec 19, 2012 at 01:24:14PM +, Grant Likely wrote:
   On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna
  padm...@samsung.com wrote:
  
+- compatible : samsung,samsung-i2s
  
   Isn't that kind of redundant?  :-)
  
   The format of the compatible strings should be vendor,part-
  number-i2s.
   Please be specific about the part number that you're doing the
   binding for. For example; use samsung,exynos4210-i2s instead of
  samsung,exynos-i2s.
  
   There are actually versioned IPs here (where the versions are used
   publically in a few places) but it's not clearly documented which is
   which.  It would be reasonable to use the IP versions here I think.
 
  Samsung has three i2s drivers one for s3c24xx, one for s3c2412 and one
  for rest of the platforms. The above mentioned other platforms has
  Version 3/4/5 of i2s controllers. This dt binding is for for the i2s
 
 Where is the version defined such as 3, 4, 5? So, what is the
 sound/soc/Samsung/s3c-i2s-v2.[ch]?
 
  driver that has support for Version 3/4/5 of i2s controller. So
  samsung,i2s-v5 is okay as compatible name? Please suggest me.
 
 I agree with using version here but we need some consensus about that.
 
 - Kukjin

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-23 Thread Padma Venkat
Hi,

On Sat, Dec 22, 2012 at 12:32 AM, Kukjin Kim kgene@samsung.com wrote:
 Padma Venkat wrote:

 Hi,

 On Wed, Dec 19, 2012 at 10:39 PM, Mark Brown
 broo...@opensource.wolfsonmicro.com wrote:
  On Wed, Dec 19, 2012 at 01:24:14PM +, Grant Likely wrote:
  On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna
 padm...@samsung.com wrote:
 
   +- compatible : samsung,samsung-i2s
 
  Isn't that kind of redundant?  :-)
 
  The format of the compatible strings should be vendor,part-
 number-i2s.
  Please be specific about the part number that you're doing the binding
  for. For example; use samsung,exynos4210-i2s instead of
 samsung,exynos-i2s.
 
  There are actually versioned IPs here (where the versions are used
  publically in a few places) but it's not clearly documented which is
  which.  It would be reasonable to use the IP versions here I think.

 Samsung has three i2s drivers one for s3c24xx, one for s3c2412 and one
 for rest of the platforms. The above mentioned other platforms has
 Version 3/4/5 of i2s controllers. This dt binding is for for the i2s

 Where is the version defined such as 3, 4, 5? So, what is the
 sound/soc/Samsung/s3c-i2s-v2.[ch]?

Versions 3, 4, 5 are defined in dev-audio.c file of corresponding platforms.
s3c-i2s-v2 is used in s3c2412 platform.


 driver that has support for Version 3/4/5 of i2s controller. So
 samsung,i2s-v5 is okay as compatible name? Please suggest me.

 I agree with using version here but we need some consensus about that.

 - Kukjin

 --
 To unsubscribe from this list: send the line unsubscribe linux-samsung-soc 
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks
Padma
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-21 Thread Padma Venkat
Hi,

On Wed, Dec 19, 2012 at 10:39 PM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
 On Wed, Dec 19, 2012 at 01:24:14PM +, Grant Likely wrote:
 On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna padm...@samsung.com 
 wrote:

  +- compatible : samsung,samsung-i2s

 Isn't that kind of redundant?  :-)

 The format of the compatible strings should be vendor,part-number-i2s.
 Please be specific about the part number that you're doing the binding
 for. For example; use samsung,exynos4210-i2s instead of 
 samsung,exynos-i2s.

 There are actually versioned IPs here (where the versions are used
 publically in a few places) but it's not clearly documented which is
 which.  It would be reasonable to use the IP versions here I think.

Samsung has three i2s drivers one for s3c24xx, one for s3c2412 and one
for rest of the platforms. The above mentioned other platforms has
Version 3/4/5 of i2s controllers. This dt binding is for for the i2s
driver that has support for Version 3/4/5 of i2s controller. So
samsung,i2s-v5 is okay as compatible name? Please suggest me.

Thanks
Padma
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-19 Thread Grant Likely
On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna padm...@samsung.com 
wrote:
 Add support for device based discovery.
 
 Signed-off-by: Padmavathi Venna padm...@samsung.com
 ---
  .../devicetree/bindings/sound/samsung-i2s.txt  |   75 +++
  sound/soc/samsung/dma.c|1 +
  sound/soc/samsung/dma.h|1 +
  sound/soc/samsung/i2s.c|  233 
 
  4 files changed, 269 insertions(+), 41 deletions(-)
  create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
 
 diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt 
 b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
 new file mode 100644
 index 000..bff47b4
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
 @@ -0,0 +1,75 @@
 +* Samsung I2S controller
 +
 +Required SoC Specific Properties:
 +
 +- compatible : samsung,samsung-i2s

Isn't that kind of redundant?  :-)

The format of the compatible strings should be vendor,part-number-i2s. 
Please be specific about the part number that you're doing the binding
for. For example; use samsung,exynos4210-i2s instead of samsung,exynos-i2s.

 +- reg: physical base address of the controller and length of memory mapped
 +  region.
 +
 +[PRELIMINARY: the dma channel allocation will change once there are
 +official DMA bindings]
 +
 +- tx-dma-channel-secondary: The dma channel specifier for secondary tx
 +  operations. The format of the dma specifier depends on the dma
 +  controller.
 +- tx-dma-channel: The dma channel specifier for tx operations. The format of
 +  the dma specifier depends on the dma controller.
 +- rx-dma-channel: The dma channel specifier for rx operations. The format of
 +  the dma specifier depends on the dma controller.
 +
 +Optional SoC Specific Properties:
 +
 +- samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel
 +  support, this flag is enabled.
 +- samsung,supports-rstclr: This flag should be set if I2S software reset bit
 +  control is required. When this flag is set I2S software reset bit will be
 +  enabled or disabled based on need.
 +- samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA,
 +  then this flag is enabled.
 +- samsung,idma-addr: Internal DMA register base address of the audio
 +  sub system(used in secondary sound source).
 +
 +Required Board Specific Properties:
 +
 +- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
 +  interface lines. The format of the gpio specifier depends on the gpio
 +  controller.
 +  The syntax of samsung gpio specifier is
 + [phandle of the gpio controller node]
 +  [pin number within the gpio controller]
 +  [mux function]
 +  [flags and pull up/down]
 +  [drive strength]
 +
 +Aliases:
 +
 +- All the I2S controller nodes are represented in the aliases node using
 +  the following format 'i2s{n}' where n is a unique number for the alias.

Are the aliases actually being used now? If not, then drop this section.
I don't see any references in this patch.

Otherwise the binding looks good to me.

g.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-19 Thread Mark Brown
On Wed, Dec 19, 2012 at 01:24:14PM +, Grant Likely wrote:
 On Thu, 13 Dec 2012 16:12:53 +0530, Padmavathi Venna padm...@samsung.com 
 wrote:

  +- compatible : samsung,samsung-i2s

 Isn't that kind of redundant?  :-)

 The format of the compatible strings should be vendor,part-number-i2s. 
 Please be specific about the part number that you're doing the binding
 for. For example; use samsung,exynos4210-i2s instead of 
 samsung,exynos-i2s.

There are actually versioned IPs here (where the versions are used
publically in a few places) but it's not clearly documented which is
which.  It would be reasonable to use the IP versions here I think.


signature.asc
Description: Digital signature


[PATCH V5 2/2] ASoC: SAMSUNG: Add DT support for i2s

2012-12-13 Thread Padmavathi Venna
Add support for device based discovery.

Signed-off-by: Padmavathi Venna padm...@samsung.com
---
 .../devicetree/bindings/sound/samsung-i2s.txt  |   75 +++
 sound/soc/samsung/dma.c|1 +
 sound/soc/samsung/dma.h|1 +
 sound/soc/samsung/i2s.c|  233 
 4 files changed, 269 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt

diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt 
b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
new file mode 100644
index 000..bff47b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
@@ -0,0 +1,75 @@
+* Samsung I2S controller
+
+Required SoC Specific Properties:
+
+- compatible : samsung,samsung-i2s
+- reg: physical base address of the controller and length of memory mapped
+  region.
+
+[PRELIMINARY: the dma channel allocation will change once there are
+official DMA bindings]
+
+- tx-dma-channel-secondary: The dma channel specifier for secondary tx
+  operations. The format of the dma specifier depends on the dma
+  controller.
+- tx-dma-channel: The dma channel specifier for tx operations. The format of
+  the dma specifier depends on the dma controller.
+- rx-dma-channel: The dma channel specifier for rx operations. The format of
+  the dma specifier depends on the dma controller.
+
+Optional SoC Specific Properties:
+
+- samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel
+  support, this flag is enabled.
+- samsung,supports-rstclr: This flag should be set if I2S software reset bit
+  control is required. When this flag is set I2S software reset bit will be
+  enabled or disabled based on need.
+- samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA,
+  then this flag is enabled.
+- samsung,idma-addr: Internal DMA register base address of the audio
+  sub system(used in secondary sound source).
+
+Required Board Specific Properties:
+
+- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
+  interface lines. The format of the gpio specifier depends on the gpio
+  controller.
+  The syntax of samsung gpio specifier is
+   [phandle of the gpio controller node]
+[pin number within the gpio controller]
+[mux function]
+[flags and pull up/down]
+[drive strength]
+
+Aliases:
+
+- All the I2S controller nodes are represented in the aliases node using
+  the following format 'i2s{n}' where n is a unique number for the alias.
+
+Example:
+
+- SoC Specific Portion:
+
+i2s@0383 {
+   compatible = samsung,samsung-i2s;
+   reg = 0x0383 0x100;
+   tx-dma-channel-secondary = pdma0 8;
+   tx-dma-channel = pdma0 10;
+   rx-dma-channel = pdma0 9;
+   samsung,supports-6ch;
+   samsung,supports-rstclr;
+   samsung,supports-secdai;
+   samsung,idma-addr = 0x0300;
+};
+
+- Board Specific Portion:
+
+i2s_0: i2s@0383 {
+   gpios = gpz 0 2 0 0, /* I2S_0_SCLK */
+   gpz 1 2 0 0, /* I2S_0_CDCLK */
+   gpz 2 2 0 0, /* I2S_0_LRCK */
+   gpz 3 2 0 0, /* I2S_0_SDI */
+   gpz 4 2 0 0, /* I2S_0_SDO[1] */
+   gpz 5 2 0 0, /* I2S_0_SDO[2] */
+   gpz 6 2 0 0; /* I2S_0_SDO[3] */
+};
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index db87628..eb79844 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -168,6 +168,7 @@ static int dma_hw_params(struct snd_pcm_substream 
*substream,
req.cap = (samsung_dma_has_circular() ?
DMA_CYCLIC : DMA_SLAVE);
req.client = prtd-params-client;
+   req.dt_dmach_prop = prtd-params-dma_prop;
config.direction =
(substream-stream == SNDRV_PCM_STREAM_PLAYBACK
? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
index 73d8c7c..9f5b35c 100644
--- a/sound/soc/samsung/dma.h
+++ b/sound/soc/samsung/dma.h
@@ -19,6 +19,7 @@ struct s3c_dma_params {
int dma_size;   /* Size of the DMA transfer */
unsigned ch;
struct samsung_dma_ops *ops;
+   struct property *dma_prop;
 };
 
 int asoc_dma_platform_register(struct device *dev);
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index ed5eeae..e3c9673 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -15,11 +15,15 @@
 #include linux/clk.h
 #include linux/io.h
 #include linux/module.h
+#include linux/of.h
+#include linux/of_gpio.h
 #include linux/pm_runtime.h
 
 #include sound/soc.h
 #include sound/pcm_params.h
 
+#include mach/dma.h
+
 #include linux/platform_data/asoc-s3c.h
 
 #include dma.h
@@ -34,6 +38,10 @@ enum samsung_dai_type {
TYPE_SEC,
 };
 
+struct samsung_i2s_dai_data {
+   int dai_type;
+};
+