From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry
Date: Tue, 1 Nov 2016 17:26:48 +0100 [thread overview]
Message-ID: <20161101162648.GG10785@lunn.ch> (raw)
In-Reply-To: <20161101155950.GA19378@broadcom.com>
> > > + 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
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Jon Mason <jon.mason@broadcom.com>
Cc: David Miller <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Florian Fainelli <f.fainelli@gmail.com>,
devicetree@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com, rafal@milecki.pl,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry
Date: Tue, 1 Nov 2016 17:26:48 +0100 [thread overview]
Message-ID: <20161101162648.GG10785@lunn.ch> (raw)
In-Reply-To: <20161101155950.GA19378@broadcom.com>
> > > + 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
next prev parent reply other threads:[~2016-11-01 16:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 20:56 [PATCH v2 0/6] add NS2 support to bgmac Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-28 20:56 ` [PATCH v2 1/6] net: phy: broadcom: add bcm54xx_auxctl_read Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-28 20:56 ` [PATCH v2 2/6] net: phy: broadcom: Add BCM54810 PHY entry Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-29 8:18 ` Andrew Lunn
2016-10-29 8:18 ` Andrew Lunn
2016-11-01 15:59 ` Jon Mason
2016-11-01 15:59 ` Jon Mason
2016-11-01 15:59 ` Jon Mason
2016-11-01 16:26 ` Andrew Lunn [this message]
2016-11-01 16:26 ` Andrew Lunn
2016-11-01 16:43 ` Jon Mason
2016-11-01 16:43 ` Jon Mason
2016-11-01 16:48 ` Andrew Lunn
2016-11-01 16:48 ` Andrew Lunn
2016-11-01 16:48 ` Andrew Lunn
2016-10-28 20:56 ` [PATCH v2 3/6] Documentation: devicetree: net: add NS2 bindings to amac Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-31 6:20 ` Rob Herring
2016-10-31 6:20 ` Rob Herring
2016-10-31 6:20 ` Rob Herring
2016-10-28 20:56 ` [PATCH v2 4/6] net: ethernet: bgmac: device tree phy enablement Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-28 20:56 ` [PATCH v2 5/6] net: ethernet: bgmac: add NS2 support Jon Mason
2016-10-28 20:56 ` Jon Mason
2016-10-28 20:56 ` [PATCH v2 6/6] arm64: dts: NS2: add AMAC ethernet support Jon Mason
2016-10-28 20:56 ` Jon Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161101162648.GG10785@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.