On 2/26/2021 8:14 AM, Daniel González Cabanelas wrote:
> I could update the BCM5365 phy_id in the downstream B53 driver to fix
> it and avoid any kind of future conflicts if the driver is upstreamed.
> Accordingly to documentation the whole BCM5365 UID (not masked) is
> 0x00406370.
> PHYID HIGH[15:0] = OUI[21:6]
> PHYID LOW[15:0] = OUI[5:0] + MODEL[5:0] + REV[3:0]
> 
> Right now the used mask is 0x1ffffc00. But if I understood correctly
> it is only required to mask the last 3 bits. This would reflect in the
> B53 driver:
> ---snip---
> /* BCM5365 */
> static struct phy_driver b53_phy_driver_id3 = {
> .phy_id = 0x00406370,
> .name = "Broadcom B53 (3)",
> .phy_id_mask = 0xfffffff8,,
> ----snip---
> 
> For the tested board, BCM6348, the UID is 0x00406240 (read by the
> kernel). But in this case its driver involves more SoCs/PHYs, maybe
> with different UIDs.

Or another way to solve this entirely is to move to the upstream DSA
driver for b53 under drivers/net/dsa/b53 and register the switch as a
mdio_device instead of as a phy_device.
-- 
Florian

Reply via email to