* [PATCH v3 1/3] dt-bindings: clock: imx93: Add SPDIF IPG clk
2024-11-19 1:58 [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
@ 2024-11-19 1:58 ` Shengjiu Wang
2024-11-19 1:58 ` [PATCH v3 2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Shengjiu Wang @ 2024-11-19 1:58 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, robh, krzk+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, imx, shengjiu.wang
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree
Add SPDIF IPG clk. The SPDIF IPG clock and root clock
share same clock gate.
Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
include/dt-bindings/clock/imx93-clock.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/dt-bindings/clock/imx93-clock.h b/include/dt-bindings/clock/imx93-clock.h
index 6c685067288b..c393fad3a346 100644
--- a/include/dt-bindings/clock/imx93-clock.h
+++ b/include/dt-bindings/clock/imx93-clock.h
@@ -209,5 +209,6 @@
#define IMX91_CLK_ENET2_REGULAR 204
#define IMX91_CLK_ENET2_REGULAR_GATE 205
#define IMX91_CLK_ENET1_QOS_TSN_GATE 206
+#define IMX93_CLK_SPDIF_IPG 207
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock
2024-11-19 1:58 [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
2024-11-19 1:58 ` [PATCH v3 1/3] dt-bindings: clock: imx93: Add SPDIF IPG clk Shengjiu Wang
@ 2024-11-19 1:58 ` Shengjiu Wang
2024-11-19 1:58 ` [PATCH v3 3/3] arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock Shengjiu Wang
2024-12-27 12:46 ` [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Abel Vesa
3 siblings, 0 replies; 7+ messages in thread
From: Shengjiu Wang @ 2024-11-19 1:58 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, robh, krzk+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, imx, shengjiu.wang
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree
Split IMX93_CLK_SPDIF_IPG from IMX93_CLK_SPDIF_GATE
because the IMX93_CLK_SPDIF_GATE controls the gate
of IPG clock and root clock. Without this change,
disabling IMX93_CLK_SPDIF_GATE would also disable
the IPG clock, causing register access failures.
Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
drivers/clk/imx/clk-imx93.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c
index 58a516dd385b..eb818db008fb 100644
--- a/drivers/clk/imx/clk-imx93.c
+++ b/drivers/clk/imx/clk-imx93.c
@@ -15,7 +15,7 @@
#include "clk.h"
-#define IMX93_CLK_END 207
+#define IMX93_CLK_END 208
#define PLAT_IMX93 BIT(0)
#define PLAT_IMX91 BIT(1)
@@ -38,6 +38,7 @@ static u32 share_count_sai2;
static u32 share_count_sai3;
static u32 share_count_mub;
static u32 share_count_pdm;
+static u32 share_count_spdif;
static const char * const a55_core_sels[] = {"a55_alt", "arm_pll"};
static const char *parent_names[MAX_SEL][4] = {
@@ -252,7 +253,8 @@ static const struct imx93_clk_ccgr {
{ IMX93_CLK_MQS1_GATE, "mqs1", "sai1_root", 0x9b00, },
{ IMX93_CLK_MQS2_GATE, "mqs2", "sai3_root", 0x9b40, },
{ IMX93_CLK_AUD_XCVR_GATE, "aud_xcvr", "audio_xcvr_root", 0x9b80, },
- { IMX93_CLK_SPDIF_GATE, "spdif", "spdif_root", 0x9c00, },
+ { IMX93_CLK_SPDIF_IPG, "spdif_ipg_clk", "bus_wakeup_root", 0x9c00, 0, &share_count_spdif},
+ { IMX93_CLK_SPDIF_GATE, "spdif", "spdif_root", 0x9c00, 0, &share_count_spdif},
{ IMX93_CLK_HSIO_32K_GATE, "hsio_32k", "osc_32k", 0x9dc0, },
{ IMX93_CLK_ENET1_GATE, "enet1", "wakeup_axi_root", 0x9e00, 0, NULL, PLAT_IMX93, },
{ IMX93_CLK_ENET_QOS_GATE, "enet_qos", "wakeup_axi_root", 0x9e40, 0, NULL, PLAT_IMX93, },
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 3/3] arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock
2024-11-19 1:58 [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
2024-11-19 1:58 ` [PATCH v3 1/3] dt-bindings: clock: imx93: Add SPDIF IPG clk Shengjiu Wang
2024-11-19 1:58 ` [PATCH v3 2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
@ 2024-11-19 1:58 ` Shengjiu Wang
2024-12-09 12:37 ` Shawn Guo
2024-12-27 12:46 ` [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Abel Vesa
3 siblings, 1 reply; 7+ messages in thread
From: Shengjiu Wang @ 2024-11-19 1:58 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, robh, krzk+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, imx, shengjiu.wang
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree
IMX93_CLK_BUS_WAKEUP is not accurate IPG clock, which
missed the clock gate part.
IMX93_CLK_SPDIF_IPG is the correct clock.
Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
arch/arm64/boot/dts/freescale/imx93.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index 688488de8cd2..56766fdb0b1e 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -925,7 +925,7 @@ xcvr: xcvr@42680000 {
reg-names = "ram", "regs", "rxfifo", "txfifo";
interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX93_CLK_BUS_WAKEUP>,
+ clocks = <&clk IMX93_CLK_SPDIF_IPG>,
<&clk IMX93_CLK_SPDIF_GATE>,
<&clk IMX93_CLK_DUMMY>,
<&clk IMX93_CLK_AUD_XCVR_GATE>;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock
2024-11-19 1:58 [PATCH v3 0/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Shengjiu Wang
` (2 preceding siblings ...)
2024-11-19 1:58 ` [PATCH v3 3/3] arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock Shengjiu Wang
@ 2024-12-27 12:46 ` Abel Vesa
3 siblings, 0 replies; 7+ messages in thread
From: Abel Vesa @ 2024-12-27 12:46 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, robh, krzk+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, imx, shengjiu.wang,
Shengjiu Wang
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree
On Tue, 19 Nov 2024 09:58:02 +0800, Shengjiu Wang wrote:
> The IMX93_CLK_SPDIF_GATE also controls the gate of IPG clock
> and root clock, need to define them separately.
> Otherwise driver disable IMX93_CLK_SPDIF_GATE will cause
> IPG clock is also disabled, then register accessing fail.
>
> changes in v3:
> - add fixes tag for all 3 commits
>
> [...]
Applied, thanks!
[1/3] dt-bindings: clock: imx93: Add SPDIF IPG clk
commit: 32e9dea2645fa10dfa08b4e333918affaf1e4de5
[2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock
commit: 6a7853544482e2336b5b8bb9a4b964f9d687f290
[3/3] arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock
commit: 570b890e66334f283710af36feb2115f16c7a27c
Best regards,
--
Abel Vesa <abel.vesa@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread