lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <MA0PR01MB7145B5094B0E3FB35764DE9FFFC29@MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM>
Date:   Fri, 13 Jan 2023 05:50:30 +0000
From:   Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
To:     Daniel Baluta <daniel.baluta@...il.com>,
        Daniel Baluta <daniel.baluta@....com>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>
CC:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "linux-imx@....com" <linux-imx@....com>,
        "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "peng.fan@....com" <peng.fan@....com>,
        "m.felsch@...gutronix.de" <m.felsch@...gutronix.de>,
        "shengjiu.wang@....com" <shengjiu.wang@....com>,
        "Markus.Niebel@...tq-group.com" <Markus.Niebel@...tq-group.com>,
        "hongxing.zhu@....com" <hongxing.zhu@....com>,
        "tommaso.merciai@...rulasolutions.com" 
        <tommaso.merciai@...rulasolutions.com>,
        "jun.li@....com" <jun.li@....com>,
        "ckeepax@...nsource.cirrus.com" <ckeepax@...nsource.cirrus.com>,
        "rf@...nsource.cirrus.com" <rf@...nsource.cirrus.com>,
        "povik+lin@...ebit.org" <povik+lin@...ebit.org>,
        "pierre-louis.bossart@...ux.intel.com" 
        <pierre-louis.bossart@...ux.intel.com>,
        "james.schulman@...rus.com" <james.schulman@...rus.com>,
        "flatmax@...tmax.com" <flatmax@...tmax.com>,
        "srinivas.kandagatla@...aro.org" <srinivas.kandagatla@...aro.org>,
        "ryan.lee.analog@...il.com" <ryan.lee.analog@...il.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Subject: Re: [PATCH] Support for MAX98090/91 codec in iMX8MM evk

>From d2001cdbc2fda3345af307b4cf3d0f2e53d80c35 Mon Sep 17 00:00:00 2001
From: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
Date: Fri, 13 Jan 2023 11:01:22 +0530
Subject: [PATCH] Add dts to support MAX98090/91 with i.MX8MM-evk

- Add sound-max98090 node to support external codec MAX98090/91
- Use i2c3 for i2c communicate with codec
- Use sai5 for i2s communication

Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk-max98090-91.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk-max98090-91.dts
new file mode 100644
index 000000000000..d053c586514a
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk-max98090-91.dts
@@ -0,0 +1,65 @@
+#include "imx8mm-evk.dtsi"
+
+/ {
+	sound-max98090 {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "max98090-audio";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,frame-master = <&cpudai>;
+		simple-audio-card,bitclock-master = <&cpudai>;
+		simple-audio-card,widgets = "Speakers", "Speakers";
+		simple-audio-card,routing =
+				"Speakers", "SPKR",
+				"Speakers", "SPKL",
+				"IN1", "MICBIAS",
+				"MIC1","IN1",
+				"MIC2","IN1";
+
+		cpudai: simple-audio-card,cpu {
+			sound-dai = <&sai5>;
+			dai-tdm-slot-num = <2>;
+			dai-tdm-slot-width = <32>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&max98090>;
+			clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;
+		};
+	};
+}
+
+&i2c3 {
+	max98090: audio-codec@10 {
+		compatible = "maxim,max98090","maxim,max98091";
+		#sound-dai-ceddlls = <0>;
+		reg = <0x10>;
+		clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;
+		clock-names = "mclk";
+	};
+}
+
+&sai5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sai5>;
+	assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
+	assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
+	assigned-clock-rates = <24576000>;
+	clocks = <&clk IMX8MM_CLK_SAI5_IPG>, <&clk IMX8MM_CLK_DUMMY>,
+		<&clk IMX8MM_CLK_SAI5_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
+		<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
+		<&clk IMX8MM_AUDIO_PLL2_OUT>;
+	clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl_sai5: sai5grp {
+		fsl,pins = <
+			MX8MM_IOMUXC_SAI5_MCLK_SAI5_MCLK        0xd6
+			MX8MM_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK     0xd6
+			MX8MM_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC     0xd6
+			MX8MM_IOMUXC_SAI5_RXD0_SAI5_RX_DATA0    0xd6
+			MX8MM_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0    0xd6
+		>;
+	}
+}
-- 
2.25.1
________________________________________
From: Daniel Baluta <daniel.baluta@...il.com>
Sent: Wednesday, January 11, 2023 5:26 PM
To: Hardevsinh Palaniya; Daniel Baluta
Cc: robh+dt@...nel.org; krzysztof.kozlowski+dt@...aro.org; shawnguo@...nel.org; s.hauer@...gutronix.de; kernel@...gutronix.de; festevam@...il.com; linux-imx@....com; lgirdwood@...il.com; broonie@...nel.org; perex@...ex.cz; tiwai@...e.com; peng.fan@....com; m.felsch@...gutronix.de; shengjiu.wang@....com; Markus.Niebel@...tq-group.com; hongxing.zhu@....com; tommaso.merciai@...rulasolutions.com; jun.li@....com; ckeepax@...nsource.cirrus.com; rf@...nsource.cirrus.com; povik+lin@...ebit.org; pierre-louis.bossart@...ux.intel.com; james.schulman@...rus.com; flatmax@...tmax.com; srinivas.kandagatla@...aro.org; ryan.lee.analog@...il.com; devicetree@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; alsa-devel@...a-project.org
Subject: Re: [PATCH] Support for MAX98090/91 codec in iMX8MM evk


 > I have added support for the external codec MAX98091 with I.MX8MM-EVK.

Please fix your email client to start sending email in text format only.

Now, going back to the matter at hand.

I do think that for an external codec we should find a smarter way of enabling it.

What would happen if you enable MAX codec in the dts but expander board is not plugged in?

Maybe create a separate dts which includes imx8mm-evk.dtsi?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