LS1046 ethernet

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

LS1046 ethernet

Jump to solution
1,506 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,377 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,378 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,405 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,405 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,405 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,497 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