mbox series

[RFC,0/3] net: phy: marvell10g: Add host speed setting by an ethernet driver

Message ID 20221019085052.933385-1-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
Headers show
Series net: phy: marvell10g: Add host speed setting by an ethernet driver | expand

Message

Yoshihiro Shimoda Oct. 19, 2022, 8:50 a.m. UTC
R-Car S4-8 environment board requires to change the host interface
as SGMII and the host speed as 1000 Mbps because the strap pin was
other mode, but the SoC/board cannot work on that mode. Also, after
the SoC initialized the SERDES once, we cannot re-initialized it
because the initialized procedure seems all black magic...

To communicate between R-Car S4-8 (host MAC) and marvell PHY,
this patch series adds a new function of_phy_connect_with_host_param()
to set host parameters (host_interfaces and host_speed), and
rswitch driver sets the paramter. After that, the marvell10g can
check the paramters and set specific registers for it.

This patch series is based on next-20221017 and the following patches
which are not upstreamed yet:
https://lore.kernel.org/all/20221019083518.933070-1-yoshihiro.shimoda.uh@renesas.com/T/#m1c3de735de018b5cb90cb3720056ac1497112b36

I'm not sure whether this is a correct way or not. So, I marked
this patch series as RFC.

Yoshihiro Shimoda (3):
  net: mdio: Add of_phy_connect_with_host_param()
  net: phy: marvell10g: Add host interface speed configuration
  net: renesas: rswitch: Pass host parameters to phydev

 drivers/net/ethernet/renesas/rswitch.c | 13 ++++++--
 drivers/net/mdio/of_mdio.c             | 42 ++++++++++++++++++++++++++
 drivers/net/phy/marvell10g.c           | 23 ++++++++++++++
 include/linux/of_mdio.h                |  7 +++++
 include/linux/phy.h                    |  8 +++++
 5 files changed, 91 insertions(+), 2 deletions(-)

Comments

Marek Behún Oct. 19, 2022, 10:44 a.m. UTC | #1
On Wed, 19 Oct 2022 17:50:49 +0900
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote:

> R-Car S4-8 environment board requires to change the host interface
> as SGMII and the host speed as 1000 Mbps because the strap pin was
> other mode, but the SoC/board cannot work on that mode. Also, after
> the SoC initialized the SERDES once, we cannot re-initialized it
> because the initialized procedure seems all black magic...

Can you tell us which exact mode is configured by the strapping pins?
Isn't it sufficient to just set the MACTYPE to SGMII, without
configuring speed?

Marek
Yoshihiro Shimoda Oct. 20, 2022, 1:04 a.m. UTC | #2
Hi Marek,

> From: Marek Behún, Sent: Wednesday, October 19, 2022 7:45 PM
> 
> On Wed, 19 Oct 2022 17:50:49 +0900
> Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote:
> 
> > R-Car S4-8 environment board requires to change the host interface
> > as SGMII and the host speed as 1000 Mbps because the strap pin was
> > other mode, but the SoC/board cannot work on that mode. Also, after
> > the SoC initialized the SERDES once, we cannot re-initialized it
> > because the initialized procedure seems all black magic...
> 
> Can you tell us which exact mode is configured by the strapping pins?

Sure. The port 0 is:

CONFIG[0] = 0 0 0
CONFIG[1] = 0 1 0
CONFIG[2] = 0 1 0

So, MACTYPE is SXGMII.

> Isn't it sufficient to just set the MACTYPE to SGMII, without
> configuring speed?

If the host speed was not changed, my environment didn't work.
The SERDES of R-Car cannot linkup with the PHY.

Best regards,
Yoshihiro Shimoda

> Marek
Yoshihiro Shimoda Oct. 20, 2022, 1:20 a.m. UTC | #3
Hi Russell,

> From: Russell King, Sent: Wednesday, October 19, 2022 8:39 PM
> 
> On Wed, Oct 19, 2022 at 12:44:42PM +0200, Marek Behún wrote:
> > On Wed, 19 Oct 2022 17:50:49 +0900
> > Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote:
> >
> > > R-Car S4-8 environment board requires to change the host interface
> > > as SGMII and the host speed as 1000 Mbps because the strap pin was
> > > other mode, but the SoC/board cannot work on that mode. Also, after
> > > the SoC initialized the SERDES once, we cannot re-initialized it
> > > because the initialized procedure seems all black magic...
> >
> > Can you tell us which exact mode is configured by the strapping pins?
> > Isn't it sufficient to just set the MACTYPE to SGMII, without
> > configuring speed?
> 
> (To Yoshihiro Shimoda)
> 
> Please note that I don't seem to have the patches to review - and as
> maintainer of the driver, I therefore NAK this series until I can
> review it.
> 
> I'm guessing the reason I don't have them is:
> 
> 2022-10-19 09:51:17 H=relmlor1.renesas.com (relmlie5.idc.renesas.com) [210.160.252.171]:58218 I=[78.32.30.218]:25 F=<>
> rejected RCPT <linux@armlinux.org.uk>: Faked bounce
> 2022-10-19 09:51:17 H=relmlor2.renesas.com (relmlie6.idc.renesas.com) [210.160.252.172]:24399 I=[78.32.30.218]:25 F=<>
> rejected RCPT <linux@armlinux.org.uk>: Faked bounce
> 2022-10-19 09:51:18 H=relmlor1.renesas.com (relmlie5.idc.renesas.com) [210.160.252.171]:58218 I=[78.32.30.218]:25 F=<>
> rejected RCPT <linux@armlinux.org.uk>: Faked bounce
> 2022-10-19 09:51:19 H=relmlor1.renesas.com (relmlie5.idc.renesas.com) [210.160.252.171]:58218 I=[78.32.30.218]:25 F=<>
> rejected RCPT <linux@armlinux.org.uk>: Faked bounce
> 
> Why are you sending patches using the NULL envelope sender - this is a
> common trick used by spammers and scammers to get their messages
> through. Please don't.

I'm sorry about this. I'll stop such sending patches.

Best regards,
Yoshihiro Shimoda

> (In case anyone questions this - as all my email is sent from encoded
> envelope from addresses rather than my published addresses, bounces
> do still work.)
> 
> Thanks.