Problems getting ethernet PHY to work

I'm trying to get the 2 GigEth ports to work on an unsupported router. Mainly for learning, and I'm stuck.
There are 2 main issues:

  1. when I run ifconfig eth0 hw ether 00:BB:CC:DD:EE:FF
    I get back ifconfig: SIOCSIFHWADDR: Not supported, so I'm stuck with a really bad MAC address of FF:E6:D9:38:FF:C8, which might be because of issue 2

  2. One of the ethernet ports (Port 1) is connected via a B50612E single PHY which is not technically supported, but it does used the same ID as a BCM54612E which is supported. And I don't know if this is a problem?
    I managed to get openwrt to recognise port changes.

[ 981] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 1, 100Mbps, full-duplex
[ 983] bcm63xx_enetsw bcm63xx_enetsw.0: link DOWN on Port 1
[ 985] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 2, 100Mbps, full-duplex
[ 986] bcm63xx_enetsw bcm63xx_enetsw.0: link DOWN on Port 2

with this part in the board_bcm963xx.c file (found the phy address with the mii-tool by luck)

	.enetsw = {
		.used_ports = {
			[3] = {         // I have found this must be on [3] to work
				.used = 1,
				.phy_id = 4,
				.name = "Port 2",
			},
			[4] = {         // I can't set this to 24
				.used = 1,
				.phy_id = 25,
				.name = "Port 1",
				.mii_override = 1,     // Tried with/without this
				.timing_sel = 1,       // Tried with/without this
			},
			// Skip cpu port 8
		},
	},

I can get some traffic out of the port (one without a phy), but no traffic on the port with the phy. I have installed libphy / broadcom.ko, but it does not appear to even run it. If I enable VLANs with swconfig, then nothing works.

Can anyone give me some clues/ideas?

1 Like

Just replying to my-self... I managed to fix issue 2 by trial and error.
I had to use port 6.

			[6] = {
				.used = 1,
				.phy_id = 25,
				.name = "Port 1",
				.mii_override = 1,
				.timing_sel = 1,
			},

and removed the other 3 Fast Ethernet internal PHY's. With them enabled it does not work. Luckily there is no actual FE ports on the router.

I'm still a confused with issue 1. macchanger does not work either.

I was checking this page to make openwrt 22.03.5 with 5.10.176 running on antminter-t9+ a board based on xc7z010 I think it was using B50612E/B50612D and I made it works by only modifying .dts

and this made me think 5.10.176 kernel "maybe" works with B50612E/B50612D