LS1046a MAC to MAC 1000base-kx connection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1046a MAC to MAC 1000base-kx connection

Jump to solution
2,180 Views
m-rains
Contributor II
Hello all,

I have an issue that likely has a simple solution. I have two LS1046's on a custom board that I am attempting to connect together MAC to MAC. My RCW serdes settings are 0x3040 0x5A06, and this 1000base-kx link is on MAC 2 (serdes 2, lane B).

In u-boot, the devices can ping each other over SGMII, and I am in the early stages of writing a 1000base-kx driver. The important thing is they can see eachother.

This is using yocto 3.1.1, kernel 5.4.3, and I took fsl_backplane.c from linux-extras.

In linux, the device fails to probe with error -12. Ignore the other errors on other interfaces, I just don't have them disabled in the device tree currently. I did add a few printk's in the dpaa_eth driver

[    8.419458] fsl_dpa: dpaa_eth.c:1143:dpa_load() FSL DPAA Ethernet driver
[    8.426269] Probing soc:fsl,dpaa:ethernet@0
[    8.428002] fsl_dpa: dpaa_eth.c:1086:dpaa_eth_priv_probe() fsl_dpa: Probed interface eth0
[    8.440411] Probing soc:fsl,dpaa:ethernet@2
[    8.440449] fsl_dpa soc:fsl,dpaa:ethernet@2: of_find_device_by_node(ethernet@e4000) failed
[    8.452909] fsl_dpa: probe of soc:fsl,dpaa:ethernet@2 failed with error -22
[    8.459895] Probing soc:fsl,dpaa:ethernet@4
[    8.461583] fsl_dpa: dpaa_eth.c:1086:dpaa_eth_priv_probe() fsl_dpa: Probed interface eth1
[    8.473990] Probing soc:fsl,dpaa:ethernet@5
[    8.475997] fsl_dpa: dpaa_eth.c:1086:dpaa_eth_priv_probe() fsl_dpa: Probed interface eth2
[    8.488411] Probing soc:fsl,dpaa:ethernet@8
[    8.488446] fsl_dpa soc:fsl,dpaa:ethernet@8: of_find_device_by_node(ethernet@f0000) failed
[    8.500904] fsl_dpa: probe of soc:fsl,dpaa:ethernet@8 failed with error -22
[    8.507890] Probing soc:fsl,dpaa:ethernet@9
[    8.510213] fsl_dpa: dpaa_eth.c:1086:dpaa_eth_priv_probe() fsl_dpa: Probed interface eth3
[    8.522608] fsl_advanced: dpaa_eth_base.c:193:dpa_advanced_load() FSL DPAA Advanced drivers:
[    8.531054] fsl_proxy: dpaa_eth_proxy.c:354:dpa_proxy_load() FSL DPAA Proxy initialization driver
[    8.540043] fsl_proxy-proxy soc:fsl,dpaa:ethernet@1: devm_kzalloc() failed
[    8.546926] fsl_proxy-proxy: probe of soc:fsl,dpaa:ethernet@1 failed with error -12
[    8.554604] fsl_oh: offline_port.c:823:oh_port_load() FSL FMan Offline Parsing port driver

I have primarily used this page and these questions for reference:

My device tree uses the following:

fsl-ls1046a_gpp.dts
&soc{
  serdes2: serdes@1eb0000 {
    reg = <0x0 0x1eb0000 0 0x00002000>;
    compatible = "fsl,serdes-10g";
    little-endian;
  };
  ...
};
&fman0 {
  mdio@e3000 {
    pcsphy1: ethernet-phy@0 {
      backplane-mode = "1000base-kx";
      compatible = "ethernet-phy-ieee802.3-c45";
      reg = <0x0>;
      fsl,lane-handle = <&serdes2>;
      fsl,lane-reg = <0x840 0x40>; /* lane B */
    };
  };
  ...
};

fsl-ls1046a_gpp-sdk.dts
&fsldpaa {
  ethernet@1 {
    compatible = "fsl,dpa-ethernet-init";
    fsl,fman-mac = <&enet1>;
    dma-coherent;
  };
  ...
};

