Add overlays needed for Interlude Audio Digital and Analog hats
authorBen Payne <ben@bluerocksoft.com>
Tue, 13 Feb 2024 22:56:28 +0000 (14:56 -0800)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:39 +0000 (11:35 +0000)
Adding 2 new overlays for use with
Interlude Audio's Digital and Analog hats
adding descriptions for both in README
adding changes to Makefile to include both DT's

arch/arm/boot/dts/overlays/Makefile
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts [new file with mode: 0644]
arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts [new file with mode: 0644]

index a568509..cab9b8a 100644 (file)
@@ -132,6 +132,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
        imx477.dtbo \
        imx519.dtbo \
        imx708.dtbo \
+       interludeaudio-analog.dtbo \
+       interludeaudio-digital.dtbo \
        iqaudio-codec.dtbo \
        iqaudio-dac.dtbo \
        iqaudio-dacplus.dtbo \
index 64f5255..a48ddfc 100644 (file)
@@ -2714,6 +2714,18 @@ Params: rotation                Mounting rotation of the camera sensor (0 or
                                 450000000 (default), 447000000, 453000000.
 
 
+Name:   interludeaudio-analog
+Info:   Configures Interlude Audio Analog Hat audio card
+Load:   dtoverlay=interludeaudio-analog,<param>=<val>
+Params: gpiopin                 GPIO pin for codec reset
+
+
+Name:   interludeaudio-digital
+Info:   Configures Interlude Audio Digital Hat audio card
+Load:   dtoverlay=interludeaudio-digital
+Params: <None>
+
+
 Name:   iqaudio-codec
 Info:   Configures the IQaudio Codec audio card
 Load:   dtoverlay=iqaudio-codec
diff --git a/arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts b/arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts
new file mode 100644 (file)
index 0000000..e259013
--- /dev/null
@@ -0,0 +1,73 @@
+// Definitions for Interlude audio analog hat
+/dts-v1/;
+/plugin/;
+
+/ {
+       compatible = "brcm,bcm2835";
+
+       fragment@0 {
+               target = <&sound>;
+               __overlay__ {
+                       compatible = "simple-audio-card";
+                       i2s-controller = <&i2s_clk_consumer>;
+                       status = "okay";
+
+                       simple-audio-card,name = "snd_IA_Analog_Hat";
+
+                       simple-audio-card,widgets =
+                               "Line", "Line In",
+                               "Line", "Line Out";
+
+                       simple-audio-card,routing =
+                               "Line Out","AOUTA+",
+                               "Line Out","AOUTA-",
+                               "Line Out","AOUTB+",
+                               "Line Out","AOUTB-",
+                               "AINA","Line In",
+                               "AINB","Line In";
+
+                       simple-audio-card,format = "i2s";
+
+                       simple-audio-card,bitclock-master = <&sound_master>;
+                       simple-audio-card,frame-master = <&sound_master>;
+
+                       simple-audio-card,cpu {
+                               sound-dai = <&i2s>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                       };
+
+                       sound_master: simple-audio-card,codec {
+                               sound-dai = <&cs4271>;
+                               system-clock-frequency = <24576000>;
+                       };
+               };
+       };
+
+       fragment@1 {
+               target = <&i2s_clk_consumer>;
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+
+       fragment@2 {
+               target = <&i2c1>;
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+
+                       cs4271: cs4271@10 {
+                               #sound-dai-cells = <0>;
+                               compatible = "cirrus,cs4271";
+                               reg = <0x10>;
+                               status = "okay";
+                               reset-gpio = <&gpio 24 0>; /* Pin 26, active high */
+                       };
+               };
+       };
+       __overrides__ {
+               gpiopin = <&cs4271>,"reset-gpio:4";
+       };
+};
diff --git a/arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts b/arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts
new file mode 100644 (file)
index 0000000..24be008
--- /dev/null
@@ -0,0 +1,49 @@
+// Definitions for Interlude Audio Digital Hat
+/dts-v1/;
+/plugin/;
+
+/ {
+       compatible = "brcm,bcm2835";
+
+       fragment@0 {
+               target = <&i2s_clk_consumer>;
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+
+       fragment@1 {
+               target = <&i2c1>;
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+
+                       wm8804@3b {
+                               #sound-dai-cells = <0>;
+                               compatible = "wlf,wm8804";
+                               reg = <0x3b>;
+                               PVDD-supply = <&vdd_3v3_reg>;
+                               DVDD-supply = <&vdd_3v3_reg>;
+                               status = "okay";
+                       };
+               };
+       };
+
+
+       fragment@2 {
+               target = <&sound>;
+               __overlay__ {
+                       compatible = "interludeaudio,interludeaudio-digital";
+                       i2s-controller = <&i2s_clk_consumer>;
+                       status = "okay";
+                       clock44-gpio = <&gpio 22 0>;
+                       clock48-gpio = <&gpio 27 0>;
+                       led1-gpio = <&gpio 13 0>;
+                       led2-gpio = <&gpio 12 0>;
+                       led3-gpio = <&gpio 6 0>;
+                       reset-gpio = <&gpio 23 0>;
+               };
+       };
+
+};