From nobody Mon Oct 6 11:51:33 2025 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 479622EB5BC; Tue, 22 Jul 2025 12:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753186622; cv=none; b=ILKRcJKmZwFdyQG9teBBOjtaotoI1z++BANP9CnEHSw6O8keuLiyi/P0avJbDqks5KBGXhN1yEJm9DiHe9CBd0llvkJG6VdEt/DPQf09hBfXFHMy4LLAHlVztdnvO/Vju4VEh9OBDmGj4PyytTXn485KA3k2rD+ZpnJY3VoVUHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753186622; c=relaxed/simple; bh=QG2ibg7pxPD8lWDc+FtHe47pxWmtqa4H5B0GtgXOR8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VdNM0rHUbB401L+zzCyPnIb6Dv+vzRj/6rr8H1VyesOGLij9pkTK7bdBzBae7R+Brahs+UzMvqiVTCX2FrfsJk1d867MaBl7KyLoxZPqJdw0n3ZsYy4ZidO7jS44ht91cQFbslAWTniEcETHAqS2RgaeWEKZWsgwfIRt9QghZ88= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=buLJq7Cd; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="buLJq7Cd" Received: by mail.gandi.net (Postfix) with ESMTPSA id C563F43A0A; Tue, 22 Jul 2025 12:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1753186618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdPK/l2sFEF6uFGugmiuJNOaATTp+suHf3ldIEXXAUM=; b=buLJq7CdHCORnhgD4+edakJz5TJ1NGr0FDEuh4NtcZ5zF2D7XlrDdJDQ5UGl/MJPo+1NBC d7H9dl/QFK549aiZW2jk5PM1WpPWXcyCDIBqpw+TkyFUvBDLTzeNX2NOo48+jY3rkXDC+j F72kXlrOYcPmSyz8BYcU1OjQi/s5qcczqD7l09vxSY/FUHGBTNyhQ5o+Hs0JDCWWKFHPk+ 9qtFMQAjoSYSZAsFWe65M5aZVrDVWMjavu3hF2WO+h9TIGyts7KqYYGJOYHCB90J9DreXu bufnGvWmY+w40qvqNHyUaJj2PNsu/7S24B4br/vYNoZI+SeoIqE9hdAXr/mW7A== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?q?K=C3=B6ry=20Maincent?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , mwojtas@chromium.org, Antoine Tenart , devicetree@vger.kernel.org, Conor Dooley , Krzysztof Kozlowski , Rob Herring , Romain Gantois , Daniel Golle , Dimitri Fedrau Subject: [PATCH net-next v10 14/15] net: phy: dp83822: Add SFP support through the phy_port interface Date: Tue, 22 Jul 2025 14:16:19 +0200 Message-ID: <20250722121623.609732-15-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250722121623.609732-1-maxime.chevallier@bootlin.com> References: <20250722121623.609732-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejgeekkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgvucevhhgvvhgrlhhlihgvrhcuoehmrgigihhmvgdrtghhvghvrghllhhivghrsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeevgedtffelffelveeuleelgfejfeevvdejhfehgeefgfffvdefteegvedutefftdenucfkphepledtrdejiedriedvrddujedunecuvehluhhsthgvrhfuihiivgepuddvnecurfgrrhgrmhepihhnvghtpeeltddrjeeirdeivddrudejuddphhgvlhhopehfvgguohhrrgdrrddpmhgrihhlfhhrohhmpehmrgigihhmvgdrtghhvghvrghllhhivghrsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefuddprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvghtpdhrtghpthhtohepmhgrgihimhgvrdgthhgvvhgrlhhlihgvrhessghoohhtlhhinhdrtghomhdprhgtphhtthhopehnvghtuggvvhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnu higqdgrrhhmqdhmshhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepthhhohhmrghsrdhpvghtrgiiiihonhhisegsohhothhlihhnrdgtohhmpdhrtghpthhtoheprghnughrvgifsehluhhnnhdrtghhpdhrtghpthhtohepkhhusggrsehkvghrnhgvlhdrohhrgh X-GND-Sasl: maxime.chevallier@bootlin.com Content-Type: text/plain; charset="utf-8" The DP83822 can support 100BaseFX. This mode was only accessible through custom DT properties, but there also exist SFP modules that support these modes. As this only requires setting the relevant supported interface in the driver, expose the port capability with the new phy_port API, allowing SFP support. Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- drivers/net/phy/dp83822.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index 2657be2e9034..aa2c0085a900 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -979,6 +979,13 @@ static int dp83822_attach_port(struct phy_device *phyd= ev, struct phy_port *port) } } =20 + /* If attached from SFP, is_mii is set, but not the mediums. */ + if (port->is_mii) + dp83822->fx_enabled =3D true; + + if (dp83822->fx_enabled) + __set_bit(PHY_INTERFACE_MODE_100BASEX, port->interfaces); + return 0; } =20 --=20 2.49.0