aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-kernel/linux/linux-renesas/0002-ARM-shmobile-porter-Sound-PIO-support-on-DTS.patch
blob: 2d46e32cf9e8e4b0ce800d375a802d4ccaa991b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From cf4fa13cdad142f1d1bdf1485cc941140062e1ce Mon Sep 17 00:00:00 2001
From: Biju Das <biju.das@bp.renesas.com>
Date: Thu, 2 Apr 2015 13:46:13 +0100
Subject: [PATCH 2/7] ARM: shmobile: porter: Sound PIO support on DTS

This change is identical to the koelsch patch "ARM: shmobile: koelsch: Sound PIO support on DTS"
from Kuninori Morimoto and backported to 3.10
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7791-porter.dts |   52 ++++++++++++++++++++++++++++++----
 1 file changed, 46 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts
index 4fb5cd5..b39dc6a 100644
--- a/arch/arm/boot/dts/r8a7791-porter.dts
+++ b/arch/arm/boot/dts/r8a7791-porter.dts
@@ -12,11 +12,9 @@
 /*
  * SSI-AK4643
  *
- * these commands are required when playback.
+ * This command is required when Playback/Capture
  *
- * # amixer set "LINEOUT Mixer DACL" on
- * # amixer set "Digital" 200
- * # amixer set "DVC Out" 50
+ * amixer set "LINEOUT Mixer DACL" on
  */
 
 /dts-v1/;
@@ -102,6 +100,23 @@
 			  1800000 0>;
 	};
 
+	sound {
+		compatible = "simple-audio-card";
+
+		simple-audio-card,format = "left_j";
+		simple-audio-card,bitclock-master = <&sndcodec>;
+		simple-audio-card,frame-master = <&sndcodec>;
+
+		sndcpu: simple-audio-card,cpu {
+			sound-dai = <&rcar_sound>;
+		};
+
+		sndcodec: simple-audio-card,codec {
+			sound-dai = <&ak4643>;
+			system-clock-frequency = <11289600>;
+		};
+	};
+
 	hdmi_transmitter: adv7511 {
 		compatible = "adi,adv7511";
 		gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
@@ -128,7 +143,7 @@
 };
 
 &pfc {
-	pinctrl-0 = <&du_pins &usb0_pins &usb1_pins &sound_pins &sound_clk_pins &vin0_pins>;
+	pinctrl-0 = <&du_pins &usb0_pins &usb1_pins &vin0_pins>;
 	pinctrl-names = "default";
 
 	du_pins: du {
@@ -337,7 +352,7 @@
 		pagesize = <16>;
 	};
 
-	snd_codec: ak4643 {
+	ak4643: sound-codec@12 {
 		#sound-dai-cells = <0>;
 		compatible = "asahi-kasei,ak4643";
 		reg = <0x12>;
@@ -395,3 +410,28 @@
 &cpu0 {
 	cpu0-supply = <&vdd_dvfs>;
 };
+
+&rcar_sound {
+	pinctrl-0 = <&sound_pins &sound_clk_pins>;
+	pinctrl-names = "default";
+
+	#sound-dai-cells = <0>;
+
+	status = "okay";
+
+	rcar_sound,dai {
+		dai0 {
+			playback = <&ssi0>;
+			capture  = <&ssi1>;
+		};
+	};
+};
+
+&ssi0 {
+	pio-transfer;
+};
+
+&ssi1 {
+	pio-transfer;
+	shared-pin;
+};
-- 
1.7.9.5