aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-05-08 13:23:46 +1000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-05-18 18:04:18 +0000
commit63d0dd33ecca4996941fe0f03bd0727538cd8fea (patch)
tree031a3df0a413d0b405eceb4ca301884604acb5f8
parentaccd05c8772e9c03589da9ef32f8bea431f22bb6 (diff)
[COMMUNITY] ADSP enable and add sound hardware abstraction in DTrocko_bsp_3.6
The ADSP on Renesas SoCs required a reserved memory area to become enabled, and this needs to be done manually. This patch adds sound hardware abstraction information for the m3ulcb and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the ADSP for dynamically determining sound hardware at runtime, allowing single binaries to be used between the two boards. Future work will incorporate the h3ulcb and Salvator boards into the abstraction. Bug-AGL: SPEC-1424 Change-Id: Ie3f3d2227e79a6396f056fc63ecbcc6c73034e6b Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
-rw-r--r--meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch121
-rw-r--r--meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-m3ulcb-ADSP-enable.patch37
-rw-r--r--meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb4
3 files changed, 123 insertions, 39 deletions
diff --git a/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch b/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch
new file mode 100644
index 0000000..e0e7269
--- /dev/null
+++ b/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch
@@ -0,0 +1,121 @@
+The ADSP on Renesas SoCs required a reserved memory area to become
+enabled, and this needs to be done manually.
+
+This patch adds sound hardware abstraction information for the m3ulcb
+and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the
+ADSP for dynamically determining sound hardware at runtime, allowing
+single binaries to be used between the two boards.
+
+Future work will incorporate the h3ulcb and Salvator boards into the
+abstraction.
+
+Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
+---
+diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts
+index de2390f009e7..4ccfa8315d17 100644
+--- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts
++++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts
+@@ -17,3 +17,35 @@
+ compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
+ "renesas,r8a7796";
+ };
++
++&adsp {
++
++ /* ADSP playback setting for pcm3168 */
++ adsp_playback0: adsp,playback {
++ mode = "tdm";
++ clock-mode = "master";
++ bus-width = <24>;
++ ssi = <3>;
++ bus-if = <0>;
++ channels = <8>;
++ pin-share-ssi = <4>;
++ };
++
++ /* ADSP capture setting for pcm3168 */
++ adsp_capture0: adsp,capture {
++ mode = "tdm";
++ clock-mode = "slave";
++ bus-width = <24>;
++ ssi = <4>;
++ bus-if = <0>;
++ channels = <8>;
++ pin-share-ssi = <3>;
++ };
++
++ adsp,ports {
++ port@0 {
++ playback = <&adsp_playback0>;
++ capture = <&adsp_capture0>;
++ };
++ };
++};
+\ No newline at end of file
+diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
+index 1cd64c1b3b31..71e59da3528d 100644
+--- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
++++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
+@@ -45,11 +45,18 @@
+ reg = <0x00000000 0x54000000 0x0 0x03000000>;
+ };
+
++ /* For Audio DSP */
++ adsp_reserved: linux,adsp {
++ compatible = "shared-dma-pool";
++ reusable;
++ reg = <0x00000000 0x57000000 0x0 0x01000000>;
++ };
++
+ /* global autoconfigured region for contiguous allocations */
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+- reg = <0x00000000 0x57000000 0x0 0x19000000>;
++ reg = <0x00000000 0x58000000 0x0 0x18000000>;
+ linux,cma-default;
+ };
+
+@@ -110,6 +117,42 @@
+ "dclkin.0", "dclkin.1", "dclkin.2";
+ };
+
++&adsp {
++ status = "okay";
++ clock-frequency = <12288000 11289600>;
++ audio-clocks = <22579200 24576000>;
++ memory-region = <&adsp_reserved>;
++
++ /* ADSP playback setting for ak4613 */
++ adsp_playback0: adsp,playback {
++ mode = "i2s";
++ clock-mode = "master";
++ bus-width = <16>;
++ ssi = <0>;
++ bus-if = <0>;
++ channels = <2>;
++ pin-share-ssi = <1>;
++ };
++
++ /* ADSP capture setting for ak4613 */
++ adsp_capture0: adsp,capture {
++ mode = "i2s";
++ clock-mode = "slave";
++ bus-width = <16>;
++ ssi = <1>;
++ bus-if = <0>;
++ channels = <2>;
++ pin-share-ssi = <0>;
++ };
++
++ adsp,ports {
++ port@0 {
++ playback = <&adsp_playback0>;
++ capture = <&adsp_capture0>;
++ };
++ };
++};
++
+ &vspb {
+ status = "okay";
+ };
diff --git a/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-m3ulcb-ADSP-enable.patch b/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-m3ulcb-ADSP-enable.patch
deleted file mode 100644
index eb737d9..0000000
--- a/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-m3ulcb-ADSP-enable.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
-index 1cd64c1b3b31..cc454a5e6a52 100644
---- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
-+++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
-@@ -45,11 +45,18 @@
- reg = <0x00000000 0x54000000 0x0 0x03000000>;
- };
-
-+ /* For Audio DSP */
-+ adsp_reserved: linux,adsp {
-+ compatible = "shared-dma-pool";
-+ reusable;
-+ reg = <0x00000000 0x57000000 0x0 0x01000000>;
-+ };
-+
- /* global autoconfigured region for contiguous allocations */
- linux,cma {
- compatible = "shared-dma-pool";
- reusable;
-- reg = <0x00000000 0x57000000 0x0 0x19000000>;
-+ reg = <0x00000000 0x58000000 0x0 0x18000000>;
- linux,cma-default;
- };
-
-@@ -110,6 +117,11 @@
- "dclkin.0", "dclkin.1", "dclkin.2";
- };
-
-+&adsp {
-+ status = "okay";
-+ memory-region = <&adsp_reserved>;
-+};
-+
- &vspb {
- status = "okay";
- };
- \ No newline at end of file
diff --git a/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb b/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb
index 13e221f..7f3514e 100644
--- a/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb
+++ b/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb
@@ -40,9 +40,9 @@ SRC_URI_append = " \
${@base_conditional("USE_CAS", "1", " file://capacity_aware_migration_strategy.cfg", "",d)} \
"
-# Add ADSP enable patch
+# Add ADSP patch to enable and add sound hardware abstraction
SRC_URI_append = " \
- file://0004-m3ulcb-ADSP-enable.patch \
+ file://0004-ADSP-enable-and-add-sound-hardware-abstraction.patch \
"
# Install USB3.0 firmware to rootfs