ARM: dts: silk: add sound support
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 27 Jul 2016 21:05:58 +0000 (00:05 +0300)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 9 Aug 2016 12:37:43 +0000 (14:37 +0200)
Define the SILK board dependent part of the R8A7794 sound  device node.
Add device node for Asahi Kasei AK4643 stereo codec to the I2C1 bus.
Add the "simple-audio-card" device node to interconnect the SoC sound
device  and the codec.

This patch is based on the commit 493b4da7c10c ("ARM: dts: porter: add
sound support").

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a7794-silk.dts

index cf24f45..cf880ac 100644 (file)
  * kind, whether express or implied.
  */
 
+/*
+ * SSI-AK4643
+ *
+ * SW1: 2-1: AK4643
+ *      2-3: ADV7511
+ *
+ * This command is required before playback/capture:
+ *
+ *     amixer set "LINEOUT Mixer DACL" on
+ */
+
 /dts-v1/;
 #include "r8a7794.dtsi"
 #include <dt-bindings/gpio/gpio.h>
                #clock-cells = <0>;
                clock-frequency = <74250000>;
        };
+
+       x9_clk: audio_clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <12288000>;
+       };
+
+       sound {
+               compatible = "simple-audio-card";
+
+               simple-audio-card,format = "left_j";
+               simple-audio-card,bitclock-master = <&soundcodec>;
+               simple-audio-card,frame-master = <&soundcodec>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&rcar_sound>;
+               };
+
+               soundcodec: simple-audio-card,codec {
+                       sound-dai = <&ak4643>;
+                       clocks = <&x9_clk>;
+               };
+       };
 };
 
 &extal_clk {
                groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
                function = "du1";
        };
+
+       ssi_pins: sound {
+               groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
+               function = "ssi";
+       };
+
+       audio_clk_pins: audio_clk {
+               groups = "audio_clkc";
+               function = "audio_clk";
+       };
 };
 
 &scif2 {
        status = "okay";
        clock-frequency = <400000>;
 
+       ak4643: codec@12 {
+               compatible = "asahi-kasei,ak4643";
+               #sound-dai-cells = <0>;
+               reg = <0x12>;
+       };
+
        composite-in@20 {
                compatible = "adi,adv7180";
                reg = <0x20>;
                };
        };
 };
+
+&rcar_sound {
+       pinctrl-0 = <&ssi_pins &audio_clk_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       /* Single DAI */
+       #sound-dai-cells = <0>;
+
+       rcar_sound,dai {
+               dai0 {
+                       playback = <&ssi0>;
+                       capture  = <&ssi1>;
+               };
+       };
+};
+
+&ssi1 {
+       shared-pin;
+};