LS1046 ethernet

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

LS1046 ethernet

Jump to solution
1,498 Views
SimonRo
Contributor III

My custom LS1046 board has an Ethernet interface with DP83867 phy connected to EC1_RGMII.  

This appears correctly in uboot as fm1-mac3 and I can successfully ping.

However, when linux boots (flexbuild image ubuntu:main) I have the device fm1-mac1 and it fails to come up/ping. 

Can anyone please suggest where I need to look to fix this mapping?

Thanks

 

0 Kudos
Reply
1 Solution
1,369 Views
SimonRo
Contributor III

I found the problem - my fsl-ls1046-board-sdk.dts did not have the correct ethernet interfaces disabled. Now that 0 and 1 are disabled and 2 is enabled, and configs/linux/linux_arm64_LS.its references the sdk.dts file, ethernet works.

View solution in original post

0 Kudos
Reply
5 Replies
1,370 Views
SimonRo
Contributor III

I found the problem - my fsl-ls1046-board-sdk.dts did not have the correct ethernet interfaces disabled. Now that 0 and 1 are disabled and 2 is enabled, and configs/linux/linux_arm64_LS.its references the sdk.dts file, ethernet works.

0 Kudos
Reply
1,397 Views
SimonRo
Contributor III

On a working LS1046ARDB EC1 RGMII comes up like this:

[    6.448783] fsl_dpa soc:fsl,dpaa:ethernet@2 fm1-mac3: renamed from eth0
[  110.759302] IPv6: ADDRCONF(NETDEV_CHANGE): fm1-mac3: link becomes ready

 

My non working board which should be using EC1 RGMII says this:

[    7.905061] fsl_dpa soc:fsl,dpaa:ethernet@0 fm1-mac1: renamed from eth0 
[   12.176080] IPv6: ADDRCONF(NETDEV_CHANGE): fm1-mac1: link becomes ready

 

even though it uses fm1-mac3 correctly in uboot.

What in the flexbuild build controls which device is used?

0 Kudos
Reply
1,397 Views
SimonRo
Contributor III

My Linux device tree looks like:

