linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
@ 2015-02-28 20:20 Andrew Lunn
  2015-03-03  9:09 ` Gregory CLEMENT
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2015-02-28 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

Add a DSA section to the DT blob representing the Ethernet switch.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
This patch requires at runtime patches in net-next,
4c732668f98b96a0fa2645ac220fd9bbc17838c4
---
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 45 +++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 485a6eb86910..a2cf2154dcdb 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -327,6 +327,51 @@
 		gpio-fan,speed-map = <0    0
 				      4500 1>;
 	};
+
+	dsa at 0 {
+		compatible = "marvell,dsa";
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		dsa,ethernet = <&eth0>;
+		dsa,mii-bus = <&mdio>;
+
+		switch at 0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x0 0>;	/* MDIO address 0, switch 0 in tree */
+
+			port at 0 {
+				reg = <0>;
+				label = "lan4";
+			};
+
+			port at 1 {
+				reg = <1>;
+				label = "lan3";
+			};
+
+			port at 2 {
+				reg = <2>;
+				label = "lan2";
+			};
+
+			port at 3 {
+				reg = <3>;
+				label = "lan1";
+			};
+
+			port at 4 {
+				reg = <4>;
+				label = "internet";
+			};
+
+			port at 5 {
+				reg = <5>;
+				label = "cpu";
+			};
+		};
+	};
 };
 
 &pinctrl {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
  2015-02-28 20:20 [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch Andrew Lunn
@ 2015-03-03  9:09 ` Gregory CLEMENT
  2015-03-03 10:44   ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Gregory CLEMENT @ 2015-03-03  9:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrew,

On 28/02/2015 21:20, Andrew Lunn wrote:
> Add a DSA section to the DT blob representing the Ethernet switch.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> This patch requires at runtime patches in net-next,
> 4c732668f98b96a0fa2645ac220fd9bbc17838c4

This dts fragment looks sane. The dependencies is only at runtime so
it is less annoying for bissectability. So I tend applying it, however
what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not
present. Does the kernel crash? Or does it only make the Ethernet
switch not available?


Thanks,

Gregory


> ---
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 45 +++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
> index 485a6eb86910..a2cf2154dcdb 100644
> --- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
> +++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
> @@ -327,6 +327,51 @@
>  		gpio-fan,speed-map = <0    0
>  				      4500 1>;
>  	};
> +
> +	dsa at 0 {
> +		compatible = "marvell,dsa";
> +		#address-cells = <2>;
> +		#size-cells = <0>;
> +
> +		dsa,ethernet = <&eth0>;
> +		dsa,mii-bus = <&mdio>;
> +
> +		switch at 0 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x0 0>;	/* MDIO address 0, switch 0 in tree */
> +
> +			port at 0 {
> +				reg = <0>;
> +				label = "lan4";
> +			};
> +
> +			port at 1 {
> +				reg = <1>;
> +				label = "lan3";
> +			};
> +
> +			port at 2 {
> +				reg = <2>;
> +				label = "lan2";
> +			};
> +
> +			port at 3 {
> +				reg = <3>;
> +				label = "lan1";
> +			};
> +
> +			port at 4 {
> +				reg = <4>;
> +				label = "internet";
> +			};
> +
> +			port at 5 {
> +				reg = <5>;
> +				label = "cpu";
> +			};
> +		};
> +	};
>  };
>  
>  &pinctrl {
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
  2015-03-03  9:09 ` Gregory CLEMENT
@ 2015-03-03 10:44   ` Andrew Lunn
  2015-03-03 12:52     ` Gregory CLEMENT
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2015-03-03 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote:
> Hi Andrew,
> 
> On 28/02/2015 21:20, Andrew Lunn wrote:
> > Add a DSA section to the DT blob representing the Ethernet switch.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> > This patch requires at runtime patches in net-next,
> > 4c732668f98b96a0fa2645ac220fd9bbc17838c4
> 
> This dts fragment looks sane. The dependencies is only at runtime so
> it is less annoying for bissectability. So I tend applying it, however
> what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not
> present. Does the kernel crash? Or does it only make the Ethernet
> switch not available?

Hi Gregory

It does not crash. During probe of DSA, it fails to find the phy's
attached to the switch ports. This causes the probe to fail and the
switch drive gets unloaded.

       Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
  2015-03-03 10:44   ` Andrew Lunn
@ 2015-03-03 12:52     ` Gregory CLEMENT
  2015-03-04 13:21       ` Gregory CLEMENT
  0 siblings, 1 reply; 5+ messages in thread
From: Gregory CLEMENT @ 2015-03-03 12:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/03/2015 11:44, Andrew Lunn wrote:
> On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote:
>> Hi Andrew,
>>
>> On 28/02/2015 21:20, Andrew Lunn wrote:
>>> Add a DSA section to the DT blob representing the Ethernet switch.
>>>
>>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>>> ---
>>> This patch requires at runtime patches in net-next,
>>> 4c732668f98b96a0fa2645ac220fd9bbc17838c4
>>
>> This dts fragment looks sane. The dependencies is only at runtime so
>> it is less annoying for bissectability. So I tend applying it, however
>> what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not
>> present. Does the kernel crash? Or does it only make the Ethernet
>> switch not available?
> 
> Hi Gregory
> 
> It does not crash. During probe of DSA, it fails to find the phy's
> attached to the switch ports. This causes the probe to fail and the
> switch drive gets unloaded.

Good. So it is safe to apply this patch to mvebu/dt now.


Thanks,

Gregory


> 
>        Andrew
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
  2015-03-03 12:52     ` Gregory CLEMENT
@ 2015-03-04 13:21       ` Gregory CLEMENT
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2015-03-04 13:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/03/2015 13:52, Gregory CLEMENT wrote:
> On 03/03/2015 11:44, Andrew Lunn wrote:
>> On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote:
>>> Hi Andrew,
>>>
>>> On 28/02/2015 21:20, Andrew Lunn wrote:
>>>> Add a DSA section to the DT blob representing the Ethernet switch.
>>>>
>>>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>>>> ---
>>>> This patch requires at runtime patches in net-next,
>>>> 4c732668f98b96a0fa2645ac220fd9bbc17838c4
>>>
>>> This dts fragment looks sane. The dependencies is only at runtime so
>>> it is less annoying for bissectability. So I tend applying it, however
>>> what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not
>>> present. Does the kernel crash? Or does it only make the Ethernet
>>> switch not available?
>>
>> Hi Gregory
>>
>> It does not crash. During probe of DSA, it fails to find the phy's
>> attached to the switch ports. This causes the probe to fail and the
>> switch drive gets unloaded.
> 
> Good. So it is safe to apply this patch to mvebu/dt now.
> 

Now applied on mvebu/dt


Thanks,

Gregory

> 
> 
>>
>>        Andrew
>>
> 
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-04 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 20:20 [PATCH] ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch Andrew Lunn
2015-03-03  9:09 ` Gregory CLEMENT
2015-03-03 10:44   ` Andrew Lunn
2015-03-03 12:52     ` Gregory CLEMENT
2015-03-04 13:21       ` Gregory CLEMENT

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).