From c2308a7e4adbb2acc8ff149f91d1ca46801c135e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 23 Dec 2019 17:25:19 +0100 Subject: brcm2708: update to latest patches from RPi Foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also removes reverted patches. Signed-off-by: Álvaro Fernández Rojas --- ...0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.19/950-0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch (limited to 'target/linux/brcm2708/patches-4.19/950-0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch') diff --git a/target/linux/brcm2708/patches-4.19/950-0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch b/target/linux/brcm2708/patches-4.19/950-0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch new file mode 100644 index 0000000000..e149912edb --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0371-Maxim-MAX98357A-I2S-DAC-overlay-2935.patch @@ -0,0 +1,130 @@ +From 5962d99b5efed4297ed5c1807d21b406ab86aef1 Mon Sep 17 00:00:00 2001 +From: wavelet2 <20504977+wavelet2@users.noreply.github.com> +Date: Mon, 15 Apr 2019 10:00:20 +0100 +Subject: [PATCH] Maxim MAX98357A I2S DAC overlay (#2935) + +Add overlay for Maxim MAX98357A I2S DAC. + +Signed-off-by: Richard Steedman +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 9 ++ + .../boot/dts/overlays/max98357a-overlay.dts | 84 +++++++++++++++++++ + 3 files changed, 94 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/max98357a-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -75,6 +75,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + justboom-dac.dtbo \ + justboom-digi.dtbo \ + ltc294x.dtbo \ ++ max98357a.dtbo \ + mbed-dac.dtbo \ + mcp23017.dtbo \ + mcp23s17.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1276,6 +1276,15 @@ Params: ltc2941 Select t + See the datasheet for more information. + + ++Name: max98357a ++Info: Configures the Maxim MAX98357A I2S DAC ++Load: dtoverlay=max98357a,= ++Params: no-sdmode Driver does not manage the state of the DAC's ++ SD_MODE pin (i.e. chip is always on). ++ sdmode-pin integer, GPIO pin connected to the SD_MODE input ++ of the DAC (default GPIO4 if parameter omitted). ++ ++ + Name: mbed-dac + Info: Configures the mbed AudioCODEC (TLV320AIC23B) + Load: dtoverlay=mbed-dac +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/max98357a-overlay.dts +@@ -0,0 +1,84 @@ ++// Overlay for Maxim MAX98357A audio DAC ++ ++// dtparams: ++// no-sdmode - SD_MODE pin not managed by driver. ++// sdmode-pin - Specify GPIO pin to which SD_MODE is connected (default 4). ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ /* Enable I2S */ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ /* DAC whose SD_MODE pin is managed by driver (via GPIO pin) */ ++ fragment@1 { ++ target-path = "/"; ++ __overlay__ { ++ max98357a_dac: max98357a { ++ compatible = "maxim,max98357a"; ++ #sound-dai-cells = <0>; ++ sdmode-gpios = <&gpio 4 0>; /* 2nd word overwritten by sdmode-pin parameter */ ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ /* DAC whose SD_MODE pin is not managed by driver */ ++ fragment@2 { ++ target-path = "/"; ++ __dormant__ { ++ max98357a_nsd: max98357a { ++ compatible = "maxim,max98357a"; ++ #sound-dai-cells = <0>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ /* Soundcard connecting I2S to DAC with SD_MODE */ ++ fragment@3 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "MAX98357A"; ++ status = "okay"; ++ simple-audio-card,cpu { ++ sound-dai = <&i2s>; ++ }; ++ simple-audio-card,codec { ++ sound-dai = <&max98357a_dac>; ++ }; ++ }; ++ }; ++ ++ /* Soundcard connecting I2S to DAC without SD_MODE */ ++ fragment@4 { ++ target = <&sound>; ++ __dormant__ { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "MAX98357A"; ++ status = "okay"; ++ simple-audio-card,cpu { ++ sound-dai = <&i2s>; ++ }; ++ simple-audio-card,codec { ++ sound-dai = <&max98357a_nsd>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ no-sdmode = <0>,"-1+2-3+4"; ++ sdmode-pin = <&max98357a_dac>,"sdmode-gpios:4"; ++ }; ++}; -- cgit v1.2.3