From: Poojaa R <poojaamonica94@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org, Poojaa R <poojaamonica94@gmail.com>
Subject: [PATCH] dtoverlays: Added DT overlay file for MAX98090 and the detailed steps for its usage is included in https://github.com/Poojaa-Rangaiah/DeviceTreeOverlay-for-MAX98090 .
Date: Wed, 18 Dec 2024 12:28:48 +0530 [thread overview]
Message-ID: <20241218065848.12254-1-poojaamonica94@gmail.com> (raw)
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
diff --git a/arch/arm/boot/dts/overlays/max98090.dts b/arch/arm/boot/dts/overlays/max98090.dts
new file mode 100644
index 000000000000..eaf197384edb
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/max98090.dts
@@ -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";
+ };
+};
+
--
2.34.1
next reply other threads:[~2024-12-18 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 6:58 Poojaa R [this message]
2024-12-18 14:28 ` [PATCH] dtoverlays: Added DT overlay file for MAX98090 and the detailed steps for its usage is included in https://github.com/Poojaa-Rangaiah/DeviceTreeOverlay-for-MAX98090 Conor Dooley
[not found] ` <CAOnmTr91ufdFAci2OR0ZnQbtrw94DzN+uEnkgoB6kiXFK+b4bA@mail.gmail.com>
2024-12-18 16:10 ` Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241218065848.12254-1-poojaamonica94@gmail.com \
--to=poojaamonica94@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox