public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Tobias Waldekranz <tobias@waldekranz•com>
To: Russell King - ARM Linux admin <linux@armlinux•org.uk>,
	Maxime Chevallier <maxime.chevallier@bootlin•com>
Cc: Andrew Lunn <andrew@lunn•ch>,
	Florian Fainelli <f.fainelli@gmail•com>,
	netdev@vger•kernel.org, Antoine Tenart <atenart@kernel•org>,
	Vivien Didelot <vivien.didelot@gmail•com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin•com>,
	"David S. Miller" <davem@davemloft•net>,
	linux-arm-kernel@lists•infradead.org,
	Heiner Kallweit <hkallweit1@gmail•com>
Subject: Re: net: phy: Dealing with 88e1543 dual-port mode
Date: Fri, 20 Nov 2020 11:59:16 +0100	[thread overview]
Message-ID: <8736149tvf.fsf@waldekranz.com> (raw)
In-Reply-To: <20201120102538.GP1551@shell.armlinux.org.uk>

On Fri, Nov 20, 2020 at 10:25, Russell King - ARM Linux admin <linux@armlinux•org.uk> wrote:
> On Fri, Nov 20, 2020 at 10:36:01AM +0100, Maxime Chevallier wrote:
>> So maybe we could be a bit more generic, with something along these lines :
>> 
>>     ethernet-phy@0 {
>>         ...
>> 
>>         mdi {
>>             port@0 {
>>                 media = "10baseT", "100baseT", "1000baseT";
>>                 pairs = <1>;
>> 	    };
>> 
>>             port@1 {
>>                 media = "1000baseX", "10gbaseR"
>>             };
>>         };
>>     };

Yeah that looks even better. Though "pairs" is redundant if you can
specify the list of supported link modes. I guess not specifying "media"
should mean "use all modes supported by the PHY". And if, for example,
media is set to 10-T+100-TX, that means that only two pairs will be
used.

> Don't forget that TP requires a minimum of two pairs. However, as
> Andrew pointed out, we already have max-speed which can be used to
> limit the speed below that which requires four pairs.

Maybe "max-speed" is how you solve this in the absense of explicit an
MDI declaration? Because in the multi-port case, the setting could be
different for the two ports, so you would source the information from
the "media" property instead.

> I have untested patches that allow the 88x3310 to be reconfigured
> between 10GBASE-R and 1000BASE-X depending on the SFP connected -
> untested because the I2C pull-ups on the Macchiatobin boards I have
> are way too strong and it results in SFP EEPROM corruption and/or
> failure to read the EEPROM.
>
>> I also like the idea of having a way to express the "preferred" media,
>> although I wonder if that's something we want to include in DT or that
>> we would want to tweak at runtime, through ethtool for example.
>
> I think preferred media should be configurable through ethtool -
> which is preferred will be specific to the user's application.

Yeah I half-regretted putting that in there right after I hit "send" :)
It should definitely be configurable from ethtool.

> However, there may be scope for DT to be able to specify the default
> preferred media.

This is where I was coming from. The vendor could potentially have more
information on what the default should be. But I guess you could also
argue that there is value in having Linux behave the same across all
devices.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-20 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 14:22 net: phy: Dealing with 88e1543 dual-port mode Maxime Chevallier
2020-11-19 14:55 ` Russell King - ARM Linux admin
2020-11-19 15:19   ` Russell King - ARM Linux admin
2020-11-19 15:24   ` Maxime Chevallier
2020-11-19 22:43     ` Tobias Waldekranz
2020-11-19 23:16       ` Russell King - ARM Linux admin
2020-11-20  0:11         ` Tobias Waldekranz
2020-11-20  0:40           ` Russell King - ARM Linux admin
2020-11-20  9:12             ` Tobias Waldekranz
2020-11-20  9:36           ` Maxime Chevallier
2020-11-20 10:25             ` Russell King - ARM Linux admin
2020-11-20 10:59               ` Tobias Waldekranz [this message]
2020-11-20 13:55               ` Andrew Lunn
2020-11-20 14:18                 ` Maxime Chevallier
2020-11-20  0:00       ` Andrew Lunn
2020-11-20  9:05         ` Tobias Waldekranz
2020-11-19 15:16 ` Andrew Lunn
2020-11-19 15:45   ` Maxime Chevallier

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=8736149tvf.fsf@waldekranz.com \
    --to=tobias@waldekranz$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=atenart@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=hkallweit1@gmail$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=maxime.chevallier@bootlin$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=thomas.petazzoni@bootlin$(echo .)com \
    --cc=vivien.didelot@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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