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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA+D8AMDbenx8scnBZdABAxF8MaYsBRzxXZjgGhMRbCJ-1wwcw@mail.gmail.com>
Date: Fri, 30 May 2025 10:21:03 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Marco Felsch <m.felsch@...gutronix.de>
Cc: Shengjiu Wang <shengjiu.wang@....com>, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de, 
	kernel@...gutronix.de, festevam@...il.com, devicetree@...r.kernel.org, 
	imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, carlos.song@....com
Subject: Re: [PATCH v2 4/6] arm64: dts: imx943-evk: add sound-wm8962 support

On Wed, May 28, 2025 at 4:37 PM Marco Felsch <m.felsch@...gutronix.de> wrote:
>
> Hi,
>
> On 25-05-28, Shengjiu Wang wrote:
> > Add WM8962 codec connected to SAI1 interface.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > Reviewed-by: Frank Li <Frank.Li@....com>
> > ---
> >  arch/arm64/boot/dts/freescale/imx943-evk.dts | 79 ++++++++++++++++++++
> >  1 file changed, 79 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> > index ff6e9ac5477f..da08aaa95904 100644
> > --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> > +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> > @@ -36,6 +36,15 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
> >               enable-active-high;
> >       };
> >
> > +     reg_audio_pwr: regulator-wm8962-pwr {
> > +             compatible = "regulator-fixed";
> > +             regulator-max-microvolt = <3300000>;
> > +             regulator-min-microvolt = <3300000>;
> > +             regulator-name = "audio-pwr";
> > +             gpio = <&pcal6416_i2c3_u171 12 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +     };
> > +
> >       reserved-memory {
> >               ranges;
> >               #address-cells = <2>;
> > @@ -50,6 +59,21 @@ linux,cma {
> >               };
> >       };
> >
> > +     sound-wm8962 {
> > +             compatible = "fsl,imx-audio-wm8962";
>
> Out of curiosity did you considered making use of "audio-graph-card2"?
>
> The "fsl,imx-audio-wm8962" seems like a pretty simple sound card which
> could be added via the "audio-graph-card2" as well. Don't get me wrong,
> it's not wrong what you're doing here but making use of the generic
> sound card would be nice because it's very common to just copy'n'paste
> the audio integration from the corresponding evk.dts file.

Thanks for the suggestion.

WM8962 has a function .set_pll(), which hasn't been supported in
audio-graph-card2.  so we still use fsl,imx-audio-wm8962.

Best regards
Shengjiu Wang

>
> Regards,
>   Marco
>
> > +             audio-codec = <&wm8962>;
> > +             audio-cpu = <&sai1>;
> > +             audio-routing = "Headphone Jack", "HPOUTL",
> > +                     "Headphone Jack", "HPOUTR",
> > +                     "Ext Spk", "SPKOUTL",
> > +                     "Ext Spk", "SPKOUTR",
> > +                     "AMIC", "MICBIAS",
> > +                     "IN3R", "AMIC",
> > +                     "IN1R", "AMIC";
> > +             hp-det-gpio = <&pcal6416_i2c3_u48 14 GPIO_ACTIVE_HIGH>;
> > +             model = "wm8962-audio";
> > +     };
> > +
> >       memory@...00000 {
> >               reg = <0x0 0x80000000 0x0 0x80000000>;
> >               device_type = "memory";
> > @@ -103,6 +127,28 @@ i2c@4 {
> >                       reg = <4>;
> >                       #address-cells = <1>;
> >                       #size-cells = <0>;
> > +
> > +                     wm8962: codec@1a {
> > +                             compatible = "wlf,wm8962";
> > +                             reg = <0x1a>;
> > +                             clocks = <&scmi_clk IMX94_CLK_SAI1>;
> > +                             AVDD-supply = <&reg_audio_pwr>;
> > +                             CPVDD-supply = <&reg_audio_pwr>;
> > +                             DBVDD-supply = <&reg_audio_pwr>;
> > +                             DCVDD-supply = <&reg_audio_pwr>;
> > +                             gpio-cfg = <
> > +                                     0x0000 /* 0:Default */
> > +                                     0x0000 /* 1:Default */
> > +                                     0x0000 /* 2:FN_DMICCLK */
> > +                                     0x0000 /* 3:Default */
> > +                                     0x0000 /* 4:FN_DMICCDAT */
> > +                                     0x0000 /* 5:Default */
> > +                             >;
> > +                             MICVDD-supply = <&reg_audio_pwr>;
> > +                             PLLVDD-supply = <&reg_audio_pwr>;
> > +                             SPKVDD1-supply = <&reg_audio_pwr>;
> > +                             SPKVDD2-supply = <&reg_audio_pwr>;
> > +                     };
> >               };
> >
> >               i2c@5 {
> > @@ -128,6 +174,12 @@ pcal6416_i2c3_u171: gpio@21 {
> >                               reg = <0x21>;
> >                               #gpio-cells = <2>;
> >                               gpio-controller;
> > +
> > +                             audio-pwren-hog {
> > +                                     gpios = <12 GPIO_ACTIVE_HIGH>;
> > +                                     gpio-hog;
> > +                                     output-high;
> > +                             };
> >                       };
> >               };
> >
> > @@ -262,6 +314,23 @@ &lpuart1 {
> >       status = "okay";
> >  };
> >
> > +&sai1 {
> > +     assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
> > +                       <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
> > +                       <&scmi_clk IMX94_CLK_AUDIOPLL1>,
> > +                       <&scmi_clk IMX94_CLK_AUDIOPLL2>,
> > +                       <&scmi_clk IMX94_CLK_SAI1>;
> > +     assigned-clock-parents = <0>, <0>, <0>, <0>,
> > +                              <&scmi_clk IMX94_CLK_AUDIOPLL1>;
> > +     assigned-clock-rates = <3932160000>,
> > +                            <3612672000>, <393216000>,
> > +                            <361267200>, <12288000>;
> > +     pinctrl-0 = <&pinctrl_sai1>;
> > +     pinctrl-names = "default";
> > +     fsl,sai-mclk-direction-output;
> > +     status = "okay";
> > +};
> > +
> >  &scmi_iomuxc {
> >
> >       pinctrl_ioexpander_int2: ioexpanderint2grp {
> > @@ -297,6 +366,16 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL          0x40000b9e
> >               >;
> >       };
> >
> > +     pinctrl_sai1: sai1grp {
> > +             fsl,pins = <
> > +                     IMX94_PAD_SAI1_TXFS__SAI1_TX_SYNC       0x31e
> > +                     IMX94_PAD_SAI1_TXC__SAI1_TX_BCLK        0x31e
> > +                     IMX94_PAD_SAI1_TXD0__SAI1_TX_DATA0      0x31e
> > +                     IMX94_PAD_SAI1_RXD0__SAI1_RX_DATA0      0x31e
> > +                     IMX94_PAD_I2C2_SDA__SAI1_MCLK           0x31e
> > +             >;
> > +     };
> > +
> >       pinctrl_uart1: uart1grp {
> >               fsl,pins = <
> >                       IMX94_PAD_UART1_TXD__LPUART1_TX         0x31e
> > --
> > 2.34.1
> >
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