Skip to contentSkip to conversation

clk: imx8mq: Add support for the CLKO1 clock

PATCH In review Fabio Estevam 5 participants 8 messages Jan 31, 2019 – Mar 1, 2019

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 clk: imx8mq: Add support for the CLKO1 clock

Add the entry for the CLKO1 clock.

---
 drivers/clk/imx/clk-imx8mq.c             | 3 +++
 include/dt-bindings/clock/imx8mq-clock.h | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mq.c +3 -0
index 63001bc891d4..a2f8a8d3585c 100644
@@ -264,6 +264,8 @@ static const char * const imx8mq_ecspi3_sels[] = {"osc_25m", "sys2_pll_200m", "s
 					   "sys1_pll_800m", "sys3_pll2_out", "sys2_pll_250m", "audio_pll2_out", };
 static const char * const imx8mq_dram_core_sels[] = {"dram_pll_out", "dram_alt_root", };
 
+static const char * const imx8mq_clko1_sels[] = {"osc_25m", "sys1_pll_800m", "osc_27m", "sys1_pll_200m",
+					  "audio_pll2_out", "sys2_pll_500m", "vpu_pll_out", "sys1_pll_80m", };
 static const char * const imx8mq_clko2_sels[] = {"osc_25m", "sys2_pll_200m", "sys1_pll_400m", "sys2_pll_166m",
 					  "sys3_pll2_out", "audio_pll1_out", "video_pll1_out", "ckil", };
 
@@ -479,6 +481,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 	clks[IMX8MQ_CLK_GPT1] = imx8m_clk_composite("gpt1", imx8mq_gpt1_sels, base + 0xb580);
 	clks[IMX8MQ_CLK_WDOG] = imx8m_clk_composite("wdog", imx8mq_wdog_sels, base + 0xb900);
 	clks[IMX8MQ_CLK_WRCLK] = imx8m_clk_composite("wrclk", imx8mq_wrclk_sels, base + 0xb980);
+	clks[IMX8MQ_CLK_CLKO1] = imx8m_clk_composite("clko1", imx8mq_clko1_sels, base + 0xba00);
 	clks[IMX8MQ_CLK_CLKO2] = imx8m_clk_composite("clko2", imx8mq_clko2_sels, base + 0xba80);
 	clks[IMX8MQ_CLK_DSI_CORE] = imx8m_clk_composite("dsi_core", imx8mq_dsi_core_sels, base + 0xbb00);
 	clks[IMX8MQ_CLK_DSI_PHY_REF] = imx8m_clk_composite("dsi_phy_ref", imx8mq_dsi_phy_sels, base + 0xbb80);
include/dt-bindings/clock/imx8mq-clock.h +3 -1
index 04f7ac345984..74f80b26f679 100644
@@ -391,5 +391,7 @@
 
 #define IMX8MQ_CLK_NAND_USDHC_BUS_RAWNAND_CLK	267
 
-#define IMX8MQ_CLK_END				268
+#define IMX8MQ_CLK_CLKO1			268
+
+#define IMX8MQ_CLK_END				269
 #endif /* __DT_BINDINGS_CLOCK_IMX8MQ_H */
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 45 lines · Fabio Estevam

Add the entry for the CLKO1 clock.

---
 drivers/clk/imx/clk-imx8mq.c             | 3 +++
 include/dt-bindings/clock/imx8mq-clock.h | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mq.c +3 -0
index 63001bc891d4..a2f8a8d3585c 100644
@@ -264,6 +264,8 @@ static const char * const imx8mq_ecspi3_sels[] = {"osc_25m", "sys2_pll_200m", "s
 					   "sys1_pll_800m", "sys3_pll2_out", "sys2_pll_250m", "audio_pll2_out", };
 static const char * const imx8mq_dram_core_sels[] = {"dram_pll_out", "dram_alt_root", };
 
+static const char * const imx8mq_clko1_sels[] = {"osc_25m", "sys1_pll_800m", "osc_27m", "sys1_pll_200m",
+					  "audio_pll2_out", "sys2_pll_500m", "vpu_pll_out", "sys1_pll_80m", };
 static const char * const imx8mq_clko2_sels[] = {"osc_25m", "sys2_pll_200m", "sys1_pll_400m", "sys2_pll_166m",
 					  "sys3_pll2_out", "audio_pll1_out", "video_pll1_out", "ckil", };
 
@@ -479,6 +481,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 	clks[IMX8MQ_CLK_GPT1] = imx8m_clk_composite("gpt1", imx8mq_gpt1_sels, base + 0xb580);
 	clks[IMX8MQ_CLK_WDOG] = imx8m_clk_composite("wdog", imx8mq_wdog_sels, base + 0xb900);
 	clks[IMX8MQ_CLK_WRCLK] = imx8m_clk_composite("wrclk", imx8mq_wrclk_sels, base + 0xb980);
