Interfacing KSZ9131Rnxi to iMX 8M Nano

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

Interfacing KSZ9131Rnxi to iMX 8M Nano

644 Views
Elias_M
Contributor I

Hi, 

I want to operate the KSZ9131RNxi with the iMx8M Nano SOM in our carrier Board. the driver of the phy and the fec mac are loading proprely but I do get the communication just at 10Mbits and only when I type the following after OS Boot up :

ethtool -s eth0 speed 10 duplex full

The PHY is wired to operate in RGMII mode and with a speed of 1000Mbit/S.

How to solve this issue to operate the phy without using to type this command after boot up  ? and why 100Mbits and 1000Mbits is not working?

I would be very thankful for your contributions.

0 Kudos
Reply
3 Replies

600 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Elias_M,
Thank you for contacting NXP Support!

 

How are you setting this up in the device tree?


I believe this issue can be resolved with a correct device tree configuration.
Could you please share your device tree file so I can review it?


If sharing it is not possible, you can refer to the examples provided in the following link

 

Best regards,
Chavira

0 Kudos
Reply

560 Views
Elias_M
Contributor I

Hi @Chavira ,

Thank you for your support.

Hier is how the fec device tree in Linux described: 

&fec1 {
fsl,magic-packet;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1_gpio>,
                   <&pinctrl_fec1>;
phy-mode = "rgmii-id";
phy-handle = <&ethphy0>;
phy-supply = <&reg_3v3_eth0>;
status = "okay";
 
 
mdio {
#address-cells = <1>;
#size-cells = <0>;
 
ethphy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
interrupt-parent = <&gpio5>;         
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;  
micrel,led-mode=<1>;
};
};
};

 

reg_3v3_eth0: regulator-ethphy {
compatible = "regulator-fixed";
off-on-delay=<500000>;
regulator-always-on;
regulator-boot-on;
 
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "3v3_eth0";
startup-delay-us = <200000>;
 
};

 

pinctrl_fec1_gpio: fec1gpiogrp {
fsl,pins = <
 
/* PHY interrupt */
MX8MN_IOMUXC_SAI3_MCLK_GPIO5_IO2           0x19
>;
};
 
pinctrl_fec1: fec1grp {
fsl,pins = <
MX8MN_IOMUXC_ENET_MDC_ENET1_MDC                              0x3
MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO                            0x3
MX8MN_IOMUXC_ENET_TD3_ENET1_RGMII_TD3                     0x1f
MX8MN_IOMUXC_ENET_TD2_ENET1_RGMII_TD2                     0x1f
MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1                       0x1f
MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0                    0x1f
MX8MN_IOMUXC_ENET_RD3_ENET1_RGMII_RD3                   0x91
MX8MN_IOMUXC_ENET_RD2_ENET1_RGMII_RD2                   0x91
MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1                     0x91
MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0                  0x91
MX8MN_IOMUXC_ENET_TXC_ENET1_RGMII_TXC                  0x1f
MX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC                 0x91
MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL     0x91
MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL     0x1f
>;
};
0 Kudos
Reply

486 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Elias_M

For a better understanding I need to check the entire device tree file.

