Poblems with DPAA ports

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

Poblems with DPAA ports

942 Views
altu
Contributor III

Good day!

I'm trying to bring up eth ports on custom ls1046-based board. All eth ports are on serdes with protocol - 0x2223. 

So ports are:

MAC9  ethernet@f0000 (SGMII,2.5) -> RTL8221
MAC10 - ethernet@f2000 (SGMII,2.5) -> RTL8221
MAC5 - ethernet@e8000 (SGMII,2.5) -> RTL8221
MAC6 - ethernet@ea000 -> RTL8211

 

My fman-related piece of UBoot dts(base on DTS for LS1046ARDB):

........
#include "fsl-ls1046-post.dtsi"
&fman0 {
        EMAC6: ethernet@ea000 {
	        phy-handle = <&sgmii_phy4>;
		phy-connection-type = "sgmii";
		status = "okay";
	};
        rtl8211: mdio@fc000 {
		sgmii_phy4: ethernet-phy@4 {
		        reg = <0x4>;
		};
	};
};

With this everything woks just fine - ethernet@ea000 in Uboot works just perfectly.

After that I move to Linux. I use USDPAA SDK drivers.

My Linux dts is also based on LS1046ardb SDK DTS: 

........
#include "fsl-ls1046-post.dtsi"
&fman0 {
        //// MAC 5
        ethernet@e8000 {   /// 2.5G SerDes SGMII external
	        phy-handle = <&sgmii_phy3>;
		phy-connection-type = "sgmii";
	};
        /// MAC6
        ethernet@ea000 {    /// 1G SerDes SGMII external
	        phy-handle = <&sgmii_phy4>; 
		phy-connection-type = "sgmii";
	};
        //// MAC9
	ethernet@f0000 { /// 2.5G SerDes SGMII external
	        phy-handle = <&sgmii_phy1>;
		phy-connection-type = "sgmii";
	};
        /// MAC10
        ethernet@f2000 {  /// 2.5G SerDes SGMII external
	        phy-handle = <&sgmii_phy2>;
		phy-connection-type = "sgmii";
	};
        mdio@fc000 {
	        compatible = "fsl,fman-memac-mdio";
                /// RTL8221
		sgmii_phy1: ethernet-phy@1 {
		        reg = <0x1>;
			compatible = "ethernet-phy-ieee802.3-c45";
		};
                /// RTL8221
		sgmii_phy2: ethernet-phy@2 {
		        reg = <0x2>;			
			compatible = "ethernet-phy-ieee802.3-c45";
		};
                /// RTL8221
		sgmii_phy3: ethernet-phy@3 {
		        reg = <0x3>;			
			compatible = "ethernet-phy-ieee802.3-c45";
		};
                /// RTL8211
		sgmii_phy4: ethernet-phy@4 {
		        reg = <0x4>;
		};
	};
};
....
#include "qoriq-dpaa-eth.dtsi"
#include "qoriq-fman3-0-6oh.dtsi"
....
&fsldpaa {
        ethernet@0 {
                status = "disabled";
        };
        ethernet@1 {
                status = "disabled";
        };

        ethernet@2 {
                status = "okay";

        };
        ethernet@3 {
                status = "okay";
        };

        ethernet@4 {
                status = "okay";
        };
        ethernet@5 {
                status = "okay";
        };
        ethernet@6 {
                status = "okay";
        };
        ethernet@8 {
                status = "okay";
        };

        ethernet@10 {
                status = "okay";
                compatible = "fsl,dpa-ethernet";
                fsl,fman-mac = <&enet7>;
                dma-coherent;
        };
};

&fman0 {
        compatible = "fsl,fman", "simple-bus";
};
.....

During Linux boot i get this:

memac.png Only MAC10 is enabling, all other ports - failed. Quite interesting that MAC6 is failed, despite to it worked OK in UBoot. 

My RCW:

