* [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A
@ 2025-02-21 19:09 Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock Laurentiu Mihalcea
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-21 19:09 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang
Cc: Pengutronix Kernel Team, linux-clk, imx, devicetree,
linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Correct the parent of the AUDIOMIX DSP and OCRAM_A clock gates by setting
it to AUDIO_AXI_CLK_ROOT, instead of AUDIO_AHB_CLK_ROOT. Additionally, set
the frequency of AUDIO_AXI_CLK_ROOT to 800MHz instead of the current
400MHz.
---
Changes in v2:
* add Fixes tags
* add Iulia's R-b
* link to v1: https://lore.kernel.org/imx/20250217165718.74619-1-laurentiumihalcea111@gmail.com/
---
Laurentiu Mihalcea (4):
dt-bindings: clock: imx8mp: add axi clock
clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents
arm64: dts: imx8mp: add AUDIO_AXI_CLK_ROOT to AUDIOMIX block
arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz
.../devicetree/bindings/clock/imx8mp-audiomix.yaml | 10 ++++++----
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 7 ++++---
drivers/clk/imx/clk-imx8mp-audiomix.c | 6 +++---
3 files changed, 13 insertions(+), 10 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock
2025-02-21 19:09 [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A Laurentiu Mihalcea
@ 2025-02-21 19:09 ` Laurentiu Mihalcea
2025-02-24 17:34 ` Rob Herring
2025-02-21 19:09 ` [PATCH v2 2/4] clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents Laurentiu Mihalcea
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-21 19:09 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang
Cc: Pengutronix Kernel Team, linux-clk, imx, devicetree,
linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The AUDIOMIX clock provider takes an additional clock: AUDIO_AXI_CLK_ROOT.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
.../devicetree/bindings/clock/imx8mp-audiomix.yaml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml b/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
index 6588a17a7d9a..0272c9527037 100644
--- a/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
+++ b/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
@@ -24,8 +24,8 @@ properties:
maxItems: 1
clocks:
- minItems: 7
- maxItems: 7
+ minItems: 8
+ maxItems: 8
clock-names:
items:
@@ -36,6 +36,7 @@ properties:
- const: sai5
- const: sai6
- const: sai7
+ - const: axi
'#clock-cells':
const: 1
@@ -72,10 +73,11 @@ examples:
<&clk IMX8MP_CLK_SAI3>,
<&clk IMX8MP_CLK_SAI5>,
<&clk IMX8MP_CLK_SAI6>,
- <&clk IMX8MP_CLK_SAI7>;
+ <&clk IMX8MP_CLK_SAI7>,
+ <&clk IMX8MP_CLK_AUDIO_AXI_ROOT>;
clock-names = "ahb",
"sai1", "sai2", "sai3",
- "sai5", "sai6", "sai7";
+ "sai5", "sai6", "sai7", "axi";
power-domains = <&pgc_audio>;
};
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents
2025-02-21 19:09 [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock Laurentiu Mihalcea
@ 2025-02-21 19:09 ` Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 3/4] arm64: dts: imx8mp: add AUDIO_AXI_CLK_ROOT to AUDIOMIX block Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz Laurentiu Mihalcea
3 siblings, 0 replies; 8+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-21 19:09 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang
Cc: Pengutronix Kernel Team, linux-clk, imx, devicetree,
linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The DSP and OCRAM_A modules from AUDIOMIX are clocked by
AUDIO_AXI_CLK_ROOT, not AUDIO_AHB_CLK_ROOT. Update the clock data
accordingly.
Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
drivers/clk/imx/clk-imx8mp-audiomix.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
index b2cb157703c5..62a180d6f8cb 100644
--- a/drivers/clk/imx/clk-imx8mp-audiomix.c
+++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
@@ -180,14 +180,14 @@ static struct clk_imx8mp_audiomix_sel sels[] = {
CLK_GATE("asrc", ASRC_IPG),
CLK_GATE("pdm", PDM_IPG),
CLK_GATE("earc", EARC_IPG),
- CLK_GATE("ocrama", OCRAMA_IPG),
+ CLK_GATE_PARENT("ocrama", OCRAMA_IPG, "axi"),
CLK_GATE("aud2htx", AUD2HTX_IPG),
CLK_GATE_PARENT("earc_phy", EARC_PHY, "sai_pll_out_div2"),
CLK_GATE("sdma2", SDMA2_ROOT),
CLK_GATE("sdma3", SDMA3_ROOT),
CLK_GATE("spba2", SPBA2_ROOT),
- CLK_GATE("dsp", DSP_ROOT),
- CLK_GATE("dspdbg", DSPDBG_ROOT),
+ CLK_GATE_PARENT("dsp", DSP_ROOT, "axi"),
+ CLK_GATE_PARENT("dspdbg", DSPDBG_ROOT, "axi"),
CLK_GATE("edma", EDMA_ROOT),
CLK_GATE_PARENT("audpll", AUDPLL_ROOT, "osc_24m"),
CLK_GATE("mu2", MU2_ROOT),
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] arm64: dts: imx8mp: add AUDIO_AXI_CLK_ROOT to AUDIOMIX block
2025-02-21 19:09 [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 2/4] clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents Laurentiu Mihalcea
@ 2025-02-21 19:09 ` Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz Laurentiu Mihalcea
3 siblings, 0 replies; 8+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-21 19:09 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang
Cc: Pengutronix Kernel Team, linux-clk, imx, devicetree,
linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Needed because the DSP and OCRAM_A components from AUDIOMIX are clocked
by AUDIO_AXI_CLK_ROOT instead of AUDIO_AHB_CLK_ROOT.
Fixes: b86c3afabb4f ("arm64: dts: imx8mp: Add SAI, SDMA, AudioMIX")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index e0d3b8cba221..86c3055789ba 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1619,10 +1619,11 @@ audio_blk_ctrl: clock-controller@30e20000 {
<&clk IMX8MP_CLK_SAI3>,
<&clk IMX8MP_CLK_SAI5>,
<&clk IMX8MP_CLK_SAI6>,
- <&clk IMX8MP_CLK_SAI7>;
+ <&clk IMX8MP_CLK_SAI7>,
+ <&clk IMX8MP_CLK_AUDIO_AXI_ROOT>;
clock-names = "ahb",
"sai1", "sai2", "sai3",
- "sai5", "sai6", "sai7";
+ "sai5", "sai6", "sai7", "axi";
power-domains = <&pgc_audio>;
assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>,
<&clk IMX8MP_AUDIO_PLL2>;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz
2025-02-21 19:09 [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A Laurentiu Mihalcea
` (2 preceding siblings ...)
2025-02-21 19:09 ` [PATCH v2 3/4] arm64: dts: imx8mp: add AUDIO_AXI_CLK_ROOT to AUDIOMIX block Laurentiu Mihalcea
@ 2025-02-21 19:09 ` Laurentiu Mihalcea
2025-02-21 19:37 ` Adam Ford
3 siblings, 1 reply; 8+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-21 19:09 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang
Cc: Pengutronix Kernel Team, linux-clk, imx, devicetree,
linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
AUDIO_AXI_CLK_ROOT can't run at currently requested 600MHz w/ its parent
SYS_PLL1 configured at 800MHz. Configure it to run at 800MHz as some
applications running on the DSP expect the core to run at this frequency
anyways. This change also affects the AUDIOMIX NoC.
Fixes: b739681b3f8b ("arm64: dts: imx8mp: Fix SDMA2/3 clocks")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 86c3055789ba..54147bce3b83 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -834,7 +834,7 @@ pgc_audio: power-domain@5 {
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
<&clk IMX8MP_SYS_PLL1_800M>;
assigned-clock-rates = <400000000>,
- <600000000>;
+ <800000000>;
};
pgc_gpu2d: power-domain@6 {
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz
2025-02-21 19:09 ` [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz Laurentiu Mihalcea
@ 2025-02-21 19:37 ` Adam Ford
2025-02-24 14:42 ` Mihalcea Laurentiu
0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2025-02-21 19:37 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang, Pengutronix Kernel Team,
linux-clk, imx, devicetree, linux-arm-kernel, linux-kernel
On Fri, Feb 21, 2025 at 1:11 PM Laurentiu Mihalcea
<laurentiumihalcea111@gmail.com> wrote:
>
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> AUDIO_AXI_CLK_ROOT can't run at currently requested 600MHz w/ its parent
> SYS_PLL1 configured at 800MHz. Configure it to run at 800MHz as some
> applications running on the DSP expect the core to run at this frequency
> anyways. This change also affects the AUDIOMIX NoC.
Unless I am missing something, the i.MX 8M Plus Applications Processor
Datasheet (rev 2.1) has a table of frequencies, and
AUDIO_AXI_CLK_ROOT is shown to be 600MHz nominal and 800MHz for
overdrive. I agree that it's likely not running at 600MHz now, but
800MHz may be out of spec for people who are using the nominal voltage
instead of the overdrive, since overdrive requires higher voltages
than the nominal.
adam
>
> Fixes: b739681b3f8b ("arm64: dts: imx8mp: Fix SDMA2/3 clocks")
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 86c3055789ba..54147bce3b83 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -834,7 +834,7 @@ pgc_audio: power-domain@5 {
> assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
> <&clk IMX8MP_SYS_PLL1_800M>;
> assigned-clock-rates = <400000000>,
> - <600000000>;
> + <800000000>;
> };
>
> pgc_gpu2d: power-domain@6 {
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz
2025-02-21 19:37 ` Adam Ford
@ 2025-02-24 14:42 ` Mihalcea Laurentiu
0 siblings, 0 replies; 8+ messages in thread
From: Mihalcea Laurentiu @ 2025-02-24 14:42 UTC (permalink / raw)
To: Adam Ford
Cc: Abel Vesa, Peng Fan, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Marek Vasut, Stephen Boyd, Shengjiu Wang, Pengutronix Kernel Team,
linux-clk, imx, devicetree, linux-arm-kernel, linux-kernel,
Lucas Stach
On 21.02.2025 21:37, Adam Ford wrote:
> On Fri, Feb 21, 2025 at 1:11 PM Laurentiu Mihalcea
> <laurentiumihalcea111@gmail.com> wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> AUDIO_AXI_CLK_ROOT can't run at currently requested 600MHz w/ its parent
>> SYS_PLL1 configured at 800MHz. Configure it to run at 800MHz as some
>> applications running on the DSP expect the core to run at this frequency
>> anyways. This change also affects the AUDIOMIX NoC.
> Unless I am missing something, the i.MX 8M Plus Applications Processor
> Datasheet (rev 2.1) has a table of frequencies, and
> AUDIO_AXI_CLK_ROOT is shown to be 600MHz nominal and 800MHz for
> overdrive. I agree that it's likely not running at 600MHz now, but
> 800MHz may be out of spec for people who are using the nominal voltage
> instead of the overdrive, since overdrive requires higher voltages
> than the nominal.
>
> adam
You're right, this would not work if someone was using
nominal voltage. Do you have an upstream board in mind/usecase which
works with nominal voltage instead of overdrive? As far as I understood from
Lucas's patch ([1]) there's no upstream board using nominal voltage?
CC-ing Lucas on this as his patch ([1]) is similar to this in that they're both
trying to use overdrive clock frequencies in the DTSI and I'd very much like
to have some sort of consistency in the DTSI if possible.
[1]: https://lore.kernel.org/imx/20250204182737.3361431-1-l.stach@pengutronix.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock
2025-02-21 19:09 ` [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock Laurentiu Mihalcea
@ 2025-02-24 17:34 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2025-02-24 17:34 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Abel Vesa, Peng Fan, Krzysztof Kozlowski, Shawn Guo, Marek Vasut,
Stephen Boyd, Shengjiu Wang, Pengutronix Kernel Team, linux-clk,
imx, devicetree, linux-arm-kernel, linux-kernel
On Fri, Feb 21, 2025 at 02:09:26PM -0500, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> The AUDIOMIX clock provider takes an additional clock: AUDIO_AXI_CLK_ROOT.
>
Fixes tag? The commit message should be expanded a bit as this is an ABI
change.
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> ---
> .../devicetree/bindings/clock/imx8mp-audiomix.yaml | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml b/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
> index 6588a17a7d9a..0272c9527037 100644
> --- a/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
> +++ b/Documentation/devicetree/bindings/clock/imx8mp-audiomix.yaml
> @@ -24,8 +24,8 @@ properties:
> maxItems: 1
>
> clocks:
> - minItems: 7
> - maxItems: 7
> + minItems: 8
> + maxItems: 8
>
> clock-names:
> items:
> @@ -36,6 +36,7 @@ properties:
> - const: sai5
> - const: sai6
> - const: sai7
> + - const: axi
>
> '#clock-cells':
> const: 1
> @@ -72,10 +73,11 @@ examples:
> <&clk IMX8MP_CLK_SAI3>,
> <&clk IMX8MP_CLK_SAI5>,
> <&clk IMX8MP_CLK_SAI6>,
> - <&clk IMX8MP_CLK_SAI7>;
> + <&clk IMX8MP_CLK_SAI7>,
> + <&clk IMX8MP_CLK_AUDIO_AXI_ROOT>;
> clock-names = "ahb",
> "sai1", "sai2", "sai3",
> - "sai5", "sai6", "sai7";
> + "sai5", "sai6", "sai7", "axi";
> power-domains = <&pgc_audio>;
> };
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-24 17:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 19:09 [PATCH v2 0/4] clk: imx8mp: fix parents of AUDIOMIX DSP/OCRAM_A Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 1/4] dt-bindings: clock: imx8mp: add axi clock Laurentiu Mihalcea
2025-02-24 17:34 ` Rob Herring
2025-02-21 19:09 ` [PATCH v2 2/4] clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 3/4] arm64: dts: imx8mp: add AUDIO_AXI_CLK_ROOT to AUDIOMIX block Laurentiu Mihalcea
2025-02-21 19:09 ` [PATCH v2 4/4] arm64: dts: imx8mp: change AUDIO_AXI_CLK_ROOT freq. to 800MHz Laurentiu Mihalcea
2025-02-21 19:37 ` Adam Ford
2025-02-24 14:42 ` Mihalcea Laurentiu
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).