lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <MN2PR15MB329506AD2E0EF1530AFE22A0C588A@MN2PR15MB3295.namprd15.prod.outlook.com>
Date: Wed, 7 May 2025 18:57:37 +0000
From: Edward J Palmer <ed@...merwirelessmedtech.com>
To: Steve Broshar <steve@...merwirelessmedtech.com>, Andrew Lunn
	<andrew@...n.ch>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: request for help using mv88e6xxx switch driver

Well, what I'll say is that we have the typical RGMII signals between the FEC on the iMX8 Nano and port 5 on the Marvell 88E6320 switch (as well as the MDIO bus).  I am not sure if the switch can be called a "MAC" in this setup, but it's true that those RGMII signals between the FEC and switch components *don't* have the magnetics and connector for an Ethernet RJ45 connection for a typical PHY.

Ed

-----Original Message-----
From: Steve Broshar <steve@...merwirelessmedtech.com> 
Sent: Wednesday, May 7, 2025 1:29 PM
To: Andrew Lunn <andrew@...n.ch>; Edward J Palmer <ed@...merwirelessmedtech.com>
Cc: netdev@...r.kernel.org
Subject: RE: request for help using mv88e6xxx switch driver

+Ed (hardware expert)

Ed, Do we have a direct MAC to MAC connection between the FEC and the Switch?

Following is the DT configuration which has a fixed-length node in the host port node. TBO some of these settings have been verified, but many are mysterious.

&fec1 {
	// [what is this? Does this tell the driver how to use the pins of pinctrl_fec1?]
	pinctrl-names = "default";

	// ethernet pins
	pinctrl-0 = <&pinctrl_fec1>;
	
	// internal delay (id) required (in switch/phy not SOC MAC) [huh?]
	phy-mode = "rgmii-id";
	// tried for for Compton, but didn't help with ethernet setup
	//phy-mode = "rgmii";
	
	// link to "phy" <=> cpu attached port of switch [huh?]
	// [is this needed? port 5 is linked to fec1. is this link also needed?]
	phy-handle = <&swp5>;

	// try this here; probably not needed as is covered with reset-gpios for switch;
	// Seems like the wrong approach since get this msg at startup:
	// "Remove /soc@...us@...00000/ethernet@...e0000:phy-reset-gpios"
	//phy-reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
	
	// enable Wake-on-LAN (WoL); aka/via magic packets
	fsl,magic-packet;
	
	// node enable
	status = "okay";
	
	// MDIO (aka SMI) bus
	mdio1: mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		// Marvell switch -- on Compton's base board
		// node doc: Documentation/devicetree/bindings/net/dsa/marvell.txt
		switch0: switch@0 {
			// used to find ID register, 6320 uses same position as 6085 [huh?]
			compatible = "marvell,mv88e6085";

			#address-cells = <1>;
			#size-cells = <0>;

			// device address (0..31);
			// any value addresses the device on the base board since it's configured for single-chip mode;
			// and that is achieved by not connecting the ADDR[4:0] lines;
			// even though any value should work at the hardware level, the driver seems to want value 0 for single chip mode
			reg = <0>;

			// reset line: GPIO2_IO10
			reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;

			// don't specify member since no cluster [huh?]
			// from dsa.yaml: "A switch not part of [a] cluster (single device hanging off a CPU port) must not specify this property"
			// dsa,member = <0 0>;

			// note: only list the ports that are physically connected; to be used
			// note: # for "port@#" and "reg=<#>" must match the physical port #
			// node doc: Documentation/devicetree/bindings/net/dsa/dsa.yaml
			// node doc: Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				// primary external port (PHY)
				port@3 {
					reg = <3>;
					label = "lan3";
				};

				// secondary external port (PHY)
				port@4 {
					reg = <4>;
					label = "lan4";
				};

				// connection to the SoC
				// note: must be in RGMII mode (which requires pins [what pins?] to be high on switch reset)
				swp5: port@5 {
					reg = <5>;
					
					// driver uses label="cpu" to identify the internal/SoC connection;
					// note: this label isn't visible in userland;
					// note: ifconfig reports a connection "eth0" which is the overall network connection; not this port per se
					label = "cpu";
					
					// link back to parent ethernet driver [why?]
					ethernet = <&fec1>;
					
					// media interface mode;
					// internal delay (id) is specified [why?]
					// Note: early driver versions didn't set [support?] id
					phy-mode = "rgmii-id";
					// tried for for Compton, but didn't help with ethernet setup
					//phy-mode = "rgmii";

					// tried this; no "link is up" msg but otherwise the same result
					// managed = "in-band-status";
					
					// ensure a fixed link to the switch [huh?]
					fixed-link {
						speed = <1000>; // 1Gbps
						full-duplex;
					};
				};
			};
		};
	};
};

-----Original Message-----
From: Andrew Lunn <andrew@...n.ch> 
Sent: Wednesday, May 7, 2025 10:15 AM
To: Steve Broshar <steve@...merwirelessmedtech.com>
Cc: netdev@...r.kernel.org
Subject: Re: request for help using mv88e6xxx switch driver

On Wed, May 07, 2025 at 02:57:32PM +0000, Steve Broshar wrote:
> Hi,
> 
> We are struggling to get ethernet working on our newly designed, custom device with a imx8mn processor and a mv88e6230 switch ... using the mv88e6xxx driver. We have worked on it for weeks, but networking is not functional. I don't know where to find community support or maybe this is the community. I'm used to more modern things like websites; not email lists.
> 
> So that you understand the context at least a little: we have MDIO comms working, but the network interface won't come up. I get encouraging messages like:
> 
> 	[    6.794063] mv88e6085 30be0000.ethernet-1:00: Link is Up - 1Gbps/Full - flow control off
> 	[    6.841921] mv88e6085 30be0000.ethernet-1:00 lan3 (uninitialized): PHY [mv88e6xxx-0:03] driver [Generic PHY] (irq=POLL)
> 
> But near the end of boot I get messages:
> 
> 	[   11.889607] net eth0: phy NOT found
> 	[   11.889617] fec 30be0000.ethernet eth0: A Unable to connect to phy
> 	[   11.892275] mv88e6085 30be0000.ethernet-1:00 lan4: failed to open master eth0

Do you have a direct MAC to MAC connection between the FEC and the Switch? If so, you need fixed-link. Look at imx7d-zii-rpu2.dts for an example.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