+	clks[IMX8MQ_CLK_CLKO1] = imx8m_clk_composite("clko1", imx8mq_clko1_sels, base + 0xba00);
 	clks[IMX8MQ_CLK_CLKO2] = imx8m_clk_composite("clko2", imx8mq_clko2_sels, base + 0xba80);
 	clks[IMX8MQ_CLK_DSI_CORE] = imx8m_clk_composite("dsi_core", imx8mq_dsi_core_sels, base + 0xbb00);
 	clks[IMX8MQ_CLK_DSI_PHY_REF] = imx8m_clk_composite("dsi_phy_ref", imx8mq_dsi_phy_sels, base + 0xbb80);
include/dt-bindings/clock/imx8mq-clock.h +3 -1
index 04f7ac345984..74f80b26f679 100644
@@ -391,5 +391,7 @@
 
 #define IMX8MQ_CLK_NAND_USDHC_BUS_RAWNAND_CLK	267
 
-#define IMX8MQ_CLK_END				268
+#define IMX8MQ_CLK_CLKO1			268
+
+#define IMX8MQ_CLK_END				269
 #endif /* __DT_BINDINGS_CLOCK_IMX8MQ_H */
Signature · 1 line
2.17.1
maintainer
#2 lore raw
In reply to Fabio Estevam

Quoting Fabio Estevam (2019-01-30 16:20:56)

Quoted 4 lines

Add the entry for the CLKO1 clock.

---

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine. Otherwise, I recommend working together to post a coherent patch series that adds the things that everyone wants or working from a stable baseline like an rc tag and letting me figure out how to do the merging. Either way, it looks like if I ever get a patch for imx clk drivers that doesn't have a cover letter or is just adding a few clks here and there I'll have to assume it's the same story as always and just toss them into a clk-imx branch without a topic.

author reviewer
#3 lore raw

Hi Stephen,

Quoted 8 lines · Stephen Boyd

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

Sorry for the trouble!

Quoted 9 lines

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine. Otherwise, I recommend working together to post a coherent patch series that adds the things that everyone wants or working from a stable baseline like an rc tag and letting me figure out how to do the merging. Either way, it looks like if I ever get a patch for imx clk drivers that doesn't have a cover letter or is just adding a few clks here and there I'll have to assume it's the same story as always and just toss them into a clk-imx branch without a topic.

Yes, let's try to make this better.

Thanks

#4 lore raw
In reply to Stephen Boyd
Quoted 16 lines

From: Stephen Boyd [mailto:[email protected]]
Sent: Friday, February 22, 2019 4:37 AM
Quoting Fabio Estevam (2019-01-30 16:20:56)

Quoted 4 lines

Add the entry for the CLKO1 clock.

---

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

Quoted 2 lines

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine.

We know that there were a lot of IMX clocks patches sent in the list recently and it was a bit overloading as you still need to maintain all other platforms. So we do appreciate for your big effort!

We're speeding up the IMX upstreaming, there might be more patches sent out in the following months for new SoCs support.

I'm NXP internal upstreaming leader, currently I'm busy with upstreaming MX8 Arch and assume I will be a bit free later. If you and Shawn are okay, I would like to spend more time to help review and collect i.MX Clock patches. Hope this would help relief you a bit.

Regards
Dong Aisheng
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw
In reply to Stephen Boyd
Quoted 15 lines · Stephen Boyd

Quoting Fabio Estevam (2019-01-30 16:20:56)

Quoted 4 lines

Add the entry for the CLKO1 clock.

---

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

Quoted 3 lines

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine.

I will help collect the i.MX platform clock patches and send you as pull request.

Shawn

maintainer
#6 lore raw

Quoting Shawn Guo (2019-02-27 18:15:12)

Quoted 16 lines · Stephen Boyd
Quoted 15 lines

Quoting Fabio Estevam (2019-01-30 16:20:56)

Quoted 4 lines

Add the entry for the CLKO1 clock.

---

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

Quoted 7 lines
Quoted 3 lines

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine.

I will help collect the i.MX platform clock patches and send you as pull request.

Ok. Thanks for the heads up. I don't expect anything for the 5.1 merge window that should open next week, but for the next cycle I'll be on the lookout for the pull request.

#7 lore raw
Quoted 21 lines · Stephen Boyd

Quoting Shawn Guo (2019-02-27 18:15:12)

Quoted 20 lines · Stephen Boyd
Quoted 18 lines

Quoting Fabio Estevam (2019-01-30 16:20:56)

Quoted 4 lines

Add the entry for the CLKO1 clock.

---

Applied to clk-next but I had to fix the whole DT binding number because I don't know what this patch is based on. In fact, please get everyone involved at NXP and whoever else is working on i.MX clk drivers to coordinate somehow. I just spent 20 minutes working through the set of imx patches in my inbox and I see approximately 6 different authors all sending out a few clks at a time for the same drivers with zero information about what the patches are based on or what order they're supposed to be applied in.

If someone wants to collect all the patches and indicate on the list they've picked them up and will be sending them as a pull request that's fine.

Quoted 7 lines
Quoted 3 lines

I will help collect the i.MX platform clock patches and send you as pull request.

Ok. Thanks for the heads up. I don't expect anything for the 5.1 merge window that should open next week, but for the next cycle I'll be on the lookout for the pull request.

Yeah. Sorry for being unclear. I meant to start from next development cycle.

Shawn