Directly connected MAC question

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

Directly connected MAC question

2,174 Views
rwilkins
Contributor I

Hello,

I'm working on a product where we'll have a FPGA connected directly to one of the unused MAC interfaces.  Since the product hardware isn't built yet, I'm trying to figure out as much as I can ahead of time.  I have a LS1046A-FRWY board to experiment with and I'm trying to configure u-boot and Linux to enable MAC 9 which is associated with the unused SGMII.9 interface associated with SerDes 1.  I supposed I could also work with the RGMII MAC as well.  What I've got so far is u-boot sees the additional MAC that I configured but it throws an error because it can't find the PHY, which is expected since the PHY doesn't exist.  I configured additional MAC addresses in the u-boot environment.  Linux boots but doesn't initialize any additional interface when I configure it in the Linux ls1046afrwy DTS, but rather it will throw an error -22 for the new interface.  I suspect this is because u-boot configures the MAC interfaces and Linux picks up on that during initialization.

My questions are:

1. how do I configure u-boot to enable the MAC in a PHY-less configuration, such as if I were connecting this interface directly to a switch chip or another MAC interface?

2. Should Linux initialize the MAC even if u-boot fails init of the new MAC or if it isn't configured properly?

Thanks in advance for any help.

Ryan Wilkins

0 Kudos
Reply
5 Replies

2,143 Views
rwilkins
Contributor I

Thanks for the reply.  I'm finally getting back to this.  I tried the solution you mentioned but I'm still unable to get the fixed-link interface to enumerate.  Here are the changes that I made and the dmesg output.

 

fsl-ls1046a-frwy-sdk.dts

