[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 11:57:22 +0800
From: Richard Tresidder <rtresidd@...ctromag.com.au>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jakub Kicinski <kuba@...nel.org>, vinschen@...hat.com,
netdev@...r.kernel.org
Subject: Re: STMMAC Ethernet Driver support
<font face="monospace">Richard Tresidder</font>
On 12/12/2023 12:16 am, Andrew Lunn wrote:
>> We use the SOC's internal STMMAC interface to connect to a Marvel switch IC
>> and expose each port individually using vlan, I'd forgot that part.
>> It's an 88E6352-xx-TFJ2I000 device utilising the 'marvell,mv88e6085'
>> compatible driver in drivers\net\dsa\mv88e6xxx
> Its odd you need VLANs. Each port should already be exposed to the
> host as netdev interfaces. That is what DSA does.
>
> Andrew
Hi Andrew
I'll read further on that one as this is the first time I've had to
dig into this side of the system.
It had always "just worked".
The ports show up in an 'ip l' list in the same style as a vlan with an
@ symbol, naming isn't quite vlan style though.
That in concert with the fact this 'vlan_feature' line broke things has
possibly distorted my view of how they're propagated.
It's a rather trimmed down busybox image, so I'm missing some tools I'd
usually use to examine stuff.
This is the config in the dts
**************************************
//------------------------------------------------------------------------------
// connected to dsa network switch
&gmac1 {
clock-names = "stmmaceth", "clk_ptp_ref";
clocks = <&emac1_clk &hps_eosc1>;
f2h_ptp_ref_clk;
fixed-link {
speed = <1000>;
full-duplex;
};
};
//------------------------------------------------------------------------------
&mdio1 {
#address-cells = <1>;
#size-cells = <0>;
switch0: switch0@0 {
compatible = "marvell,mv88e6085";
#address-cells = <1>;
reg = <0>;
//reset-gpios = <&pio_a0 2 GPIO_ACTIVE_LOW>;
dsa,member = <0 0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@2 {
reg = <2>;
label = "lan1";
phy-handle = <&switch1phy2>;
};
port@3 {
reg = <3>;
label = "lan2";
phy-handle = <&switch1phy3>;
};
port@4 {
reg = <4>;
label = "lan3";
phy-handle = <&switch1phy4>;
};
port@5 {
reg = <5>;
label = "wifi";
fixed-link {
speed = <100>;
full-duplex;
};
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
switch1phy2: switch1phy2@2 {
reg = <2>;
marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx
Energy Detect, no FLPs sents
};
switch1phy3: switch1phy3@3 {
reg = <3>;
marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx
Energy Detect, no FLPs sents
};
switch1phy4: switch1phy4@4 {
reg = <4>;
marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx
Energy Detect, no FLPs sents
};
};
};
};
*************************************************
This is how they appear using 'ip l'
The @ symbol got me as I've usually associated this with vlan's in my
day to day networking.
But the config files don't configure them as vlans.
*************************************************
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq qlen 1000
link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
3: sit0@...E: <NOARP> mtu 1480 qdisc noop qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
4: lan1@...0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
qlen 1000
link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
5: lan2@...0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
qlen 1000
link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
6: lan3@...0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
qlen 1000
link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
7: wifi@...0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
qlen 1000
link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
*************************************************
And these are the systemd config files
No vlan mentioned in there..
*************************************************
/etc/systemd/network/eth0.network
[Match]
Name=eth0
[Network]
/etc/systemd/network/lan.network
[Match]
Name=lan*
[Network]
DHCP=yes
BindCarrier=eth0
LinkLocalAddressing=yes
[DHCP]
UseDomains=yes
ClientIdentifier=mac
*************************************************
Cheers
Richard
Powered by blists - more mailing lists