1 From 5962d99b5efed4297ed5c1807d21b406ab86aef1 Mon Sep 17 00:00:00 2001
2 From: wavelet2 <20504977+wavelet2@users.noreply.github.com>
3 Date: Mon, 15 Apr 2019 10:00:20 +0100
4 Subject: [PATCH 425/806] Maxim MAX98357A I2S DAC overlay (#2935)
6 Add overlay for Maxim MAX98357A I2S DAC.
8 Signed-off-by: Richard Steedman <richard.steedman@gmail.com>
10 arch/arm/boot/dts/overlays/Makefile | 1 +
11 arch/arm/boot/dts/overlays/README | 9 ++
12 .../boot/dts/overlays/max98357a-overlay.dts | 84 +++++++++++++++++++
13 3 files changed, 94 insertions(+)
14 create mode 100644 arch/arm/boot/dts/overlays/max98357a-overlay.dts
16 --- a/arch/arm/boot/dts/overlays/Makefile
17 +++ b/arch/arm/boot/dts/overlays/Makefile
18 @@ -75,6 +75,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -1276,6 +1276,15 @@ Params: ltc2941 Select t
29 See the datasheet for more information.
33 +Info: Configures the Maxim MAX98357A I2S DAC
34 +Load: dtoverlay=max98357a,<param>=<val>
35 +Params: no-sdmode Driver does not manage the state of the DAC's
36 + SD_MODE pin (i.e. chip is always on).
37 + sdmode-pin integer, GPIO pin connected to the SD_MODE input
38 + of the DAC (default GPIO4 if parameter omitted).
42 Info: Configures the mbed AudioCODEC (TLV320AIC23B)
43 Load: dtoverlay=mbed-dac
45 +++ b/arch/arm/boot/dts/overlays/max98357a-overlay.dts
47 +// Overlay for Maxim MAX98357A audio DAC
50 +// no-sdmode - SD_MODE pin not managed by driver.
51 +// sdmode-pin - Specify GPIO pin to which SD_MODE is connected (default 4).
57 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
67 + /* DAC whose SD_MODE pin is managed by driver (via GPIO pin) */
71 + max98357a_dac: max98357a {
72 + compatible = "maxim,max98357a";
73 + #sound-dai-cells = <0>;
74 + sdmode-gpios = <&gpio 4 0>; /* 2nd word overwritten by sdmode-pin parameter */
80 + /* DAC whose SD_MODE pin is not managed by driver */
84 + max98357a_nsd: max98357a {
85 + compatible = "maxim,max98357a";
86 + #sound-dai-cells = <0>;
92 + /* Soundcard connecting I2S to DAC with SD_MODE */
96 + compatible = "simple-audio-card";
97 + simple-audio-card,format = "i2s";
98 + simple-audio-card,name = "MAX98357A";
100 + simple-audio-card,cpu {
101 + sound-dai = <&i2s>;
103 + simple-audio-card,codec {
104 + sound-dai = <&max98357a_dac>;
109 + /* Soundcard connecting I2S to DAC without SD_MODE */
113 + compatible = "simple-audio-card";
114 + simple-audio-card,format = "i2s";
115 + simple-audio-card,name = "MAX98357A";
117 + simple-audio-card,cpu {
118 + sound-dai = <&i2s>;
120 + simple-audio-card,codec {
121 + sound-dai = <&max98357a_nsd>;
127 + no-sdmode = <0>,"-1+2-3+4";
128 + sdmode-pin = <&max98357a_dac>,"sdmode-gpios:4";