* [PATCH 3/3] ARM: shmobile: lager: add sound support on DT
@ 2014-06-10 2:34 Kuninori Morimoto
2014-06-10 15:37 ` Sergei Shtylyov
2014-06-10 15:39 ` Sergei Shtylyov
0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2014-06-10 2:34 UTC (permalink / raw)
To: linux-sh
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
It supports PIO transfer at this point
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/boot/dts/r8a7790-lager.dts | 70 +++++++++++++++++++++++++++++++++++
arch/arm/mach-shmobile/Kconfig | 1 +
2 files changed, 71 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 295a60e..51a3e41 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -9,6 +9,18 @@
* kind, whether express or implied.
*/
+/*
+ * SSI-AK4643
+ *
+ * SW1: 1: AK4643
+ * 2: CN22
+ * 3: ADV7511
+ *
+ * this command is required when playback.
+ *
+ * # amixer set "LINEOUT Mixer DACL" on
+ */
+
/dts-v1/;
#include "r8a7790.dtsi"
#include <dt-bindings/gpio/gpio.h>
@@ -144,6 +156,22 @@
states = <3300000 1
1800000 0>;
};
+
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,format = "left_j";
+ simple-audio-card,cpu {
+ sound-dai = <&rcar_sound 0>;
+ };
+
+ simple-audio-card,codec {
+ bitclock-master;
+ frame-master;
+ sound-dai = <&snd_codec>;
+ system-clock-frequency = <11289600>;
+ };
+ };
};
&extal_clk {
@@ -219,6 +247,16 @@
renesas,groups = "i2c3";
renesas,function = "i2c3";
};
+
+ sound_pins: sound {
+ renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
+ renesas,function = "ssi";
+ };
+
+ sound_clk_pins: sound_clk {
+ renesas,groups = "audio_clk_a";
+ renesas,function = "audio_clk";
+ };
};
ðer {
@@ -372,3 +410,35 @@
&i2c3 {
status = "ok";
};
+
+&i2c2 {
+ status = "okay";
+ snd_codec: ak4643 {
+ #sound-dai-cells = <0>;
+ compatible = "asahi-kasei,ak4643";
+ reg = <0x12>;
+ };
+};
+
+&rcar_sound {
+ pinctrl-0 = <&sound_pins &sound_clk_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+
+ rcar_sound,dai {
+ dai0 {
+ playback = <&ssi0>;
+ capture = <&ssi1>;
+ };
+ };
+};
+
+&ssi0 {
+ pio-transfer;
+};
+
+&ssi1 {
+ pio-transfer;
+ shared-pin;
+};
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 3b28bd8..6fc352a 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -58,6 +58,7 @@ config MACH_LAGER
bool "Lager board"
depends on ARCH_R8A7790
select MICREL_PHY if SH_ETH
+ select SND_SOC_AK4642 if SND_SIMPLE_CARD
config MACH_MARZEN
bool "MARZEN board"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: lager: add sound support on DT
2014-06-10 2:34 [PATCH 3/3] ARM: shmobile: lager: add sound support on DT Kuninori Morimoto
@ 2014-06-10 15:37 ` Sergei Shtylyov
2014-06-10 15:39 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-06-10 15:37 UTC (permalink / raw)
To: linux-sh
Hello.
On 06/10/2014 06:34 AM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> It supports PIO transfer at this point
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7790-lager.dts | 70 +++++++++++++++++++++++++++++++++++
> arch/arm/mach-shmobile/Kconfig | 1 +
> 2 files changed, 71 insertions(+)
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 295a60e..51a3e41 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
[...]
> @@ -372,3 +410,35 @@
> &i2c3 {
> status = "ok";
> };
> +
> +&i2c2 {
> + status = "okay";
Worth putting an empty line here...
> + snd_codec: ak4643 {
I see that I'll have to remind about ePAPR again:
"The name of a node should be somewhat generic, reflecting the function of the
device and not its precise programming model."
> + #sound-dai-cells = <0>;
I think that property should go last.
> + compatible = "asahi-kasei,ak4643";
I think that property should go first.
> + reg = <0x12>;
> + };
> +};
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: lager: add sound support on DT
2014-06-10 2:34 [PATCH 3/3] ARM: shmobile: lager: add sound support on DT Kuninori Morimoto
2014-06-10 15:37 ` Sergei Shtylyov
@ 2014-06-10 15:39 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-06-10 15:39 UTC (permalink / raw)
To: linux-sh
On 06/10/2014 06:34 AM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> It supports PIO transfer at this point
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7790-lager.dts | 70 +++++++++++++++++++++++++++++++++++
> arch/arm/mach-shmobile/Kconfig | 1 +
> 2 files changed, 71 insertions(+)
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 295a60e..51a3e41 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
[...]
> @@ -372,3 +410,35 @@
> &i2c3 {
> status = "ok";
> };
> +
> +&i2c2 {
> + status = "okay";
> + snd_codec: ak4643 {
> + #sound-dai-cells = <0>;
> + compatible = "asahi-kasei,ak4643";
Oh, and according to
Documentation/devicetree/bindings/vendor-prefixes.txt, the vendor prefix
should be "ak", not "asahi-kasei"...
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-10 15:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 2:34 [PATCH 3/3] ARM: shmobile: lager: add sound support on DT Kuninori Morimoto
2014-06-10 15:37 ` Sergei Shtylyov
2014-06-10 15:39 ` Sergei Shtylyov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.