brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.14 / 950-0235-overlays-Add-overlay-for-PiBell-soundcard.patch
1 From 36a2db8647b19b0c8576a10ab787b14098049f9b Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 28 Feb 2018 21:29:42 +0000
4 Subject: [PATCH 235/454] overlays: Add overlay for PiBell soundcard
5
6 This overlay is presented as another example of using the simple card
7 driver.
8
9 See: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=99784&p=1279490#p1278971
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
12 ---
13 arch/arm/boot/dts/overlays/Makefile | 1 +
14 arch/arm/boot/dts/overlays/README | 7 ++
15 arch/arm/boot/dts/overlays/pibell-overlay.dts | 81 +++++++++++++++++++
16 3 files changed, 89 insertions(+)
17 create mode 100644 arch/arm/boot/dts/overlays/pibell-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -76,6 +76,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
22 pi3-disable-bt.dtbo \
23 pi3-disable-wifi.dtbo \
24 pi3-miniuart-bt.dtbo \
25 + pibell.dtbo \
26 piscreen.dtbo \
27 piscreen2r.dtbo \
28 pisound.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -1182,6 +1182,13 @@ Load: dtoverlay=pi3-miniuart-bt
32 Params: <None>
33
34
35 +Name: pibell
36 +Info: Configures the pibell audio card.
37 +Load: dtoverlay=pibell,<param>=<val>
38 +Params: alsaname Set the name as it appears in ALSA (default
39 + "PiBell")
40 +
41 +
42 Name: piscreen
43 Info: PiScreen display by OzzMaker.com
44 Load: dtoverlay=piscreen,<param>=<val>
45 --- /dev/null
46 +++ b/arch/arm/boot/dts/overlays/pibell-overlay.dts
47 @@ -0,0 +1,81 @@
48 +/dts-v1/;
49 +/plugin/;
50 +
51 +/ {
52 + compatible = "brcm,bcm2708";
53 +
54 + fragment@0 {
55 + target-path = "/";
56 + __overlay__ {
57 + codec_out: spdif-transmitter {
58 + #address-cells = <0>;
59 + #size-cells = <0>;
60 + #sound-dai-cells = <0>;
61 + compatible = "linux,spdif-dit";
62 + status = "okay";
63 + };
64 +
65 + codec_in: card-codec {
66 + #sound-dai-cells = <0>;
67 + compatible = "invensense,ics43432";
68 + status = "okay";
69 + };
70 + };
71 + };
72 +
73 + fragment@1 {
74 + target = <&i2s>;
75 + __overlay__ {
76 + #sound-dai-cells = <0>;
77 + status = "okay";
78 + };
79 + };
80 +
81 + fragment@2 {
82 + target = <&sound>;
83 + snd: __overlay__ {
84 + compatible = "simple-audio-card";
85 + simple-audio-card,name = "PiBell";
86 +
87 + status="okay";
88 +
89 + capture_link: simple-audio-card,dai-link@0 {
90 + format = "i2s";
91 +
92 + r_cpu_dai: cpu {
93 + sound-dai = <&i2s>;
94 +
95 +/* example TDM slot configuration
96 + dai-tdm-slot-num = <2>;
97 + dai-tdm-slot-width = <32>;
98 +*/
99 + };
100 +
101 + r_codec_dai: codec {
102 + sound-dai = <&codec_in>;
103 + };
104 + };
105 +
106 + playback_link: simple-audio-card,dai-link@1 {
107 + format = "i2s";
108 +
109 + p_cpu_dai: cpu {
110 + sound-dai = <&i2s>;
111 +
112 +/* example TDM slot configuration
113 + dai-tdm-slot-num = <2>;
114 + dai-tdm-slot-width = <32>;
115 +*/
116 + };
117 +
118 + p_codec_dai: codec {
119 + sound-dai = <&codec_out>;
120 + };
121 + };
122 + };
123 + };
124 +
125 + __overrides__ {
126 + alsaname = <&snd>, "simple-audio-card,name";
127 + };
128 +};