Re: [PATCH] lan743x: Added fixed_phy support / Question regarding proper devicetree

From: Andrew Lunn
Date: Fri May 01 2020 - 14:45:50 EST


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