2013-10-14 05:41:17

by Bo Shen

[permalink] [raw]
Subject: [PATCH 0/5] ARM:at91:enable sound on at91sam9n12ek board

This patch series enable sound on at91sam9n12ek board with wm8904 codec


Bo Shen (5):
ARM: at91: add at91sam9n12 ssc clock in look up table
ARM: at91: add ssc dma parameter for at91sam9n12
ARM: at91: enable wm8904 on at91sam9n12ek board
ARM: at91: enable ssc on at91sam9n12ek board
ARM: at91: add sound support on at91sam9n12ek board

arch/arm/boot/dts/at91sam9n12.dtsi | 3 +++
arch/arm/boot/dts/at91sam9n12ek.dts | 34 ++++++++++++++++++++++++++++++++++
arch/arm/mach-at91/at91sam9n12.c | 1 +
3 files changed, 38 insertions(+)

--
1.7.9.5


2013-10-14 05:41:20

by Bo Shen

[permalink] [raw]
Subject: [PATCH 4/5] ARM: at91: enable ssc on at91sam9n12ek board

Enable ssc on at91sam9n12ek board

Signed-off-by: Bo Shen <[email protected]>
---
arch/arm/boot/dts/at91sam9n12ek.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 1ba8def..391c532 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -38,6 +38,10 @@
status = "okay";
};

+ ssc0: ssc@f0010000 {
+ status = "okay";
+ };
+
i2c0: i2c@f8010000 {
status = "okay";

--
1.7.9.5

2013-10-14 05:41:18

by Bo Shen

[permalink] [raw]
Subject: [PATCH 5/5] ARM: at91: add sound support on at91sam9n12ek board

Add sound support on at91sam9n12ek board with wm8904 as codec.

Signed-off-by: Bo Shen <[email protected]>

---
arch/arm/boot/dts/at91sam9n12ek.dts | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 391c532..e9487f6 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -91,6 +91,13 @@
<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
};
};
+
+ sound {
+ pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
+ atmel,pins =
+ <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+ };
+ };
};

spi0: spi@f0000000 {
@@ -151,4 +158,22 @@
gpio-key,wakeup;
};
};
+
+ sound {
+ compatible = "atmel,asoc-wm8904";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
+
+ atmel,model = "wm8904 @ AT91SAM9N12";
+ atmel,audio-routing =
+ "Headphone Jack", "HPOUTL",
+ "Headphone Jack", "HPOUTR",
+ "IN2L", "Line In Jack",
+ "IN2R", "Line In Jack",
+ "Mic", "MICBIAS",
+ "IN1L", "Mic";
+
+ atmel,ssc-controller = <&ssc0>;
+ atmel,audio-codec = <&wm8904>;
+ };
};
--
1.7.9.5

2013-10-14 05:41:16

by Bo Shen

[permalink] [raw]
Subject: [PATCH 1/5] ARM: at91: add at91sam9n12 ssc clock in look up table

Add at91sam9n12 ssc clock in look up table

Signed-off-by: Bo Shen <[email protected]>
---
arch/arm/mach-at91/at91sam9n12.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index c7d670d..2d895a2 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -169,6 +169,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk),
CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk),
CLKDEV_CON_DEV_ID("mci_clk", "f0008000.mmc", &mmc_clk),
+ CLKDEV_CON_DEV_ID(NULL, "f0010000.ssc", &ssc_clk),
CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk),
CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
--
1.7.9.5

2013-10-14 05:41:14

by Bo Shen

[permalink] [raw]
Subject: [PATCH 3/5] ARM: at91: enable wm8904 on at91sam9n12ek board

Enable wm8904 codec on at91sam9n12ek board, which is connect
to i2c0 bus with 0x1a as address.

Signed-off-by: Bo Shen <[email protected]>
---
arch/arm/boot/dts/at91sam9n12ek.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 27a9352..1ba8def 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -41,6 +41,11 @@
i2c0: i2c@f8010000 {
status = "okay";

+ wm8904: codec@1a {
+ compatible = "wm8904";
+ reg = <0x1a>;
+ };
+
qt1070: keyboard@1b {
compatible = "qt1070";
reg = <0x1b>;
--
1.7.9.5

2013-10-14 05:41:13

by Bo Shen

[permalink] [raw]
Subject: [PATCH 2/5] ARM: at91: add ssc dma parameter for at91sam9n12

Add ssc dma parameter for at91sam9n12

Signed-off-by: Bo Shen <[email protected]>
---
arch/arm/boot/dts/at91sam9n12.dtsi | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index 9fb7ffd..6224f9f 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -437,6 +437,9 @@
compatible = "atmel,at91sam9g45-ssc";
reg = <0xf0010000 0x4000>;
interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+ dmas = <&dma 0 AT91_DMA_CFG_PER_ID(21)>,
+ <&dma 0 AT91_DMA_CFG_PER_ID(22)>;
+ dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
status = "disabled";
--
1.7.9.5

2013-10-14 07:39:12

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 0/5] ARM:at91:enable sound on at91sam9n12ek board

On 14/10/2013 07:38, Bo Shen :
> This patch series enable sound on at91sam9n12ek board with wm8904 codec
>
>
> Bo Shen (5):
> ARM: at91: add at91sam9n12 ssc clock in look up table
> ARM: at91: add ssc dma parameter for at91sam9n12
> ARM: at91: enable wm8904 on at91sam9n12ek board
> ARM: at91: enable ssc on at91sam9n12ek board
> ARM: at91: add sound support on at91sam9n12ek board

Great!

And on the whole patch series:

Acked-by: Nicolas Ferre <[email protected]>

I stack it on at91-3.13-dt branch.

Thanks.

>
> arch/arm/boot/dts/at91sam9n12.dtsi | 3 +++
> arch/arm/boot/dts/at91sam9n12ek.dts | 34 ++++++++++++++++++++++++++++++++++
> arch/arm/mach-at91/at91sam9n12.c | 1 +
> 3 files changed, 38 insertions(+)
>


--
Nicolas Ferre