From: Andrew Lunn <andrew@lunn.ch>
To: Roelof Berg <rberg@berg-solutions.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Bryan Whitehead <bryan.whitehead@microchip.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Russell King <linux@armlinux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lan743x: Added fixed_phy support
Date: Mon, 27 Apr 2020 23:52:09 +0200 [thread overview]
Message-ID: <20200427215209.GP1250287@lunn.ch> (raw)
In-Reply-To: <6C2E44BB-F4D1-4BC3-9FCB-55F01DA4A3C9@berg-solutions.de>
On Mon, Apr 27, 2020 at 11:37:07PM +0200, Roelof Berg wrote:
> Hello Andrew,
>
> thanks for working together on this. Our target system is an embedded linux device for vehicles, that has all three components as single chips on one PCB: The MCU, the lan743x MAC and a KSZ9893 switch.
What is the MCU? ARM?
> Four options:
> a) We offer this kernel configuration and the next embedded system designer can use phyless MII mode.
> b) We change this to a runtime configuration that somehow auto-detects that phyless MII mode is desired.
> (Then the EEPROM/OTP needs to provide baud rate, MII mode and duplex mode by user-register access).
> c) We move the configuration of the phyless mode to somewhere like dev-fs
> d) We avoid compiled fixed_phy and use a newer method. Like device-tree configuration of fixed_phy (is it working allready ?) or phylink as you originally suggested. Unfortunately I have no test-hardware here that uses a phy.
> e) We leave this one away from the kernel if it is unlikely that other embedded systems would use lan8431 in direct (phyless) MII mode as well. Microchip (on cc) could know more about this likelihood.
If you are using ARM, device tree is the way to go. In systems like
this, you know exactly which PCIe bus the lan743x will be hanging
off. So you can add a DT node for it. It is not done very often, but
look at arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi. That board has an
intel i210 on its PCIe bus, and we need a phandle for it. But you can
add any properties you want. For what you are doing, you should be
looking at:
Documentation/devicetree/bindings/net/ethernet-controller.yaml:
phy-mode and fixed-link.
Andrew
next prev parent reply other threads:[~2020-04-27 21:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-25 23:43 [PATCH] lan743x: Added fixed_phy support Roelof Berg
2020-04-26 14:31 ` Andrew Lunn
2020-04-27 21:37 ` Roelof Berg
2020-04-27 21:52 ` Andrew Lunn [this message]
2020-04-28 13:06 ` Roelof Berg
[not found] ` <3C939186-D81B-4423-A148-6C5F104E3684@berg-solutions.de>
2020-05-01 18:13 ` [PATCH] lan743x: Added fixed_phy support / Question regarding proper devicetree Roelof Berg
2020-05-01 18:45 ` Andrew Lunn
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=20200427215209.GP1250287@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=rberg@berg-solutions.de \
--cc=tglx@linutronix.de \
/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).