]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Dec 2015 05:36:34 +0000 (05:36 +0000)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 1 Dec 2015 06:32:06 +0000 (15:32 +0900)
CS2000 needs AUDIO_CLKOUT as master clock which is generated
by Renesas sound, and Renesas sound needs CS2000 as ADUIO_CLK_B.
Because of this relationship, it will be dead-lock when driver probe.

cs2000: clk_multiplier@4f {
        ...
        clocks = <&rcar_sound 0>, <&x12_clk>;
        ...
};

&rcar_sound {
        ...
        assigned-clocks = <&cs2000>;
        ...
};

This patch is using dummy audio_clkout to avoid this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts

index beeacfaf18d04b5b5bd61d12904bee3d8c72c68d..75af5ec5a4d4133d47db6f1a7db327ea141dd9a5 100644 (file)
                clock-frequency = <24576000>;
        };
 
+       audio_clkout: audio_clkout {
+               /*
+                * This is same as <&rcar_sound 0>
+                * but needed to avoid cs2000/rcar_sound probe dead-lock
+                */
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <11289600>;
+       };
+
        rsnd_ak4613: sound {
                compatible = "simple-audio-card";
 
                asahi-kasei,out5-single-end;
                asahi-kasei,out6-single-end;
        };
+
+       cs2000: clk_multiplier@4f {
+               #clock-cells = <0>;
+               compatible = "cirrus,cs2000-cp";
+               reg = <0x4f>;
+               clocks = <&audio_clkout>, <&x12_clk>;
+               clock-names = "clk_in", "ref_clk";
+
+               assigned-clocks = <&cs2000>;
+               assigned-clock-rates = <24576000>; /* 1/1 divide */
+       };
 };
 
 &rcar_sound {
 
        status = "okay";
 
+       /* update <audio_clk_b> to <cs2000> */
+       clocks = <&cpg CPG_MOD 1005>,
+                <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
+                <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
+                <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
+                <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
+                <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
+                <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
+                <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
+                <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
+                <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
+                <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
+                <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
+                <&audio_clk_a>, <&cs2000>,
+                <&audio_clk_c>,
+                <&cpg CPG_CORE R8A7795_CLK_S0D4>;
+
        rcar_sound,dai {
                dai0 {
                        playback = <&ssi0 &src0 &dvc0>;