ARM: dts: Switch to new DSA binding
cover ARM: dts: Switch to new DSA binding
Hi all,
This patch series converts the in-tree users to utilize the new (relatively) DSA binding that was introduced with commit 8c5ad1d6179d ("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.
In about 2-3 releases we may consider removing the old DSA binding entirely from the kernel.
Thank you!
Florian Fainelli (8):
ARM: dts: armada-370-rd: Utilize new DSA binding
ARM: dts: armada-38x: Utilize new DSA binding
ARM: dts: armada-388-clearfog: Utilize new DSA binding
ARM: dts: armada-xp-linksys-mamba: Utilize new DSA binding
ARM: dts: kirkwood-dir665: Utilize new DSA binding
ARM: dts: kirkwood-linksys-viper: Utilize new DSA binding
ARM: dts: kirkwood-mv88f6281gtw-ge: Utilize new DSA binding
ARM: dts: kirkwood-rd88f6281: Utilize new DSA binding
arch/arm/boot/dts/armada-370-rd.dts | 44 +++++++++++++++++ arch/arm/boot/dts/armada-385-linksys.dtsi | 52 ++++++++++++++++++++- arch/arm/boot/dts/armada-388-clearfog.dts | 65 ++++++++++++++++++++++++++ arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 53 +++++++++++++++++++++ arch/arm/boot/dts/kirkwood-dir665.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-linksys-viper.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 11 +++++ arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 44 +++++++++++++++++ 9 files changed, 415 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.3
PATCH 1/8 ARM: dts: armada-370-rd: Utilize new DSA binding
Utilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/armada-370-rd.dts | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
arch/arm/boot/dts/armada-370-rd.dts +44 -0
@@ -173,6 +173,8 @@ }; dsa { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;
@@ -235,6 +237,48 @@ phy0: ethernet-phy at 0 { reg = <0>; }; + + switch: switch at 10 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <16>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + label = "lan0"; + }; + + port at 1 { + reg = <1>; + label = "lan1"; + }; + + port at 2 { + reg = <2>; + label = "lan2"; + }; + + port at 3 { + reg = <3>; + label = "lan3"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð1>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; };
Signature · 1 line
2.9.3
PATCH 2/8 ARM: dts: armada-38x: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/armada-385-linksys.dtsi | 52 ++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-linksys.dtsi +51 -1
@@ -103,8 +103,56 @@ }; }; - mdio { + mdio at 72004 { status = "okay"; + + switch at 0 { + compatible = "marvell,mv88e6095"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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 = "wan"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð2>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; }; sata at a8000 {
@@ -261,6 +309,8 @@ }; dsa at 0 { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;
Signature · 1 line
2.9.3
PATCH 3/8 ARM: dts: armada-388-clearfog: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net:
dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/armada-388-clearfog.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
arch/arm/boot/dts/armada-388-clearfog.dts +65 -0
@@ -351,6 +351,8 @@ }; dsa at 0 { + status = "okay"; + compatible = "marvell,dsa"; dsa,ethernet = <ð1>; dsa,mii-bus = <&mdio>;
@@ -444,3 +446,66 @@ status = "disabled"; }; }; + +&mdio { + status = "okay"; + + switch at 4 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; + pinctrl-names = "default"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + label = "lan5"; + }; + + port at 1 { + reg = <1>; + label = "lan4"; + }; + + port at 2 { + reg = <2>; + label = "lan3"; + }; + + port at 3 { + reg = <3>; + label = "lan2"; + }; + + port at 4 { + reg = <4>; + label = "lan1"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð1>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port at 6 { + /* 88E1512 external phy */ + reg = <6>; + label = "lan6"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +};
Signature · 1 line
2.9.3
PATCH 4/8 ARM: dts: armada-xp-linksys-mamba: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +53 -0
@@ -302,6 +302,8 @@ }; dsa { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;
@@ -398,3 +400,54 @@ spi-max-frequency = <40000000>; }; }; + +&mdio { + status = "okay"; + + switch at 0 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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"; + ethernet = <ð0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +};
Signature · 1 line
2.9.3
PATCH 5/8 ARM: dts: kirkwood-dir665: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/kirkwood-dir665.dts | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
arch/arm/boot/dts/kirkwood-dir665.dts +49 -0
@@ -194,6 +194,8 @@ }; dsa { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;
@@ -241,6 +243,53 @@ &mdio { status = "okay"; + + switch at 0 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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 = "wan"; + }; + + port at 6 { + reg = <6>; + label = "cpu"; + ethernet = <ð0port>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; }; /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
Signature · 1 line
2.9.3
PATCH 6/8 ARM: dts: kirkwood-linksys-viper: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/kirkwood-linksys-viper.dts | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
arch/arm/boot/dts/kirkwood-linksys-viper.dts +49 -0
@@ -70,6 +70,8 @@ }; dsa { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;
@@ -207,6 +209,53 @@ &mdio { status = "okay"; + + switch at 10 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <16>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + label = "ethernet1"; + }; + + port at 1 { + reg = <1>; + label = "ethernet2"; + }; + + port at 2 { + reg = <2>; + label = "ethernet3"; + }; + + port at 3 { + reg = <3>; + label = "ethernet4"; + }; + + port at 4 { + reg = <4>; + label = "internet"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð0port>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; }; &uart0 {
Signature · 1 line
2.9.3
PATCH 7/8 ARM: dts: kirkwood-mv88f6281gtw-ge: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts +49 -0
@@ -112,6 +112,8 @@ }; dsa { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <1>; #size-cells = <0>;
@@ -159,6 +161,53 @@ &mdio { status = "okay"; + + switch at 0 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + label = "lan1"; + }; + + port at 1 { + reg = <1>; + label = "lan2"; + }; + + port at 2 { + reg = <2>; + label = "lan3"; + }; + + port at 3 { + reg = <3>; + label = "lan4"; + }; + + port at 4 { + reg = <4>; + label = "wan"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð0port>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; }; ð0 {
Signature · 1 line
2.9.3
PATCH 8/8 ARM: dts: kirkwood-rd88f6281: Utilize new DSA binding
In reply to Florian FainelliUtilize the new DSA binding, introduced with commit 8c5ad1d6179d ("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.
--- arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 11 ++++++++ arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 44 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts +11 -0
@@ -33,3 +33,14 @@ ð1 { status = "disabled"; }; + +&switch { + reg = <0>; + + ports { + port at 4 { + reg = <4>; + label = "wan"; + }; + }; +};
arch/arm/boot/dts/kirkwood-rd88f6281.dtsi +44 -0
56 lines not on this page · raw message
Signature · 1 line
2.9.3
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
In reply to Florian FainelliHi Florian,
Quoted 14 lines · Florian Fainelli
Utilize the new DSA binding, introduced with commit
8c5ad1d6179d("net:
dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/armada-388-clearfog.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)arch/arm/boot/dts/armada-388-clearfog.dts +0
-0
arch/arm/boot/dts/armada-388-clearfog.dts line 354
Quoted 4 lines
arch/arm/boot/dts/armada-388-clearfog.dts +1
-0@@ -351,6 +351,8 @@ }; dsa at 0 { + status = "okay";
I think you wanted "disabled" here !
arch/arm/boot/dts/armada-388-clearfog.dts line 448
Quoted 8 lines
arch/arm/boot/dts/armada-388-clearfog.dts +1
-0+ compatible = "marvell,dsa"; dsa,ethernet = <ð1>; dsa,mii-bus = <&mdio>;@@ -444,3 +446,66 @@ status = "disabled"; }; };
[...]
Neil
Re: [PATCH 2/8] ARM: dts: armada-38x: Utilize new DSA binding
In reply to Florian FainelliHi Florian,
You should use the board name in the topic, ie:
"ARM: dts: armada-385-linksys: Utilize new DSA binding"
Thanks,
Gregory
Quoted 83 lines · Florian Fainelli
Utilize the new DSA binding, introduced with commit
8c5ad1d6179d("net: dsa:
Document new binding"). The legacy binding node is kept included, but is marked disabled.Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/armada-385-linksys.dtsi | 52 ++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)arch/arm/boot/dts/armada-385-linksys.dtsi +51
-1@@ -103,8 +103,56 @@ }; }; - mdio { + mdio at 72004 { status = "okay"; + + switch at 0 { + compatible = "marvell,mv88e6095"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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 = "wan"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð2>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; }; sata at a8000 {@@ -261,6 +309,8 @@ }; dsa at 0 { + status = "disabled"; + compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>;Signature · 1 line
2.9.3
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Hi Florian,
Quoted 9 lines · Florian Fainelli
Hi all,
This patch series converts the in-tree users to utilize the new (relatively) DSA binding that was introduced with commit
8c5ad1d6179d("net: dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.In about 2-3 releases we may consider removing the old DSA binding entirely from the kernel.
The series looks OK. However I would like to have a reviewed by from Andrew who know well the mvebu platform and the DSA subsystem.
Also there's few fixes needed for the v2.
Thanks,
Gregory
Quoted 27 lines
Thank you!
Florian Fainelli (8):
ARM: dts: armada-370-rd: Utilize new DSA binding
ARM: dts: armada-38x: Utilize new DSA binding
ARM: dts: armada-388-clearfog: Utilize new DSA binding
ARM: dts: armada-xp-linksys-mamba: Utilize new DSA binding
ARM: dts: kirkwood-dir665: Utilize new DSA binding
ARM: dts: kirkwood-linksys-viper: Utilize new DSA binding
ARM: dts: kirkwood-mv88f6281gtw-ge: Utilize new DSA binding
ARM: dts: kirkwood-rd88f6281: Utilize new DSA bindingarch/arm/boot/dts/armada-370-rd.dts | 44 +++++++++++++++++ arch/arm/boot/dts/armada-385-linksys.dtsi | 52 ++++++++++++++++++++- arch/arm/boot/dts/armada-388-clearfog.dts | 65 ++++++++++++++++++++++++++ arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 53 +++++++++++++++++++++ arch/arm/boot/dts/kirkwood-dir665.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-linksys-viper.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 49 +++++++++++++++++++ arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 11 +++++ arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 44 +++++++++++++++++ 9 files changed, 415 insertions(+), 1 deletion(-)Signature · 1 line
2.9.3
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 2 lines
The series looks OK. However I would like to have a reviewed by from Andrew who know well the mvebu platform and the DSA subsystem.
Hi Gregory
Yes, i was planning on reviewing, and testing on at least three of these platforms.
Since this is mvebu/arm-soc and not netdev, i may take a week or so before i get around to it. netdev is too fast some times.
Andrew
Re: [PATCH 1/8] ARM: dts: armada-370-rd: Utilize new DSA binding
In reply to Florian Fainelliarch/arm/boot/dts/armada-370-rd.dts line 245
Quoted 6 lines
arch/arm/boot/dts/armada-370-rd.dts +6
-0+ + switch: switch at 10 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <16>;
Hummm, a device tree question. switch at 10, reg = <16>. Is there an implicit understanding that the 10 is hex?
Andrew
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
In reply to Florian FainelliHi Florian,
Quoted 4 lines · Florian Fainelli
Utilize the new DSA binding, introduced with commit
8c5ad1d6179d("net:
dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.
I tested this patch on mvebu/dt (I needed to reduce the context to apply the patch due to the changes made by Russell King on this file). I also set the status of the old binding to "disable" (instead of "okay").
It seems to work with the limited test did:
ifconfig eth1 up
udhcpc -i lan1
iperf -c mylaptop
(same for lan4)
However is there a way to be sure that the new binding is used?
Gregory
Quoted 88 lines
Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/armada-388-clearfog.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)arch/arm/boot/dts/armada-388-clearfog.dts +65
-0@@ -351,6 +351,8 @@ }; dsa at 0 { + status = "okay"; + compatible = "marvell,dsa"; dsa,ethernet = <ð1>; dsa,mii-bus = <&mdio>;@@ -444,3 +446,66 @@ status = "disabled"; }; }; + +&mdio { + status = "okay"; + + switch at 4 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; + pinctrl-names = "default"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + label = "lan5"; + }; + + port at 1 { + reg = <1>; + label = "lan4"; + }; + + port at 2 { + reg = <2>; + label = "lan3"; + }; + + port at 3 { + reg = <3>; + label = "lan2"; + }; + + port at 4 { + reg = <4>; + label = "lan1"; + }; + + port at 5 { + reg = <5>; + label = "cpu"; + ethernet = <ð1>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port at 6 { + /* 88E1512 external phy */ + reg = <6>; + label = "lan6"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +};Signature · 1 line
2.9.3
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
Quoted 4 lines · Gregory CLEMENT
Hi Florian,
On lun., janv. 02 2017, Florian Fainelli <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
Utilize the new DSA binding, introduced with commit
8c5ad1d6179d("net:
dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.I tested this patch on mvebu/dt (I needed to reduce the context to apply the patch due to the changes made by Russell King on this file). I also set the status of the old binding to "disable" (instead of "okay").
Yes, that needs fixing, thanks for mentioning that.
Quoted 9 lines
It seems to work with the limited test did:
ifconfig eth1 up
udhcpc -i lan1
iperf -c mylaptop(same for lan4)
However is there a way to be sure that the new binding is used?
The best way is probably to make sure that your switch device appears parented to the MDIO bus driver under /sys/class/mdio_bus/*mvmdio*. Alternatively, if you see a message like:
DSA: switch 0 0 parsed
in your dmesg, that would also be indicative of using the new binding and corresponding code.
Thanks a lot for trying that out!
Signature · 1 line
Florian
Re: [PATCH 1/8] ARM: dts: armada-370-rd: Utilize new DSA binding
In reply to Andrew LunnQuoted 9 lines · Andrew Lunn
arch/arm/boot/dts/armada-370-rd.dts line 245
Quoted 6 lines
arch/arm/boot/dts/armada-370-rd.dts +6
-0+ + switch: switch at 10 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <16>;Hummm, a device tree question. switch at 10, reg = <16>. Is there an implicit understanding that the 10 is hex?
Most (if not all?) unit addresses are hexadecimal, which is why this was chosen here, but I really don't mind changing that.
Signature · 1 line
Florian
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
In reply to Florian FainelliHi Florian, All,
Quoted 10 lines · Florian Fainelli
Quoted 1 line
However is there a way to be sure that the new binding is used?
The best way is probably to make sure that your switch device appears parented to the MDIO bus driver under
/sys/class/mdio_bus/*mvmdio*. Alternatively, if you see a message like:DSA: switch 0 0 parsed
in your dmesg, that would also be indicative of using the new binding and corresponding code.
That makes me think that we should either remove, or use different values for the version described in net/dsa/dsa.c:
char dsa_driver_version[] = "0.1";
Today this is absolutely useless and erroneous.
Thanks,
Vivien
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
Quoted 6 lines
That makes me think that we should either remove, or use different values for the version described in
net/dsa/dsa.c:char dsa_driver_version[] = "0.1";Today this is absolutely useless and erroneous.
I think it has been useless for over 9 years.
Feel free to remove it.
Andrew
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
Hi Andrew,
Quoted 8 lines · Andrew Lunn
Quoted 6 lines
That makes me think that we should either remove, or use different values for the version described in
net/dsa/dsa.c:char dsa_driver_version[] = "0.1";Today this is absolutely useless and erroneous.
I think it has been useless for over 9 years.
Do we want to get rid of it, or do we want to have a string version per DSA implementation? (old vs. new bindings).
I don't like the actual way to distinguish between the two (grep'ing dmesg as Florian shown). Maybe a pr_info in dsa2.c would be enough to inform about DSA "v2". What do you guys prefer?
Thanks,
Vivien
Re: [PATCH 1/8] ARM: dts: armada-370-rd: Utilize new DSA binding
In reply to Florian FainelliHi Florian,
Quoted 11 lines · Florian Fainelli
Quoted 9 lines · Andrew Lunn
arch/arm/boot/dts/armada-370-rd.dts line 245
Quoted 6 lines
arch/arm/boot/dts/armada-370-rd.dts +6
-0+ + switch: switch at 10 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <16>;Hummm, a device tree question. switch at 10, reg = <16>. Is there an implicit understanding that the 10 is hex?
Quoted 2 lines
Most (if not all?) unit addresses are hexadecimal, which is why this was chosen here, but I really don't mind changing that.
And what about using:
reg = <0x10>;
Gregory
Quoted 2 lines
Signature · 1 line
Florian
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Re: [PATCH 3/8] ARM: dts: armada-388-clearfog: Utilize new DSA binding
In reply to Florian FainelliHi Florian,
Quoted 26 lines · Florian Fainelli
Quoted 4 lines · Gregory CLEMENT
Hi Florian,
On lun., janv. 02 2017, Florian Fainelli <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
Utilize the new DSA binding, introduced with commit
8c5ad1d6179d("net:
dsa: Document new binding"). The legacy binding node is kept included, but is marked disabled.I tested this patch on mvebu/dt (I needed to reduce the context to apply the patch due to the changes made by Russell King on this file). I also set the status of the old binding to "disable" (instead of "okay").
Yes, that needs fixing, thanks for mentioning that.
Quoted 9 lines
It seems to work with the limited test did:
ifconfig eth1 up
udhcpc -i lan1
iperf -c mylaptop(same for lan4)
However is there a way to be sure that the new binding is used?
Quoted 8 lines
The best way is probably to make sure that your switch device appears parented to the MDIO bus driver under
/sys/class/mdio_bus/*mvmdio*. Alternatively, if you see a message like:DSA: switch 0 0 parsed
in your dmesg, that would also be indicative of using the new binding and corresponding code.
So it's OK I had this message.
Gregory
Quoted 4 lines
Thanks a lot for trying that out!
Signature · 1 line
Florian
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com