From: Shawn Guo <shawnguo@kernel.org>
To: Adam Ford <aford173@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, aford@beaconembedded.com,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC
Date: Sat, 27 May 2023 20:28:19 +0800 [thread overview]
Message-ID: <20230527122819.GR528183@dragon> (raw)
In-Reply-To: <20230521230902.167280-1-aford173@gmail.com>
On Sun, May 21, 2023 at 06:09:02PM -0500, Adam Ford wrote:
> The baseboard has an WM8962 Audio CODEC connected to the SAI3
> peripheral. The CODEC supports stereo in and out
> and a microphone input connected to the headphone jack.
> Route this CODEC through the simple-audio-card driver.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> index cdae45a48c2c..3480fb522230 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> @@ -118,6 +118,15 @@ pcie0_refclk: clock-pcie {
> clock-frequency = <100000000>;
> };
>
> + reg_audio: regulator-wm8962 {
> + compatible = "regulator-fixed";
> + regulator-name = "3v3_aud";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + gpio = <&pca6416_1 11 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> reg_usdhc2_vmmc: regulator-usdhc2 {
> compatible = "regulator-fixed";
> regulator-name = "VSD_3V3";
> @@ -137,6 +146,30 @@ reg_usb1_host_vbus: regulator-usb1-vbus {
> gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> };
> +
> + sound-wm8962 {
> + compatible = "simple-audio-card";
> + simple-audio-card,name = "wm8962";
> + simple-audio-card,format = "i2s";
> + simple-audio-card,widgets = "Headphone", "Headphones",
> + "Microphone", "Headset Mic",
> + "Speaker", "Speaker";
> + simple-audio-card,routing = "Headphones", "HPOUTL",
> + "Headphones", "HPOUTR",
> + "Speaker", "SPKOUTL",
> + "Speaker", "SPKOUTR",
> + "Headset Mic", "MICBIAS",
> + "IN3R", "Headset Mic";
Have a newline between property list and child node.
> + simple-audio-card,cpu {
> + sound-dai = <&sai3>;
> + };
Have a newline between nodes.
Shawn
> + simple-audio-card,codec {
> + sound-dai = <&wm8962>;
> + clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
> + frame-master;
> + bitclock-master;
> + };
> + };
> };
>
> &ecspi2 {
> @@ -239,6 +272,34 @@ &i2c4 {
> clock-frequency = <384000>;
> status = "okay";
>
> + wm8962: audio-codec@1a {
> + compatible = "wlf,wm8962";
> + reg = <0x1a>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_wm8962>;
> + clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
> + assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
> + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
> + assigned-clock-rates = <22576000>;
> + DCVDD-supply = <®_audio>;
> + DBVDD-supply = <®_audio>;
> + AVDD-supply = <®_audio>;
> + CPVDD-supply = <®_audio>;
> + MICVDD-supply = <®_audio>;
> + PLLVDD-supply = <®_audio>;
> + SPKVDD1-supply = <®_audio>;
> + SPKVDD2-supply = <®_audio>;
> + gpio-cfg = <
> + 0x0000 /* 0:Default */
> + 0x0000 /* 1:Default */
> + 0x0000 /* 2:FN_DMICCLK */
> + 0x0000 /* 3:Default */
> + 0x0000 /* 4:FN_DMICCDAT */
> + 0x0000 /* 5:Default */
> + >;
> + #sound-dai-cells = <0>;
> + };
> +
> pca6416: gpio@20 {
> compatible = "nxp,pcal6416";
> reg = <0x20>;
> @@ -315,6 +376,16 @@ &pcie_phy {
> status = "okay";
> };
>
> +&sai3 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sai3>;
> + assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
> + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
> + assigned-clock-rates = <12288000>;
> + fsl,sai-mclk-direction-output;
> + status = "okay";
> +};
> +
> &snvs_pwrkey {
> status = "okay";
> };
> @@ -477,6 +548,16 @@ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x40
> >;
> };
>
> + pinctrl_sai3: sai3grp {
> + fsl,pins = <
> + MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6
> + MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6
> + MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6
> + MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6
> + MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6
> + >;
> + };
> +
> pinctrl_tpm: tpmgrp {
> fsl,pins = <
> MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO00 0x19 /* Reset */
> @@ -547,4 +628,10 @@ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
> MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12 0x1c4
> >;
> };
> +
> + pinctrl_wm8962: wm8962grp {
> + fsl,pins = <
> + MX8MP_IOMUXC_GPIO1_IO14__CCM_CLKO1 0x59
> + >;
> + };
> };
> --
> 2.39.2
>
prev parent reply other threads:[~2023-05-27 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-21 23:09 [PATCH] arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC Adam Ford
2023-05-27 12:28 ` Shawn Guo [this message]
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=20230527122819.GR528183@dragon \
--to=shawnguo@kernel.org \
--cc=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).