[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a62i1ge4.fsf@miraculix.mork.no>
Date:   Mon, 16 Jan 2023 19:30:27 +0100
From:   Bjørn Mork <bjorn@...k.no>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Frank Wunderlich <frank-w@...lic-files.de>,
        Frank Wunderlich <linux@...web.de>,
        linux-mediatek@...ts.infradead.org,
        Alexander Couzens <lynxis@...0.eu>,
        Felix Fietkau <nbd@....name>, John Crispin <john@...ozen.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Mark Lee <Mark-MC.Lee@...iatek.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops
"Russell King (Oracle)" <linux@...linux.org.uk> writes:
> That all looks fine. However, I'm running out of ideas.
Thanks a lot for the effort in any case.  It's comforting that even the
top experts can't figure out this one :-)
> What we seem to have is:
>
> PHY:
> VSPEC1_SGMII_CTRL = 0x34da
> VSPEC1_SGMII_STAT = 0x000e
>
> The PHY is programmed to exchange SGMII with the host PCS, and it
> says that it hasn't completed that exchange (bit 5 of STAT).
>
> The Mediatek PCS says:
> BMCR = 0x1140		AN enabled
> BMSR = 0x0008		AN capable
> ADVERTISE = 0x0001	SGMII response (bit 14 is clear, hardware is
> 			supposed to manage that bit)
> LPA = 0x0000		SGMII received control word (nothing)
> SGMII_MODE = 0x011b	SGMII mode, duplex AN, 1000M, Full duplex,
> 			Remote fault disable
>
> which all looks like it should work - but it isn't.
>
> One last thing I can think of trying at the moment would be writing
> the VSPEC1_SGMII_CTRL with 0x36da, setting bit 9 which allegedly
> restarts the SGMII exchange. There's some comments in the PHY driver
> that this may be needed - maybe it's necessary once the MAC's PCS
> has been switched to SGMII mode.
Tried that now.  Didn't change anything.  And still no packets.
root@...nWrt:/# mdio mdio-bus 6:30 raw 8
0x34da
root@...nWrt:/# mdio mdio-bus 6:30 raw 9
0x000e
root@...nWrt:/# mdio mdio-bus 6:30 raw 8 0x36da
root@...nWrt:/# mdio mdio-bus 6:30 raw 8
0x34da
root@...nWrt:/# mdio mdio-bus 6:30 raw 9
0x000e
Bjørn
Powered by blists - more mailing lists
 
