From nobody Thu Oct 2 07:46:35 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 9B2972417C6; Sun, 21 Sep 2025 16:08:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758470921; cv=none; b=G+45L9aaqBc8VCbcCt3ka7z3i5XTw7b4MBtz1yVUtj9pWn3dEksgZQIcmmE6+TR+1LBbMzfOMjyLPEbvblLiDTI77SfVboGcbGoNNlftnvRJmNjptcUvLwS4/4CE3av0UYEjvKXevAvzCWXWg49SIMcDBSyD+K+pmAIyzlLDXiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758470921; c=relaxed/simple; bh=iZl8tqn5LprLuabLFXX9n2eq44tf5EIa8uMNG4aQCco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IjXyvzYMZLiuYf2mAUzV0Ytdq0jc2O9pJwI8ayy8img8lO49mETOEhWyeHRJe3I/3izYE4qVeNQX1JgMiE3s7VgAGA6lQNZmc5uL07Bxbx10gsM3oH6/X+OEzFC45440qdAJ7de6Tg2jEgu+QnnMp1V5PVyMEmIyRVbWkqd6OrU= 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=xQscMhe5; arc=none smtp.client-ip=185.246.85.4 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="xQscMhe5" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 2F93B4E408EA; Sun, 21 Sep 2025 16:08:38 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0624860634; Sun, 21 Sep 2025 16:08:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1BAB9102F17CB; Sun, 21 Sep 2025 18:08:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758470916; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=VMInU4rf/tUHep9iM23mnZEBLwbcWZpRZ70zqhXUaBY=; b=xQscMhe5B86VGnS8GVvcLCqx+QI/qtPj6Y67+8LMqKj83kmnW1G7KfhcA2rYqugBD2GYyF bSJIxVvDSUZnqqQSBU0nek1r2BGE2U2sqYRo6vjg/fJrDYHfgeEkMEsXE0cVrGu6HEsgw2 ZLaBfwQOj65SjXia4ZVKcCpr23WE5jnxWuD1mekTOVz3dJ5jU6X16lddRNbwR6/+r7eUk8 TkQumuP/4I4o6SVZe01guws98pYMiHJ6Flo84DSH5/QXlLYYLplQJ8pCA/2jBdD+4KT2RI Izpa9AWqSjG9BtceDNG+FtFEu1ie26wQFS1YVEBnlAZw/A3oKJy0x8iH94EbGA== 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 , Florian Fainelli Subject: [PATCH net-next v13 17/18] net: phy: dp83822: Add SFP support through the phy_port interface Date: Sun, 21 Sep 2025 21:34:15 +0530 Message-ID: <20250921160419.333427-18-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250921160419.333427-1-maxime.chevallier@bootlin.com> References: <20250921160419.333427-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-Last-TLS-Session-Version: TLSv1.3 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 Tested-by: Oleksij Rempel Tested-by: Florian Fainelli Tested-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 c6e5b7244658..94036e5af242 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -980,6 +980,13 @@ static int dp83822_attach_mdi_port(struct phy_device *= phydev, } } =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