new file mode 100644
@@ -0,0 +1,96 @@
+/*
+ * Device Tree Overlay for MAX98090, MAX98091 Audio Codec.
+ * https://github.com/Poojaa-Rangaiah/DeviceTreeOverlay-for-MAX98090 => for more details.
+ * MAX98090 audio codec as master and Raspberry Pi as slave.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835", "brcm,bcm2711";
+
+ fragment@0 {
+ target = <&i2s_clk_consumer>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&i2c1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ max98090_codec: max98090@10 {
+ #sound-dai-cells = <0>;
+ compatible = "maxim,max98090","maxim,max98091";
+ reg = <0x10>;
+ interrupt-parent = <&gpio>;
+ interrupts = <27 2>; /* GPIO 27 as Edge_Falling_IRQ (2) */
+ maxim,micbias = <3>;
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@2 {
+ target-path = "/";
+ __overlay__ {
+ clk_oscillator: oscillator {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <12288000>; /* Frequency of the external oscillator (mclk = 12.288 MHz) but can also be 11.2896 MHz/12 MHz/13 MHz/26 MHz/19.2 MHz. */
+ clock-output-names = "mclk";
+ };
+ };
+ };
+
+ fragment@3 {
+ target = <&sound>;
+ sound_overlay: __overlay__ {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "MAX98090-Codec";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Speaker", "Speaker",
+ "Line", "Line In",
+ "Line", "Line Out",
+ "Headphone", "Headphone Jack";
+
+ simple-audio-card,routing =
+ "Headphone Jack", "HPL",
+ "Headphone Jack", "HPR",
+ "Line Out", "RCVL",
+ "Line Out", "RCVR",
+ /* Uncomment any of these below lines if the Line Input(s) is(are) used else leave it as such. */
+ //"IN5", "Line In", /* IN1/IN2/IN3/IN4/IN6 (For single ended input) */
+ //"IN56", "Line In", /* IN34 (For differential inputs) */
+ "MIC1", "Mic Jack",
+ "MIC2", "Mic Jack",
+ "Speaker", "SPKL",
+ "Speaker", "SPKR";
+
+ status = "okay";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s_clk_consumer>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&max98090_codec>;
+ clocks = <&clk_oscillator>;
+ };
+ };
+ };
+
+ __overrides__ {
+ card-name = <&sound_overlay>, "simple-audio-card,name";
+ };
+};
+
Only the driver files were existing for max98090 audio codec (playback and capture) but now the max98090.dts file is also included in linux/arch/arm/boot/dts/overlays/. new file: arch/arm/boot/dts/overlays/max98090.dts Signed-off-by: Poojaa R <poojaamonica94@gmail.com> --- arch/arm/boot/dts/overlays/max98090.dts | 96 +++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/max98090.dts