b383b744e71fa163417e3997e8f2c37475122106
[openwrt/staging/blocktrron.git] /
1 From 813135a7ff3f0c2b91dc06a5b3f8deac15570466 Mon Sep 17 00:00:00 2001
2 From: j-schambacher <joerg@hifiberry.com>
3 Date: Wed, 28 Feb 2024 11:34:05 +0100
4 Subject: [PATCH 1283/1295] Overlays: Add definitions for HiFiBerry 8 channel
5 DAC8X
6
7 Dedicated overlay claiming all 4 data lanes of the designware
8 I2S0 module to drive 4x PCM5102. THe devices share BCLK and
9 LRCLK, therefore all outputs will always run at the same
10 samplerate and format.
11
12 Compatible only with PI5!
13
14 Signed-off-by: j-schambacher <joerg@hifiberry.com>
15 ---
16 arch/arm/boot/dts/overlays/Makefile | 1 +
17 arch/arm/boot/dts/overlays/README | 6 +++
18 .../dts/overlays/hifiberry-dac8x-overlay.dts | 50 +++++++++++++++++++
19 arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++
20 4 files changed, 61 insertions(+)
21 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
22
23 --- a/arch/arm/boot/dts/overlays/Makefile
24 +++ b/arch/arm/boot/dts/overlays/Makefile
25 @@ -88,6 +88,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
26 hifiberry-amp3.dtbo \
27 hifiberry-amp4pro.dtbo \
28 hifiberry-dac.dtbo \
29 + hifiberry-dac8x.dtbo \
30 hifiberry-dacplus.dtbo \
31 hifiberry-dacplusadc.dtbo \
32 hifiberry-dacplusadcpro.dtbo \
33 --- a/arch/arm/boot/dts/overlays/README
34 +++ b/arch/arm/boot/dts/overlays/README
35 @@ -1772,6 +1772,12 @@ Load: dtoverlay=hifiberry-dac
36 Params: <None>
37
38
39 +Name: hifiberry-dac8x
40 +Info: Configures the HifiBerry DAC8X audio cards (only on PI5)
41 +Load: dtoverlay=hifiberry-dac8x
42 +Params: <None>
43 +
44 +
45 Name: hifiberry-dacplus
46 Info: Configures the HifiBerry DAC+ audio card
47 Load: dtoverlay=hifiberry-dacplus,<param>=<val>
48 --- /dev/null
49 +++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
50 @@ -0,0 +1,50 @@
51 +// Definitions for HiFiBerry DAC8x
52 +/dts-v1/;
53 +/plugin/;
54 +
55 +/ {
56 + compatible = "brcm,bcm2712";
57 +
58 + fragment@0 {
59 + target = <&gpio>;
60 + __overlay__ {
61 + rp1_i2s0_dac8x: rp1_i2s0_dac8x {
62 + function = "i2s0";
63 + pins = "gpio18", "gpio19", "gpio21",
64 + "gpio23", "gpio25", "gpio27";
65 + bias-disable;
66 + status = "okay";
67 + };
68 + };
69 + };
70 +
71 + fragment@1 {
72 + target = <&i2s_clk_producer>;
73 + __overlay__ {
74 + pinctrl-names = "default";
75 + pinctrl-0 = <&rp1_i2s0_dac8x>;
76 + status = "okay";
77 + };
78 + };
79 +
80 + fragment@2 {
81 + target-path = "/";
82 + __overlay__ {
83 + pcm5102a-codec {
84 + #sound-dai-cells = <0>;
85 + compatible = "ti,pcm5102a";
86 + status = "okay";
87 + };
88 + };
89 + };
90 +
91 + fragment@3 {
92 + target = <&sound>;
93 + __overlay__ {
94 + compatible = "hifiberry,hifiberry-dac8x";
95 + i2s-controller = <&i2s_clk_producer>;
96 + status = "okay";
97 + };
98 + };
99 +
100 +};
101 --- a/arch/arm/boot/dts/overlays/overlay_map.dts
102 +++ b/arch/arm/boot/dts/overlays/overlay_map.dts
103 @@ -48,6 +48,10 @@
104 bcm2712;
105 };
106
107 + hifiberry-dac8x {
108 + bcm2712;
109 + };
110 +
111 highperi {
112 bcm2711;
113 };