From patchwork Thu Feb 15 23:48:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201845 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193258dyb; Thu, 15 Feb 2024 15:50:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXNyz3vur0OW6E2lxS2a/jfe5xsEc+uYskA6ajJzh+tdW3itXQWq6+JORNAXHHgexAjAcG1WCM4If6cphcR+UdnjRD89w== X-Google-Smtp-Source: AGHT+IG+U+iEaecsmt1q2jd6rb5qgGDZz1QoPKULhS4TcDqR+dF/agEov0wfPNaxLhFKk9MxdyDk X-Received: by 2002:a05:6214:d6f:b0:68c:62e2:65bd with SMTP id 15-20020a0562140d6f00b0068c62e265bdmr4641356qvs.46.1708041051949; Thu, 15 Feb 2024 15:50:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041051; cv=pass; d=google.com; s=arc-20160816; b=V/IvwP9x8QhoHRD7g9cTMBxGCbfTR7hSTFTXRH+KHU/b6/MJZFisC3DWv/ewgvjds5 6x4pe6MdlySjABsWc//bv8UbJpxQ49Hz2Nntk3HOMVm2lidM8wnEE/LZfM1JMHrfM2qq +kNb7F4DbSr9+xxPTnk3GZ22Lu6TV8mwn6wjc/+Z6EMua5AQx4RJjMrL0TNwC1oeyD2y iKn9g8NADboGC2Y4ZO9/cZusQvC1UoTWEvmGE8gcB95rgANRbQ/dqWTHrMLTBWRWsa5C hWKK1cCNEdLt2I8A7ghR62f1FYp+wCGYINAMkbJQy2w+La7MaWzd7OG3gJLvn1JvVGZ5 Abpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=0oT7c75AqVPRkGayF0nHaFad18LQ8AYfNtYrd7VyWIM=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=vxyeDwCc/643FI+54Ox+mEHjRLWFwoVcGhP1AfIOleM1+FDPvYS1ZggeKRRqZBhRDD w5MRmc9wYmuLCAnaqQrAl+yq1mEyG+Oip5JBKrvMllJCfk92o0G9cEn9dEsNtJsjq3mL /wNQQxgJ/NxE4TDoPqEHYPCJ7VoUkBrTzVjKvsghKvsnWjvouwMZX9Lx5UJJXtSx7O4O mHF/LkkV78L95NR2FO8N3YzinbmWC2ejqPtwIYbxZjAbDZu/orfQQmKfXZ5pViqf1UWz K2U/+4PciQW64QIi/fBU7+CixG/zwWy2zrKEaPJAM002Gfe5jM1fA7Na5Lsif24Bbln5 ff6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iSd7o1RE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67853-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67853-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z8-20020a056214040800b0068ef7759bd3si2698594qvx.489.2024.02.15.15.50.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:50:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67853-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iSd7o1RE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67853-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67853-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AE07D1C21370 for ; Thu, 15 Feb 2024 23:50:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA6761487F0; Thu, 15 Feb 2024 23:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iSd7o1RE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 35FBC53362; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=KLo15KvdfzPXz4VveMHkUhtkpoknigm/F87DKOqnbLAWIYK57GpocrqbMDGFxntvw95LL2GwMUtT080TyN3gWwweFdCwiVgL6iyqo3xrJN1ARyE7hSFSSRHRVsPG/KdBtA6wUPgPSw0z2NNRUSYcbzUVNq/K5tjtp9dkBKfjlAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=Pfcpe+f2Jdbm5K/fR0SSrDTMjraZiY9d5hY2tmvWQow=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pub2mPwOkcqZENnC4lXJWGSFF+iCvladcFPpLiOhvERhoWP0gFMoR/Da401uuG14qEUip9Axrcf2cWKQhocJ0iIuoiIN0pYgeGByI4wCJl8TsbJPG5wX+6Zr4rHJZAKwTxcira3mT6hXcY8ewDpH92o63H9WNivzMzoPD74IpcE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iSd7o1RE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C10D3C433F1; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040932; bh=Pfcpe+f2Jdbm5K/fR0SSrDTMjraZiY9d5hY2tmvWQow=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=iSd7o1REgbtZfHtfzNnVmB2eqGT6ltnTmq4DSzK1ppg7zeYhHqLd/tm9M37AR6mbx 9as4MInob3U+P8u5GdsQUe2JQAGORgR/b0nBd8sBZnfQnan755YBEyN7zA0vKgZBzB NtW4JM9cQCoY30JFe13UlqGBAdtUa6zl88fG1YaA6dYqPhTFzEGHs/dkT3/h3bII+h 54seN2XHmu8PCqwRJb2TXBjCU3dNAhSRqmAjJOzYsifewwJCWE3rHLTilpMI1cTHQv zThahYPfWhBauWdJv/cPQrv0+f/ViqtRAh5u7gGi+TZowdwEOASv4BLzHWY65+Bngl deUE2xxLYZCdQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4ABAC48BEC; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:53 +0800 Subject: [PATCH 1/6] net: hisilicon: add support for hisi_femac core on Hi3798MV200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-1-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=7225; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=Ke+HNZMdcM7+6gvjPIovBNlpGzAw05BiWeWYXFjkCK8=; b=M3M1M8uRN/VH4jHNjdrus8DBfhRe0JcYhaliW0y5QZBLTX7GhVTB4bq7b/OUmrULQsPLtvKSj IIGgUBe2RpWCHcl7LEjcFUiNSoM9MAUAq4ZmCMMl1izVi04sZkvuaCh X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010854060832503 X-GMAIL-MSGID: 1791010854060832503 From: Yang Xiwen Considering that no users is found in the kernel, no backward compatibility is maintained. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 90 ++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index 2406263c9dd3..d72160efff9a 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -10,8 +10,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -97,6 +99,13 @@ enum phy_reset_delays { DELAYS_NUM, }; +enum clk_type { + CLK_MAC, + CLK_BUS, + CLK_PHY, + CLK_NUM, +}; + struct hisi_femac_queue { struct sk_buff **skb; dma_addr_t *dma_phys; @@ -108,7 +117,7 @@ struct hisi_femac_queue { struct hisi_femac_priv { void __iomem *port_base; void __iomem *glb_base; - struct clk *clk; + struct clk *clks[CLK_NUM]; struct reset_control *mac_rst; struct reset_control *phy_rst; u32 phy_reset_delays[DELAYS_NUM]; @@ -116,6 +125,7 @@ struct hisi_femac_priv { struct device *dev; struct net_device *ndev; + struct platform_device *mdio_pdev; struct hisi_femac_queue txq; struct hisi_femac_queue rxq; @@ -693,6 +703,7 @@ static const struct net_device_ops hisi_femac_netdev_ops = { static void hisi_femac_core_reset(struct hisi_femac_priv *priv) { reset_control_assert(priv->mac_rst); + usleep_range(200, 300); reset_control_deassert(priv->mac_rst); } @@ -712,6 +723,10 @@ static void hisi_femac_sleep_us(u32 time_us) static void hisi_femac_phy_reset(struct hisi_femac_priv *priv) { + /* MAC clock must be disabled before PHY reset + */ + clk_disable(priv->clks[CLK_MAC]); + clk_disable(priv->clks[CLK_BUS]); /* To make sure PHY hardware reset success, * we must keep PHY in deassert state first and * then complete the hardware reset operation @@ -727,6 +742,9 @@ static void hisi_femac_phy_reset(struct hisi_femac_priv *priv) reset_control_deassert(priv->phy_rst); /* delay some time to ensure later MDIO access */ hisi_femac_sleep_us(priv->phy_reset_delays[POST_DELAY]); + + clk_enable(priv->clks[CLK_MAC]); + clk_enable(priv->clks[CLK_BUS]); } static void hisi_femac_port_init(struct hisi_femac_priv *priv) @@ -768,11 +786,17 @@ static void hisi_femac_port_init(struct hisi_femac_priv *priv) static int hisi_femac_drv_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; + struct device_node *node = dev->of_node, *mdio_np; struct net_device *ndev; struct hisi_femac_priv *priv; struct phy_device *phy; - int ret; + int ret, i; + bool mdio_registered = false; + static const char * const clk_strs[] = { + [CLK_MAC] = "mac", + [CLK_BUS] = "bus", + [CLK_PHY] = "phy", + }; ndev = alloc_etherdev(sizeof(*priv)); if (!ndev) @@ -797,23 +821,20 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) goto out_free_netdev; } - priv->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(priv->clk)) { - dev_err(dev, "failed to get clk\n"); - ret = -ENODEV; - goto out_free_netdev; - } - - ret = clk_prepare_enable(priv->clk); - if (ret) { - dev_err(dev, "failed to enable clk %d\n", ret); - goto out_free_netdev; + for (i = 0; i < CLK_NUM; i++) { + priv->clks[i] = devm_clk_get_enabled(&pdev->dev, clk_strs[i]); + if (IS_ERR(priv->clks[i])) { + dev_err(dev, "failed to get enabled clk %s: %ld\n", clk_strs[i], + PTR_ERR(priv->clks[i])); + ret = -ENODEV; + goto out_free_netdev; + } } priv->mac_rst = devm_reset_control_get(dev, "mac"); if (IS_ERR(priv->mac_rst)) { ret = PTR_ERR(priv->mac_rst); - goto out_disable_clk; + goto out_free_netdev; } hisi_femac_core_reset(priv); @@ -826,15 +847,32 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) priv->phy_reset_delays, DELAYS_NUM); if (ret) - goto out_disable_clk; + goto out_free_netdev; hisi_femac_phy_reset(priv); } + // Register the optional MDIO bus + for_each_available_child_of_node(node, mdio_np) { + if (of_node_name_prefix(mdio_np, "mdio")) { + priv->mdio_pdev = of_platform_device_create(mdio_np, NULL, dev); + of_node_put(mdio_np); + if (!priv->mdio_pdev) { + dev_err(dev, "failed to register MDIO bus device\n"); + goto out_free_netdev; + } + mdio_registered = true; + break; + } + } + + if (!mdio_registered) + dev_warn(dev, "MDIO subnode notfound. This is usually a bug.\n"); + phy = of_phy_get_and_connect(ndev, node, hisi_femac_adjust_link); if (!phy) { dev_err(dev, "connect to PHY failed!\n"); ret = -ENODEV; - goto out_disable_clk; + goto out_unregister_mdio_bus; } phy_attached_print(phy, "phy_id=0x%.8lx, phy_mode=%s\n", @@ -885,8 +923,8 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) out_disconnect_phy: netif_napi_del(&priv->napi); phy_disconnect(phy); -out_disable_clk: - clk_disable_unprepare(priv->clk); +out_unregister_mdio_bus: + platform_device_unregister(priv->mdio_pdev); out_free_netdev: free_netdev(ndev); @@ -897,12 +935,15 @@ static void hisi_femac_drv_remove(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); struct hisi_femac_priv *priv = netdev_priv(ndev); + int i; netif_napi_del(&priv->napi); unregister_netdev(ndev); phy_disconnect(ndev->phydev); - clk_disable_unprepare(priv->clk); + platform_device_unregister(priv->mdio_pdev); + for (i = 0; i < CLK_NUM; i++) + clk_disable_unprepare(priv->clks[i]); free_netdev(ndev); } @@ -912,6 +953,7 @@ static int hisi_femac_drv_suspend(struct platform_device *pdev, { struct net_device *ndev = platform_get_drvdata(pdev); struct hisi_femac_priv *priv = netdev_priv(ndev); + int i; disable_irq(ndev->irq); if (netif_running(ndev)) { @@ -919,7 +961,8 @@ static int hisi_femac_drv_suspend(struct platform_device *pdev, netif_device_detach(ndev); } - clk_disable_unprepare(priv->clk); + for (i = 0; i < CLK_NUM; i++) + clk_disable_unprepare(priv->clks[i]); return 0; } @@ -928,8 +971,10 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); struct hisi_femac_priv *priv = netdev_priv(ndev); + int i; - clk_prepare_enable(priv->clk); + for (i = 0; i < CLK_NUM; i++) + clk_prepare_enable(priv->clks[i]); if (priv->phy_rst) hisi_femac_phy_reset(priv); @@ -948,6 +993,7 @@ static const struct of_device_id hisi_femac_match[] = { {.compatible = "hisilicon,hisi-femac-v1",}, {.compatible = "hisilicon,hisi-femac-v2",}, {.compatible = "hisilicon,hi3516cv300-femac",}, + {.compatible = "hisilicon,hi3798mv200-femac",}, {}, }; From patchwork Thu Feb 15 23:48:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193169dyb; Thu, 15 Feb 2024 15:50:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXFHO2VdNTaWXrR4YainO+amT9Kg2gQAOE10UDq0U9nR8gyrfgTDxy89oFgLRoVeVIsiRMMX7M2YakjFWO7e0yY6oa0Fg== X-Google-Smtp-Source: AGHT+IF72/nWPEbQ03hb+eJPxIu9sfgwcFM6ygDtT2xwg96qKKyuP+ecDnDe6Py0Tf5SDl26uRfn X-Received: by 2002:a2e:8802:0:b0:2d0:dfa5:666e with SMTP id x2-20020a2e8802000000b002d0dfa5666emr2280890ljh.16.1708041034420; Thu, 15 Feb 2024 15:50:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041034; cv=pass; d=google.com; s=arc-20160816; b=TSk0e5s4NJh9yAIFfpfbVgXNWvp/AQ5xXkFSnCRFL0yDoIltWPxlkBU4m1ITdHAlMY qnbbR31Q0G6hewx2yiJKDir7smoCzV8ggUDb5VVXSFL6omrSad/mGs43zZojwsa+mcVP ULuBtoVOKV9RTlTHnGhnjNpsVwiY+hhJ8RqkkrvSh0FGSIIzoOU6U08IZtZyQGSUXTcI zxeHt9oVOC79Lrabnn0ESktcENQctFFdSNC1PILY7Yw1tymisiyjXpNLcEQ0H407TKVR fbHKnhSUTRiPXeyXW8yK+9RI7S7fmTsNI/Z5RcXZ9tki6bIgjZwT+c9heId4iFEemGse HncA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=Yg3XDav6GCo+UMx/asrOFGkHXBL6eRmR0GRcIc/3Wps=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=RsN0yG3HnshLM9fRx2ROcYud7h9dtsND3jVnOb0Om8S+vjbEmn0pRIhhmgvVbF/IJm D0SIt0SkCHfuya4qDlePWqzhi7kv4u0TFMz4VRPVSAxTmLYp98aM8cFVgAR472yflqZo 3yPMOw9smQ2+8rxfh5vJbwDtWkpjhcAwJNM0w2SvwiDiA5Q4/A9Dvyr9xJJbSo3gdLRa +uscUhCTPLOwYu0yWyMur8b361Jxd8hAjtF0UKjXBJg2VJls3wkg/O5IIoZcYyOsP+0k asUIEWnaQzXpyqAMaQOM6Fut6N6R4M/355gbNmQj8S1PjJBwUGRmMSRbXn3dioHc/CqF OgLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ldt4ZEkx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67851-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67851-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x19-20020a50d613000000b00563b8a5bb8csi872145edi.227.2024.02.15.15.50.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:50:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67851-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ldt4ZEkx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67851-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67851-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0ABDD1F23DFC for ; Thu, 15 Feb 2024 23:50:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF8441487C4; Thu, 15 Feb 2024 23:48:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ldt4ZEkx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3603A145346; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=t/O4sOoyeRwtKSKNdgRWiIRLF1rnSftMm20dwyi8K+3a4bm6BJToz8cZPqOJLG4siMSOhUL5Lxf5+V6SIy2gy5D8JtfAqF4xuL1jF0cnuu1dGe8Uxdn/4yuwrngJSNSxp0bhccx51Jc/ZSLlq64YeftJfKM/VrY2xprQ5TEweho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=kHlJYXFc2o2nqfCsYXCiE5nblag+GF9yfKhjdNiYNhk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hJSUopXQd7JAdpD+BrTcVx8j00NFhmYdD+S+5isoDXPffB7odOjG0+obU0FPPryjnK9DAOZpro/JswmRlI7NQTwgt3cblySUtIE0neF1af8sYM0pyjSIdmc1ptWFG6dgcly9wFiMZG2o1/pIbAW7vjvHnNUwXCBUYsrSQ3X18Wg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ldt4ZEkx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id CBF4FC43399; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040932; bh=kHlJYXFc2o2nqfCsYXCiE5nblag+GF9yfKhjdNiYNhk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Ldt4ZEkxxdQARf4z7y9yg1o5ZZ4/aP82xEHLJH5KmamlzWCW4jhjbWAX1i587Ebzg GwMkGWZEV+zCulEthzeHhvnVpQOdP0r8LMZPoTx9O9fu171cuwnVdg9HRHsrLXvUGq 9jNqpii8HD9S+Gy8JuNPBrMM+bYkophvfHyj3qWOvMAZWzVGqAq3ftQsZvSxrGQoC6 ek49UUc6FTgR8wj9gaYLWuTpvaEtwRmg4tfpbPb2t929SFZJZxtNGL0rBr5RHHiV37 Mgkxxd3V4waxfmHOo/QdwMHBoRtnaAQw1QmqUDabBqCz9rB5r8NIw67hvUUeKkwV92 Nqfnpdp0ojPEw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B54B9C4829E; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:54 +0800 Subject: [PATCH 2/6] net: hisi_femac: remove unused compatible strings Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-2-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=848; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=Q6RobEliCYMOixlSWarXH2F6cDTqzSpO8SvRil35ZCg=; b=ic/0aLLq/JZF1P0XEK/8iZ7k8+22sry3xHwtc9XbBn5LCQaRENK+l+qF4NuHlLn3JUOfAjl80 hhleIxNJVIkCJWBxDEHq/spq3dyp/PNQ7jhZX4WliE331rdd0VTU2CA X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010835774654336 X-GMAIL-MSGID: 1791010835774654336 From: Yang Xiwen These compatible strings are not found in any mainline dts, remove them. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index d72160efff9a..6dabc62a00b7 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -990,9 +990,6 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) #endif static const struct of_device_id hisi_femac_match[] = { - {.compatible = "hisilicon,hisi-femac-v1",}, - {.compatible = "hisilicon,hisi-femac-v2",}, - {.compatible = "hisilicon,hi3516cv300-femac",}, {.compatible = "hisilicon,hi3798mv200-femac",}, {}, }; From patchwork Thu Feb 15 23:48:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193203dyb; Thu, 15 Feb 2024 15:50:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAHgjVJ6QZkh4bOgUpwqeMufw67IyGhRKyMyQhf4K9JPtVMJyFRTkqK5Qpnj1u8BlAaYAXB+eJ6a9mzRAYCvBYGoh39A== X-Google-Smtp-Source: AGHT+IFyOioQe50DrqOWI1SJlWGASJCfCDudTI671zbWzjxB5Kqd9C5F6aq4lMLkq6b2b2y4XBGs X-Received: by 2002:a05:620a:1451:b0:785:f587:f92 with SMTP id i17-20020a05620a145100b00785f5870f92mr3384155qkl.8.1708041040414; Thu, 15 Feb 2024 15:50:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041040; cv=pass; d=google.com; s=arc-20160816; b=xFBkq/yQPdrpmnPgL3OQUbY0n53Lxe9QyKPkNukJlyMurLT6viZo87IsDxuUd6xAfm L2wU45QQ0OU28fUSRC+9wuvJUpppgRjyIvb/epnYUf4d0PaX7BuTUtHo3TEmz2UcS4Ya 5VGpayEr8pLfnhwRsaV6Z1AFPznJO5wPOdRazc4uxwA/p3qLTlARu0aGIcu7aep/Kupv pWvVEDmD5Ep6jpcsS5EEEYTX4VRLdAYawuGwq/iJlFFEQIF2wyEWwF3ER9S1q1OSwTSI b4bV5cv2K3OtAv9NE2zP3OwUa3IzpDlXdJC2n84EahGd3I5PhIoKNXP9LLNrDCVYsKst AAFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=Vnnyrm0QR+v8mz60+4xpf+TsXY4atjhGxvSKocpxLJI=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=gactWTkI1iL0rmi78Gtn+H6ZR7WO6ZgvLE6KAZRBTtHZQUPptc0E5U3+Xhw6CUkSZi dusuT1ozlN+9d2nRz3fqH/Hm61rFaWVYbQqZCxn+5d8HWmOyHWUzIUSmfhAqPRuWHhAl oNXtBC1PlnP17KztMmrc8z2Kw5CGzCdZiQbl1NKwDFlkib5fE2VDSKpti/GvojCfLwQ7 u7JHhCafHszm/hHizv8Yq2lH/4JBIksUoXuRumeMlz/qT6qzhr1CeXrThV7SDDfXzKjC I/dkkVOjqULVW873+h+FT0/asGuJzCNwpweqILdTUUi619HAex6LrxCIoPHxHqsKGBy9 P6Gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h5W5kA6l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67854-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67854-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id br38-20020a05620a462600b007873fb9461dsi731572qkb.261.2024.02.15.15.50.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:50:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67854-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h5W5kA6l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67854-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67854-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 667AC1C22647 for ; Thu, 15 Feb 2024 23:50:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 071CA1487C6; Thu, 15 Feb 2024 23:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h5W5kA6l" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4B17B145B07; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=k9sNAu2vIBCl3AVMFz9iRtuLa/PM/QD3vmB95KH1P11KvnzRycZgaL0Zpe/DtTm4E19j3tenloVCBxvWiDA+bGjFKX+G+SyM280pyHteOVF3/BxAblAEbIJvu9dDKYY22331cdOnClJmOwIMc7S8xhPeMnksiXS2z0UJQz2QqSI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=zk4WR4VZ/jCY8pexd+8b92ywhJFB67TqSj5YpsTG+TQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fm35wGj9/UbtED9eolKNhk2c4GXmikmV9+Rp+hya74jcBK6ke4eUsY6YjTiC1VEQAlyEQc6gYheebfBUgJtR7f2i/WHuEEdQPF/6fhMZSrY3M+CGXKnz5POfKYB+MMZHtGnCWmmw5MWScXuqsY4mt+1r9MRH+kfwH+gg85UJZXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h5W5kA6l; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id DC873C433B2; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040932; bh=zk4WR4VZ/jCY8pexd+8b92ywhJFB67TqSj5YpsTG+TQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=h5W5kA6llfgxVAHUfzeNHCObe9n50aKNMJDNG11KqsrBK58kDilm9wT5BChQmUQTX DLPKIrcYoc4HXm4y+Qd5K+LLJcyRq9DB0ZChLa27eoG/fd+D9p8tkVPtOsuvyYL+UW KkWhK8h/2bMnXGZB/LkjL26Nxi4ri+D0gAEC+fXdrYRYKpTxW3cAeIC0fD59StR49R gH4ukguTqPRaUCg7gqBRdIGRka+bLDJZdNJFuu/JHpy+bt6dZDCx8+Vj9k1Hi38weV ihakl/d0ZXuetjBRuZUi1FZqBIyqDoHBQFzoF79xeMSmwgOh3/Yp3XLing3RgQcbbo L8JK2wtu6KxBQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8297C48BF2; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:55 +0800 Subject: [PATCH 3/6] dt-bindings: net: remove outdated hisilicon-femac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-3-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=2291; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=/LRpcFbOMPfKKUiQJIHRI4Rc7KX5XmWz3V8ZUehXBd8=; b=+iIZXH+TBsZ0TpNpIKvi2QCLLprQXK65wZF6Z9kiv5kV4SKJdhRYMipMC3GxD/9L11qwrOHc8 mja+oNKt4cRDIesBekKRdlJQS4juaDM58pPIanNHL/76wWLjEEkNg7n X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010842252833349 X-GMAIL-MSGID: 1791010842252833349 From: Yang Xiwen The user documented(Hi3516) is not found in current kernel anymore. Remove this binding entirely due to recent driver changes. Signed-off-by: Yang Xiwen --- .../devicetree/bindings/net/hisilicon-femac.txt | 41 ---------------------- 1 file changed, 41 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac.txt b/Documentation/devicetree/bindings/net/hisilicon-femac.txt deleted file mode 100644 index 5f96976f3cea..000000000000 --- a/Documentation/devicetree/bindings/net/hisilicon-femac.txt +++ /dev/null @@ -1,41 +0,0 @@ -Hisilicon Fast Ethernet MAC controller - -Required properties: -- compatible: should contain one of the following version strings: - * "hisilicon,hisi-femac-v1" - * "hisilicon,hisi-femac-v2" - and the soc string "hisilicon,hi3516cv300-femac". -- reg: specifies base physical address(s) and size of the device registers. - The first region is the MAC core register base and size. - The second region is the global MAC control register. -- interrupts: should contain the MAC interrupt. -- clocks: A phandle to the MAC main clock. -- resets: should contain the phandle to the MAC reset signal(required) and - the PHY reset signal(optional). -- reset-names: should contain the reset signal name "mac"(required) - and "phy"(optional). -- phy-mode: see ethernet.txt [1]. -- phy-handle: see ethernet.txt [1]. -- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given. - The 1st cell is reset pre-delay in micro seconds. - The 2nd cell is reset pulse in micro seconds. - The 3rd cell is reset post-delay in micro seconds. - -The MAC address will be determined using the optional properties -defined in ethernet.txt[1]. - -[1] Documentation/devicetree/bindings/net/ethernet.txt - -Example: - hisi_femac: ethernet@10090000 { - compatible = "hisilicon,hi3516cv300-femac","hisilicon,hisi-femac-v2"; - reg = <0x10090000 0x1000>,<0x10091300 0x200>; - interrupts = <12>; - clocks = <&crg HI3518EV200_ETH_CLK>; - resets = <&crg 0xec 0>,<&crg 0xec 3>; - reset-names = "mac","phy"; - mac-address = [00 00 00 00 00 00]; - phy-mode = "mii"; - phy-handle = <&phy0>; - hisilicon,phy-reset-delays-us = <10000 20000 20000>; - }; From patchwork Thu Feb 15 23:48:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193217dyb; Thu, 15 Feb 2024 15:50:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9nw3Pow3o+FlD2a/7U5NLleailDwYCtwf08/d4KWA+D5HGfcLd6JQWOkRNAPjbKn2xbjgllAVDkqM5mdD5GxAzMAX+Q== X-Google-Smtp-Source: AGHT+IG3qGX2tBt9iWWJdFgI6J5mFkIpHiPnSIt/zB5s7NIIenbobP18ORsRhuFTpVutGMnZJlBX X-Received: by 2002:a05:6214:2503:b0:68c:8667:f77f with SMTP id gf3-20020a056214250300b0068c8667f77fmr5095982qvb.18.1708041043986; Thu, 15 Feb 2024 15:50:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041043; cv=pass; d=google.com; s=arc-20160816; b=DxajrmGR/Kunt7hpghM8nySNQbFv90N/DlPCmuHUgG1sSKhad4cA8dRvNC7asF3Maf pvcIB6vspI80JZ8nJpgM4De3dQIsnkM8U1J4z8XIu0jXmU+9FTN6aHLoqiQXjDR/qAVT tIVuKS6gdLLTnGh/3IswuRsKVMxy4n9eiJdbTj7z8vpx+LoTXQo0q8/Jyb8l0NhyeUq0 QUjJmBEnd4TpX7l3nmBFh3xy2F786KZ1CHog45qtIN4JSe+IJQ5uE7Ckbu0MLQEkEsaC 0h0gEdHl25j5+LeybwBdzfD/ydV9sEKOWFUcN9J4GOOb3YFbzbwrhGmgyUnqzixvLUHZ 2uYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=ORhPo7S0wqL8iupWL48BPhP40HKUF4hfB/lfEdzyNCo=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=lsIF4K41EgRScI+T9xyRQgUizbBh2ano4TaogWfoNAHLpj7YTdJNBKXYLbrKmeM/1d JvoXf5gXlPn0iISkHTRf6/p8Yz0tQ20teZvfjg0InwODWOmUtJG1vW/Gxn7cNymOK+9I ospqafbrBpfndV9nMnDX1Kn0ALz/lYe52yDeUy0tJ6flBEOabNHq9UOv0IigUpDfDhv1 KYv9QEELeyShGr2g3UihSCUj6LkXIa2jeUuiJbIGzV/5EKufMqNeEGM/BK8R9cFDO2ho EC4pYu7PfNXSh4LIKCTPcYNm0ZWQlC4b++qZNQ8Q/4ALlI75pXLuMnQeK0ktdufVzS6l axyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uqWuSeSW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q7-20020a05621419e700b0068cc29e26e3si2539290qvc.267.2024.02.15.15.50.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:50:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uqWuSeSW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C78A51C22473 for ; Thu, 15 Feb 2024 23:50:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 567391487D9; Thu, 15 Feb 2024 23:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uqWuSeSW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4B1BC145B18; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=J81JbDeWtIWamxX/A30j5Xg7JstLBb1RhAzU1yv7Jkz5EzaK/olkA9IwwjDFKi1noYKI990XPy1Px2zwwg/8j2uFpEUJ70lcVjadMA4dqd67lohaaql4e/VlgCTB02ULZCHwhMBaB0qB+b85lsvRrjoqoFAOR1CoOqQ2x0I0H5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=dwG+Zq2OviJrgx903WZkhrqBopa6+N02UuKRpguueHo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c6Ybmfb2eOyTHbQED27s9ujPCfr1+Cs0GEkHjVhOG8d2ENWaluLGkgvASewbZMZllGQ4tk20mEt/5PiHXilfLqxsrYP81fN8DEvhrUEgZRTu6Bt5LkCTJM2CYgVkcTFEhUuvGQiN7T98SNBgXJcmm4gCLMHEAczBPUPDIBgL6mE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uqWuSeSW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id ECC9AC43142; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040933; bh=dwG+Zq2OviJrgx903WZkhrqBopa6+N02UuKRpguueHo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=uqWuSeSWrhv2TjeFqs8wGgEjOEp4Kf3BHin9D57H+IQH4H7yJ3wkYZEpWtt4qnpk6 bKEix9cEsHcchGvzD3uIDZTmIVC+wAoyk3PlL9tFRfmcZO4H4pMxjvk51q2+GxVz+E fP5e6YC03J071YSoAqhHwYUBJ24qcSbijac1E5b8NKGItA9YQCtRAfaJE3HhPxiRh7 oNtO5P/A9aP4wyq7cxCEc0GFpmgGZfZZ9p51HSNkY5M5+u5y934pn0BoQhDM5tlU8k F4KDDtSKvnKX1y1hmnQZPL9slQn751HDvgISf59L24A7vk1x2iBaOXuNtaEpDINFEJ wXAHJrYQdqTAA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D60E3C48BC4; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:56 +0800 Subject: [PATCH 4/6] dt-bindings: net: add hisilicon-femac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-4-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=3806; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=DJxzgsmEBlHh9lBL/uI/3VbIKC/AIol7DNEC5Vfzj9E=; b=1sKSohKyPR+wipV8br+qVxleQc6iVOq6lcuPziMYN1mgVhfUH/LZcoGTSerKMi8Cz3Tyhj/BP wPzw2KeWGxmCJgzdeNSAaYOWYrio54EqlcaNBY9DPLMllyoFHgae/py X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010846171809079 X-GMAIL-MSGID: 1791010846171809079 From: Yang Xiwen This binding gets rewritten. Compared to previous txt based binding doc, the following changes are made: - No "hisi-femac-v1/2" binding anymore - Remove unused Hi3516 SoC, add Hi3798MV200 - add MDIO subnode - add phy clock and reset Signed-off-by: Yang Xiwen --- .../devicetree/bindings/net/hisilicon-femac.yaml | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon-femac.yaml new file mode 100644 index 000000000000..008127e148aa --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-femac.yaml @@ -0,0 +1,125 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hisilicon-femac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon Fast Ethernet MAC controller + +maintainers: + - Yang Xiwen + +allOf: + - $ref: ethernet-controller.yaml + +properties: + compatible: + enum: + - hisilicon,hi3798mv200-femac + + reg: + minItems: 2 + maxItems: 2 + description: | + The first region is the MAC core register base and size. + The second region is the global MAC control register. + + ranges: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 3 + maxItems: 3 + + clock-names: + items: + - const: mac + - const: macif + - const: phy + + resets: + minItems: 2 + maxItems: 2 + + reset-names: + items: + - const: mac + - const: phy + + hisilicon,phy-reset-delays-us: + minItems: 3 + maxItems: 3 + description: | + The 1st cell is reset pre-delay in micro seconds. + The 2nd cell is reset pulse in micro seconds. + The 3rd cell is reset post-delay in micro seconds. + +patternProperties: + '^mdio@[0-9a-f]+$': + type: object + description: See ./hisi-femac-mdio.txt + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - reset-names + - phy-connection-type + - phy-handle + - hisilicon,phy-reset-delays-us + +unevaluatedProperties: false + +examples: + - | + #include + #include + + #ifndef HISTB_ETH0_PHY_CLK + #define HISTB_ETH0_PHY_CLK 0 + #endif + femac: ethernet@9c30000 { + compatible = "hisilicon,hi3798mv200-femac"; + reg = <0x9c30000 0x1000>, <0x9c31300 0x200>; + ranges = <0x0 0x9c30000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + interrupts = ; + clocks = <&crg HISTB_ETH0_MAC_CLK>, + <&crg HISTB_ETH0_MACIF_CLK>, + <&crg HISTB_ETH0_PHY_CLK>; + clock-names = "mac", "macif", "phy"; + resets = <&crg 0xd0 3>, <&crg 0x388 4>; + reset-names = "mac", "phy"; + phy-handle = <&fephy>; + phy-connection-type = "mii"; + // To be filled by bootloader + mac-address = [00 00 00 00 00 00]; + hisilicon,phy-reset-delays-us = <10000 10000 500000>; + status = "okay"; + + mdio: mdio@1100 { + compatible = "hisilicon,hisi-femac-mdio"; + reg = <0x1100 0x20>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + fephy: ethernet-phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + }; + }; From patchwork Thu Feb 15 23:48:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193365dyb; Thu, 15 Feb 2024 15:51:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZ8nSD1jQTrz7j/ntPMvL+I+XFhhyZ1HrSMCdZB4VxBps5dSa9FYggqEoyMibqHkq/xd9W/j8SExCTwyB4ugsFNd4u0g== X-Google-Smtp-Source: AGHT+IFLu9r8DATJpGQkyCLYuHYpDTjWBF8/shBLbprYzI1+vf3lXuP6jGAKmrWJQMMO40aCaR6/ X-Received: by 2002:a17:902:da92:b0:1db:80d3:1af8 with SMTP id j18-20020a170902da9200b001db80d31af8mr4780086plx.19.1708041073334; Thu, 15 Feb 2024 15:51:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041073; cv=pass; d=google.com; s=arc-20160816; b=KAlfNDdp8v+BcwTgoSsIobNJ1HwtWBIe/tOyIKRJVqt5XdpJmhFPGbf0tM8AMur1cz KyZbG2s+UBVdr8esJ2c1yR6JwRJZ8s1vjybBYw1wVBkdGdC+egV0gbgSOJZO9j+8pHej 4wN9D1RWww8URboVXZcaOf4nCUdX0q8TcPmpqxwYbExyZ5OMdPuW4qBHPRFe4kXUZkS0 GDL3P4hIVl6CzRUhJx/6OQiD76PlRG0VGRlo/ftOwDihB/vP99qH585/qf3UsYwHeLjI gokpR9SagnR2HDaP4r7fhA+iNrUVvsSKoGLpcrjosyBXf6B+0LX4sJMuDORDyKwg8tj5 CzFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=7mi/oAti9uc+JsnjjjpWvSnTdRhCdO+I/4P7fLOMzkI=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=zaHSj9sKhozveJOz8SUoqyscirr28sTT5tRpMLnzjaT1fxwNar1mqSs9GcTwk8fvvs TvAZ0r8rMh7rY2fOsMCrsHKV+uqXDDRgh4OykoqaVzORo2db/Gx7wgAZyZYnrdOQHDZ1 trWOos3pJOlX3EO2EfSA1dh4DU9tRsZ+Z30eYBdjIX9dcVnPEcZuQh5Ncrl1kAHmRgmQ oMeSZmdwVcwRgBmjFNM7BEHClLDIFQdDk7WG8+0ypzKI936PiPRSGb5Pyl80qfWyYNFK oEMCaGD8AJ+emRitnaSSKIZaCkLQNnjgLZZWAygIzCNz2OfHG6l8SvJRGVW3Z5s8hd/w mGtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EjV5lrI+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67856-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67856-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e12-20020a170902cf4c00b001db3bb0647esi1887262plg.605.2024.02.15.15.51.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:51:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67856-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EjV5lrI+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67856-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67856-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2AAA928165E for ; Thu, 15 Feb 2024 23:51:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 172F0149009; Thu, 15 Feb 2024 23:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EjV5lrI+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 853C7145FF7; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=SODQ+330RXP8SqpC+HvLxJ4XUQW7GGWJZOAMg8eoZ3e/iwlSQUxqfrDwD42K5sSdsd/efBsbZWw4HUvMf8o8IYikFLac/FCVUhLA83oEdWdGthA1QRnxtgGsI9O8HxG37nj/V65v0oTdwM3/NQFMpkREGcCgPrP088VVkXCVuRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=7qpxZXKNb+gP/tnwm1MPhxnNC2V6cxuGt+MDwFekHBE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MfPpamaMVmOGNijzsi1ZVpEv5s3iMQ3e1Z9iTEazgayzoBUGgFDvrsKPlnr2DZyd1UCpTdRH9q6p/00a8ff56J/GQGzYS3BzO07aLB6V9HgMITt5hPY/aKKjO/wR8yAgOv7IDWHJyHLbzMov4I9gKmNb2+6Aitdjz5tU8DT877w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EjV5lrI+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id F225DC43143; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040933; bh=7qpxZXKNb+gP/tnwm1MPhxnNC2V6cxuGt+MDwFekHBE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=EjV5lrI+Nbo8KQHsgSYFmIm919LPAnRjnY/Lb7bl9Sm4i5kCpANSQMqQKKhiLklag 6oGFCUd+x0IoSzrlo7VsZnCd2NiArO5q0tj+RqsKDBb4OFBlYfl6Cbk1Oxyu+GBEQx q9Y5jyLoRw9p+CdLx749kikZxpQ4MxQH9ZK0QSmTTp7NZwna+/VKoIjrb7WStoEW6k ReLMP4nNUSjS69MeHe6Kk0r+eqRk58+0Tq61qWXL5Wp9yXU9MDgOPwLiWk1m3kKPyz 24UMPvaGdzN/N7cJebc03jSvUQrNNQDsAGvmtXCwsBaRMGQ+ab0NHJf7ExYeqRd2rX UvmtHG3MSPe+A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF464C48BF3; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:57 +0800 Subject: [PATCH 5/6] net: mdio: hisi-femac: make clock optional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-5-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=720; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=CtG+9hi3qtkcoLBxP9QyjEY1uFXvU0ZodPoAkWSo5gY=; b=QYzvW4P72cPyxM2AbyfFSJt2FcuisIbXKazfDqJmZjikuu0+PGGVfGoZIQp9ItG0BfwcVzdZi zTb/uLSG2FlAsq98RLH7FSW6dh0A+HZLyd1VlGAeE4umBRxqA2QYOY+ X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010876677138492 X-GMAIL-MSGID: 1791010876677138492 From: Yang Xiwen The clocks are optional. Signed-off-by: Yang Xiwen --- drivers/net/mdio/mdio-hisi-femac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mdio/mdio-hisi-femac.c b/drivers/net/mdio/mdio-hisi-femac.c index 6703f626ee83..a2620b200381 100644 --- a/drivers/net/mdio/mdio-hisi-femac.c +++ b/drivers/net/mdio/mdio-hisi-femac.c @@ -93,7 +93,7 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev) goto err_out_free_mdiobus; } - data->clk = devm_clk_get(&pdev->dev, NULL); + data->clk = devm_clk_get_optional(&pdev->dev, NULL); if (IS_ERR(data->clk)) { ret = PTR_ERR(data->clk); goto err_out_free_mdiobus; From patchwork Thu Feb 15 23:48:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 201847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp193373dyb; Thu, 15 Feb 2024 15:51:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUnuUnUgG01sKOyy0I3ZJwROc4cCiTvjSyNbvl8Migr3ODOoBRVzu2Uq8g19rpjkzOco2UDTFf/ilXPPpUkul+QFBYagg== X-Google-Smtp-Source: AGHT+IFXfD24F9/H/f1/xL+nHm7Jn8AKI62XR9uEK0XNQJH4ZyqoKYgzCn8y/TZvajKK5/ayFMvy X-Received: by 2002:a05:622a:446:b0:42c:3c63:d3dd with SMTP id o6-20020a05622a044600b0042c3c63d3ddmr3307658qtx.10.1708041074122; Thu, 15 Feb 2024 15:51:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041074; cv=pass; d=google.com; s=arc-20160816; b=m+1f0pc0BXxjVITvlAmtdLFus99eFVhyzvNYdyU2/AU0yOEJcao0odqEScCwvcSllh qFpLDae1tNpvxbgM3jH1HKSP/CRJLsdroAZ8Lx7zv+sfKfM+SpI12kaS3xuWZsv84rBc y1XSwF2uqWu0L36lEcEGgktXp6NsDoo64FTDO0I63qjvu9lbn1bdUNHh5Nl+V/HNW03R niQTcdS7dIrnLoPXIv2OTNvlHlsWVXIgwOI7X+URoxfntVUGsIr4NmJ/HKxvD1XfVs/c joA8mLiHZFv9DFyOPMWNykUDqWdMAAdFhz4pXAK1p91asXnCM0gUhdphwarTdbvDxRDo C6LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=Z3RfvhDsnbazyrrw5E2RTylD8XTsI6CqerE9NUnM+zQ=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=YGSNb0b0qi3ocoLjXLdUSmQ7inJKNkMK9xfhoknC92FNiSx5reMQx0ml5IoUoD5dUX zSvg7fVl1TT4R0rDKssZFQIaJsApX+gLlNmbmhOFlOTRzAlU5rJsSbTBTFs4Mx2o2mLW V4btE5M99BrY09xilBPGgVlp7GGYQxWX3Pf/7ppFl3kvsDGwFpweo4tBBmW5Ez9V3h1s DRp+qfgFrgbXM7kNnHb+PGZ1+iV1Glo+7X+jlVmNgF+jUNalx1ajRUtgmHNjg8wr83bV MSupdrRmy6qYuyLj1p8MMZfnkBxF0xnxDDYt85XjDcIAgXKdD2o8/uaxd9SmlNxFe472 rB8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xf5w3rhj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67857-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67857-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p11-20020ac8460b000000b0042bfe8c5a23si2435741qtn.137.2024.02.15.15.51.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:51:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67857-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xf5w3rhj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67857-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67857-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E46971C20A68 for ; Thu, 15 Feb 2024 23:51:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1732F14900A; Thu, 15 Feb 2024 23:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xf5w3rhj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 86C8C145FF8; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; cv=none; b=c42syIDJHcdWqyg5Yssci7r+Wm8ErrrbR8q2WgQp6HM0VAQUQLti/+ot5/sTziwtfWWXoy45snpZ3xsn/e0h75DVoet56Zot8szrKmDvYKlWZrrLJc8FCjOCZUmwM6JFe+ha/AyNa4SXlsW3KbeEuRbz6NTbaVTNdT3RBGxpluY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708040933; c=relaxed/simple; bh=vtgSM7xn4vYZIyKOKZORU9qlltEYS8vu8vuE/kDiVUk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m0QMskCsYYddEx9Ag2d49rfQmO4KUHpw1M0URjWzkJ+cSutSQTrwhs/xMMk+Xmp5sH2FmYZd/RKdun7ADbjhXRlPWuavYG365oqh3BYk4wn2DcEJbeq3nS6tP3omvDdrMmCe37UdbLU/SlwD0lks0lZqgeDeVMpBUKwnJM+OQJo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xf5w3rhj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 08C31C4166B; Thu, 15 Feb 2024 23:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708040933; bh=vtgSM7xn4vYZIyKOKZORU9qlltEYS8vu8vuE/kDiVUk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Xf5w3rhjEC8bRteZGEHMpzGCqkl6ePcJhzqPIoS9TzUzgbATtIqztY0O9LC+yhwzp 0z4YBU8+n3L1jloTBUTxZKKshE+j89nL5oCto7q3Frt36IqQer8FFmhuh338Z9YpV7 +dxXNEPBZdsvpALyDmo6S15VG79ztTg/wmiUlCqIEgaXRAVFKkTs3FVg+gDN8zcSgE IHN9P/9V38XQNt45cTvMq01zlLX/9UgjG6+nRg/+pd/xqYynl8q5yPh1FmZtg6g05A WBKjEo2e9//z7WYUe7MCEHa1Q0GXjEJllmiVQTh2ZWMslxejsAxQ1s7IK2YWwM5Zjc AvBPoSkkEepVg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9FD3C4829E; Thu, 15 Feb 2024 23:48:52 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 07:48:58 +0800 Subject: [PATCH 6/6] dt-bindings: net: hisilicon-femac-mdio: make clock optional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240216-net-v1-6-e0ad972cda99@outlook.com> References: <20240216-net-v1-0-e0ad972cda99@outlook.com> In-Reply-To: <20240216-net-v1-0-e0ad972cda99@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708040932; l=878; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=F5kHPrADx5NPlmJ1rkhSxa9z6ULOnV4wfItxfOuEBlU=; b=6HbzsNnWkAYAwbHHS3hcLyUnHF83hhbSg5L2TOq54PaHAnk9Ka1K2HjwZiA7DlrEZPmXrP4v7 jwdNlMUA7JtCEQ1ky6bp7ra5L0oVS5+wgJ8w07CFJ6/fkTIprmD+tCa X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791010877358001821 X-GMAIL-MSGID: 1791010877358001821 From: Yang Xiwen The clock is optional. Signed-off-by: Yang Xiwen --- Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt b/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt index 23a39a309d17..cd37f43abd45 100644 --- a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt +++ b/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt @@ -3,6 +3,8 @@ Hisilicon Fast Ethernet MDIO Controller interface Required properties: - compatible: should be "hisilicon,hisi-femac-mdio". - reg: address and length of the register set for the device. + +Optional properties: - clocks: A phandle to the reference clock for this device. - PHY subnode: inherits from phy binding [1]