From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75D2D15351A; Wed, 21 Aug 2024 16:18:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257138; cv=none; b=M4geFTYBOfziZmXSHrcUySop1j3wzGBk0TAw0EP+82FZ5WFuKOf8V1fr+aOk8E4B85rgh0bMX3BHV4Z1DL2mF500fj9MG01w2zrQviw1VBZHdvDi9q96vsHLFfRucolsWzlaOAyf9UiQkUOWIAYtGu4dQfsXI7mGfmEYzRyFwfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724257138; c=relaxed/simple; bh=uI5XOxDKColPbfMT2OOYBtkew6KV8Urmmejp4pPH1Uc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a9SR77gVUX2GKRtaIjRI4OQJ4bsIdLaEw6oJ+iACyQFoFcG667wVB8+Gk9nMd7wbXYjq1HJIRCcVM+Yzy6ikpXyPstigVN8K2yK31c18zswpG5g1sxDcCQey/ClxMw9APABLfbIJjOQR2TK+nsvILGK0yvPSc8W7GxUIyNUr2+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98) (envelope-from ) id 1sgo2q-000000004qn-1LlN; Wed, 21 Aug 2024 16:18:48 +0000 Date: Wed, 21 Aug 2024 17:18:44 +0100 From: Daniel Golle To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Christian Marangi , Bartosz Golaszewski , Robert Marko , Russell King , Chad Monroe , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/2] net: phy: aquantia: allow forcing order of MDI pairs Message-ID: References: <5173302f9f1a52d7487e1fb54966673c448d6928.1724244281.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Aug 21, 2024 at 06:07:06PM +0200, Andrew Lunn wrote: > On Wed, Aug 21, 2024 at 01:46:50PM +0100, Daniel Golle wrote: > > Normally, the MDI reversal configuration is taken from the MDI_CFG pin. > > However, some hardware designs require overriding the value configured > > by that bootstrap pin. The PHY allows doing that by setting a bit which > > allows ignoring the state of the MDI_CFG pin and configuring whether > > the order of MDI pairs should be normal (ABCD) or reverse (DCBA). > > > > Introduce two boolean properties which allow forcing either normal or > > reverse order of the MDI pairs from DT. > > How does this interact with ethtool -s eth42 [mdix auto|on|off] > > In general, you want mdix auto, so the two ends figure out how the > cable is wired and so it just works. It looks like Aquantia only supports swapping pair (1,2) with pair (3,6) like it used to be for MDI-X on 100MBit/s networks. When all 4 pairs are in use (for 1000MBit/s or faster) the link does not come up with pair order is not configured correctly, either using MDI_CFG pin or using the "PMA Receive Reserved Vendor Provisioning 1" register. And yes, I did verify that Auto MDI-X is enabled in the "Autonegotiation Reserved Vendor Provisioning 1" register.