devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases
@ 2023-10-11  7:18 Tony Lindgren
  2023-10-11  7:18 ` [PATCH 2/2] clk: ti: Fix missing omap5 " Tony Lindgren
  2023-10-12 22:42 ` [PATCH 1/2] clk: ti: Fix missing omap4 " Stephen Boyd
  0 siblings, 2 replies; 5+ messages in thread
From: Tony Lindgren @ 2023-10-11  7:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Tero Kristo
  Cc: devicetree, linux-clk, linux-omap, Andreas Kemnade,
	Péter Ujfalusi, H. Nikolaus Schaller

We are using a wrong mcbsp functional clock. The interconnect target module
driver provided clock for mcbsp is not same as the mcbsp functional clock
known as the gfclk main_clk. The mcbsp functional clocks for mcbsp should
have been added before we dropped the legacy platform data.

Additionally we are also missing the clock aliases for the clocks used by
the audio driver if reparenting is needed. This causes audio driver errors
like "CLKS: could not clk_get() prcm_fck" for mcbsp as reported by Andreas.
The mcbsp clock aliases too should have been added before we dropped the
legacy platform data.

Let's add the clocks and aliases with a single patch to fix the issue.

Fixes: 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp")
Reported-by: Andreas Kemnade <andreas@kemnade.info>
Reported-by: Péter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi | 6 ++++++
 arch/arm/boot/dts/ti/omap/omap4-l4.dtsi     | 2 ++
 drivers/clk/ti/clk-44xx.c                   | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi
