🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15820

Re: [PATCH net-next v3 0/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios

#15820
From: Daniel Golle
Date: Fri, 13 Nov 2026 15:10
46 lines
9313 bytes
On Fri, Nov 13, 2026 at 03:08:10PM +0100, Andrew Lunn wrote:
> > This is separate from commit 82e2c7db0830 ("net: dsa: mxl-gsw1xx: force
> > internal PHYs into a known reset state"), which only programs the PHY
> > bits of RST_REQ. On this board that commit is applied, and the PHYs still
> > sit at the shifted addresses; only a hardware reset of the switch moves
> > them back.
> 
> I don't think 82e2c7db0830 is relevant here. The commit message says
> nothing about the address of the PHY.
> 
> How does the bootloader change the address? I assume there is a
> register it writes?

Yes.

PHY_ADDR_{0,1,2,3,4,5} at offsets 0xF415, 0xF414, 0xF413, 0xF412,
0xF411, 0xF410 (ie. reverse order). Bits 4:0 are the address of the
respective built-in PHY.

> 
> Is there a comment about why it changes the address?

I *guess* that in this case the vendor wants to avoid using PHY
address 0 which is widely misunderstood as being the "broadcast
address" (which it is, but only in scope of AUI attachments and SFP
modules). I know many people who get upset about using PHY address 0
for an actual PHY rather than reserving it as a broadcast address all
PHYs on the bus are listening on...

The switch also has it's own MDIO master interface exposed on external
pins which is shared with the internal PHYs. Hence programming the
addresses of the built-in PHYs can be done in order to accomodate
external PHYs on the same bus which may not be free to use arbitrary
addresses.

> 
> Does the driver have an implicit assumption about the addresses of the
> PHYs? Should the driver actually be writing this register to put the
> PHYs at the expected address?

The driver does what is described in the device tree. Ie. boot firmware
applying a non-default PHY addresses should just say so in the DT passed
to Linux imho.

See also Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
Technical Details
Message-ID: <avcoghKd4CU13QI_@makrotopia.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362718-linux-kernel-netdev=dewy.ru
References: <20261112-mxl-gsw1xx-reset-v3-0-863e82074893@telaak.dev> <a2f45802-b75b-4a19-9508-2d1b5ebe473a@lunn.ch>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362718-linux-kernel-netdev=dewy.ru
From: daniel@makrotopia.org (Daniel Golle)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 0/2] net: dsa: mxl-gsw1xx: reset the switch
 through reset-gpios
