Hello
We have a custom designed board based on the LS1043A, which has a Marvell 88e6141 switch connected to SerDes lane B and EMI1.
The SerDes configuration is 0x2255.
Due to we're very similar to below case:
https://community.nxp.com/t5/Layerscape/LS1043A-Marvell-88e6341-on-SerDes-lane-B-and-EMI1-EC1/m-p/11...
I modify a dts file based on above case.
On booting log, OS can recognize switch.
But still can't ping via switch.
Also upload my /etc/config/network setting, in case the setting is wrong.
Would you please tell me which part is wrong? dts or network setting?
Best regards,
Max Liou
已解决! 转到解答。
Dear Yiping,
I have try three different compatible as below:
"marvell,mv88e6141", "marvell,mv88e6341" and "marvell,mv88e6085" (all in Boot_Log.zip).
Only "marvell,mv88e6085" can find "switch 0x3400 detected: Marvell 88E6341" and "entered forwarding state" in boot log.
And refer to \linux-4.14.202\Documentation\devicetree\bindings\net\dsa\marvell.txt, it also describes should be one of "marvell,mv88e6085" or
"marvell,mv88e6190".
But even the switch enter forwarding state, I still can't ping to my laptop.
There's only TX's data increases, RX's bytes remains 0 (0.0 B)
Am I wrong in my /etc/config/network setting?
(Block diagram of PHY/switch also upload)
Dear Yiping,
Thanks for your promptly response.
I forgot to write our openwrt info:
OpenWRT version : 19.07
Kernel version : 4.14.202
Due to we're not using "extirq 11", I change to use our interrupt interrupts = <0 132 IRQ_TYPE_LEVEL_HIGH>
Unfortunately, I still can't get any RX data on eth1.
Upload boot log as attachment.
BR,
Max
Dear Yiping,
I have try three different compatible as below:
"marvell,mv88e6141", "marvell,mv88e6341" and "marvell,mv88e6085" (all in Boot_Log.zip).
Only "marvell,mv88e6085" can find "switch 0x3400 detected: Marvell 88E6341" and "entered forwarding state" in boot log.
And refer to \linux-4.14.202\Documentation\devicetree\bindings\net\dsa\marvell.txt, it also describes should be one of "marvell,mv88e6085" or
"marvell,mv88e6190".
But even the switch enter forwarding state, I still can't ping to my laptop.
There's only TX's data increases, RX's bytes remains 0 (0.0 B)
Am I wrong in my /etc/config/network setting?
(Block diagram of PHY/switch also upload)
Please try the following dts configuration.
mdio: mdio@fc000 {
switch0: switch0@0 {
compatible = "marvell,mv88e6341"; /*JL<M>*/
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
interrupts-extended = <&extirq 11 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
SerDes Lane A is xfi
The probing of the Marvell chip fails late with error -517. The problem seems to be that somehow the reference from the CPU port to the ethernet interface is not working. Function dsa_port_parse_of in dsa2.c fails because of_find_net_device_by_node(ethernet); returns NULL.
LSDK:2108
ethernet@f0000 {
fixed-link = <6 1 10000 0 0>;
phy-connection-type = "10gbase-kr";
};
mdio1:mdio@fd000 {
switch0: switch0@6 {
compatible = "marvell,mv88e6190";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x6>;
interrupts-extended = <&extirq 10 IRQ_TYPE_LEVEL_LOW>;
dsa,member = <0 0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "cpu";
fixed-link = <6 1 10000 0 0>;
ethernet = <&enet6>;
local-mac-address = [42 00 00 00 00 80];
fixed-link {
speed = <10000>;
full-duplex;
};
};
static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
{
struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0);
const char *name = of_get_property(dn, "label", NULL);
bool link = of_property_read_bool(dn, "link");
dp->dn = dn;
if (ethernet) {
struct net_device *master;
master = of_find_net_device_by_node(ethernet);
if (!master)
return -EPROBE_DEFER;
return dsa_port_parse_cpu(dp, master);
}
if (link)
return dsa_port_parse_dsa(dp);
return dsa_port_parse_user(dp, name);
}
Hi Yangili,
The same happens to me...
Debugging the startup process I figure out that the ethernet device you have to link to the switch is the on in: arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi
fsldpaa: fsl,dpaa {
compatible = "fsl,ls1043a-dpaa", "simple-bus", "fsl,dpaa";
ethernet@0 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet0>;
dma-coherent;
};
ethernet@1 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet1>;
dma-coherent;
};
ethernet@2 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet2>;
dma-coherent;
};
ethernet@3 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet3>;
dma-coherent;
};
ethernet@4 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet4>;
dma-coherent;
};
ethernet@5 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet5>;
dma-coherent;
};
switch_cpu_port: ethernet@8 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet6>;
dma-coherent;
};
};
Add a label to the port you want to use "switch_cpu_port"
Add also a label to the port you defined on the switch as CPU one, for example "cpu_ethernet: port@0 {...".
And assign it on the arch/arm64/boot/dts/freescale/fsl-ls1043a-<YOUR BOARD>-sdk.dts
&cpu_ethernet {
ethernet = <ðernet_switch>;
};
This solution worked for me. Good luck!