From: Adam Ford <aford173@gmail.com> To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford <aford173@gmail.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: imx8mp-beacon-kit: Move sai3 to Audio_PLL1 Date: Thu, 29 Feb 2024 17:35:54 -0600 [thread overview] Message-ID: <20240229233556.116944-1-aford173@gmail.com> (raw) The Beacon board has an LVDS display that cannot get a proper clock rate from Video_PLL if the DSI is operational due to the way the clock divides the pixel clocks from video_pll. To make the LVDS work, the LVDS needs to use an alternative clock. Because the clock rated needed for the LDB driving the LVDS display isn't divisible by the clock rate needed by SAI3, move SAI3 to use Audio_PLL1, and reconfigure the CODEC to use a 12MHz fixed clock. Because these clocks are no longer in sync with each other, the sound generated as the wrong pitch, so reconfigure the SAI3 to be the master since the CODEC can internally compensate when fed a fixed clock reference, even if it is not an even multiple of the desired rate. This now leaves AUDIO_PLL2 completely free for the LDB without compromising the audio sound from the codec. 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 a08057410bde..1f827ef38e36 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts @@ -211,20 +211,20 @@ sound-wm8962 { simple-audio-card,cpu { sound-dai = <&sai3>; + frame-master; + bitclock-master; }; simple-audio-card,codec { sound-dai = <&wm8962>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>; - frame-master; - bitclock-master; }; }; }; &audio_blk_ctrl { - assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>, <&clk IMX8MP_AUDIO_PLL2>; - assigned-clock-rates = <393216000>, <135475200>; + assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>; + assigned-clock-rates = <393216000>; }; &ecspi2 { @@ -370,8 +370,8 @@ wm8962: audio-codec@1a { 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>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + assigned-clock-rates = <12000000>; DCVDD-supply = <®_audio>; DBVDD-supply = <®_audio>; AVDD-supply = <®_audio>; @@ -499,10 +499,9 @@ &pcie_phy { &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; - assigned-clocks = <&clk IMX8MP_CLK_SAI3>, - <&clk IMX8MP_AUDIO_PLL2> ; - assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; - assigned-clock-rates = <12288000>, <361267200>; + assigned-clocks = <&clk IMX8MP_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <12288000>; fsl,sai-mclk-direction-output; status = "okay"; }; -- 2.43.0
WARNING: multiple messages have this Message-ID (diff)
From: Adam Ford <aford173@gmail.com> To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford <aford173@gmail.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: imx8mp-beacon-kit: Move sai3 to Audio_PLL1 Date: Thu, 29 Feb 2024 17:35:54 -0600 [thread overview] Message-ID: <20240229233556.116944-1-aford173@gmail.com> (raw) The Beacon board has an LVDS display that cannot get a proper clock rate from Video_PLL if the DSI is operational due to the way the clock divides the pixel clocks from video_pll. To make the LVDS work, the LVDS needs to use an alternative clock. Because the clock rated needed for the LDB driving the LVDS display isn't divisible by the clock rate needed by SAI3, move SAI3 to use Audio_PLL1, and reconfigure the CODEC to use a 12MHz fixed clock. Because these clocks are no longer in sync with each other, the sound generated as the wrong pitch, so reconfigure the SAI3 to be the master since the CODEC can internally compensate when fed a fixed clock reference, even if it is not an even multiple of the desired rate. This now leaves AUDIO_PLL2 completely free for the LDB without compromising the audio sound from the codec. 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 a08057410bde..1f827ef38e36 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts @@ -211,20 +211,20 @@ sound-wm8962 { simple-audio-card,cpu { sound-dai = <&sai3>; + frame-master; + bitclock-master; }; simple-audio-card,codec { sound-dai = <&wm8962>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>; - frame-master; - bitclock-master; }; }; }; &audio_blk_ctrl { - assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>, <&clk IMX8MP_AUDIO_PLL2>; - assigned-clock-rates = <393216000>, <135475200>; + assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>; + assigned-clock-rates = <393216000>; }; &ecspi2 { @@ -370,8 +370,8 @@ wm8962: audio-codec@1a { 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>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + assigned-clock-rates = <12000000>; DCVDD-supply = <®_audio>; DBVDD-supply = <®_audio>; AVDD-supply = <®_audio>; @@ -499,10 +499,9 @@ &pcie_phy { &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; - assigned-clocks = <&clk IMX8MP_CLK_SAI3>, - <&clk IMX8MP_AUDIO_PLL2> ; - assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; - assigned-clock-rates = <12288000>, <361267200>; + assigned-clocks = <&clk IMX8MP_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <12288000>; fsl,sai-mclk-direction-output; status = "okay"; }; -- 2.43.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2024-02-29 23:36 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-29 23:35 Adam Ford [this message] 2024-02-29 23:35 ` [PATCH 1/2] arm64: dts: imx8mp-beacon-kit: Move sai3 to Audio_PLL1 Adam Ford 2024-02-29 23:35 ` [PATCH 2/2] arm64: dts: imx8mp-beacon: Enable LVDS-1 Adam Ford 2024-02-29 23:35 ` Adam Ford 2024-03-01 8:58 ` Marco Felsch 2024-03-01 8:58 ` Marco Felsch 2024-03-01 13:54 ` [PATCH 1/2] arm64: dts: imx8mp-beacon-kit: Move sai3 to Audio_PLL1 Rob Herring 2024-03-01 13:54 ` Rob Herring
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=20240229233556.116944-1-aford173@gmail.com \ --to=aford173@gmail.com \ --cc=aford@beaconembedded.com \ --cc=conor+dt@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=festevam@gmail.com \ --cc=imx@lists.linux.dev \ --cc=kernel@pengutronix.de \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=robh@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.