Skip to content

Commit

Permalink
ASoC: A simple-card overlay for ADAU7002
Browse files Browse the repository at this point in the history
Usage: `dtoverlay=adau7002-simple`
  • Loading branch information
plasticchris authored and popcornmix committed May 5, 2017
1 parent 7266759 commit 29a63df
Show file tree
Hide file tree
Showing 3 changed files with 59 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 @@ -2,6 +2,7 @@

dtbo-$(CONFIG_ARCH_BCM2835) += \
adau1977-adc.dtbo \
adau7002-simple.dtbo \
ads1015.dtbo \
ads7846.dtbo \
akkordion-iqdacplus.dtbo \
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ Load: dtoverlay=adau1977-adc
Params: <None>


Name: adau7002-simple
Info: Overlay for the activation of ADAU7002 stereo PDM to I2S converter.
Load: dtoverlay=adau7002-simple,<param>=<val>
Params: card-name Override the default, "adau7002", card name.


Name: ads1015
Info: Overlay for activation of Texas Instruments ADS1015 ADC over I2C
Load: dtoverlay=ads1015,<param>=<val>
Expand Down
52 changes: 52 additions & 0 deletions arch/arm/boot/dts/overlays/adau7002-simple-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

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

fragment@1 {
target-path = "/";
__overlay__ {
adau7002_codec: adau7002-codec {
#sound-dai-cells = <0>;
compatible = "adi,adau7002";
/* IOVDD-supply = <&supply>;*/
status = "okay";
};
};
};

fragment@2 {
target = <&sound>;
sound_overlay: __overlay__ {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "adau7002";
simple-audio-card,bitclock-slave = <&dailink0_slave>;
simple-audio-card,frame-slave = <&dailink0_slave>;
simple-audio-card,widgets =
"Microphone", "Microphone Jack";
simple-audio-card,routing =
"PDM_DAT", "Microphone Jack";
status = "okay";
simple-audio-card,cpu {
sound-dai = <&i2s>;
};
dailink0_slave: simple-audio-card,codec {
sound-dai = <&adau7002_codec>;
};
};
};


__overrides__ {
card-name = <&sound_overlay>,"simple-audio-card,name";
};
};

0 comments on commit 29a63df

Please sign in to comment.