From patchwork Sun Jan 22 22:51:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 1730211 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.a=rsa-sha256 header.s=fm1 header.b=DH8Ff6a/; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=gV9J6EWA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P0T5N3s7kz23gY for ; Mon, 23 Jan 2023 09:52:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EBE71856CA; Sun, 22 Jan 2023 23:51:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="DH8Ff6a/"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="gV9J6EWA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 86E8885518; Sun, 22 Jan 2023 23:51:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A513484954 for ; Sun, 22 Jan 2023 23:51:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4DA50320024A; Sun, 22 Jan 2023 17:51:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 22 Jan 2023 17:51:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1674427873; x=1674514273; bh=kt WuG61O67+jknKYZId2pjx67e6v7OxxXiW0uArcduw=; b=DH8Ff6a/pBaCvJreMX JswDdsJ6nrE/LpoWQZ4MNRueHZAKsxOtrGBO/tvCoCA8t9VI9PvjxLOC8QTslq1C 7TFOt1jWQxuG/Xy5gwZL7zEV5xWqouXidXI66Eqf29s8BsQnHNc74HWkk88T6Y+G Qh7kQJ5S3frj/iUQ2LAWsVPsV+8N3H1T2JnrvU6REC7IPux3+S+E2kGadeKF9Kkg nDkqgC//BNw1DMYvXKHmJfyRl7qrtkiWxgFRJP5TL42nZVNz2Rophbx114MYiIHE RdTw7joTecr5DaA/UxYo1mQKldHfWP14UdQ+lam62nLlnWRoQTsTPnzg5Mo75zQ6 15dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674427873; x=1674514273; bh=ktWuG61O67+jk nKYZId2pjx67e6v7OxxXiW0uArcduw=; b=gV9J6EWA1tar72vlP7+x3sHIRosLW EIEjOUA6h1NhxD6FC6SkJouDMG01NlPJ/EPzujnkb83IMUoUdzaD1KMdInlAbVfT tyPBOkxo6x4zhVi6Roghu7jH8aLU94a/iJS8zq133RuU7WmFXqxDo2V0OFr1onMd uk/MGxdHrd+pYOqpuE6jjJzRjbk/pWZ9ACZvtvsjTGiJILN4FTexnJ7m95Geq8v5 bTS1iry3OWGICoiLrjtYTEFqoQkS8lDeSlUgJQxY2BmPSYmMGMTxONZ0dR0LjYuj Ob/WpPUcp3ltYZrfXTiu1sUW5Eo5KTZWmLcaJFPAnDWqhZA7CirkH7YyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddujedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Jan 2023 17:51:13 -0500 (EST) From: Samuel Holland To: Andre Przywara , Jagan Teki Cc: Samuel Holland , Joe Hershberger , Ramon Fried , u-boot@lists.denx.de Subject: [PATCH v2 3/5] net: sun8i-emac: Add a flag for the internal PHY switch Date: Sun, 22 Jan 2023 16:51:04 -0600 Message-Id: <20230122225107.62464-4-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230122225107.62464-1-samuel@sholland.org> References: <20230122225107.62464-1-samuel@sholland.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Describe this feature instead of using the SoC ID. Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Reviewed-by: Ramon Fried --- Changes in v2: - New patch for v2 drivers/net/sun8i_emac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index f232b8f087..36cc2498b5 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -137,6 +137,7 @@ enum emac_variant_id { struct emac_variant { enum emac_variant_id variant; + bool soc_has_internal_phy; bool support_rmii; }; @@ -860,7 +861,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev) if (pdata->phy_interface == PHY_INTERFACE_MODE_NA) return -EINVAL; - if (priv->variant->variant == H3_EMAC) { + if (priv->variant->soc_has_internal_phy) { ret = sun8i_handle_internal_phy(dev, priv); if (ret) return ret; @@ -906,6 +907,7 @@ static const struct emac_variant emac_variant_a83t = { static const struct emac_variant emac_variant_h3 = { .variant = H3_EMAC, + .soc_has_internal_phy = true, .support_rmii = true, };