Skip to contentSkip to conversation

mxs: enable phy-clock in the driver?

DISCUSSION Wolfram Sang 4 participants 8 messages Jan 8, 2012 – Jan 11, 2012

lore
Share & tools
lore
#0 lore raw

Hi Shawn,

I recently noticed that my tx28 board did not have net when booting from NAND (before that, barebox was setting up the network). Adding lines like these from mx28evk helped:

228         /* Enable fec phy clock */
229         clk = clk_get_sys("pll2", NULL);
230         if (!IS_ERR(clk))

231 clk_enable(clk);

So, if every board seems to need this, I'd think this should rather be in the driver? Am I correct or is there something I have overlooked?

Regards,

Wolfram

Signature · 9 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120108/33bc4499/attachment.sig>
#1 lore raw
Quoted 6 lines · Wolfram Sang

Hi Shawn,

I recently noticed that my tx28 board did not have net when booting from NAND (before that, barebox was setting up the network). Adding lines like these from mx28evk helped:

Quoted 8 lines
228         /* Enable fec phy clock */
229         clk = clk_get_sys("pll2", NULL);
230         if (!IS_ERR(clk))

231 clk_enable(clk);

So, if every board seems to need this, I'd think this should rather be in the driver? Am I correct or is there something I have overlooked?

Hmm, as far as I know, at least m28evk from denx does not need this. Different from that imx28 supplies clock to phy on mx28evk board, m28evk has phy supply clock to imx28.

Signature · 2 lines
Regards,
Shawn
#2 lore raw

Hi,

Quoted 12 lines · Shawn Guo
Quoted 11 lines · Wolfram Sang

Hi Shawn,

I recently noticed that my tx28 board did not have net when booting from NAND (before that, barebox was setting up the network). Adding lines like these from mx28evk helped:

228         /* Enable fec phy clock */
229         clk = clk_get_sys("pll2", NULL);
230         if (!IS_ERR(clk))

231 clk_enable(clk);

Quoted 7 lines
Quoted 3 lines

So, if every board seems to need this, I'd think this should rather be in the driver? Am I correct or is there something I have overlooked?

Hmm, as far as I know, at least m28evk from denx does not need this. Different from that imx28 supplies clock to phy on mx28evk board, m28evk has phy supply clock to imx28.

The TX28 derives its PHY clock from the ENET_CLK pin of the processor. Thus the CLK_ENET_TIME should be enabled by the driver as mentioned in <[email protected]>

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#3 lore raw
Quoted 4 lines · Lothar Wa?mann

The TX28 derives its PHY clock from the ENET_CLK pin of the processor. Thus the CLK_ENET_TIME should be enabled by the driver as mentioned in <[email protected]>

Can you give a web link for that message?

Signature · 2 lines
Regards,
Shawn
#4 lore raw

Hi,

Quoted 7 lines · Shawn Guo
Quoted 4 lines · Lothar Wa?mann

The TX28 derives its PHY clock from the ENET_CLK pin of the processor. Thus the CLK_ENET_TIME should be enabled by the driver as mentioned in <[email protected]>

Can you give a web link for that message?

It's your own email from "Sun, 8 Jan 2012 11:32:40 +0800" with the subject "Re: MX28 fec clock frequency":
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/079556.html

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#5 lore raw
Quoted 8 lines · Lothar Wa?mann

Hi,

Quoted 5 lines · Shawn Guo
Quoted 4 lines · Lothar Wa?mann

The TX28 derives its PHY clock from the ENET_CLK pin of the processor. Thus the CLK_ENET_TIME should be enabled by the driver as mentioned in <[email protected]>

Quoted 6 lines
Quoted 2 lines

Can you give a web link for that message?

It's your own email from "Sun, 8 Jan 2012 11:32:40 +0800" with the subject "Re: MX28 fec clock frequency":
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/079556.html

Ah, yes. But what I said there is the CLK_ENET_TIME should be enabled by PTP support, not the need of clocking external phy required by particular board design.

Signature · 2 lines
Regards,
Shawn
#6 lore raw

Hi,

Quoted 11 lines · Shawn Guo
Quoted 10 lines · Lothar Wa?mann

Hi,

Quoted 7 lines · Shawn Guo
Quoted 4 lines · Lothar Wa?mann

The TX28 derives its PHY clock from the ENET_CLK pin of the processor. Thus the CLK_ENET_TIME should be enabled by the driver as mentioned in <[email protected]>

Can you give a web link for that message?

Quoted 8 lines
Quoted 4 lines

It's your own email from "Sun, 8 Jan 2012 11:32:40 +0800" with the subject "Re: MX28 fec clock frequency":
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/079556.html

Ah, yes. But what I said there is the CLK_ENET_TIME should be enabled by PTP support, not the need of clocking external phy required by particular board design.

My point was, that it is the same clock. Thus, not "pll2" but "enet_ptp" or whatever it's name will be needs to be enabled for the Ethernet PHY on TX28.

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#7 lore raw
In reply to Wolfram Sang
Quoted 9 lines

Hi Shawn,

I recently noticed that my tx28 board did not have net when booting from NAND (before that, barebox was setting up the network). Adding lines like these from mx28evk helped:

228         /* Enable fec phy clock */
229         clk = clk_get_sys("pll2", NULL);
230         if (!IS_ERR(clk))
Quoted 8 lines

231 clk_enable(clk);

So, if every board seems to need this, I'd think this should rather be in the driver? Am I correct or is there something I have overlooked?

Regards,

Wolfram

Did you really disable the clock to FEC or only the PHY didn't have clock?

M