Message ID | 2a986604b49f7bfbee3898c8870bb0cf8182e879.1597729692.git.landen.chao@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net-next: dsa: mt7530: add support for MT7531 | expand |
On Tue, Aug 18, 2020 at 03:14:12PM +0800, Landen Chao wrote: > Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. > > Signed-off-by: Landen Chao <landen.chao@mediatek.com> > --- > .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++++++++++++++++++ > 1 file changed, 44 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > index d174ad214857..c57b2571165f 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > @@ -143,6 +143,50 @@ > mdio: mdio-bus { > #address-cells = <1>; > #size-cells = <0>; > + > + switch@0 { > + compatible = "mediatek,mt7531"; > + reg = <0>; > + reset-gpios = <&pio 54 0>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + label = "wan"; > + }; > + > + port@1 { > + reg = <1>; > + label = "lan0"; > + }; > + > + port@2 { > + reg = <2>; > + label = "lan1"; > + }; > + > + port@3 { > + reg = <3>; > + label = "lan2"; > + }; > + > + port@4 { > + reg = <4>; > + label = "lan3"; > + }; > + > + port@6 { > + reg = <6>; > + label = "cpu"; > + ethernet = <&gmac0>; > + phy-mode = "2500base-x"; > + }; Is there any reason why you're not specifying a fixed-link node here? > + }; > + }; > + > }; > }; > > -- > 2.17.1 Thanks, -Vladimir
On Wed, 2020-08-19 at 00:24 +0800, Vladimir Oltean wrote: > On Tue, Aug 18, 2020 at 03:14:12PM +0800, Landen Chao wrote: > > Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. > > > > Signed-off-by: Landen Chao <landen.chao@mediatek.com> > > --- > > .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > index d174ad214857..c57b2571165f 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > @@ -143,6 +143,50 @@ > > mdio: mdio-bus { > > #address-cells = <1>; > > #size-cells = <0>; > > + > > + switch@0 { > > + compatible = "mediatek,mt7531"; > > + [snip] > > + port@6 { > > + reg = <6>; > > + label = "cpu"; > > + ethernet = <&gmac0>; > > + phy-mode = "2500base-x"; > > + }; > > Is there any reason why you're not specifying a fixed-link node here? I got the below feedback in v1, so I follow the DSA common design in v2. v2 can work with fixed-link node or without fixed-link node in CPU port node. "This fixed-link should not be needed. The DSA driver is supposed to configure the CPU port to its fastest speed by default. 2500 is the fastest speed a 2500Base-X link can do..." > > + }; > > + }; > > + > > }; > > }; > > > > -- > > 2.17.1 > > Thanks, > -Vladimir
On Wed, Aug 19, 2020 at 04:15:01PM +0800, Landen Chao wrote: > On Wed, 2020-08-19 at 00:24 +0800, Vladimir Oltean wrote: > > On Tue, Aug 18, 2020 at 03:14:12PM +0800, Landen Chao wrote: > > > Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. > > > > > > Signed-off-by: Landen Chao <landen.chao@mediatek.com> > > > --- > > > .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++++++++++++++++++ > > > 1 file changed, 44 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > > index d174ad214857..c57b2571165f 100644 > > > --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > > +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts > > > @@ -143,6 +143,50 @@ > > > mdio: mdio-bus { > > > #address-cells = <1>; > > > #size-cells = <0>; > > > + > > > + switch@0 { > > > + compatible = "mediatek,mt7531"; > > > + > [snip] > > > + port@6 { > > > + reg = <6>; > > > + label = "cpu"; > > > + ethernet = <&gmac0>; > > > + phy-mode = "2500base-x"; > > > + }; > > > > Is there any reason why you're not specifying a fixed-link node here? > I got the below feedback in v1, so I follow the DSA common design in v2. > v2 can work with fixed-link node or without fixed-link node in CPU port > node. > > "This fixed-link should not be needed. The DSA driver is supposed to > configure the CPU port to its fastest speed by default. 2500 is > the fastest speed a 2500Base-X link can do..." See this discussion and the replies to it: https://www.spinics.net/lists/netdev/msg630102.html I think if mt7530 is using phylink for non-netdev ports (and it is), it would be good to have standard bindings that phylink can parse. For example, in lack of a "pause" specifier, will the CPU port use flow control or won't it? Why? I think there's simply no good reason why you'd omit 3 more lines now. > > > + }; > > > + }; > > > + > > > }; > > > }; > > > > > > -- > > > 2.17.1 > > > > Thanks, > > -Vladimir > -Vladimir
diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts index d174ad214857..c57b2571165f 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -143,6 +143,50 @@ mdio: mdio-bus { #address-cells = <1>; #size-cells = <0>; + + switch@0 { + compatible = "mediatek,mt7531"; + reg = <0>; + reset-gpios = <&pio 54 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "wan"; + }; + + port@1 { + reg = <1>; + label = "lan0"; + }; + + port@2 { + reg = <2>; + label = "lan1"; + }; + + port@3 { + reg = <3>; + label = "lan2"; + }; + + port@4 { + reg = <4>; + label = "lan3"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + }; + }; + }; + }; };
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao <landen.chao@mediatek.com> --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+)