1. Is a MAC to MAC link possible with this driver?

2. If so, what am I doing wrong?
 
3. I tried doing a SGMII link before this, though it is unconventional for this use case. I received error -22 when probing and couldn't figure it out. Should I go back to attempting this method?

Thank you. Verbosity is appreciated, as I am very new to this.
Labels (1)
0 Kudos
Reply
1 Solution
2,026 Views
m-rains
Contributor II
Just an update for any future readers - I was not able to figure out 1000base-kx, but I was able to figure out a fixed sgmii link, while unconventional, is good enough for my application.

There was an alias conflict in my device tree, making MAC 2 not probeI don't know what driver caused this, unfortunately. Additionally, serdes 2 PLL 2 needed to be reset.

I changed ethernet1 to ethernetx1:

fsl-ls1046a_gpp.dts
&fman0 {
  ethernet@e2000 {
    fixed-link = <0 1 1000 0 0>;
    phy-connection-type = "sgmii";
  };
};

fsl-ls1046a_gpp-sdk.dts
&fsldpaa {
  ethernet@1 {
    compatible = "fsl,dpa-ethernet-init";
    fsl,fman-mac = <&enet1>;
    dma-coherent;
  };
};

fsl-ls1046a.dtsi
/ {
  aliases {
    ethernetx1 = &enet1;
  };
};

Serdes 2 PLL 2 reset, thanks to andreloddenkemp, source.
I inserted this into one of the last enet initialization driver probes via ioremap. Everything worked perfectly after that.

Regards,
m-rains

View solution in original post

0 Kudos
Reply
4 Replies
628 Views
gkrishna
Contributor III

Hi Mrains,

 

I am using similar thing in my custom board mac to mac, and that goes to sfp cage straight away.

 

Could you please let me know what changes you did to make in u-boot especially.

Could you please point out the rcw, u-boot changes if any and the linux changes to test. 

I am in the bring up stage, this info would be really helpful.

Thanks,

Gopi Krishna M

0 Kudos
Reply
2,027 Views
m-rains
Contributor II
Just an update for any future readers - I was not able to figure out 1000base-kx, but I was able to figure out a fixed sgmii link, while unconventional, is good enough for my application.

There was an alias conflict in my device tree, making MAC 2 not probeI don't know what driver caused this, unfortunately. Additionally, serdes 2 PLL 2 needed to be reset.

I changed ethernet1 to ethernetx1:

fsl-ls1046a_gpp.dts
&fman0 {
  ethernet@e2000 {
    fixed-link = <0 1 1000 0 0>;
    phy-connection-type = "sgmii";
  };
};

fsl-ls1046a_gpp-sdk.dts
&fsldpaa {
  ethernet@1 {
    compatible = "fsl,dpa-ethernet-init";
    fsl,fman-mac = <&enet1>;
    dma-coherent;
  };
};

fsl-ls1046a.dtsi
/ {
  aliases {
    ethernetx1 = &enet1;
  };
};

Serdes 2 PLL 2 reset, thanks to andreloddenkemp, source.
I inserted this into one of the last enet initialization driver probes via ioremap. Everything worked perfectly after that.

Regards,
m-rains
0 Kudos
Reply
2,130 Views
SebastianG
NXP TechSupport
NXP TechSupport

Hello @m-rains,

I would like to inform you that I'm working on your questions, I will let you know as soon as I have an update.

Thank you so much for your patience

Regards,

Sebastian

0 Kudos
Reply
2,110 Views
m-rains
Contributor II

Sebastian,
Thank you, I appreciate any help I can get.

Regards,
m-rains

0 Kudos
Reply
An error has occurred when reading existing sub-variable "Language_PG_Configuration"; see cause exception! The type of the containing value was: extended_hash+string (lithium.coreapi.webui.template.models.NamedValueByNameTemplateModel wrapped into f.e.b.StringModel) ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign redirect_lingo_page_url = web... [in template "language_macro_header.ftl" at line 173, column 1] - Reached through: #include "language_macro_header.ftl" [in template "Language_translator_Dashboard" at line 3, column 1] ----