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
149
150
151
152
153
|
From 58e6a45fb77833acc3fdaf0460ed3407f22dee63 Mon Sep 17 00:00:00 2001
From: pifi-bz <73530753+pifi-bz@users.noreply.github.com>
Date: Fri, 19 Feb 2021 13:14:32 +0200
Subject: [PATCH] DAC overlays (#4154)
Adding overlays for PiFi DAC Zero and PiFi DAC HD.
Signed-off-by: David Knell <david.knell@gmail.com>
---
arch/arm/boot/dts/overlays/Makefile | 2 +
arch/arm/boot/dts/overlays/README | 12 +++++
.../boot/dts/overlays/pifi-dac-hd-overlay.dts | 49 +++++++++++++++++++
.../dts/overlays/pifi-dac-zero-overlay.dts | 49 +++++++++++++++++++
4 files changed, 112 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/pifi-dac-hd-overlay.dts
create mode 100644 arch/arm/boot/dts/overlays/pifi-dac-zero-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -130,6 +130,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
pibell.dtbo \
pifacedigital.dtbo \
pifi-40.dtbo \
+ pifi-dac-hd.dtbo \
+ pifi-dac-zero.dtbo \
pifi-mini-210.dtbo \
piglow.dtbo \
piscreen.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2131,6 +2131,18 @@ Load: dtoverlay=pifi-40
Params: <None>
+Name: pifi-dac-hd
+Info: Configures the PiFi DAC HD
+Load: dtoverlay=pifi-dac-hd
+Params: <None>
+
+
+Name: pifi-dac-zero
+Info: Configures the PiFi DAC Zero
+Load: dtoverlay=pifi-dac-zero
+Params: <None>
+
+
Name: pifi-mini-210
Info: Configures the PiFi Mini stereo amplifier
Load: dtoverlay=pifi-mini-210
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pifi-dac-hd-overlay.dts
@@ -0,0 +1,49 @@
+// Overlay for PiFi-DAC-HD
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&i2s>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&i2c1>;
+ __overlay__ {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells =<0>;
+
+ pcm5142: pcm5142@4c {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5142";
+ reg = <0x4c>;
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&sound>;
+ __overlay__ {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "PiFi-DAC-HD";
+ status = "okay";
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+ cpu {
+ sound-dai = <&i2s>;
+ };
+ codec {
+ sound-dai = <&pcm5142>;
+ };
+ };
+ };
+ };
+};
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pifi-dac-zero-overlay.dts
@@ -0,0 +1,49 @@
+// Overlay for PiFi-DAC-Zero
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&sound>;
+ __overlay__ {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "PiFi-DAC-Zero";
+ status = "okay";
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+
+ cpu {
+ sound-dai = <&i2s>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+ };
+
+ codec {
+ sound-dai = <&codec_out>;
+ };
+ };
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+ __overlay__ {
+ codec_out: pcm5102a-codec {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5102a";
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&i2s>;
+ __overlay__ {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ };
+ };
+};
|