&fsldpaa {
ethernet@1 {
// status = "disabled"; //rrw
};
ethernet@2 {
// status = "disabled"; //rw
};
ethernet@3 {
// status = "disabled"; //rrw
};
ethernet@6 {
// status = "disabled"; //rrw
};
ethernet@9 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet7>;
dma-coherent;
};
};
 
 
fsl-ls1046a-frwy.dts
&fman0 {
ethernet@e0000 {
phy-handle = <&qsgmii_phy4>;
phy-connection-type = "qsgmii";
};

ethernet@e8000 {
phy-handle = <&qsgmii_phy2>;
phy-connection-type = "qsgmii";
};

ethernet@ea000 {
phy-handle = <&qsgmii_phy1>;
phy-connection-type = "qsgmii";
};

ethernet@f2000 {
phy-handle = <&qsgmii_phy3>;
phy-connection-type = "qsgmii";
};

// rrw
ethernet@f0000 {
phy-connection-type = "sgmii";
fixed-link = <0 0 1000 0 0>;
};

ethernet@e4000 {
phy-connection-type = "rgmii";
fixed-link = <0 0 1000 0 0>;
};

ethernet@e6000 {
phy-connection-type = "rgmii";
fixed-link = <0 0 1000 0 0>;
};
 
 
dmesg output

ryan@localhost:~$ dmesg |grep fsl

[    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id fsl,qm

an-fqd

[    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id fsl,q

man-pfdr

[    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id fsl,b

man-fbpr

[    1.935833] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree

[    1.942185] fsl-ifc 1530000.ifc: Freescale Integrated Flash Controller

[    1.948765] fsl-ifc 1530000.ifc: IFC version 1.4, 8 banks

[    2.708874] fsl,ifc-nand 7e800000.nand: IFC NAND device at 0x7e800000, bank 0

[    2.820518] fsl_mac: fsl_mac: FSL FMan MAC API based driver

[    2.826475] fsl_mac 1ae0000.ethernet: FMan MEMAC

[    2.831098] fsl_mac 1ae0000.ethernet: FMan MAC address: 00:04:9f:06:46:38

[    2.838197] fsl_mac 1ae8000.ethernet: FMan MEMAC

[    2.842817] fsl_mac 1ae8000.ethernet: FMan MAC address: 00:04:9f:06:46:39

[    2.849905] fsl_mac 1aea000.ethernet: FMan MEMAC

[    2.854529] fsl_mac 1aea000.ethernet: FMan MAC address: 00:04:9f:06:46:3a

[    2.861623] fsl_mac 1af2000.ethernet: FMan MEMAC

[    2.866244] fsl_mac 1af2000.ethernet: FMan MAC address: 00:04:9f:06:46:3b

[    2.873061] fsl_dpa: FSL DPAA Ethernet driver

[    2.878918] fsl_dpa: fsl_dpa: Probed interface eth0

[    2.883865] fsl_dpa soc:fsl,dpaa:ethernet@1: of_find_device_by_node(ethernet@

e2000) failed

[    2.892142] fsl_dpa: probe of soc:fsl,dpaa:ethernet@1 failed with error -22

[    2.899150] fsl_dpa soc:fsl,dpaa:ethernet@2: of_find_device_by_node(ethernet@

e4000) failed

[    2.907423] fsl_dpa: probe of soc:fsl,dpaa:ethernet@2 failed with error -22

[    2.914430] fsl_dpa soc:fsl,dpaa:ethernet@3: of_find_device_by_node(ethernet@

e6000) failed

[    2.922704] fsl_dpa: probe of soc:fsl,dpaa:ethernet@3 failed with error -22

[    2.930977] fsl_dpa: fsl_dpa: Probed interface eth1

[    2.937279] fsl_dpa: fsl_dpa: Probed interface eth2

[    2.942219] fsl_dpa soc:fsl,dpaa:ethernet@8: of_find_device_by_node(ethernet@

f0000) failed

[    2.950493] fsl_dpa: probe of soc:fsl,dpaa:ethernet@8 failed with error -22

[    2.958995] fsl_dpa: fsl_dpa: Probed interface eth3

[    2.963899] fsl_advanced: FSL DPAA Advanced drivers:

[    2.968863] fsl_proxy: FSL DPAA Proxy initialization driver

[    2.974572] fsl_oh: FSL FMan Offline Parsing port driver

[    3.608232] fsl-usdpaa: no region found

[    6.905984] fsl_dpa soc:fsl,dpaa:ethernet@0 fm1-mac1: renamed from eth0

[    6.932856] fsl_dpa soc:fsl,dpaa:ethernet@4 fm1-mac5: renamed from eth1

[    6.980809] fsl_dpa soc:fsl,dpaa:ethernet@5 fm1-mac6: renamed from eth2

[    7.016700] fsl_dpa soc:fsl,dpaa:ethernet@9 fm1-mac10: renamed from eth3

 

u-boot environment have the additional MAC addresses configured.

ethaddr=00:04:9F:06:46:38

eth1addr=00:04:9F:06:46:39

eth2addr=00:04:9F:06:46:3A

eth3addr=00:04:9F:06:46:3B

eth4addr=00:04:9F:06:46:3C

eth5addr=00:04:9F:06:46:3D

eth6addr=00:04:9F:06:46:3E

eth7addr=00:04:9F:06:46:3F

 

No matter what I do the interfaces still don't enumerate in Linux.  See the error -22 sections in the dmesg output.  I would expect to see the MAC addresses show up in the fsl_mac module but only the four qsgmii connected interfaces show up.

This is using lsdk2012 and kernel version 5.4.47.

Do you have any other suggestions of what to try to get this working?

 

Thanks,

Ryan Wilkins

0 Kudos
Reply

2,128 Views
yipingwang
NXP TechSupport
NXP TechSupport

For RCW configuration, please refer to serdes1_cfg_tbl definition in arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c to choose a suitable serdes configuration. Please check whether FM1_DTSEC9 is available under u-boot first.

0 Kudos
Reply

2,118 Views
rwilkins
Contributor I

The RCW configuration for SERDES 1 is 0x3040.  FM1_DTSEC9 shows available by u-boot.  Here's the output from u-boot.  This is the unmodified u-boot that came with LSDK 2012.

 

NOTICE:  BL31: v1.5(release):LSDK-20.12:  BL2: Booting BL31

NOTICE:  BL31: Built : 19:49:58, Mar 31 2021

NOTICE:  Welcome to LS1046 BL31 Phase

 

 

U-Boot 2020.04-dirty (Mar 31 2021 - 17:52:02 +0000)

 

SoC:  LS1046AE Rev1.0 (0x87070010)

Clock Configuration:

       CPU0(A72):1600 MHz  CPU1(A72):1600 MHz  CPU2(A72):1600 MHz  

       CPU3(A72):1600 MHz  

       Bus:      600  MHz  DDR:      2100 MT/s  FMAN:     700  MHz

Reset Configuration Word (RCW):

       00000000: 0c150010 0e000000 00000000 00000000

       00000010: 30400506 00800012 60040000 c1000000

       00000020: 00000000 00000000 00000000 00038800

       00000030: 20044100 24003101 00000096 00000001

Model: LS1046A FRWY Board

Board: LS1046AFRWY, Rev: B, boot from SD

SD1_CLK1 = 100.00MHZ, SD1_CLK2 = 100.00MHZ

DRAM:  3.9 GiB (DDR4, 64-bit, CL=15, ECC on)

SEC0: RNG instantiated

Using SERDES1 Protocol: 12352 (0x3040)

Using SERDES2 Protocol: 1286 (0x506)

NAND:  512 MiB

MMC:   FSL_SDHC: 0

Loading Environment from MMC... OK

EEPROM: NXID v1

In:    serial

Out:   serial

Err:   serial

Net:   

MMC read: dev # 0, block # 18432, count 128 ...

Fman1: Uploading microcode version 106.4.18

Could not get PHY for FSL_MDIO0: addr 3

Failed to connect

PCIe1: pcie@3400000 disabled

PCIe2: pcie@3500000 Root Complex: x1 gen2

PCIe3: pcie@3600000 Root Complex: x1 gen1

FM1@DTSEC1, FM1@DTSEC5, FM1@DTSEC6, FM1@DTSEC9, FM1@DTSEC10

0 Kudos
Reply

2,103 Views
yipingwang
NXP TechSupport
NXP TechSupport

Actually the issue is that FRWY-LS1046A board does not have SGMII.9 , so we need to disable this interface in u-boot code based on board type.

I added the device node in fsl-ls1046a-frwy.dts and verified it on LS1046ARDB, this device node can be probed successfully.

ethernet@f0000 {
phy-connection-type = "sgmii";
fixed-link = <0 0 1000 0 0>;
};

0 Kudos
Reply

2,167 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. Please refer to serdes1_cfg_tbl definition in arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c to choose a suitable serdes configuration according to your target board. 

I assume that you do modification based on ls1046afrwy u-boot source code.

In function board_eth_init in board/freescale/ls1046afrwy/eth.c, please comment the following line.

//fm_disable_port(FM1_DTSEC9);

 

2. Please define the following in Linux dts file

      ethernet@f0000 {

                fixed-link = <0 0 1000 0 0>;

                phy-connection-type = "sgmii";

        };

Linux initializes the MAC even if u-boot fails init of the new MAC .

 

 

0 Kudos
Reply