Patchwork [U-Boot,2/5] EXYNOS5: FDT: Add sound and codec device node informations

login
register
mail settings
Submitter Rajeshwari Birje
Date Nov. 8, 2012, 5:37 a.m.
Message ID <1352353039-17165-3-git-send-email-rajeshwari.s@samsung.com>
Download mbox | patch
Permalink /patch/197762/
State Superseded
Delegated to: Minkyu Kang
Headers show

Comments

Rajeshwari Birje - Nov. 8, 2012, 5:37 a.m.
Adds sound and codec device node parameters

Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
 board/samsung/dts/exynos5250-smdk5250.dts |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
Simon Glass - Nov. 9, 2012, 1:13 a.m.
Hi,

On Wed, Nov 7, 2012 at 9:37 PM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> Adds sound and codec device node parameters
>
> Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>

The binding for all of this should be in the previous patch as mentioned.

> ---
>  board/samsung/dts/exynos5250-smdk5250.dts |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts
> index 8722b36..6a500e1 100644
> --- a/board/samsung/dts/exynos5250-smdk5250.dts
> +++ b/board/samsung/dts/exynos5250-smdk5250.dts
> @@ -50,4 +50,24 @@
>                 samsung,slope           = <268470274>;
>                 samsung,dc-value        = <25>;
>         };
> +
> +       sound@12d60000 {
> +               samsung,i2s-epll-clock-frequency = <192000000>;
> +               samsung,i2s-sampling-rate = <48000>;
> +               samsung,i2s-bits-per-sample = <16>;
> +               samsung,i2s-channels = <2>;
> +               samsung,i2s-lr-clk-framesize = <256>;
> +               samsung,i2s-bit-clk-framesize = <32>;
> +       };
> +
> +       sound@12d60000 {
> +               samsung,codec-type = "wm8994";

This is the only thing that is odd to me. Maybe you want a phandle
here pointing to the soundcodec node.

> +       };
> +
> +       i2c@12c70000 {
> +               soundcodec@1a {
> +                       reg = <0x1a>;
> +                       compatible = "wolfson,wm8994-codec";

Or maybe better a phandle here pointing to the sound node.

This soundcodec node should be found and examined by your wolfson
driver, not the sound driver. So I think you need a few lines of code
in the wolfson driver, and a call to the sound code to attach the
driver.

At present you are teaching the sound module about different drivers,
but that is a bit backwards. It should be possible in principle to add
new sound drivers without touching the sound module. It also seems odd
to put wm8994 twice in the fdt.

I know this is a fairly small change, but I think it is more correct.

> +               };
> +       };
>  };
> --
> 1.7.4.4
>

Regards,
Simon

Patch

diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts
index 8722b36..6a500e1 100644
--- a/board/samsung/dts/exynos5250-smdk5250.dts
+++ b/board/samsung/dts/exynos5250-smdk5250.dts
@@ -50,4 +50,24 @@ 
 		samsung,slope		= <268470274>;
 		samsung,dc-value	= <25>;
 	};
+
+	sound@12d60000 {
+		samsung,i2s-epll-clock-frequency = <192000000>;
+		samsung,i2s-sampling-rate = <48000>;
+		samsung,i2s-bits-per-sample = <16>;
+		samsung,i2s-channels = <2>;
+		samsung,i2s-lr-clk-framesize = <256>;
+		samsung,i2s-bit-clk-framesize = <32>;
+	};
+
+	sound@12d60000 {
+		samsung,codec-type = "wm8994";
+	};
+
+	i2c@12c70000 {
+		soundcodec@1a {
+			reg = <0x1a>;
+			compatible = "wolfson,wm8994-codec";
+		};
+	};
 };