--- a/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi
@@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49022000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP4_MCBSP1_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
@@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49024000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
@@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49026000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP4_MCBSP3_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
--- a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
@@ -2043,6 +2043,8 @@ mcbsp4: mcbsp@0 {
 				compatible = "ti,omap4-mcbsp";
 				reg = <0x0 0xff>; /* L4 Interconnect */
 				reg-names = "mpu";
+				clocks = <&l4_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
diff --git a/drivers/clk/ti/clk-44xx.c b/drivers/clk/ti/clk-44xx.c
--- a/drivers/clk/ti/clk-44xx.c
+++ b/drivers/clk/ti/clk-44xx.c
@@ -749,9 +749,14 @@ static struct ti_dt_clk omap44xx_clks[] = {
 	DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
 	DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
 	DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
+	DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"),
+	DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"),
+	DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"),
 	DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4-per-clkctrl:00c0:26"),
+	DT_CLK("48096000.mcbsp", "prcm_fck", "l4-per-clkctrl:00c0:26"),
 	DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3-init-clkctrl:00c0:8"),
 	DT_CLK(NULL, "otg_60m_gfclk", "l3-init-clkctrl:0040:24"),
+	DT_CLK(NULL, "pad_fck", "pad_clks_ck"),
 	DT_CLK(NULL, "per_mcbsp4_gfclk", "l4-per-clkctrl:00c0:24"),
 	DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu-sys-clkctrl:0000:20"),
 	DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"),
-- 
2.42.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] clk: ti: Fix missing omap5 mcbsp functional clock and aliases
  2023-10-11  7:18 [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases Tony Lindgren
@ 2023-10-11  7:18 ` Tony Lindgren
  2023-10-12 22:43   ` Stephen Boyd
  2023-10-12 22:42 ` [PATCH 1/2] clk: ti: Fix missing omap4 " Stephen Boyd
  1 sibling, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2023-10-11  7:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Tero Kristo
  Cc: devicetree, linux-clk, linux-omap, H . Nikolaus Schaller,
	Andreas Kemnade, Péter Ujfalusi

We are using a wrong mcbsp functional clock. The interconnect target module
driver provided clock for mcbsp is not same as the mcbsp functional clock
known as the gfclk main_clk. The mcbsp functional clocks for mcbsp should
have been added before we dropped the legacy platform data.

Additionally we are also missing the clock aliases for the clocks used by
the audio driver if reparenting is needed. This causes audio driver errors
like "CLKS: could not clk_get() prcm_fck" for mcbsp as reported by Andreas.
The mcbsp clock aliases too should have been added before we dropped the
legacy platform data.

Let's add the clocks and aliases with a single patch to fix the issue
similar to omap4. On omap5, there is no mcbsp4 instance on the l4_per
interconnect.

Fixes: b1da0fa21bd1 ("ARM: OMAP2+: Drop legacy platform data for omap5 mcbsp")
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Reported-by: Andreas Kemnade <andreas@kemnade.info>
Reported-by: Péter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi | 6 ++++++
 drivers/clk/ti/clk-54xx.c                   | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi b/arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi
--- a/arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap5-l4-abe.dtsi
@@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49022000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP5_MCBSP1_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
@@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49024000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP5_MCBSP2_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
@@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 {
 				reg = <0x0 0xff>, /* MPU private access */
 				      <0x49026000 0xff>; /* L3 Interconnect */
 				reg-names = "mpu", "dma";
+				clocks = <&abe_clkctrl OMAP5_MCBSP3_CLKCTRL 24>;
+				clock-names = "fck";
 				interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "common";
 				ti,buffer-size = <128>;
diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c
--- a/drivers/clk/ti/clk-54xx.c
+++ b/drivers/clk/ti/clk-54xx.c
@@ -565,15 +565,19 @@ static struct ti_dt_clk omap54xx_clks[] = {
 	DT_CLK(NULL, "gpio8_dbclk", "l4per-clkctrl:00f8:8"),
 	DT_CLK(NULL, "mcbsp1_gfclk", "abe-clkctrl:0028:24"),
 	DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
+	DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"),
 	DT_CLK(NULL, "mcbsp2_gfclk", "abe-clkctrl:0030:24"),
 	DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
+	DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"),
 	DT_CLK(NULL, "mcbsp3_gfclk", "abe-clkctrl:0038:24"),
 	DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
+	DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"),
 	DT_CLK(NULL, "mmc1_32khz_clk", "l3init-clkctrl:0008:8"),
 	DT_CLK(NULL, "mmc1_fclk", "l3init-clkctrl:0008:25"),
 	DT_CLK(NULL, "mmc1_fclk_mux", "l3init-clkctrl:0008:24"),
 	DT_CLK(NULL, "mmc2_fclk", "l3init-clkctrl:0010:25"),
 	DT_CLK(NULL, "mmc2_fclk_mux", "l3init-clkctrl:0010:24"),
+	DT_CLK(NULL, "pad_fck", "pad_clks_ck"),
 	DT_CLK(NULL, "sata_ref_clk", "l3init-clkctrl:0068:8"),
 	DT_CLK(NULL, "timer10_gfclk_mux", "l4per-clkctrl:0008:24"),
 	DT_CLK(NULL, "timer11_gfclk_mux", "l4per-clkctrl:0010:24"),
-- 
2.42.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases
  2023-10-11  7:18 [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases Tony Lindgren
  2023-10-11  7:18 ` [PATCH 2/2] clk: ti: Fix missing omap5 " Tony Lindgren
@ 2023-10-12 22:42 ` Stephen Boyd
  2023-10-13  8:03   ` Tony Lindgren
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2023-10-12 22:42 UTC (permalink / raw)
  To: Michael Turquette, Tero Kristo, Tony Lindgren
  Cc: devicetree, linux-clk, linux-omap, Andreas Kemnade,
	Péter Ujfalusi, H. Nikolaus Schaller

Quoting Tony Lindgren (2023-10-11 00:18:55)
> We are using a wrong mcbsp functional clock. The interconnect target module
> driver provided clock for mcbsp is not same as the mcbsp functional clock
> known as the gfclk main_clk. The mcbsp functional clocks for mcbsp should
> have been added before we dropped the legacy platform data.
> 
> Additionally we are also missing the clock aliases for the clocks used by
> the audio driver if reparenting is needed. This causes audio driver errors
> like "CLKS: could not clk_get() prcm_fck" for mcbsp as reported by Andreas.
> The mcbsp clock aliases too should have been added before we dropped the
> legacy platform data.
> 
> Let's add the clocks and aliases with a single patch to fix the issue.
> 
> Fixes: 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp")
> Reported-by: Andreas Kemnade <andreas@kemnade.info>
> Reported-by: Péter Ujfalusi <peter.ujfalusi@gmail.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] clk: ti: Fix missing omap5 mcbsp functional clock and aliases
  2023-10-11  7:18 ` [PATCH 2/2] clk: ti: Fix missing omap5 " Tony Lindgren
@ 2023-10-12 22:43   ` Stephen Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2023-10-12 22:43 UTC (permalink / raw)
  To: Michael Turquette, Tero Kristo, Tony Lindgren
  Cc: devicetree, linux-clk, linux-omap, H . Nikolaus Schaller,
	Andreas Kemnade, Péter Ujfalusi

Quoting Tony Lindgren (2023-10-11 00:18:56)
> We are using a wrong mcbsp functional clock. The interconnect target module
> driver provided clock for mcbsp is not same as the mcbsp functional clock
> known as the gfclk main_clk. The mcbsp functional clocks for mcbsp should
> have been added before we dropped the legacy platform data.
> 
> Additionally we are also missing the clock aliases for the clocks used by
> the audio driver if reparenting is needed. This causes audio driver errors
> like "CLKS: could not clk_get() prcm_fck" for mcbsp as reported by Andreas.
> The mcbsp clock aliases too should have been added before we dropped the
> legacy platform data.
> 
> Let's add the clocks and aliases with a single patch to fix the issue
> similar to omap4. On omap5, there is no mcbsp4 instance on the l4_per
> interconnect.
> 
> Fixes: b1da0fa21bd1 ("ARM: OMAP2+: Drop legacy platform data for omap5 mcbsp")
> Cc: H. Nikolaus Schaller <hns@goldelico.com>
> Reported-by: Andreas Kemnade <andreas@kemnade.info>
> Reported-by: Péter Ujfalusi <peter.ujfalusi@gmail.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases
  2023-10-12 22:42 ` [PATCH 1/2] clk: ti: Fix missing omap4 " Stephen Boyd
@ 2023-10-13  8:03   ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2023-10-13  8:03 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Michael Turquette, Tero Kristo, devicetree, linux-clk, linux-omap,
	Andreas Kemnade, Péter Ujfalusi, H. Nikolaus Schaller

* Stephen Boyd <sboyd@kernel.org> [231012 22:42]:
> Quoting Tony Lindgren (2023-10-11 00:18:55)
> > We are using a wrong mcbsp functional clock. The interconnect target module
> > driver provided clock for mcbsp is not same as the mcbsp functional clock
> > known as the gfclk main_clk. The mcbsp functional clocks for mcbsp should
> > have been added before we dropped the legacy platform data.
> > 
> > Additionally we are also missing the clock aliases for the clocks used by
> > the audio driver if reparenting is needed. This causes audio driver errors
> > like "CLKS: could not clk_get() prcm_fck" for mcbsp as reported by Andreas.
> > The mcbsp clock aliases too should have been added before we dropped the
> > legacy platform data.
> > 
> > Let's add the clocks and aliases with a single patch to fix the issue.
> > 
> > Fixes: 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp")
> > Reported-by: Andreas Kemnade <andreas@kemnade.info>
> > Reported-by: Péter Ujfalusi <peter.ujfalusi@gmail.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>

Thanks applying both patches into my fixes branch.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-13  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11  7:18 [PATCH 1/2] clk: ti: Fix missing omap4 mcbsp functional clock and aliases Tony Lindgren
2023-10-11  7:18 ` [PATCH 2/2] clk: ti: Fix missing omap5 " Tony Lindgren
2023-10-12 22:43   ` Stephen Boyd
2023-10-12 22:42 ` [PATCH 1/2] clk: ti: Fix missing omap4 " Stephen Boyd
2023-10-13  8:03   ` Tony Lindgren

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).