devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE"
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers
Date: Thu, 13 Apr 2017 23:51:14 +0200	[thread overview]
Message-ID: <20170413215114.GB29708@lunn.ch> (raw)
In-Reply-To: <6fdcec91-829b-70c9-8780-992b67f6831a@gmail.com>

> The DT binding is in tree and provides an example of how the switch
> looks like, below is the example, but I am also adding the MDIO bus and
> the PHYs just so you can see how things wind up:
> 
> switch_top@f0b00000 {
>         compatible = "simple-bus";
>         #size-cells = <1>;
>         #address-cells = <1>;
>         ranges = <0 0xf0b00000 0x40804>;
> 
>         ethernet_switch@0 {
>                 compatible = "brcm,bcm7445-switch-v4.0";
>                 #size-cells = <0>;
>                 #address-cells = <1>;
>                 reg = <0x0 0x40000
>                         0x40000 0x110
>                         0x40340 0x30
>                         0x40380 0x30
>                         0x40400 0x34
>                         0x40600 0x208>;
>                 reg-names = "core", "reg", intrl2_0", "intrl2_1",
>                             "fcb, "acb";
>                 interrupts = <0 0x18 0
>                                 0 0x19 0>;
>                 brcm,num-gphy = <1>;
>                 brcm,num-rgmii-ports = <2>;
>                 brcm,fcb-pause-override;
>                 brcm,acb-packets-inflight;
> 
>                 ports {
>                         #address-cells = <1>;
>                         #size-cells = <0>;
> 
>                         port@0 {
>                                 label = "gphy";
>                                 reg = <0>;
> 				phy-handle = <&phy5>;
>                         };
> 
> 			sw0port1: port@1 {
> 				label = "rgmii_1";
> 				reg = <1>;
> 				phy-mode = "rgmii";
> 				fixed-link {
> 					speed = <1000>;
> 					full-duplex;
> 				};
> 			}
>                 };
>         };
> 
> 	mdio@403c0 {
> 		reg = <0x403c0 0x8 0x40300 0x18>;
> 		#address-cells = <0x1>;
> 		#size-cells = <0x0>;
> 		compatible = "brcm,unimac-mdio";
> 		reg-names = "mdio", "mdio_indir_rw";
> 
> 		switch: switch@0 {
> 			broken-turn-around;
> 			reg = <0x0>;
> 			compatible = "brcm,bcm53125";
> 			#address-cells = <1>;
> 			#size-cells = <0>;
> 
> 			ports {
> 				..
> 				port@8 {
> 					ethernet = <&sw0port1>;
> 				};
> 				...
> 			};
> 		};
> 
> 		phy5: ethernet-phy@5 {
> 			reg = <0x5>;
> 			compatible = "ethernet-phy-ieee802.3-c22";
> 		};
> 	};
> };

So phy5 is connected to the internal switch with a phy-handle. But
because of your double usage of this node, it also can be mapped into
the external switches port 5?

Is that your problem?

It seems like you should add an mdio node inside your switch node, and
list your external switch internal/external phys there if needed.

   Andrew

  reply	other threads:[~2017-04-13 21:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 21:42 [RFC net-next] of: mdio: Honor hints from MDIO bus drivers Florian Fainelli
2017-04-11 22:18 ` Florian Fainelli
     [not found]   ` <8ef102a4-22e5-def8-b50e-04f84b5849d7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-11 23:14     ` Andrew Lunn
     [not found]       ` <20170411231424.GA6174-g2DYL2Zd6BY@public.gmane.org>
2017-04-11 23:23         ` Florian Fainelli
     [not found]           ` <6de72d4c-5634-f3d6-5bfd-fcc0acda0b83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-12 21:48             ` Florian Fainelli
     [not found]               ` <417fdaa1-7aba-e646-8a50-043322f1410d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-12 22:10                 ` Andrew Lunn
     [not found]                   ` <20170412221016.GA29708-g2DYL2Zd6BY@public.gmane.org>
2017-04-12 23:58                     ` Florian Fainelli
2017-04-13 21:51                       ` Andrew Lunn [this message]
     [not found]                         ` <20170413215114.GB29708-g2DYL2Zd6BY@public.gmane.org>
2017-04-13 23:20                           ` Florian Fainelli
     [not found] ` <20170410214258.9409-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-13 16:49   ` David Miller

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=20170413215114.GB29708@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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).