kernel: bump 4.14 to 4.14.93
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.14 / 950-0411-Add-support-for-audioinjector.net-ultra-soundcard.-2.patch
1 From e4981de3c02a5d73085ba036be4e104a6b034791 Mon Sep 17 00:00:00 2001
2 From: Matt Flax <flatmax@flatmax.org>
3 Date: Tue, 28 Aug 2018 18:42:13 +1000
4 Subject: [PATCH 411/454] Add support for audioinjector.net ultra soundcard.
5 (#2664)
6
7 Uses the simple-audio-card ALSA machine driver. Sets up the machine
8 driver in the device tree overlay file. The overlays/Makefile is
9 altered to add the audioinjector-ultra.dtbo dtb overlay.
10
11 Adds CONFIG_SND_SOC_CS4265 to the defconfig files.
12
13 Signed-off-by: Matt Flax <flatmax@flatmax.org>
14 ---
15 arch/arm/boot/dts/overlays/Makefile | 1 +
16 arch/arm/boot/dts/overlays/README | 6 ++
17 .../overlays/audioinjector-ultra-overlay.dts | 71 +++++++++++++++++++
18 arch/arm/configs/bcm2709_defconfig | 1 +
19 arch/arm/configs/bcmrpi_defconfig | 1 +
20 5 files changed, 80 insertions(+)
21 create mode 100644 arch/arm/boot/dts/overlays/audioinjector-ultra-overlay.dts
22
23 --- a/arch/arm/boot/dts/overlays/Makefile
24 +++ b/arch/arm/boot/dts/overlays/Makefile
25 @@ -17,6 +17,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
26 applepi-dac.dtbo \
27 at86rf233.dtbo \
28 audioinjector-addons.dtbo \
29 + audioinjector-ultra.dtbo \
30 audioinjector-wm8731-audio.dtbo \
31 audremap.dtbo \
32 balena-fin.dtbo \
33 --- a/arch/arm/boot/dts/overlays/README
34 +++ b/arch/arm/boot/dts/overlays/README
35 @@ -411,6 +411,12 @@ Params: non-stop-clocks Keeps th
36 is paused or stopped (default off)
37
38
39 +Name: audioinjector-ultra
40 +Info: Configures the audioinjector.net ultra soundcard
41 +Load: dtoverlay=audioinjector-ultra
42 +Params: <None>
43 +
44 +
45 Name: audioinjector-wm8731-audio
46 Info: Configures the audioinjector.net audio add on soundcard
47 Load: dtoverlay=audioinjector-wm8731-audio
48 --- /dev/null
49 +++ b/arch/arm/boot/dts/overlays/audioinjector-ultra-overlay.dts
50 @@ -0,0 +1,71 @@
51 +// Definitions for audioinjector.net audio add on soundcard
52 +/dts-v1/;
53 +/plugin/;
54 +
55 +/ {
56 + compatible = "brcm,bcm2708";
57 +
58 + fragment@0 {
59 + target = <&i2s>;
60 + __overlay__ {
61 + status = "okay";
62 + };
63 + };
64 +
65 + fragment@1 {
66 + target = <&i2c1>;
67 + __overlay__ {
68 + #address-cells = <1>;
69 + #size-cells = <0>;
70 + status = "okay";
71 +
72 + cs4265: cs4265@4e {
73 + #sound-dai-cells = <0>;
74 + compatible = "cirrus,cs4265";
75 + reg = <0x4e>;
76 + reset-gpios = <&gpio 5 0>;
77 + status = "okay";
78 + };
79 + };
80 + };
81 +
82 + fragment@2 {
83 + target = <&sound>;
84 + __overlay__ {
85 + compatible = "simple-audio-card";
86 + i2s-controller = <&i2s>;
87 + status = "okay";
88 +
89 + simple-audio-card,name = "audioinjector-ultra";
90 +
91 + simple-audio-card,widgets =
92 + "Line", "OUTPUTS",
93 + "Line", "INPUTS";
94 +
95 + simple-audio-card,routing =
96 + "OUTPUTS","LINEOUTL",
97 + "OUTPUTS","LINEOUTR",
98 + "OUTPUTS","SPDIFOUT",
99 + "LINEINL","INPUTS",
100 + "LINEINR","INPUTS",
101 + "MICL","INPUTS",
102 + "MICR","INPUTS";
103 +
104 + simple-audio-card,format = "i2s";
105 +
106 + simple-audio-card,bitclock-master = <&sound_master>;
107 + simple-audio-card,frame-master = <&sound_master>;
108 +
109 + simple-audio-card,cpu {
110 + sound-dai = <&i2s>;
111 + dai-tdm-slot-num = <2>;
112 + dai-tdm-slot-width = <32>;
113 + };
114 +
115 + sound_master: simple-audio-card,codec {
116 + sound-dai = <&cs4265>;
117 + system-clock-frequency = <12288000>;
118 + };
119 + };
120 + };
121 +};
122 --- a/arch/arm/configs/bcm2709_defconfig
123 +++ b/arch/arm/configs/bcm2709_defconfig
124 @@ -917,6 +917,7 @@ CONFIG_SND_SOC_AK4554=m
125 CONFIG_SND_SOC_CS4271_I2C=m
126 CONFIG_SND_SOC_SPDIF=m
127 CONFIG_SND_SOC_WM8804_I2C=m
128 +CONFIG_SND_SOC_CS4265=m
129 CONFIG_SND_SIMPLE_CARD=m
130 CONFIG_HID_BATTERY_STRENGTH=y
131 CONFIG_HIDRAW=y
132 --- a/arch/arm/configs/bcmrpi_defconfig
133 +++ b/arch/arm/configs/bcmrpi_defconfig
134 @@ -910,6 +910,7 @@ CONFIG_SND_SOC_AK4554=m
135 CONFIG_SND_SOC_CS4271_I2C=m
136 CONFIG_SND_SOC_SPDIF=m
137 CONFIG_SND_SOC_WM8804_I2C=m
138 +CONFIG_SND_SOC_CS4265=m
139 CONFIG_SND_SIMPLE_CARD=m
140 CONFIG_HID_BATTERY_STRENGTH=y
141 CONFIG_HIDRAW=y