Convert to new override syntax
[AGL/meta-agl.git] / meta-agl-bsp / meta-rcar-gen3 / recipes-kernel / linux / files / 0004-ADSP-enable-and-add-sound-hardware-abstraction.patch
1 The ADSP on Renesas SoCs required a reserved memory area to become
2 enabled, and this needs to be done manually.
3
4 This patch adds sound hardware abstraction information for the m3ulcb
5 and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the
6 ADSP for dynamically determining sound hardware at runtime, allowing
7 single binaries to be used between the two boards. 
8
9 Future work will incorporate the h3ulcb and Salvator boards into the
10 abstraction.
11
12 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
13 Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
14 ---
15 diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
16 index 1cd64c1b3b31..71e59da3528d 100644
17 --- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
18 +++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
19 @@ -42,11 +42,18 @@
20                         reg = <0x00000000 0x54000000 0x0 0x03000000>;
21                 };
22  
23 +               /* For Audio DSP */
24 +               adsp_reserved: linux,adsp {
25 +                       compatible = "shared-dma-pool";
26 +                       reusable;
27 +                       reg = <0x00000000 0x57000000 0x0 0x01000000>;
28 +               };
29 +
30                 /* global autoconfigured region for contiguous allocations */
31                 linux,cma@57000000 {
32                         compatible = "shared-dma-pool";
33                         reusable;
34 -                       reg = <0x00000000 0x57000000 0x0 0x19000000>;
35 +                       reg = <0x00000000 0x58000000 0x0 0x18000000>;
36                         linux,cma-default;
37                 };
38  
39 @@ -110,6 +117,42 @@
40                       "dclkin.0", "dclkin.1", "dclkin.2";
41  };
42  
43 +&adsp {
44 +       status = "okay";
45 +       clock-frequency = <12288000 11289600>;
46 +       audio-clocks = <22579200 24576000>;
47 +       memory-region = <&adsp_reserved>;
48 +
49 +       /* ADSP playback setting for ak4613 */
50 +       adsp_playback0: adsp,playback {
51 +               mode  = "i2s";
52 +               clock-mode = "master";
53 +               bus-width = <16>;
54 +               ssi = <0>;
55 +               bus-if = <0>;
56 +               channels = <2>;
57 +               pin-share-ssi = <1>;
58 +       };
59 +
60 +       /* ADSP capture setting for ak4613 */
61 +       adsp_capture0: adsp,capture {
62 +               mode  = "i2s";
63 +               clock-mode = "slave";
64 +               bus-width = <16>;
65 +               ssi = <1>;
66 +               bus-if = <0>;
67 +               channels = <2>;
68 +               pin-share-ssi = <0>;
69 +       };
70 +       
71 +       adsp,ports {
72 +               port@0 {
73 +                       playback = <&adsp_playback0>;
74 +                       capture  = <&adsp_capture0>;
75 +               };
76 +       };
77 +};
78 +
79  &vspb {
80         status = "okay";
81  };