Best regards,
Chavira

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2289343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EInterfacing%20KSZ9131Rnxi%20to%20iMX%208M%20Nano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20operate%20the%20KSZ9131RNxi%20with%20the%20iMx8M%20Nano%20SOM%20in%20our%20carrier%20Board.%20the%20driver%20of%20the%20phy%20and%20the%20fec%20mac%20are%20loading%20proprely%20but%20I%20do%20get%20the%20communication%20just%20at%2010Mbits%20and%20only%20when%20I%20type%20the%20following%20after%20OS%20Boot%20up%20%3A%3C%2FP%3E%3CP%3E%24%26nbsp%3B%3CSTRONG%3Eethtool%20-s%20eth0%20speed%2010%20duplex%20full%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThe%20PHY%20is%20wired%20to%20operate%20in%20RGMII%20mode%20and%20with%20a%20speed%20of%201000Mbit%2FS.%3C%2FP%3E%3CP%3EHow%20to%20solve%20this%20issue%20to%20operate%20the%20phy%20without%20using%20to%20type%20this%20command%20after%20boot%20up%26nbsp%3B%20%3F%20and%20why%20100Mbits%20and%201000Mbits%20is%20not%20working%3F%3C%2FP%3E%3CP%3EI%20would%20be%20very%20thankful%20for%20your%20contributions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289644%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Interfacing%20KSZ9131Rnxi%20to%20iMX%208M%20Nano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289644%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241655%22%20target%3D%22_blank%22%3E%40Elias_M%3C%2FA%3E%2C%3CBR%20%2F%3EThank%20you%20for%20contacting%20NXP%20Support!%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHow%20are%20you%20setting%20this%20up%20in%20the%20device%20tree%3F%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EI%20believe%20this%20issue%20can%20be%20resolved%20with%20a%20correct%20device%20tree%20configuration.%3CBR%20%2F%3ECould%20you%20please%20share%20your%20device%20tree%20file%20so%20I%20can%20review%20it%3F%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EIf%20sharing%20it%20is%20not%20possible%2C%20you%20can%20refer%20to%20the%20examples%20provided%20in%20the%20following%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3Drepo%253Anxp-imx%252Flinux-imx%2520KSZ9131RN%26amp%3Btype%3Dcode%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Elink%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EChavira%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2290129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Interfacing%20KSZ9131Rnxi%20to%20iMX%208M%20Nano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F206761%22%20target%3D%22_blank%22%3E%40Chavira%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20support.%3C%2FP%3E%3CP%3EHier%20is%20how%20the%20fec%20device%20tree%20in%20Linux%20described%3A%26nbsp%3B%3C%2FP%3E%3CDIV%3E%26amp%3Bfec1%20%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Efsl%2Cmagic-packet%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Epinctrl-names%20%3D%20%22default%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Epinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_fec1_gpio%26gt%3B%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26lt%3B%26amp%3Bpinctrl_fec1%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ephy-mode%20%3D%20%22rgmii-id%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ephy-handle%20%3D%20%26lt%3B%26amp%3Bethphy0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ephy-supply%20%3D%20%26lt%3B%26amp%3Breg_3v3_eth0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Estatus%20%3D%20%22okay%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Emdio%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%23address-cells%20%3D%20%26lt%3B1%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%23size-cells%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eethphy0%3A%20ethernet-phy%400%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ecompatible%20%3D%20%22ethernet-phy-ieee802.3-c22%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ereg%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Einterrupt-parent%20%3D%20%26lt%3B%26amp%3Bgpio5%26gt%3B%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Einterrupts%20%3D%20%26lt%3B2%20IRQ_TYPE_LEVEL_LOW%26gt%3B%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Emicrel%2Cled-mode%3D%26lt%3B1%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3B%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3Ereg_3v3_eth0%3A%20regulator-ethphy%20%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ecompatible%20%3D%20%22regulator-fixed%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eoff-on-delay%3D%26lt%3B500000%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eregulator-always-on%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eregulator-boot-on%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eregulator-min-microvolt%20%3D%20%26lt%3B3300000%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eregulator-max-microvolt%20%3D%20%26lt%3B3300000%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eregulator-name%20%3D%20%223v3_eth0%22%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Est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%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%200x3%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TD3_ENET1_RGMII_TD3%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TD2_ENET1_RGMII_TD2%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%200x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RD3_ENET1_RGMII_RD3%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RD2_ENET1_RGMII_RD2%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%200x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TXC_ENET1_RGMII_TXC%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%200x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x91%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B0x1f%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26gt%3B%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291133%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Interfacing%20KSZ9131Rnxi%20to%20iMX%208M%20Nano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291133%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241655%22%20target%3D%22_blank%22%3E%40Elias_M%3C%2FA%3E%2C%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20a%20better%20understanding%20I%20need%20to%20check%20the%20entire%20device%20tree%20file.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2C%3CBR%20%2F%3EChavira%3C%2FP%3E%3C%2FLINGO-BODY%3E