SYS_PLL_RAT=7
MEM_PLL_RAT=21
CGA_PLL1_RAT=18
CGA_PLL2_RAT=16
/// SerDes PLL & Protocol configuration
SRDS_PRTCL_S1=8739  ///  0x2223
SRDS_PRTCL_S2=34952  /// 0x8888
SRDS_PLL_REF_CLK_SEL_S1=2
SRDS_PLL_REF_CLK_SEL_S2=0
SRDS_PLL_PD_S1=0
SRDS_PLL_PD_S2=0
SRDS_DIV_PEX_S1=0
SRDS_DIV_PEX_S2=0

/// Misc PLL-Related Configuration
DDR_REFCLK_SEL=1
SRDS_REFCLK_SEL_S1=1
SRDS_REFCLK_SEL_S2=1
DDR_FDBK_MULT=2
/// Boot configuartion
PBI_src=4
/// Clocking configuration
HWA_CGA_M1_CLK_SEL=6
DRAM_LAT=1
/// Pin Multiplexing Configuration
UART_BASE=5
IRQ_OUT=1
IRQ_BASE=510
IFC_GRP_A_EXT=1
IFC_GRP_E1_EXT=2
IFC_GRP_E1_EXT=0
IFC_GRP_F_EXT=1
/// SoC-specific Configuration
EM1=0
EMI1_DMODE=0
EMI1_CMODE=0

EM2=1
EMI2_DMODE=1
EMI2_CMODE=1

DVDD_VSEL=2
/// PLL & Clocking Configuration Expansion
SYSCLK_FREQ=600
HWA_CGA_M2_CLK_SEL=1

So please tell me what can be the problem with ports? Why only MAC10 is enabling? 

Tags (4)
0 Kudos
Reply
1 Reply

897 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The issue where only
MAC10 is enabling in Linux, despite MAC6 working in U-Boot, typically points to a discrepancy in the DPAA (Data Path Acceleration Architecture) configuration within the Linux Device Tree (DTS). Here are the most likely causes and how to fix them:
 
1. Incorrect SGMII Speed Mapping (2.5G vs 1G)
The LS1046A SGMII lanes for MAC9, 10, and 5 are running at 2.5G. In Linux, the standard sgmii type often defaults to 1G.
  • Fix: Change the phy-connection-type for MAC9, 10, and 5 to "2500base-x" or "sgmii-2500".
  • For MAC6 (RTL8211), keep it as "sgmii" (1G).
 
2. MDIO Clause 45 vs Clause 22
Your DTS shows the RTL8221s (MACs 9, 10, 5) using compatible = "ethernet-phy-ieee802.3-c45".
  • Conflict: If your MDIO controller node (mdio@fc000) is not explicitly configured to support Clause 45 via the driver, it may fail to probe those PHYs.
  • Check: Does dmesg show "PHY not found" for these addresses? If so, verify the MDIO compatible string is exactly fsl,fman-memac-mdio.
 
3. Misalignment in fsldpaa Nodes In your DTS, you have:
 
dts
ethernet@10 {
    fsl,fman-mac = <&enet7>; // This maps to MAC10
};
 
However, the other ports (ethernet@2 through ethernet@8) might be mapping to the wrong enet labels. In the LS1046A SDK:
  • MAC5 is usually &enet4
  • MAC6 is usually &enet5
  • MAC9 is usually &enet6
  • MAC10 is usually &enet7 (which matches your working port)
Action: Ensure that for every ethernet@X node under &fsldpaa, the fsl,fman-mac property points to the correct &enetX label defined in fsl-ls1046-post.dtsi.
 
4. Duplicate fman0 Definition At the end of your snippet, you have:
 
dts
&fman0 { compatible = "fsl,fman", "simple-bus"; };
Remove this. By adding simple-bus and changing the compatible string, you might be preventing the DPAA FMan driver from binding correctly to the sub-nodes (the MACs). The driver expects the specific FMan compatible string provided by the NXP SDK dtsi files.
 
regards
0 Kudos
Reply