riscv defconfig CONFIG_PM/macb/generic PHY regression in v5.18-rc1
Conor Dooley
mail at conchuod.ie
Tue Apr 5 10:23:49 PDT 2022
On 05/04/2022 17:56, Palmer Dabbelt wrote:
> On Tue, 05 Apr 2022 08:53:06 PDT (-0700), linux at armlinux.org.uk wrote:
>> On Tue, Apr 05, 2022 at 01:05:12PM +0000, Conor.Dooley at microchip.com
>> wrote:
>>> Hey,
>>> I seem to have come across a regression in the default riscv defconfig
>>> between riscv-for-linus-5.18-mw0 (bbde015227e8) & v5.18-rc1, exposed by
>>> c5179ef1ca0c ("RISC-V: Enable RISC-V SBI CPU Idle driver for QEMU virt
>>> machine") which causes the ethernet phy to not come up on my Icicle kit:
>>> [ 3.179864] macb 20112000.ethernet eth0: validation of sgmii with
>>> support 0000000,00000000,00006280 and advertisement
>>> 0000000,00000000,00004280 failed: -EINVAL
>>> [ 3.194490] macb 20112000.ethernet eth0: Could not attach PHY (-22)
>>
>> I don't think that would be related to the idle driver. This looks like
>> the PHY hasn't filled in the supported mask at probe time - do you have
>> the driver for the PHY built-in or the PHY driver module loaded?
>
> IIRC we had a bunch of issues with the PHY on the HiFive Unleashed,
> there was a quirky reset sequence that it wouldn't even probe correctly
> without. We have a
> ð0 {
> status = "okay";
> phy-mode = "gmii";
> phy-handle = <&phy0>;
> phy0: ethernet-phy at 0 {
> compatible = "ethernet-phy-id0007.0771";
> reg = <0>;
> };
> };
>
> in the Unleashed DT, but I can't find anything similar in the Icicle DT
>
> &mac1 {
> status = "okay";
> phy-mode = "sgmii";
> phy-handle = <&phy1>;
> phy1: ethernet-phy at 9 {
> reg = <9>;
> ti,fifo-depth = <0x1>;
> };
> phy0: ethernet-phy at 8 {
> reg = <8>;
> ti,fifo-depth = <0x1>;
> };
> };
>
> I seem to remember picking that specific phy because it was similar to
> the one that was POR for the Icicle at the time we decided, maybe you
> have a similar phy with a similar quirk and need a similar workaround?
I tried using the one for the VSC8662 (0007.0660) since that's whats on,
the board but that didn't help.
Without the revert:
[ 1.521768] macb 20112000.ethernet eth0: Cadence GEM rev 0x0107010c
at 0x20112000 irq 17 (00:04:a3:4d:4c:dc)
[ 3.206274] macb 20112000.ethernet eth0: PHY
[20112000.ethernet-ffffffff:09] driver [Vitesse VSC8662] (irq=POLL)
[ 3.216641] macb 20112000.ethernet eth0: configuring for phy/sgmii
link mode
(and then nothing)
If I revert the CONFIG_PM addition:
[ 1.508882] macb 20112000.ethernet eth0: Cadence GEM rev 0x0107010c
at 0x20112000 irq 17 (00:04:a3:4d:4c:dc)
[ 2.879617] macb 20112000.ethernet eth0: PHY
[20112000.ethernet-ffffffff:09] driver [Vitesse VSC8662] (irq=POLL)
[ 2.890010] macb 20112000.ethernet eth0: configuring for phy/sgmii
link mode
[ 6.981823] macb 20112000.ethernet eth0: Link is Up - 1Gbps/Full -
flow control off
[ 6.989657] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
I will try again tomorrow with "ethernet-phy-id0007.0771" to see if
anything changes, since that would use the Microsemi driver rather
than the Vitesse driver that VSC8662/0007.0660 uses.
Thanks,
Conor.
More information about the linux-riscv
mailing list