aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0722-overlays-Update-and-rename-chipdip-i2s-master-dac.patch
blob: 0ec62af31edfb14563241ad37ac99a82e9e88837 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
From e83ebb02f24f527df4916309cdb0b8a3f7d07a79 Mon Sep 17 00:00:00 2001
From: "chipdip.lab" <43340836+chipdipru@users.noreply.github.com>
Date: Mon, 26 Jul 2021 14:43:11 +0300
Subject: [PATCH] overlays: Update and rename chipdip-i2s-master-dac

Simple card fragment removed, GPIO fragment added.

Signed-off-by: Evgenij Sapunov <evgenij.sapunov@chipdip.ru>
---
 arch/arm/boot/dts/overlays/Makefile           |  2 +-
 arch/arm/boot/dts/overlays/README             |  6 +--
 .../boot/dts/overlays/chipdip-dac-overlay.dts | 46 ++++++++++++++++
 .../chipdip-i2s-master-dac-overlay.dts        | 53 -------------------
 4 files changed, 50 insertions(+), 57 deletions(-)
 create mode 100644 arch/arm/boot/dts/overlays/chipdip-dac-overlay.dts
 delete mode 100644 arch/arm/boot/dts/overlays/chipdip-i2s-master-dac-overlay.dts

--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -31,7 +31,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
 	audremap.dtbo \
 	balena-fin.dtbo \
 	cap1106.dtbo \
-	chipdip-i2s-master-dac.dtbo \
+	chipdip-dac.dtbo \
 	cma.dtbo \
 	dht11.dtbo \
 	dionaudio-loco.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -628,9 +628,9 @@ Load:   dtoverlay=cap1106,<param>=<val>
 Params: int_pin                 GPIO pin for interrupt signal (default 23)
 
 
-Name:   chipdip-i2s-master-dac
-Info:   Configures Raspberry PI to work as I2S slave with BCLK=64Fs.
-Load:   dtoverlay=chipdip-i2s-master-dac
+Name:   chipdip-dac
+Info:   Configures Chip Dip audio cards.
+Load:   dtoverlay=chipdip-dac
 Params: <None>
 
 
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/chipdip-dac-overlay.dts
@@ -0,0 +1,46 @@
+/*
+ * Device Tree overlay for ChipDip DAC
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "brcm,bcm2835";
+
+	fragment@0 {
+		target = <&i2s>;
+		__overlay__ {
+			status = "okay";
+		};
+	};
+
+	fragment@1 {
+		target-path = "/";
+		__overlay__ {
+			spdif-transmitter {
+				#address-cells = <0>;
+				#size-cells = <0>;
+				#sound-dai-cells = <0>;
+				compatible = "linux,spdif-dit";
+				status = "okay";
+			};
+		};
+	};
+
+	fragment@2 {
+		target = <&sound>;
+		__overlay__ {
+			compatible = "chipdip,chipdip-dac";
+			i2s-controller = <&i2s>;
+			sr0-gpios = <&gpio 5 0>;
+			sr1-gpios = <&gpio 6 0>;
+			sr2-gpios = <&gpio 12 0>;
+			res0-gpios = <&gpio 24 0>;
+			res1-gpios = <&gpio 27 0>;
+			mute-gpios = <&gpio 4 0>;
+			sdwn-gpios = <&gpio 13 0>;
+			status = "okay";
+		};
+	};
+};
--- a/arch/arm/boot/dts/overlays/chipdip-i2s-master-dac-overlay.dts
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Device Tree overlay for ChipDip I2S master DAC
- */
-
-/dts-v1/;
-/plugin/;
-
-/ {
-    compatible = "brcm,bcm2835";
-    fragment@0 {
-        target = <&sound>;
-        __overlay__ {
-            compatible = "simple-audio-card";
-            simple-audio-card,name = "ChipDip I2S master DAC";
-            status="okay";
-            playback_link: simple-audio-card,dai-link@0 {
-                format = "i2s";
-		bitclock-master = <&p_codec_dai>;
-                frame-master = <&p_codec_dai>;
-                p_cpu_dai: cpu {
-                        sound-dai = <&i2s>;
-			dai-tdm-slot-num = <2>;
-			dai-tdm-slot-width = <32>;
-				};
-
-                p_codec_dai: codec {
-                        sound-dai = <&codec_out>;
-                };
-            };
-        };
-    }; 
-
-    fragment@1 {
-        target-path = "/";
-        __overlay__ {
-            codec_out: spdif-transmitter {
-                #address-cells = <0>;
-                #size-cells = <0>;
-                #sound-dai-cells = <0>;
-                compatible = "linux,spdif-dit";
-                status = "okay";
-            };
-        };
-    };
- 
-    fragment@2 {
-        target = <&i2s>;
-        __overlay__ {
-            #sound-dai-cells = <0>;
-            status = "okay";
-        };
-    };
-};