From patchwork Mon Jul 24 13:52:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 1811836 X-Patchwork-Delegate: rfried.dev@gmail.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=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Vt5OwWyf; 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 4R8hdM1FLqz1yZw for ; Tue, 25 Jul 2023 00:00:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4C0286725; Mon, 24 Jul 2023 16:00:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Vt5OwWyf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0433D867D9; Mon, 24 Jul 2023 15:59:22 +0200 (CEST) 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 EC8398681D for ; Mon, 24 Jul 2023 15:58:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mripard@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D5D1611F6; Mon, 24 Jul 2023 13:53:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 402EFC433C7; Mon, 24 Jul 2023 13:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690206780; bh=K0Miir4tcZj3tqRFKsYshYdPf8AchpqwlW2THnt5zW0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Vt5OwWyfYCpWR51RAtuVNu32i6yLcxiolrBxqWe6etDw5t2Qfg1iJDi46tz83v3P9 g5FH7/5jzlHgAxks7NnScVQ+0QY+mmgGCM/MpYctZyrzZs057k9h1iBbJG1oeOyIZH H9Ylab1PsT9az/FUFAYI8g0+v39uawFBeIL2ULmJTC2AhvR8icbAT942QmMg+SuPMv 9yH8ARJlanC2y3EOxHoxwcVJEsmfxUzS/Vlz68W0ha+PTnPNpos0ekq2htaV9D9Sh/ Q1ncLymaWXn7f7kCOp5Fm1SBMz/Oat52aZLnpxHZRADi9B4fMlO8zPBjrZ5DBbsFu2 tHpVqG/H8tq3Q== From: Maxime Ripard Date: Mon, 24 Jul 2023 15:52:52 +0200 Subject: [PATCH v3 1/3] net: ti: am65-cpsw-nuss: Enforce pinctrl state on the MDIO child node MIME-Version: 1.0 Message-Id: <20230724-ti-mdio-pinmux-v3-1-fc8359b0014b@kernel.org> References: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> In-Reply-To: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> To: Joe Hershberger , Nishanth Menon , Ramon Fried , Ravi Gunasekaran , Roger Quadros , Simon Glass Cc: Javier Martinez Canillas , Peter Robinson , u-boot@lists.denx.de, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4064; i=mripard@kernel.org; h=from:subject:message-id; bh=K0Miir4tcZj3tqRFKsYshYdPf8AchpqwlW2THnt5zW0=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDCn7msz+GLV/3af4k5VtSo7NZX5G/jmygs+S9Iy3fl4mK /83vMquo5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABP5OI3hr1iBf4LLr7zmmZqf XRZcj07MOz9BNP/nGZ3XWY2v35pOvsLI8F809hhj3MS/x16UxjmdN3dIYT2ve2/5mfjUeWo+qcc b2AA= X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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.8 at phobos.denx.de X-Virus-Status: Clean The binding represents the MDIO controller as a child device tree node of the MAC device tree node. The U-Boot driver mostly ignores that child device tree node and just hardcodes the resources it uses to support both the MAC and MDIO in a single driver. However, some resources like pinctrl muxing states are thus ignored. This has been a problem with some device trees that will put some pinctrl states on the MDIO device tree node, like the SK-AM62 Device Tree does. Let's rework the driver a bit to create a dummy MDIO driver that we will then get during our initialization to force the core to select the right muxing. Signed-off-by: Maxime Ripard --- drivers/net/ti/Kconfig | 1 + drivers/net/ti/am65-cpsw-nuss.c | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/drivers/net/ti/Kconfig b/drivers/net/ti/Kconfig index d9f1c019a885..02660e4fbb44 100644 --- a/drivers/net/ti/Kconfig +++ b/drivers/net/ti/Kconfig @@ -41,6 +41,7 @@ endchoice config TI_AM65_CPSW_NUSS bool "TI K3 AM65x MCU CPSW Nuss Ethernet controller driver" depends on ARCH_K3 + imply DM_MDIO imply MISC_INIT_R imply MISC imply SYSCON diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c index ce52106e5238..29a4284a9b70 100644 --- a/drivers/net/ti/am65-cpsw-nuss.c +++ b/drivers/net/ti/am65-cpsw-nuss.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -605,14 +606,69 @@ static const struct soc_attr k3_mdio_soc_data[] = { { /* sentinel */ }, }; +static ofnode am65_cpsw_find_mdio(ofnode parent) +{ + ofnode node; + + ofnode_for_each_subnode(node, parent) + if (ofnode_device_is_compatible(node, "ti,cpsw-mdio")) + return node; + + return ofnode_null(); +} + +static int am65_cpsw_mdio_setup(struct udevice *dev) +{ + struct am65_cpsw_priv *priv = dev_get_priv(dev); + struct am65_cpsw_common *cpsw_common = priv->cpsw_common; + struct udevice *mdio_dev; + ofnode mdio; + int ret; + + mdio = am65_cpsw_find_mdio(dev_ofnode(cpsw_common->dev)); + if (!ofnode_valid(mdio)) + return -ENODEV; + + /* + * The MDIO controller is represented in the DT binding by a + * subnode of the MAC controller. + * + * Our driver largely ignores that and supports MDIO by + * hardcoding the register offsets. + * + * However, some resources (clocks, pinctrl) might be tied to + * the MDIO node, and thus ignored. + * + * Clocks are not a concern at the moment since it's shared + * between the MAC and MDIO, so the driver handles both at the + * same time. + * + * However, we do need to make sure the pins states tied to the + * MDIO node are configured properly. Fortunately, the core DM + * does that for use when we get a device, so we can work around + * that whole issue by just requesting a dummy MDIO driver to + * probe, and our pins will get muxed. + */ + ret = uclass_get_device_by_ofnode(UCLASS_MDIO, mdio, &mdio_dev); + if (ret) + return ret; + + return 0; +} + static int am65_cpsw_mdio_init(struct udevice *dev) { struct am65_cpsw_priv *priv = dev_get_priv(dev); struct am65_cpsw_common *cpsw_common = priv->cpsw_common; + int ret; if (!priv->has_phy || cpsw_common->bus) return 0; + ret = am65_cpsw_mdio_setup(dev); + if (ret) + return ret; + cpsw_common->bus = cpsw_mdio_init(dev->name, cpsw_common->mdio_base, cpsw_common->bus_freq, @@ -868,3 +924,14 @@ U_BOOT_DRIVER(am65_cpsw_nuss_port) = { .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE, }; + +static const struct udevice_id am65_cpsw_mdio_ids[] = { + { .compatible = "ti,cpsw-mdio" }, + { } +}; + +U_BOOT_DRIVER(am65_cpsw_mdio) = { + .name = "am65_cpsw_mdio", + .id = UCLASS_MDIO, + .of_match = am65_cpsw_mdio_ids, +}; From patchwork Mon Jul 24 13:52:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 1811834 X-Patchwork-Delegate: rfried.dev@gmail.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=F34/ailI; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4R8hd454GZz1yZw for ; Tue, 25 Jul 2023 00:00:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 828D2868B5; Mon, 24 Jul 2023 15:59:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="F34/ailI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AAF986897; Mon, 24 Jul 2023 15:59:18 +0200 (CEST) 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 ABB0086808 for ; Mon, 24 Jul 2023 15:58:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mripard@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A17C1611FE; Mon, 24 Jul 2023 13:53:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2283C433C8; Mon, 24 Jul 2023 13:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690206784; bh=HdWM2DonklQuHNRLk0wp15xXXoXFmgHaum8heQtJ4FQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=F34/ailI+ZBgmyX8f27KnzcvZd+t4h0geMda/9uscFhf/AaEodFHQ3pMsSURIa/G7 7ekv/nZbP0c/PXgQOrjlmFNacVkTIqQ0PQToK/cWwp4In7kFGjNljIgBHHyyzK+ZBV M+XbyaFvT3iFhNv1KVFbO0wSDH2kanl8DKllU+ZQy8d45JH0mgKOFa+jplNALkHD1G q1tIbi6cO4HOeaE/kHss1My2bru0lhBpIPcPc9/61s2U/25KYNad/a9Wau9P31jhwM hD4vlrTe4bu/4DK/zSiMIpYuJ7HpL8snBbXbfTdx5XW3LkAXPEG6GHItl2ja7Xu6tS SfexpfKWaC4Cg== From: Maxime Ripard Date: Mon, 24 Jul 2023 15:52:53 +0200 Subject: [PATCH v3 2/3] fixup! arm: dts: k3-am62: Bump dtsi from linux v6.5-rc1 MIME-Version: 1.0 Message-Id: <20230724-ti-mdio-pinmux-v3-2-fc8359b0014b@kernel.org> References: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> In-Reply-To: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> To: Joe Hershberger , Nishanth Menon , Ramon Fried , Ravi Gunasekaran , Roger Quadros , Simon Glass Cc: Javier Martinez Canillas , Peter Robinson , u-boot@lists.denx.de, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=760; i=mripard@kernel.org; h=from:subject:message-id; bh=HdWM2DonklQuHNRLk0wp15xXXoXFmgHaum8heQtJ4FQ=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDCn7msyYjm1Zmiiy8dWLhKtndV2XfFGc43rdtXO3ZpDT4 rNcBZtCOkpZGMS4GGTFFFlihM2XxJ2a9bqTjW8ezBxWJpAhDFycAjARTSOGf/ZWetHsU555lEqd bvyunLxVu3qvYp68g2BKY0FAi3/ARUaGW0bJLxbf/Cab8uCv+kS3HVt8b7h+iy1Xkbv1OGyJyhw NXgA= X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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.8 at phobos.denx.de X-Virus-Status: Clean The MDIO pinctrl nodes can't be duplicated between the child and device, because if we ever boot Linux with our DT it will try to attach that pinctrl configuration to both the MAC and MDIO devices, which will result in failure to probe. Signed-off-by: Maxime Ripard --- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi b/arch/arm/dts/k3-am625-sk-u-boot.dtsi index a3f207baa304..c1685bc9ca39 100644 --- a/arch/arm/dts/k3-am625-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-sk-u-boot.dtsi @@ -120,7 +120,6 @@ &cpsw3g { bootph-pre-ram; - pinctrl-0 = <&main_mdio1_pins_default &main_rgmii1_pins_default>; }; &cpsw_port1 { From patchwork Mon Jul 24 13:52:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 1811831 X-Patchwork-Delegate: rfried.dev@gmail.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=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=tJetBroT; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R8hcZ110Vz1yYC for ; Mon, 24 Jul 2023 23:59:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E17B86896; Mon, 24 Jul 2023 15:59:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="tJetBroT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E2278675F; Mon, 24 Jul 2023 15:59:10 +0200 (CEST) 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 141E886821 for ; Mon, 24 Jul 2023 15:58:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mripard@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 833DE61207; Mon, 24 Jul 2023 13:53:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92BADC433C8; Mon, 24 Jul 2023 13:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690206786; bh=YZSUp5oLi/Heaxra00D/1dyDu+BhX/MwhgaM66KZRWg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tJetBroT1zz9szba8GZqImtsQqeGgALRkcvX+zXjw0LmH+XXv1Aot61BZptOr6y96 kTQqY/quMyU65k/8mS81mo8mMlybVsE4jDvFGPDQrwIMkYZfyaitG+LgxIKUgcq208 07fZqCWtbHGr8wZhs7uv9CU0Asb4GkFH+GwPk8CSGGPIsvml8K1zP2AAb59djM+5Pp MX6hHkiSBcdlwGMw1BDUnh62Ql9lof2ib9ypREg4e5lJARAABfFjLv5cr8+ZlLr+oM UnCiNpdTTimsfI6aKnxbYPYww8ud8yPYIvc61CeO0Em0djoBnT8RV8XXKUfUoxkmQG IL19QBCuFoC9Q== From: Maxime Ripard Date: Mon, 24 Jul 2023 15:52:54 +0200 Subject: [PATCH v3 3/3] fixup! net: ti: am65-cpsw-nuss: Enforce pinctrl state on the MDIO child node MIME-Version: 1.0 Message-Id: <20230724-ti-mdio-pinmux-v3-3-fc8359b0014b@kernel.org> References: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> In-Reply-To: <20230724-ti-mdio-pinmux-v3-0-fc8359b0014b@kernel.org> To: Joe Hershberger , Nishanth Menon , Ramon Fried , Ravi Gunasekaran , Roger Quadros , Simon Glass Cc: Javier Martinez Canillas , Peter Robinson , u-boot@lists.denx.de, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1263; i=mripard@kernel.org; h=from:subject:message-id; bh=YZSUp5oLi/Heaxra00D/1dyDu+BhX/MwhgaM66KZRWg=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDCn7msxmyFtX80rn/Dy9vbH16/5GzQj7J9/dgj5s+7A0L 377xOuzO0pZGMS4GGTFFFlihM2XxJ2a9bqTjW8ezBxWJpAhDFycAjCR82mMDDsDy5Orsu6EPwr1 7X26Y5Oo8E+jqXZ1ysoSJ04+8GATM2b4K7E8+57nWffZ7HIZt8Ldg+8mhcxaOTcx5bqVT2F4bHA 0HwA= X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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.8 at phobos.denx.de X-Virus-Status: Clean --- drivers/net/ti/am65-cpsw-nuss.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c index 29a4284a9b70..51a8167d14a9 100644 --- a/drivers/net/ti/am65-cpsw-nuss.c +++ b/drivers/net/ti/am65-cpsw-nuss.c @@ -627,21 +627,14 @@ static int am65_cpsw_mdio_setup(struct udevice *dev) mdio = am65_cpsw_find_mdio(dev_ofnode(cpsw_common->dev)); if (!ofnode_valid(mdio)) - return -ENODEV; + return 0; /* * The MDIO controller is represented in the DT binding by a * subnode of the MAC controller. * - * Our driver largely ignores that and supports MDIO by - * hardcoding the register offsets. - * - * However, some resources (clocks, pinctrl) might be tied to - * the MDIO node, and thus ignored. - * - * Clocks are not a concern at the moment since it's shared - * between the MAC and MDIO, so the driver handles both at the - * same time. + * We don't have a DM driver for the MDIO device yet, and thus any + * pinctrl setting on its node will be ignored. * * However, we do need to make sure the pins states tied to the * MDIO node are configured properly. Fortunately, the core DM