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:
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?