Date: Fri, 13 Nov 2026 15:10:58 +0000
Organization: Usenet Network
Message-ID: <avcoghKd4CU13QI_@makrotopia.org>
References: <20261112-mxl-gsw1xx-reset-v3-0-863e82074893@telaak.dev>
 <a2f45802-b75b-4a19-9508-2d1b5ebe473a@lunn.ch>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1379962"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/tkO4+FSX//K6NV+HtD+JNd8rJg= sha256:cY5M8Ld69u64VsbMtSL8TD8MxoO49Keo6tNl4/SRpa8=
	sha1:w2YQGMn9rvheNumM29noympxnc0= sha256:Wu/TXN6ir7deHRGl5W9xqcJAPoDITh3K14yUrnv1nS4=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 28DD51145A7; Fri, 13 Nov 2026 19:14:52 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id URxqzpUJqqgP;
	Fri, 13 Nov 2026 19:14:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-362718-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=makrotopia.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 674391145A2; Fri, 13 Nov 2026 19:14:43 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id B7DAF184DB1; Fri, 13 Nov 2026 15:11:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794582687;
	b=CeWYNHm30bcGyDLXmfmA4dcDRSVhcPn7c7XCOBslW2BG97XrRUx0LPXDseM33dIZqoIr
	 0OKbfghH9wULDJMlC5GDOULNsi3cEc1ZPOumxXz5HYC7Ok7vyoGwHXy0bpuyTH3C9Ya0y
	 lo6A5P4vryO5yBJr8OgsObdf0R51sRSJwj8QuLClYbmxsZ2+laNpdjwO8MI5RtDCE3OUS
	 oDNxyVCwAIfdeWMOSodiGJ4GGhxhW+nwJoUDbGJxGbiGafHZNuk8QiwV+TQiY9jTvwRjG
	 l574w3XYuNqoETr6pHe/ceutZkyGPwzr7v/0axUkWGu2BdpS6MN+3YhO9jiakV3aybw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794582687;
	h=X-Original-To:Received:DMARC-Filter:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To;
	bh=vDzDjk5wOPRNTyrCu+qywdWe1gP/ssS390KRH683Jh8=;
	b=aRhPfzRkD4SRcz7ATDvg+OfPmzaz8V9RBkbl6T91t/gyfElAvvcoGw/6+QaZ7MP39GGd
	 0LAFpJPrxuStSJQQFF+INOGFVryyHQdUIagiNYKMfp/16FCEGvS36exbx0kz2mTUdUf9Q
	 ydYXX/X9f7SEC34OUlcRvKLGI2mK4oEOsaZf7o+QKVk7OEGG0TMD9CPiIwoSIHCuLs26e
	 k6lpHdDZMULz+2+tlH/0WHr162y+w9FUqX5lRU78dCSGvhy0Ux9GprP6hi/yvgnq4k9yy
	 n9P7qEq4w0cWF57+LCPdrOijvMBnG0Qb8+dWDgrcgrfFWpWrBbbbzXxYhlukStswM/g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=makrotopia.org;
	spf=pass smtp.mailfrom=makrotopia.org;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A5CB606A333;
	Fri, 13 Nov 2026 15:11:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.142.180.65
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794582681;
	b=NXNHyh0lJdU3UHtsMFzTPwJ65f8gG+rE/ijD6wEKNAsQiBlkSx1lLipTuhuXwdWtalJv
	 t9js3nX5WIbszLT8ofdz3wLtHYkpcP5k/p+9AUhXb5zc3JXwi/llUpdkJgb8I6j6Tjvbm
	 sXciW/vQjzRZAqeEvSgd7yFn0L3YjCC0MiaCeImFpMeVZX4JWMoMKfquV3tqc6ML3boFj
	 Ew3/bEFTBxGFA0DKjw6FD5RW2Ul1lILDe6NKw9AvR9Hkk2FOXPbJe9qFQN4UjliBtLrAI
	 L1JiPtra5LhGaFxILkx8RRNMPyaISG62HDOCRvBjxa+mh2nW2axZvbljIjRyWDdLoDw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794582681;
	h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=vDzDjk5wOPRNTyrCu+qywdWe1gP/ssS390KRH683Jh8=;
	b=VBByXnOQRpVEYkzY6Ggg5tXq13Rim6ufaRountvk5XGHtvmlVzPo7ZRUzNfljp6fDEvH
	 2RAQAx1xpvTT+LG/7VSuQSO8z2Q9yuXY7LuMh3fDqm7Hd+g5pFPJ3pcpbKV58ELRofHmO
	 nAFXob+XmVlUj5DCEtlz4K6L22Lk7wCcNFvzehP4nKMfDgTVrq0iwmc9ET22bN8Qk1gZ2
	 cV/xm6FQN/ai8lAt6ZGXBQza9rqHu1OVS+mMyJjU+C/945dqDtUPhD5DnTy7oAHKCVAjo
	 KVi327jnHezwgYuvkMN0w6peJFEvcDJjw3qAX2E1BzsAI/Fy2Cyxf/x37d02/eRIUZA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=makrotopia.org;
	spf=pass smtp.mailfrom=makrotopia.org;
	arc=none smtp.remote-ip=185.142.180.65
X-Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F64A606A330;
	Fri, 13 Nov 2026 15:11:21 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3F64A606A330
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org
X-Received: from local
	by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256:X25519MLKEM768)
	 (Exim 4.100.1)
	(envelope-from <daniel@makrotopia.org>)
	id 1xRsvk-000000004Px-1vle;
	Fri, 13 Nov 2026 15:11:08 +0000
X-Cc: joseph@telaak.dev, Hauke Mehrtens <hauke@hauke-m.de>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <a2f45802-b75b-4a19-9508-2d1b5ebe473a@lunn.ch>