Skip to content

Commit

Permalink
BCM270X: Adding device tree support for AudioSense-Pi add-on soundcard
Browse files Browse the repository at this point in the history
Device tree overlay for AudioSense-Pi card.

To enable support for the hardware add the following
line to the RPi /boot/config.txt:

	dtoverlay=audiosense-pi

More documentation @ arch/arm/boot/dts/overlays/README

Signed-off-by: b-ak <[email protected]>
  • Loading branch information
b-ak authored and Phil Elwell committed Jan 15, 2019
1 parent c56747a commit b11b5e7
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
audioinjector-addons.dtbo \
audioinjector-ultra.dtbo \
audioinjector-wm8731-audio.dtbo \
audiosense-pi.dtbo \
audremap.dtbo \
balena-fin.dtbo \
bmp085_i2c-sensor.dtbo \
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,14 @@ Load: dtoverlay=audioinjector-wm8731-audio
Params: <None>


Name: audiosense-pi
Info: Configures the audiosense-pi add on soundcard
For more information refer to
https://gitlab.com/kakar0t/audiosense-pi
Load: dtoverlay=audiosense-pi
Params: <None>


Name: audremap
Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
Load: dtoverlay=audremap,<param>=<val>
Expand Down
82 changes: 82 additions & 0 deletions arch/arm/boot/dts/overlays/audiosense-pi-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// Definitions for audiosense add on soundcard
/dts-v1/;
/plugin/;
#include <dt-bindings/pinctrl/bcm2835.h>
#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "brcm,bcm2837", "brcm,bcm2836", "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target-path = "/";
__overlay__ {
codec_reg_1v8: codec-reg-1v8 {
compatible = "regulator-fixed";
regulator-name = "tlv320aic3204_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
};
};

fragment@2 {
target = <&gpio>;
__overlay__ {
codec_rst: codec-rst {
brcm,pins = <26>;
brcm,function = <BCM2835_FSEL_GPIO_OUT>;
};
};
};

fragment@3 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

/* audio external oscillator */
codec_osc: codec_osc {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12000000>; /* 12 MHz */
};

codec: tlv320aic32x4@18 {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic32x4";
reg = <0x18>;

clocks = <&codec_osc>;
clock-names = "mclk";

iov-supply = <&vdd_3v3_reg>;
ldoin-supply = <&vdd_3v3_reg>;

gpio-controller;
#gpio-cells = <2>;
reset-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;

status = "okay";
};
};
};

fragment@4 {
target = <&sound>;
__overlay__ {
compatible = "as,audiosense-pi";
i2s-controller = <&i2s>;
status = "okay";
};
};
};

0 comments on commit b11b5e7

Please sign in to comment.