&fman0 {
	ethernet@e0000 {
		phy-handle = <&rgmii_phy1>;
		phy-connection-type = "rgmii-id";
	};

	mdio@fc000 {
		rgmii_phy1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <0x1>;
			ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
			ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
			ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
			ti,clk-output-sel = <DP83867_CLK_O_SEL_CHN_A_RCLK>;
			enet-phy-lane-no-swap;
		};
0 Kudos
Reply
1,397 Views
SimonRo
Contributor III

That's not my problem. In u-boot the ethernet interface appears as fm1-mac3. The device tree for this is:

 

&fman0 {
	ethernet@e4000 {
		phy-handle = <&rgmii_phy1>;
		phy-connection-type = "rgmii-id";
		status = "okay";
	};
	
	mdio@fc000 {
		rgmii_phy1: ethernet-phy@1 {
			reg = <0x1>;
			ti,clk-output-sel = <0x0>;
		};
	};
};

 

When subsequently booted to an ubuntu:main image built by flexbuilder LSDK21.10 the system detects and configures fm1-mac1 only. I can configure this device but it won't ping. Oscilloscope shows no data on the rgmii lines at this point.

If I use a device tree for Linux similar to the above I get:

[ 2.357640] Freescale FM module, FMD API version 21.1.0
[ 2.365586] Freescale FM Ports module
[ 2.369254] fsl_mac: fsl_mac: FSL FMan MAC API based driver
[ 2.375016] fsl_mac 1ae0000.ethernet: Cannot read PHY connection type of mac node ethernet@e0000 from device tree. Defaulting to MII
[ 2.386945] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000

It feels like linux should also be using the e4000 device. 

0 Kudos
Reply
1,489 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello.

 

You may enable the desired port in /etc/network/interfaces file. You may try first with static IP by adding the information below in such file.

 

For a DHCP client:

auto eth1 (the name of the interface)

iface eth1 inet dhcp

 

For a Static IP (of course this is an example, your numbers will be different):

auto eth1

iface eth1 inet static

address 192.168.0.100

network 192.168.0.0

netmask 255.255.255.0

broadcast 192.168.0.255

gateway 192.168.0.1

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2035224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMy%20custom%20LS1046%20board%20has%20an%20Ethernet%20interface%20with%20DP83867%20phy%20connected%20to%20EC1_RGMII.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20appears%20correctly%20in%20uboot%20as%20fm1-mac3%20and%20I%20can%20successfully%20ping.%3C%2FP%3E%3CP%3EHowever%2C%20when%20linux%20boots%20(flexbuild%20image%20ubuntu%3Amain)%20I%20have%20the%20device%20fm1-mac1%20and%20it%20fails%20to%20come%20up%2Fping.%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20please%20suggest%20where%20I%20need%20to%20look%20to%20fix%20this%20mapping%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2039183%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2039183%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20found%20the%20problem%20-%20my%20fsl-ls1046-board-sdk.dts%20did%20not%20have%20the%20correct%20ethernet%20interfaces%20disabled.%20Now%20that%200%20and%201%20are%20disabled%20and%202%20is%20enabled%2C%20and%20configs%2Flinux%2Flinux_arm64_LS.its%20references%20the%20sdk.dts%20file%2C%20ethernet%20works.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOn%20a%20working%20LS1046ARDB%20EC1%20RGMII%20comes%20up%20like%20this%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%20%26nbsp%3B%20%26nbsp%3B6.448783%5D%20fsl_dpa%20soc%3Afsl%2Cdpaa%3Aethernet%402%20fm1-mac3%3A%20renamed%20from%20eth0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%5B%20%26nbsp%3B110.759302%5D%20IPv6%3A%20ADDRCONF(NETDEV_CHANGE)%3A%20fm1-mac3%3A%20link%20becomes%20ready%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EMy%20non%20working%20board%20which%20should%20be%20using%20EC1%20RGMII%20says%20this%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%20%26nbsp%3B%20%26nbsp%3B7.905061%5D%20fsl_dpa%20soc%3Afsl%2Cdpaa%3Aethernet%400%20fm1-mac1%3A%20renamed%20from%20eth0%26nbsp%3B%3CBR%20%2F%3E%5B%20%26nbsp%3B%2012.176080%5D%20IPv6%3A%20ADDRCONF(NETDEV_CHANGE)%3A%20fm1-mac1%3A%20link%20becomes%20ready%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3Eeven%20though%20it%20uses%20fm1-mac3%20correctly%20in%20uboot.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhat%20in%20the%20flexbuild%20build%20controls%20which%20device%20is%20used%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038643%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038643%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMy%20Linux%20device%20tree%20looks%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bfman0%20%7B%0A%09ethernet%40e0000%20%7B%0A%09%09phy-handle%20%3D%20%26lt%3B%26amp%3Brgmii_phy1%26gt%3B%3B%0A%09%09phy-connection-type%20%3D%20%22rgmii-id%22%3B%0A%09%7D%3B%0A%0A%09mdio%40fc000%20%7B%0A%09%09rgmii_phy1%3A%20ethernet-phy%401%20%7B%0A%09%09%09compatible%20%3D%20%22ethernet-phy-ieee802.3-c22%22%3B%0A%09%09%09reg%20%3D%20%26lt%3B0x1%26gt%3B%3B%0A%09%09%09ti%2Crx-internal-delay%20%3D%20%3CDP83867_RGMIIDCTL_2_00_NS%3E%3B%0A%09%09%09ti%2Ctx-internal-delay%20%3D%20%3CDP83867_RGMIIDCTL_2_00_NS%3E%3B%0A%09%09%09ti%2Cfifo-depth%20%3D%20%3CDP83867_PHYCR_FIFO_DEPTH_4_B_NIB%3E%3B%0A%09%09%09ti%2Cclk-output-sel%20%3D%20%3CDP83867_CLK_O_SEL_CHN_A_RCLK%3E%3B%0A%09%09%09enet-phy-lane-no-swap%3B%0A%09%09%7D%3B%3C%2FDP83867_CLK_O_SEL_CHN_A_RCLK%3E%3C%2FDP83867_PHYCR_FIFO_DEPTH_4_B_NIB%3E%3C%2FDP83867_RGMIIDCTL_2_00_NS%3E%3C%2FDP83867_RGMIIDCTL_2_00_NS%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038640%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038640%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThat's%20not%20my%20problem.%20In%20u-boot%20the%20ethernet%20interface%20appears%20as%26nbsp%3B%3CSPAN%3Efm1-mac3.%20The%20device%20tree%20for%20this%20is%3A%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bfman0%20%7B%0A%09ethernet%40e4000%20%7B%0A%09%09phy-handle%20%3D%20%26lt%3B%26amp%3Brgmii_phy1%26gt%3B%3B%0A%09%09phy-connection-type%20%3D%20%22rgmii-id%22%3B%0A%09%09status%20%3D%20%22okay%22%3B%0A%09%7D%3B%0A%09%0A%09mdio%40fc000%20%7B%0A%09%09rgmii_phy1%3A%20ethernet-phy%401%20%7B%0A%09%09%09reg%20%3D%20%26lt%3B0x1%26gt%3B%3B%0A%09%09%09ti%2Cclk-output-sel%20%3D%20%26lt%3B0x0%26gt%3B%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EWhen%20subsequently%20booted%20to%20an%20ubuntu%3Amain%20image%20built%20by%20flexbuilder%20LSDK21.10%20the%20system%20detects%20and%20configures%20fm1-mac1%20only.%20I%20can%20configure%20this%20device%20but%20it%20won't%20ping.%20Oscilloscope%20shows%20no%20data%20on%20the%20rgmii%20lines%20at%20this%20point.%3C%2FP%3E%3CP%3EIf%20I%20use%20a%20device%20tree%20for%20Linux%20similar%20to%20the%20above%20I%20get%3A%3C%2FP%3E%3CP%3E%5B%202.357640%5D%20Freescale%20FM%20module%2C%20FMD%20API%20version%2021.1.0%3CBR%20%2F%3E%5B%202.365586%5D%20Freescale%20FM%20Ports%20module%3CBR%20%2F%3E%5B%202.369254%5D%20fsl_mac%3A%20fsl_mac%3A%20FSL%20FMan%20MAC%20API%20based%20driver%3CBR%20%2F%3E%5B%202.375016%5D%20fsl_mac%201ae0000.ethernet%3A%20Cannot%20read%20PHY%20connection%20type%20of%20mac%20node%20ethernet%40e0000%20from%20device%20tree.%20Defaulting%20to%20MII%3CBR%20%2F%3E%5B%202.386945%5D%20Unable%20to%20handle%20kernel%20NULL%20pointer%20dereference%20at%20virtual%20address%200000000000000000%3C%2FP%3E%3CP%3EIt%20feels%20like%20linux%20should%20also%20be%20using%20the%20e4000%20device.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2035248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20ethernet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EYou%20may%20enable%20the%20desired%20port%20in%20%2Fetc%2Fnetwork%2Finterfaces%20file.%20You%20may%20try%20first%20with%20static%20IP%20by%20adding%20the%20information%20below%20in%20such%20file.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFor%20a%20DHCP%20client%3A%3C%2FP%3E%0A%3CP%3Eauto%20eth1%20(the%20name%20of%20the%20interface)%3C%2FP%3E%0A%3CP%3Eiface%20eth1%20inet%20dhcp%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFor%20a%20Static%20IP%20(of%20course%20this%20is%20an%20example%2C%20your%20numbers%20will%20be%20different)%3A%3C%2FP%3E%0A%3CP%3Eauto%20eth1%3C%2FP%3E%0A%3CP%3Eiface%20eth1%20inet%20static%3C%2FP%3E%0A%3CP%3Eaddress%20192.168.0.100%3C%2FP%3E%0A%3CP%3Enetwork%20192.168.0.0%3C%2FP%3E%0A%3CP%3Enetmask%20255.255.255.0%3C%2FP%3E%0A%3CP%3Ebroadcast%20192.168.0.255%3C%2FP%3E%0A%3CP%3Egateway%20192.168.0.1%3C%2FP%3E%3C%2FLINGO-BODY%3E