1 From 0d2a0f4f4c00c958fb6e7a2673adbe51c2a932f2 Mon Sep 17 00:00:00 2001
2 From: b-ak <anur.bhargav@gmail.com>
3 Date: Thu, 3 Jan 2019 00:29:14 +0530
4 Subject: [PATCH 300/806] BCM270X: Adding device tree support for AudioSense-Pi
7 Device tree overlay for AudioSense-Pi card.
9 To enable support for the hardware add the following
10 line to the RPi /boot/config.txt:
12 dtoverlay=audiosense-pi
14 More documentation @ arch/arm/boot/dts/overlays/README
16 Signed-off-by: b-ak <anur.bhargav@gmail.com>
18 arch/arm/boot/dts/overlays/Makefile | 1 +
19 arch/arm/boot/dts/overlays/README | 8 ++
20 .../dts/overlays/audiosense-pi-overlay.dts | 82 +++++++++++++++++++
21 3 files changed, 91 insertions(+)
22 create mode 100644 arch/arm/boot/dts/overlays/audiosense-pi-overlay.dts
24 --- a/arch/arm/boot/dts/overlays/Makefile
25 +++ b/arch/arm/boot/dts/overlays/Makefile
26 @@ -20,6 +20,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
27 audioinjector-addons.dtbo \
28 audioinjector-ultra.dtbo \
29 audioinjector-wm8731-audio.dtbo \
30 + audiosense-pi.dtbo \
33 bmp085_i2c-sensor.dtbo \
34 --- a/arch/arm/boot/dts/overlays/README
35 +++ b/arch/arm/boot/dts/overlays/README
36 @@ -453,6 +453,14 @@ Load: dtoverlay=audioinjector-wm8731-a
41 +Info: Configures the audiosense-pi add on soundcard
42 + For more information refer to
43 + https://gitlab.com/kakar0t/audiosense-pi
44 +Load: dtoverlay=audiosense-pi
49 Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
50 Load: dtoverlay=audremap,<param>=<val>
52 +++ b/arch/arm/boot/dts/overlays/audiosense-pi-overlay.dts
54 +// Definitions for audiosense add on soundcard
57 +#include <dt-bindings/pinctrl/bcm2835.h>
58 +#include <dt-bindings/gpio/gpio.h>
61 + compatible = "brcm,bcm2837", "brcm,bcm2836", "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
73 + codec_reg_1v8: codec-reg-1v8 {
74 + compatible = "regulator-fixed";
75 + regulator-name = "tlv320aic3204_1v8";
76 + regulator-min-microvolt = <1800000>;
77 + regulator-max-microvolt = <1800000>;
78 + regulator-always-on;
86 + codec_rst: codec-rst {
88 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
96 + #address-cells = <1>;
100 + /* audio external oscillator */
101 + codec_osc: codec_osc {
102 + compatible = "fixed-clock";
103 + #clock-cells = <0>;
104 + clock-frequency = <12000000>; /* 12 MHz */
107 + codec: tlv320aic32x4@18 {
108 + #sound-dai-cells = <0>;
109 + compatible = "ti,tlv320aic32x4";
112 + clocks = <&codec_osc>;
113 + clock-names = "mclk";
115 + iov-supply = <&vdd_3v3_reg>;
116 + ldoin-supply = <&vdd_3v3_reg>;
120 + reset-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
130 + compatible = "as,audiosense-pi";
131 + i2s-controller = <&i2s>;