devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Vivek Unune <npcomplete13@gmail.com>, Andrew Lunn <andrew@lunn.ch>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	hauke@hauke-m.de, zajec5@gmail.com, linux@armlinux.org.uk,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: BCM5301X: Add support for Linksys EA9500
Date: Wed, 15 Mar 2017 12:49:30 -0700	[thread overview]
Message-ID: <7f5ddeba-6f79-9de5-2c67-a77e6bec0ef9@broadcom.com> (raw)
In-Reply-To: <CAChtp75xk3LN1-DPVvaHT5qEvrdoFFvXEk-daVCcJ=4rYu_vmw@mail.gmail.com>

On 03/15/2017 12:34 PM, Vivek Unune wrote:
> Andrew,
> 
> I'm not entirely sure. But here is what I observed.
> 
> Boot loader sets up both the switches. And I can use all 8 ports of the
> router when I boot Lede. Only the internal swich is detected and
> configurable via swconfig tool
> Internal switch is connected to CPU via port 5 same as Netgear R8000.
> The other bit here is that I looked through the GPL source and gpio pin
> 10 is labeled as EA9500_RST2LANSW_GPIO10_PIN/ResetSwitch. So when I
> performed a robo reset of the pin and 5 (labeled 1 thru 5 on the unit)
> of the 8 physical ports stopped working (no packets).
> 
> If the external switch were to be connect via dedicated ethernet
> interface it should have shown up during the probe. Is in't it?

Not necessarily, and probably not with LEDE which would treat the
external 53125 as a dumb switch and not even see it. With a mainline
kernel and the B53 DSA driver you would be able to represent both
switches in Device Tree and describe how they are cascading from each other.

The potential Device Tree changes could look like this (based on your
explanation, but I am not sure) for your platform, assuming the 53125 is
actually exposing the front panel ports and that we did introduce a
"mdio" node which would be required to expose the external BCM53125 switch.


/* There is no MDIO node, there should be one */
&mdio {
	status = "okay";

	switch@30 {
		#address-cells = <1>;
		#size-cells = <0>;
		reset-gpios = <&gpio 10>;
		reset-names = "robo_reset";

		ports {
                	#address-cells = <1>;
	                #size-cells = <0>;

        	        port@0 {
                	        reg = <0>;
                        	label = "lan1";
	                };

	                port@1 {
        	                reg = <1>;
                	        label = "lan2";
                	};

	                port@2 {
        	                reg = <2>;
                	        label = "lan3";
                	};

	                port@3 {
        	                reg = <3>;
                	        label = "lan1";
                	};

	                port@4 {
        	                reg = <4>;
                	        label = "wan";
                	};

 	               port@5 {
        	                reg = <5>;
                	        label = "cpu";
                        	ethernet = <&sw0port8>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
                	};
		};
	};
};

&srab {
        status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};

		sw0port8: port@8 {
			reg = <8>;
			label = "extswitch";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
        };
};

> 
> Thanks,
> 
> Vivek
> 
> 
> On Wed, Mar 15, 2017 at 2:52 PM Andrew Lunn <andrew@lunn.ch
> <mailto:andrew@lunn.ch>> wrote:
> 
>     Hi Vivek
> 
>     > - It has two switches in order to support 8 lan ports. Internal
>     switch is
>     >   BCM53012. The external switch BCM53125 currently works as "dumb
>     switch"
> 
>     Do you know how the second switch is connected? Is it cascaded off the
>     internal switch? Or does it have a dedicated Ethernet interface?
> 
>     Thanks
>             Andrew
> 


-- 
Florian

  parent reply	other threads:[~2017-03-15 19:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 15:00 [PATCH] ARM: dts: BCM5301X: Add support for Linksys EA9500 Vivek Unune
     [not found] ` <1489590033-4946-1-git-send-email-npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-15 18:52   ` Andrew Lunn
2017-03-15 19:34     ` Vivek Unune
     [not found]       ` <CAChtp75xk3LN1-DPVvaHT5qEvrdoFFvXEk-daVCcJ=4rYu_vmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-15 19:44         ` Vivek Unune
2017-03-15 19:49       ` Florian Fainelli [this message]
     [not found]         ` <7f5ddeba-6f79-9de5-2c67-a77e6bec0ef9-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-03-15 20:18           ` Vivek Unune
2017-03-15 21:19             ` Florian Fainelli
2017-06-27 16:42               ` Vivek Unune
     [not found]               ` <2e4ed52f-4134-9b6a-18c9-7c1f28cd7038-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-06-27 17:03                 ` Vivek Unune
     [not found]                   ` <CAChtp76sbKjxq03ipSDJN69XeJRU-0aRTeJ75+gCXZfo4D5r0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-27 17:38                     ` Florian Fainelli
     [not found]                       ` <03ba6198-a2cc-da9f-7d7d-f626d53d5717-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-29 21:04                         ` Vivek Unune
     [not found]                           ` <CAChtp77nD-dUCytja6PM3fAqXLCVshHqN-hV6pp6ues0PQcaOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-14  4:44                             ` Vivek Unune
2017-08-14 16:37                               ` Florian Fainelli
2017-08-19 21:30                                 ` Vivek Unune
2018-03-02 19:41 ` [PATCH v2] " Vivek Unune
2018-03-09 19:17   ` Florian Fainelli
2018-03-09 22:05     ` Vivek Unune
2018-03-29 22:16       ` Vivek Unune

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=7f5ddeba-6f79-9de5-2c67-a77e6bec0ef9@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=npcomplete13@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=zajec5@gmail.com \
    /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).