Skip to contentSkip to conversation

clk: imx: clk-imx6q: Let OSC to be routed to anaclk2/2b

PATCH Superseded Michael Trimarchi 3 participants 5 messages Nov 8, 2015 – Nov 25, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: imx: clk-imx6q: Let OSC to be routed to anaclk2/2b

OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin

---
 drivers/clk/imx/clk-imx6q.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx6q.c +2 -1
index b2c1c04..8fe0015 100644
@@ -70,7 +70,8 @@ static const char *cko_sels[] = { "cko1", "cko2", };
 static const char *lvds_sels[] = {
 	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
 	"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
-	"pcie_ref_125m", "sata_ref_100m",
+	"pcie_ref_125m", "sata_ref_100m",  "usbphy1", "usbphy2",
+	"dummy", "dummy", "dummy", "dummy", "osc",
 };
 static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", };
 static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", };
Signature · 1 line
2.6.3
#1 lore raw

Hi

Quoted 3 lines · Michael Trimarchi

OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin

Do I need to include an example in the commit message?

	usb_hub: usb-hub {
		compatible = "smsc,usb3503a";
		clocks = <&clks IMX6QDL_CLK_LVDS2_GATE>;
		clock-names = "refclk";
	};
};
&clks {
	assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>;
	assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
};
 osc                                      5            5    24000000          0 0  
    cko2_sel                              0            0    24000000          0 0  
       cko2_podf                          0            0    24000000          0 0  
          cko2                            0            0    24000000          0 0  
             cko                          0            0    24000000          0 0  
    lvds2_sel                             1            1    24000000          0 0  
       lvds2_gate                         1            1    24000000          0 0  

Best regards
Michael

Quoted 22 lines
---
 drivers/clk/imx/clk-imx6q.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx6q.c +2 -1
index b2c1c04..8fe0015 100644
@@ -70,7 +70,8 @@ static const char *cko_sels[] = { "cko1", "cko2", };
 static const char *lvds_sels[] = {
 	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
 	"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
-	"pcie_ref_125m", "sata_ref_100m",
+	"pcie_ref_125m", "sata_ref_100m",  "usbphy1", "usbphy2",
+	"dummy", "dummy", "dummy", "dummy", "osc",
 };
 static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", };
 static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", };
Signature · 1 line
2.6.3
Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#2 lore raw

PATCH v2 1/1 clk: imx: clk-imx6q: Let OSC to be routed to anaclk2/2b

OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin.

This show a usage example:

[...]

	usb_hub: usb-hub {
		compatible = "smsc,usb3503a";
		clocks = <&clks IMX6QDL_CLK_LVDS2_GATE>;
		clock-names = "refclk";
	};
};

[...]

&clks {
        assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
};

/sys/kernel/debug/clk/clk_summary

osc 5 5 24000000 0 0
[...]

    lvds2_sel                       1            1    24000000          0 0
       lvds2_gate                   1            1    24000000          0 0

[...]

---
Changes in v2:
- rework the commit message to give a better description

 drivers/clk/imx/clk-imx6q.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx6q.c +2 -1
index b2c1c04..8fe0015 100644
@@ -70,7 +70,8 @@ static const char *cko_sels[] = { "cko1", "cko2", };
 static const char *lvds_sels[] = {
 	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
 	"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
-	"pcie_ref_125m", "sata_ref_100m",
+	"pcie_ref_125m", "sata_ref_100m",  "usbphy1", "usbphy2",
+	"dummy", "dummy", "dummy", "dummy", "osc",
 };
 static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", };
 static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", };
Signature · 1 line
2.6.3
Applied
#3 lore raw
Quoted 21 lines · Michael Trimarchi

OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin.

This show a usage example:

[...]

	usb_hub: usb-hub {
		compatible = "smsc,usb3503a";
		clocks = <&clks IMX6QDL_CLK_LVDS2_GATE>;
		clock-names = "refclk";
	};
};

[...]

&clks {
        assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
};

/sys/kernel/debug/clk/clk_summary

Quoted 7 lines

osc 5 5 24000000 0 0
[...]

    lvds2_sel                       1            1    24000000          0 0
       lvds2_gate                   1            1    24000000          0 0

[...]

Applied, thanks.

Reviewed-by on v1 1/1
#4 lore raw
In reply to Michael Trimarchi

Am Sonntag, den 08.11.2015, 15:07 +0100 schrieb Michael Trimarchi:

Quoted 4 lines

OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin

I don't think the more verbose commit message of V2 adds any more value, so I'm explicitly looking at V1. Change looks in line with the TRM, so:

Quoted 18 lines
---
 drivers/clk/imx/clk-imx6q.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx6q.c +2 -1
index b2c1c04..8fe0015 100644
@@ -70,7 +70,8 @@ static const char *cko_sels[] = { "cko1", "cko2", };
 static const char *lvds_sels[] = {
 	"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
 	"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
-	"pcie_ref_125m", "sata_ref_100m",
+	"pcie_ref_125m", "sata_ref_100m",  "usbphy1", "usbphy2",
+	"dummy", "dummy", "dummy", "dummy", "osc",
 };
 static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", };
 static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", };
Signature · 2 lines
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |