netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 / Question regarding proper devicetree
Date: Fri, 1 May 2020 20:45:32 +0200	[thread overview]
Message-ID: <20200501184532.GI128733@lunn.ch> (raw)
In-Reply-To: <3C939186-D81B-4423-A148-6C5F104E3684@berg-solutions.de>

On Fri, May 01, 2020 at 08:09:05PM +0200, Roelof Berg wrote:
> Working status: I added fixed_phy support to the Microchip lan743x ethernet
> driver and for upstream contribution I need to make it runtime configurable via
> the device tree.
> 
> Question:
> 
> There are, amongst other, the following devices on my target (i.mx6): 
> /soc/aips-bus@2100000/ethernet@2188000
> /soc/pcie@1ffc000
> 
> Where would I put my additional lan743x ethernet device in the device tree ?

It is a child device of the PCIe host. So that decides where it goes
in the tree. The pcie bus should already be in the imx6 DTSI file. So
in your board specific dts file you want something like:

&pcie {
        host@0 {
                reg = <0 0 0 0 0>;

                #address-cells = <3>;
                #size-cells = <2>;

                ethernet: ethernet@0 {
                        reg = <0 0 0 0 0>;
			phy-connection-type = "rgmii";
                         
                        fixed-link {
                                speed = <100>;
                                full-duplex;
                        };
                };
         };
};

You will probably need to play around with this. It is not well
documented, there are few examples. I needed to put a few printk() in
the PCI core to get it working for the ZII boards.

    Andrew

      parent reply	other threads:[~2020-05-01 18:45 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
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 [this message]

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=20200501184532.GI128733@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).