public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sja1105q: proper way to solve PHY clk dependecy
@ 2022-03-23  6:03 Oleksij Rempel
  2022-03-23  9:52 ` Vladimir Oltean
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2022-03-23  6:03 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Jakub Kicinski, Yangbo Lu, netdev, linux-kernel, kernel

Hi Vladimir,

I have SJA1105Q based switch with 3 T1L PHYs connected over RMII
interface. The clk input "XI" of PHYs is connected to "MII0_TX_CLK/REF_CLK/TXC"
pins of the switch. Since this PHYs can't be configured reliably over MDIO
interface without running clk on XI input, i have a dependency dilemma:
i can't probe MDIO bus, without enabling DSA ports.

If I see it correctly, following steps should be done:
- register MDIO bus without scanning for PHYs
- define SJA1105Q switch as clock provider and PHYs as clk consumer
- detect and attach PHYs on port enable if clks can't be controlled
  without enabling the port.
- HW reset line of the PHYs should be asserted if we disable port and
  deasserted with proper reinit after port is enabled.

Other way would be to init and enable switch ports and PHYs by a bootloader and
keep it enabled.

What is the proper way to go?

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

end of thread, other threads:[~2022-03-24 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23  6:03 sja1105q: proper way to solve PHY clk dependecy Oleksij Rempel
2022-03-23  9:52 ` Vladimir Oltean
2022-03-24 13:48   ` Oleksij Rempel
2022-03-24 14:35     ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox