From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"olteanv@gmail.com" <olteanv@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] net: dsa: mv88e6xxx: Support serdes ports on MV88E6097
Date: Sun, 18 Oct 2020 20:09:46 +0000 [thread overview]
Message-ID: <b3d1d071-3bce-84f4-e9d5-f32a41c432bd@alliedtelesis.co.nz> (raw)
In-Reply-To: <20201018161624.GD456889@lunn.ch>
On 19/10/20 5:16 am, Andrew Lunn wrote:
> On Tue, Oct 13, 2020 at 03:18:58PM +1300, Chris Packham wrote:
>> Implement serdes_power, serdes_get_lane and serdes_pcs_get_state ops for
>> the MV88E6097 so that ports 8 & 9 can be supported as serdes ports and
>> directly connected to other network interfaces or to SFPs without a PHY.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>
>> This should be usable for all variants of the 88E6185 that have
>> tri-speed capable ports (which is why I used the mv88e6185 prefix
>> instead of mv88e6097). But my hardware only has a 88e6097 so I've only
>> connected up the ops for that chip.
>>
>> drivers/net/dsa/mv88e6xxx/chip.c | 61 ++++++++++++++++++++++++++++++++
>> 1 file changed, 61 insertions(+)
>>
>> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
>> index 1ef392ee52c5..1c6cd5c43eb1 100644
>> --- a/drivers/net/dsa/mv88e6xxx/chip.c
>> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
>> @@ -3436,6 +3436,64 @@ static int mv88e6xxx_set_eeprom(struct dsa_switch *ds,
>> return err;
>> }
>>
>> +static int mv88e6185_serdes_power(struct mv88e6xxx_chip *chip, int port, u8 lane,
>> + bool up)
>> +{
>> + /* The serdes power can't be controlled on this switch chip but we need
>> + * to supply this function to avoid returning -EOPNOTSUPP in
>> + * mv88e6xxx_serdes_power_up/mv88e6xxx_serdes_power_down
>> + */
> Hi Chris
>
> How about bit 11 of the control register 0? This looks a lot like a
> BMCR, and BMCR_PDOWN.
>
> This is what mv88e6352_serdes_power() does. You might be able to even
> re-use it, if you can make the lane numbers work.
I assume you're talking about the PHY Control Register 0 bit 11. If so
that's for the internal PHYs on ports 0-7. Ports 8, 9 and 10 don't have
PHYs.
next prev parent reply other threads:[~2020-10-18 20:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 2:18 [PATCH 0/2] net: dsa: mv88e6xxx: serdes link without phy Chris Packham
2020-10-13 2:18 ` [PATCH 1/2] net: dsa: mv88e6xxx: Don't force link when using in-band-status Chris Packham
2020-10-18 16:00 ` Andrew Lunn
2020-10-13 2:18 ` [PATCH 2/2] net: dsa: mv88e6xxx: Support serdes ports on MV88E6097 Chris Packham
2020-10-18 16:16 ` Andrew Lunn
2020-10-18 20:09 ` Chris Packham [this message]
2020-10-18 20:25 ` Andrew Lunn
2020-10-18 21:15 ` Chris Packham
2020-10-18 22:08 ` Andrew Lunn
2020-10-18 22:31 ` Chris Packham
2020-10-19 2:45 ` Chris Packham
2020-10-15 0:35 ` [PATCH 0/2] net: dsa: mv88e6xxx: serdes link without phy Jakub Kicinski
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=b3d1d071-3bce-84f4-e9d5-f32a41c432bd@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).