Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513349
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry |
| Date | 2016-11-01 17:30 +0100 |
| Message-ID | <syK6K-2Be-13@gated-at.bofh.it> (permalink) |
| References | <sxmpP-4Re-3@gated-at.bofh.it> <sxmpQ-4Re-35@gated-at.bofh.it> <sxx1V-3GR-63@gated-at.bofh.it> <syJNo-2sA-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> > > + if (of_property_read_bool(np, "brcm,enet-phy-lane-swap")) {
> > > + /* Lane Swap - Undocumented register...magic! */
> > > + ret = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_SEL_ER + 0x9,
> > > + 0x11B);
> > > + if (ret < 0)
> > > + return ret;
> > > + }
> > > +
> >
> > I wounder if this property could be made generic? What exactly are you
> > swapping? Rx and Tx lanes? Maybe we should add it to phy.txt?
>
> Are you envisioning adding a DT check (similar to the
> of_property_read_bool above, only with a more generic string) in
> phy_device_create(), which will then set a PHY device flag? This flag
> would then be checked for in the PHY driver and the appropriate action
> taken (in this case the bcm_phy_write_exp above).
I would keep the parsing of the property in the driver. But if we
think other PHYs could also support this feature, it would be good to
avoid having "brcm,enet-phy-lane-swap", "marvell,enet-phy-lane-swap",
"davicom,enet-phy-lane-swap", etc. It would be better to have one well
defined property documented in phy.txt which any PHY is free to
implement.
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] add NS2 support to bgmac Jon Mason <jon.mason@broadcom.com> - 2016-10-28 23:00 +0200
[PATCH v2 1/6] net: phy: broadcom: add bcm54xx_auxctl_read Jon Mason <jon.mason@broadcom.com> - 2016-10-28 23:00 +0200
[PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Jon Mason <jon.mason@broadcom.com> - 2016-10-28 23:00 +0200
Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Andrew Lunn <andrew@lunn.ch> - 2016-10-29 10:20 +0200
Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Jon Mason <jon.mason@broadcom.com> - 2016-11-01 17:10 +0100
Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Andrew Lunn <andrew@lunn.ch> - 2016-11-01 17:30 +0100
Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Jon Mason <jon.mason@broadcom.com> - 2016-11-01 17:50 +0100
Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Andrew Lunn <andrew@lunn.ch> - 2016-11-01 18:00 +0100
[PATCH v2 4/6] net: ethernet: bgmac: device tree phy enablement Jon Mason <jon.mason@broadcom.com> - 2016-10-28 23:00 +0200
[PATCH v2 5/6] net: ethernet: bgmac: add NS2 support Jon Mason <jon.mason@broadcom.com> - 2016-10-28 23:00 +0200
csiph-web