Re: [PATCH v2 03/12] PCI: aardvark: Add PHY support

From: Miquel Raynal
Date: Tue Dec 18 2018 - 03:18:34 EST


Hi Marek,

Marek Behun <marek.behun@xxxxxx> wrote on Mon, 17 Dec 2018 22:34:30
+0100:

> Miquel,
>
> I tried the patches and they are working, with the exception of Compex
> WLE900X card, but we know that this card is problematic.

How did you test them? I am surprised that COMPHY calls worked for you
out of the box. I am not sure you have A3700 COMPHY support in your ATF
but it probably work because U-Boot is doing the initial configuration.

> I am interesting if there is a known way to turn of the comphy on
> A3720, or at least change the SGMII mode from 1Gbps to 2.5Gbps and
> back. Marvell documentation does not provide this information and the
> code in ATF providing the SMC calls does not do this either.
> Do you know how this can be achieved?

The driver already handles these calls (see [1]), making use of
them is just a matter of hacking into drivers (in your case, I
suppose it is mvneta) and add phy_set_mode()/phy_power_on() calls.

[1] https://github.com/miquelraynal/linux/blob/marvell/phy-next/pm/drivers/phy/marvell/phy-mvebu-a3700-comphy.c#L189


Thanks,
MiquÃl