From patchwork Wed Feb 28 09:02:25 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: 13575079 X-Patchwork-Delegate: kuba@kernel.org 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 0B7852D60A; Wed, 28 Feb 2024 09:02:26 +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=1709110947; cv=none; b=FYT9Z6PGhdKJwG8XvBBKQAgckczcyKvUXCj/aaN8XoZmmF0HXo+t+0URqx5a6ydcxNQWqoNmcmUpmJyB7ppIknPIoy2uJzZ2XD3rIVBakm9ZU/T4qUlzJF4rqaxwmGzz31A1EWX08uJoD/iGJcnv0Gd69TlsIHv7kS5cY3/WPRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=3nX8fP3l7Bt65toEN0CdGwFHFH0sX3inF2oQP8On+7k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WaV5Z0+cTL1191d0sySSCVmaISdWtBfj5bmDZvDPX6XO/lSYrLTdb4oOU4TI97TXX+vFqrassPeMxTdfA+RVTQJxhcU2Y3B5+HvncvtFL3bLMFIvAe02dnCKpRSawU6wWLKik/THbd9LCl8k3aoFVXqXHLFD4KF6Tw1RB0cD2R8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZcoILyx5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZcoILyx5" Received: by smtp.kernel.org (Postfix) with ESMTPS id A4B60C433C7; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=3nX8fP3l7Bt65toEN0CdGwFHFH0sX3inF2oQP8On+7k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ZcoILyx5mMJCQYbABt/JqDHzxG0DgwoUAOd8k5VlH8HPdSIdlIPnuXzS7NBxdmK5/ 7pkVya1TArhpyByt4IGtrkC9u9axXvuWzhlH4zZNJNwY/UhrWTP/qOz2ZCP/f4rF9j q5h006p+DOwR4jNy2ioZyBEvvTbZA88VOlzf90fA35Po3VpIa7ipRJwYWCXOan7N8n ypCKhuxFawl7uVkNf2D8Hzs0gfcz8LDXFIaeH7tdN0qAZorfwBVOjYi/vmJgojQWhf Ec2Pzav2daDHbTERNg66wP1zcdj18ZcMQXgzH3KhX0nbDdaaGUR93xtdzuMdyr6WG5 FnpTTN4i/liJQ== 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 8872FC54E4A; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:25 +0800 Subject: [PATCH net-next v6 01/11] dt-bindings: net: hisilicon-femac-mdio: convert to YAML Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-1-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=2517; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=stv+a/mRLJaLswc2WeXjirfjJSRDl5txIs38K87wIhs=; b=i1QaEYVqRNc6pkZ4uX161aYrm7OD2YSAFoOgERKGJfSFK2ZjbiYbDqqEDwyy5cIIYKnLtKI6J HK+Uzvx/VM+AbdcME0LUNo5her3rhWVIx26dTSG3v6MXupJM28hiP4z X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen convert the old text binding to modern YAML based binding. No semantic change. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac-mdio.yaml | 44 ++++++++++++++++++++++ .../bindings/net/hisilicon-femac-mdio.txt | 22 ----------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml new file mode 100644 index 000000000000..36def9d5eecd --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hisilicon,hisi-femac-mdio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon FEMAC MDIO bus + +maintainers: + - Yang Xiwen + +allOf: + - $ref: mdio.yaml# + +properties: + compatible: + const: hisilicon,hisi-femac-mdio + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + +unevaluatedProperties: false + +examples: + - | + mdio@10091100 { + compatible = "hisilicon,hisi-femac-mdio"; + reg = <0x10091100 0x20>; + clocks = <&clk_mdio>; + #address-cells = <1>; + #size-cells = <0>; + + phy@1 { + reg = <1>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt b/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt deleted file mode 100644 index 23a39a309d17..000000000000 --- a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt +++ /dev/null @@ -1,22 +0,0 @@ -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. -- clocks: A phandle to the reference clock for this device. - -- PHY subnode: inherits from phy binding [1] -[1] Documentation/devicetree/bindings/net/phy.txt - -Example: -mdio: mdio@10091100 { - compatible = "hisilicon,hisi-femac-mdio"; - reg = <0x10091100 0x10>; - clocks = <&crg HI3516CV300_MDIO_CLK>; - #address-cells = <1>; - #size-cells = <0>; - - phy0: phy@1 { - reg = <1>; - }; -}; From patchwork Wed Feb 28 09:02:26 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: 13575080 X-Patchwork-Delegate: kuba@kernel.org 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 0B7492D05B; Wed, 28 Feb 2024 09:02:26 +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=1709110947; cv=none; b=R5XMmYUMzAFZ+0TRPfca94buN9/v25ZiIlM5cuFc1HWP4az6R5kIoqsOHn9pioozwBXGbGQjPjJW4S55oAXf5xkNPLkR7q1pC7HwgHQ1aT7xqGjGLwc7wsGBHQAb+U2vdpCpw6OjMrNH7Sb5IcUGc638jGgoeo6F7VOYFrCw43E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=7PtIg95ncCvxMHh4b5Xw5GAtbDAZ3d89g3e/YJ0Tj88=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ne2ZgfVMhUnveQWewRNVjU/Q2aCX5g77mlu3DXrVSqwV7FMPoqQPmHhwAN377bZ/4pOD0uuLUQ0PmdqQPkPDfZTDsUr2RNpDC9rACuPG0XiU5yt7SVOdkYj8bTLBplTn1MZsDlZt15yNNHJNzXOlaiO/ZSD/GcT3EiXze+nklxU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KRbbelZu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KRbbelZu" Received: by smtp.kernel.org (Postfix) with ESMTPS id AC6F5C43394; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=7PtIg95ncCvxMHh4b5Xw5GAtbDAZ3d89g3e/YJ0Tj88=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=KRbbelZu2r8ZCHAd5jUeZ0yh67kw68WtN+YvbLpk9GJCnngaw/UBY/ZADgK1fXATW SU5KoIRzdPAryS2LN7Ok1cA9jl2gIORohYINRJkoeTbWUUZl70ymTcarR2CUzGQPk4 HG1XMF78w2Vb0vQof3vqjtRW/WJYMg64hpWR8iFUgoBwYBlMHHFV7JsAaV8VNE7O7o t3wUJkl1aFr2aPLptb02+oQLsvLfroorRrWuzDxSlKrnO65gzxMerSvXZnVm4EJPsE cUPOT94exHCXaDgEIYUWNewqXRwckFH6UgtwUpgswBm8IuX+8jc8E85FTGowKvaUP4 z21U7ICLuvgwg== 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 947DFC54E41; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:26 +0800 Subject: [PATCH net-next v6 02/11] dt-bindings: net: hisilicon,hisi-femac-mdio: remove clocks Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-2-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=1118; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=zFRj07D287wM/dCKue4SsEqnuuC7qPQ9ydZbNJ2lxsQ=; b=wccrlFqnkY16QlFTzC49WXlslqsmco/SZT7/gLpofD10XQu6VgR2J4xCkaDkluMduEWYG/6pp 2YAoLrTNZSVAutvsGFHiNX4r76Gf7flSLqzD45CUlrqNZpViWR6tCgV X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen This integrated MDIO bus does not have a dedicated clock. Remove it. The old binding is wrong. Acked-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml index 36def9d5eecd..dea1bcc27381 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml @@ -19,13 +19,9 @@ properties: reg: maxItems: 1 - clocks: - maxItems: 1 - required: - compatible - reg - - clocks unevaluatedProperties: false @@ -34,7 +30,6 @@ examples: mdio@10091100 { compatible = "hisilicon,hisi-femac-mdio"; reg = <0x10091100 0x20>; - clocks = <&clk_mdio>; #address-cells = <1>; #size-cells = <0>; From patchwork Wed Feb 28 09:02:27 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: 13575082 X-Patchwork-Delegate: kuba@kernel.org 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 0F4392D610; Wed, 28 Feb 2024 09:02:26 +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=1709110947; cv=none; b=W+LkQb25yEDNy/24PkqQ2VREV7k910/FrAffT4sl81DSAf/z5mRC2pSAh1QGb9GYR3U6CgJKBR4UoDDiWy3B+YwRJJnkl9a7zP1lIoSapjvVRAOA1OxO4eq8JwUf9Eo2l2/DPOr02RIwDNELpl/8Ejar2OsrdkHqHWR0tl7IZJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=vu47BKfN+xFcRDfbkn3C1v8zrm2ugq1RBZELrpt63GU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s1PIG+i4Nao85xZoZI7bKsxzR5TTVoMXu4DlVAFKD1hF6bdVSMdfrXw1a0D8/VV8vQqAZbpvBozCoYijVtLH5Zks6JmnwI8NB5jHaM2lDHgR2DCw/X27AEtSGf0v+FS0W1UvGNNFp0M06PJnRFXdHh6P6S1D/rBqKa/On2IGwvI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YhDwBDjq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YhDwBDjq" Received: by smtp.kernel.org (Postfix) with ESMTPS id B923DC43399; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=vu47BKfN+xFcRDfbkn3C1v8zrm2ugq1RBZELrpt63GU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=YhDwBDjqPHjjmCBz+Pz6TXhKQ/v34FOjQ5G47iqDwww8/Dux63x/aN2naYaW8uX9l 6xBluAY86MiAun8IZWRhaS6DTt22bJcRSSP9O+PXSmFSKQcfKxoTWCBGFSMl1vBHpa +cXP9/JA2mUgFCCcE4D4bzKw7HbVbpuGSZiooPDLi61QCojookTLYqh8/KUzdK2Hle aBOYB2kf6MALwoEXZbzNLSuDVEf3ri3Pp8dnyodqSitDzFetXt3vf4egKHRWMycDhX skGfSWH18152bDEQNVBvIzkrriMU7S0zXcDp2LWRQkTyzHdVZmT/EPHf4E3+yaeW5O g1L+gH3F+DJBQ== 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 A084CC54E55; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:27 +0800 Subject: [PATCH net-next v6 03/11] net: mdio: hisi-femac: remove clock Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-3-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=1802; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=kdWAr70dNlF5sryokQxZlrJGOk8Z9nw7ekwi0I/9miA=; b=4KDFlw8uRnWDCV0oL9YwdDB9rRXWJ5tNkYoGPZ0DDnSRRRi3doo95m4UkX3SRAuBbGy/HHmez A+8fIjxCDaZBfMWknwmofXIO+9PHMm/C/wMcqNclcXurcoFqgHK5OZy X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen This integrated MDIO bus does not have a dedicated clock, remove it. Signed-off-by: Yang Xiwen --- drivers/net/mdio/mdio-hisi-femac.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/net/mdio/mdio-hisi-femac.c b/drivers/net/mdio/mdio-hisi-femac.c index 6703f626ee83..faf4688eb1ab 100644 --- a/drivers/net/mdio/mdio-hisi-femac.c +++ b/drivers/net/mdio/mdio-hisi-femac.c @@ -5,7 +5,6 @@ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd. */ -#include #include #include #include @@ -21,7 +20,6 @@ #define BIT_WR_DATA_OFFSET 16 struct hisi_femac_mdio_data { - struct clk *clk; void __iomem *membase; }; @@ -93,26 +91,14 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev) goto err_out_free_mdiobus; } - data->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(data->clk)) { - ret = PTR_ERR(data->clk); - goto err_out_free_mdiobus; - } - - ret = clk_prepare_enable(data->clk); - if (ret) - goto err_out_free_mdiobus; - ret = of_mdiobus_register(bus, np); if (ret) - goto err_out_disable_clk; + goto err_out_free_mdiobus; platform_set_drvdata(pdev, bus); return 0; -err_out_disable_clk: - clk_disable_unprepare(data->clk); err_out_free_mdiobus: mdiobus_free(bus); return ret; @@ -121,10 +107,8 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev) static void hisi_femac_mdio_remove(struct platform_device *pdev) { struct mii_bus *bus = platform_get_drvdata(pdev); - struct hisi_femac_mdio_data *data = bus->priv; mdiobus_unregister(bus); - clk_disable_unprepare(data->clk); mdiobus_free(bus); } From patchwork Wed Feb 28 09:02:28 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: 13575087 X-Patchwork-Delegate: kuba@kernel.org 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 519AF2E859; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=GpqC8+iIaQNu7T0QFL93vmqHi/b7f9xNy4FhvmoJA/PyTB3Xnqy7Acdc7AahX6iKfU7tMkAB19pjk3NoAY9ixFVLZs3w6BfGz4UFPhve39R8/c7xLCshIbIrbUcGkfAoz2yD+1cJDJBwf0172ZT7NsJIzQJXOczteMzYSsVrV2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=11Chm52DkDm90Z+9rURQw+ckrvXjmAjHB8kGkDZExho=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lcNwuYf8++SwFNFTw4UxpF0MISZyBzEVmnre46BRrzxSoJcWSd7xcncb/SA3jpbre+Vk9UFmrb34/FLYm2LPUEyo4sVwtY/sq8RfcDPQmBSiqpyr2lk2zDYcpOZ0Z0A/JHA9Qp+QLm4yJeTBBz83fbKrMADZFLkr9Q7x1pbgcKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ehr1NEPs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ehr1NEPs" Received: by smtp.kernel.org (Postfix) with ESMTPS id C9B72C43601; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=11Chm52DkDm90Z+9rURQw+ckrvXjmAjHB8kGkDZExho=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ehr1NEPsvJnkpT1F56mtP3Px9dJYkYGB1oBKVHZPEj8rsd6/cyvPOjpysBjc2DBWq 5eqrrCEUZtmEE47r1hzl2qGnXNoGU5KZWxOcBhOmx4BIQnlp68AhIbub8cvgYfhWX7 H5rhjiFQO7hoPh7AhVBqTA92i/l57LbdXSxBkphVCoOskMLfGXPCFIGzDvZVjnsfVV S/SDpjmKB4KHCFdUkprlXnKoV1DUpNKDJqABoZOP+RQnMeZ17yLD0r4rgf6+CGWPaZ /HFGezNT4luWrUiJ8SnECHJYh8ULYSvkPLo9D08ZsIuhznriRZDflCjVDYJWoTMx/K 0LJfgcnq8tQuQ== 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 AE5FBC47DD9; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:28 +0800 Subject: [PATCH net-next v6 04/11] dt-bindings: net: convert hisi-femac.txt to YAML Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-4-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=4845; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=PSEYqEoYzlBBu6yX+HTyEhlHFF2ZYTm301mnnQnq38Y=; b=ZP584DCe7m2JsV2i8t41Oc/Bj1Kq+fSH3N/8PxPPsyp++ETHiLDLeL1UpRhPuRsFdrWujvWQt vUQNDB2HqcADmTzrtd9dSG3y+D/ioASCxCIHwVpApWhcwq0OohvsMmo X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen convert the old text biinding to new YAML. No semantic change. Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac.yaml | 82 ++++++++++++++++++++++ .../devicetree/bindings/net/hisilicon-femac.txt | 41 ----------- 2 files changed, 82 insertions(+), 41 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml new file mode 100644 index 000000000000..016e9e409a30 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hisilicon,hisi-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: + items: + - enum: + - hisilicon,hi3516cv300-femac + - enum: + - hisilicon,hisi-femac-v1 + - hisilicon,hisi-femac-v2 + + reg: + items: + - description: The first region is the MAC core register base and size. + - description: The second region is the global MAC control register. + + interrupts: + maxItems: 1 + + clocks: + items: + - description: MAC main clock + + resets: + items: + - description: MAC reset signal + - description: PHY reset signal + + reset-names: + items: + - const: mac + - const: phy + + hisilicon,phy-reset-delays-us: + description: PHY reset timing requirement (in micro seconds). + The integrated PHY usually have a special reset timing sequence and must + interact with MAC controller to accomplish the entire reset procedure. So + these properties belong to MAC controller, not PHY. + items: + - description: pre-reset delay for PHY + - description: reset pulse for PHY + - description: post-reset delay for PHY + +required: + - compatible + - reg + - interrupts + - clocks + - resets + - reset-names + - phy-mode + - phy-handle + - hisilicon,phy-reset-delays-us + +unevaluatedProperties: false + +examples: + - | + ethernet@10090000 { + compatible = "hisilicon,hi3516cv300-femac", "hisilicon,hisi-femac-v2"; + reg = <0x10090000 0x1000>, <0x10091300 0x200>; + interrupts = <12>; + clocks = <&clk_femac>; + resets = <&crg 0xec 0>, <&crg 0xec 3>; + reset-names = "mac", "phy"; + mac-address = [00 00 00 00 00 00]; + phy-mode = "mii"; + phy-handle = <&fephy>; + hisilicon,phy-reset-delays-us = <10000 20000 20000>; + }; 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 Wed Feb 28 09:02:29 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: 13575083 X-Patchwork-Delegate: kuba@kernel.org 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 3B76815C8; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=JXM8pQtj4oYVCHdmuy16p+X9zTOGegyHp0SKJ7aui6GqsQ1itsdcdestWEf1xYv2cTMbDAaf/EbCvoPMsjd8KJ3WUIArnqH1gnGUiXa1+j5IIz+ZXvrrN2RsLuPeTcRBSk4ZoK2vyF2QA8Z5DI/98Igi6zY0Nyop385pAN0KsRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=PVTUps5QghY5pZZb1/WBlgZZuf3lpAztu7mSutrIHP8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Fedd/eWUPNr0u7aX1yTK4E0rSOdfigvIBzDJRJWFT3MayMvfNNCifQ8oUrPO5d9wQ1o+Q2ASaD2jLkLqelRXr4eQp8JsdLjWZX+8pzgOXj4bkKt18oqStYrLPTWO4vOR7CETchdkjhnUaIYaDY/EHPckeAUIslqQNfZWSBa96AQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kedKpLZz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kedKpLZz" Received: by smtp.kernel.org (Postfix) with ESMTPS id D8A62C41674; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=PVTUps5QghY5pZZb1/WBlgZZuf3lpAztu7mSutrIHP8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=kedKpLZzMGAWyL25bEKf22W5entPmsZl1g+ESOpLK7woVk1o9m/5vTZjP+Rac6pg8 46yy4HqGJdkiTmwy5HOUqu9NYm+Grmyq0uS/gRpV/x6gFc2qSp1VWub5suLroxPmkL yURMwwlvdbY/Q8Hv+smFF7s5D/8loH0pfRwKaBg618xZYdf5DeMGQr2PGrd8bus3wP nxVbcdKm+Sa9KVMq+x9AuzSaGFtN297ZaJnXhbT7w/SYODnGEZJNZ5+eu+xWOSUnpN G2Gl/5F6ngnzw8qU42MmAbU2i7g9F2FdV3w+HtBgDYVx/mSJrC4Kc6NG+WWu7w6QAF k5+UU8r2zSlqw== 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 C1F20C54E56; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:29 +0800 Subject: [PATCH net-next v6 05/11] dt-bindings: net: hisi-femac: remove core specific versioning Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-5-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=1304; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=QaLk+lI8wjJQd0lZBh2cmavdezy+qKZvyIpwbApopOY=; b=l5U1wW1kB4lGB6SEiVqjtKkYCq6xwMOu/+uEl3FnZaD8SWhssPq8y+GR5HJB9WRVS9mUOBF3S hSoU8mLvtiMDm+eSIIVtjBnCUvFQjIfZ2P5Rd0igQM/4494n5xVi07M X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen The version numbers are not documented publicly. The version also does not change programming interface. Remove it until it's really needed. Signed-off-by: Yang Xiwen --- Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml index 016e9e409a30..be8e34b48243 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -17,9 +17,7 @@ properties: items: - enum: - hisilicon,hi3516cv300-femac - - enum: - - hisilicon,hisi-femac-v1 - - hisilicon,hisi-femac-v2 + - const: hisilicon,hisi-femac reg: items: @@ -69,7 +67,7 @@ unevaluatedProperties: false examples: - | ethernet@10090000 { - compatible = "hisilicon,hi3516cv300-femac", "hisilicon,hisi-femac-v2"; + compatible = "hisilicon,hi3516cv300-femac", "hisilicon,hisi-femac"; reg = <0x10090000 0x1000>, <0x10091300 0x200>; interrupts = <12>; clocks = <&clk_femac>; From patchwork Wed Feb 28 09:02:30 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: 13575084 X-Patchwork-Delegate: kuba@kernel.org 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 3B7B02DF9D; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=nFjhR+wxdMoZhXK+CVrz0lSn1fYR9ihYF/RcDprLXcoNgfiVPdKAXh3T02SengoycLVFeBDlUbWOsQ+nvF50n93BZEBZskW4N6e6c5ySBtJjV4jfItoOnxF8GTdbyQCxdtGSybWoh+oWPYtZsLYPHkNS89U3BVOzA5V1AF+mbNo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=tOs31KYTqoxrPKz/Y05lViH2DSx10Kk1ejHawTz0Dtk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kA2l+/8ICXIoKYykx1OlR1K24PKStjkh+UI34CXsCptjA8oG033Iibl5N/1sbYMPfqfdOmzYDA17EGHQhkeX74W3ViGyiVgRmfycLgi4ZpPikNspHMHe3MlyaNry+Ybyb2CbqrL4+J1nQi/hqSIK38MtXny3wWY4ZQYPEpj7Uoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a39FbhhC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a39FbhhC" Received: by smtp.kernel.org (Postfix) with ESMTPS id E08C8C4167D; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110946; bh=tOs31KYTqoxrPKz/Y05lViH2DSx10Kk1ejHawTz0Dtk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=a39FbhhCU3m6ABccgExQ2FPaKnG/4JoDw7vn0E6zJK85qhFTZGu8wIHiCPS4jjNhF 8WYVQBysghItmUtaFb2tCIVpQhCWohuweNlMt7LKqSpKE5xAvUUdAhLyFvruOvsDbE D90y3rp9ZAhV4Jb8tbcpIZDGq/o5wMjZ+bNpG+R9EhUD00LG25wWGinUGoOAUr5aDf oSAMAQmQao36I1N8rB44ZRkyYdvWMt3K+g/lmyNH3A+OQ8cKop4STD/P2GOONfcICp s0QtTEQD2fqwABg6eTojSioeeJLpSgQaMdB2wKeiu3PcGQ8ZB0qiIA2dbxXZw38G/K ZofJCT5rm0Txw== 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 CE782C54E41; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:30 +0800 Subject: [PATCH net-next v6 06/11] dt-bindings: net: hisi-femac: add missing clocks Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-6-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=1390; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=SAqU1dlvXmk1RmH1J0egzZj4SE6kA1y4eeXVDLyRO28=; b=MGeGh9vcJucfrOUy4UwkspwQpi6g+ejOsZjXYNkCGbkGxi9GrfpIG3GLwKNpiugvRIWqvDzaP POnOPWZIkENBl/NuvWCi2MNDZF/rqcDOSrXw5JMfyzs/kW8gyXs7teC X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen A few clocks are missing in old binding file. Add them to match the real hardware. Signed-off-by: Yang Xiwen --- .../devicetree/bindings/net/hisilicon,hisi-femac.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml index be8e34b48243..ba207f2c9ae4 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -30,6 +30,14 @@ properties: clocks: items: - description: MAC main clock + - description: MAC bus interface clock + - description: PHY clock + + clock-names: + items: + - const: mac + - const: macif + - const: phy resets: items: @@ -70,7 +78,8 @@ examples: compatible = "hisilicon,hi3516cv300-femac", "hisilicon,hisi-femac"; reg = <0x10090000 0x1000>, <0x10091300 0x200>; interrupts = <12>; - clocks = <&clk_femac>; + clocks = <&clk_femac>, <&clk_femacif>, <&clk_fephy>; + clock-names = "mac", "macif", "phy"; resets = <&crg 0xec 0>, <&crg 0xec 3>; reset-names = "mac", "phy"; mac-address = [00 00 00 00 00 00]; From patchwork Wed Feb 28 09:02:31 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: 13575088 X-Patchwork-Delegate: kuba@kernel.org 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 5D22531A83; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=dg56972apL/Ju2Dl7501nxLLVC4iUby264Fll14zjAF1w3YOwmjh56TpcnRjCJmljah5pYZ18qHMK7PfgVKeRRijUTDmGmGrk+97vFQdIu/8PXkgB1LxGeERusGnnoxtdshWXDBo0EQS6Lr6YaufiVyCz6L0YPMDVQM1M8ur89U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=AwiWhyYYPQ6J5Nsxc1RcXcfAeBDJwdSxCWFxnx8UpOE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L0iQA0MYenj0Gbf3zVvAlU+cIRbwAODbT3FbVCA2D3mwIhh2hjIjSczcx82BmsDHwn5Ti8TWKeIBGWHKgtuycdq7BR0aqPl54lXoCk/GDTP6cv9PB3q3jMBTbQvlNJgmI0KYDtSC2EJKZF00JL3lX8vHACnM3DWgM52XE9VLtVU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TxXoc0Eo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TxXoc0Eo" Received: by smtp.kernel.org (Postfix) with ESMTPS id EB21EC4167E; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110947; bh=AwiWhyYYPQ6J5Nsxc1RcXcfAeBDJwdSxCWFxnx8UpOE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TxXoc0EoB29C+ytOFAg+pPsjhb+xBC0jvwepynh3cX7mMnlIg5/h8qEs8K0KZkxjP 2oO4igRgVtceE5KwMf8iTNccByS9bufsyICws3sA4d9+amE09GLLlO5+OEoFyIB2Dy +ZVG7UlY9xRxAkHfugCqz8wjENQeT8C0VUq3VBpLygLXSYU2MQR6KNi+7JK7RJtuVo GEIfuP9rXJlH5lr2rUD07ZmGwyjdC+emCItOn6G2uiniqFbG77v4/o1TcRGTzKqXwt 4aO2y/aMM1H/bRAiArLEkyDLjY0iYxAoz2Om4zYD+ZcwTRA71XtsWHC+ThbqBRMlnY xv5arJzybeZHw== 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 DB361C54E55; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:31 +0800 Subject: [PATCH net-next v6 07/11] dt-bindings: net: hisi-femac: replace deprecated phy-mode with recommended phy-connection-type Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-7-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=1121; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=UkM6cazLUUcGm7V+UelgyTmRZYNnC9CwRUbl7j+gA44=; b=f5Z5JfMhFzIZrioziMkhpJB/CbSksX9sZDGw/4dP0dQYJHzTEaL2jb0GFBOtYQQ1738WyKZ4X GWICiPgPUFOCNGnp3xFLFHiUbPWx0lzBribGIcCjE8z3ivD+rsr8FPV X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen The old property "phy-mode" should be replaced with the latest "phy-connection-type". Signed-off-by: Yang Xiwen --- Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml index ba207f2c9ae4..6c5888897876 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -66,7 +66,7 @@ required: - clocks - resets - reset-names - - phy-mode + - phy-connection-type - phy-handle - hisilicon,phy-reset-delays-us @@ -83,7 +83,7 @@ examples: resets = <&crg 0xec 0>, <&crg 0xec 3>; reset-names = "mac", "phy"; mac-address = [00 00 00 00 00 00]; - phy-mode = "mii"; + phy-connection-type = "mii"; phy-handle = <&fephy>; hisilicon,phy-reset-delays-us = <10000 20000 20000>; }; From patchwork Wed Feb 28 09:02:32 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: 13575089 X-Patchwork-Delegate: kuba@kernel.org 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 5ECD931A89; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=ukv/CZcRFP9ozWyrNJFWC40xwAXmP1AH8W0Q9xKLST/F86f+YMQwV3IPWltLrFArAXkTqzNsE7K/gNZdvGe5iSInHigjPfZkyfb62XaXN1Uz8a6oJiFvWZ+Egsu94tqy/V1N341OSmSvx2B9L/8cbbdAOagHmFz9lAxgwOkJP14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=MNYEXN+BFTezcIlzVe0klHXNpA0g3TpmZO9OeiTVtnA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tJvGch4dIobqdaisEuMvg+zEbGYphsD/nl3wYMTknqWpXR755x0X6xBWXLynTu0Gc2ePTgbEEbz5XqNDhepYtv5DsCP6SrLCYOc2ZSIDdwNWS0z0xqSnM/MTo4g+pSEbv4sRecsfkepWzUXNM/yP3q4uofgL4pMJGNvGoGADenQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yg/ULCK2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Yg/ULCK2" Received: by smtp.kernel.org (Postfix) with ESMTPS id 0BC23C32784; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110947; bh=MNYEXN+BFTezcIlzVe0klHXNpA0g3TpmZO9OeiTVtnA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Yg/ULCK2NLoe4vrLCoa6gYUCIT9mNdF4KBd/yxBkpM/8RxAKZ8HEhsGRgC4Hj/TAA RsIRI0Wq6LTka4MbwH+PE3KSFIkIv0x6mdGdDAyp8mIRgor5f6isIbH6m5D83g3FqO qDRj7lBeWGnh0L3u0oY8TMZLIQapTG7I4puTPdVq1T8k8L4fM0pnrGM9LE57lVT9/R z1J3jtf2oUJuFcCb4A6h3BJfb00V66yqQTgt2f6tvM3Wpuqr53vm9g29ipMgp2WVA6 h02sHzcRYgn9UeO18ZkEI9Rn7UpJkQMbTk+5klWQjmv0nWU/zdzKoz700RM6b3J3gD /ycg5GIoZuvFg== 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 E759FC54E4A; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:32 +0800 Subject: [PATCH net-next v6 08/11] dt-bindings: net: hisi-femac: add mandatory MDIO bus subnode Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-8-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=2257; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=MD9OppYNChwYfG+o7jC+6/9qGjd639+9Q/OQeo2lPDE=; b=GZzpszJU5Lk1WHcFpWaL2FCo4+GVzam2ZcPlapSzzm5ZVst/XdgO4bRL4RTS5n3gUO4uYubDk Rq5HheLT4ZpDfvP6WYD5e+85IW39MwnY4q7DJZi800L5aNEq6csMTd/ X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen FEMAC core always has an integrated MDIO bus mapped in its address space. Add required properties '#address-cells', 'size-cells', 'ranges' and MDIO bus subnode. Signed-off-by: Yang Xiwen Reviewed-by: Krzysztof Kozlowski --- .../bindings/net/hisilicon,hisi-femac.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml index 6c5888897876..d56ff8538a86 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -24,6 +24,15 @@ properties: - description: The first region is the MAC core register base and size. - description: The second region is the global MAC control register. + ranges: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + interrupts: maxItems: 1 @@ -59,9 +68,16 @@ properties: - description: reset pulse for PHY - description: post-reset delay for PHY +patternProperties: + 'mdio@[0-9a-f]+': + $ref: hisilicon,hisi-femac-mdio.yaml# + required: - compatible - reg + - ranges + - '#address-cells' + - '#size-cells' - interrupts - clocks - resets @@ -77,6 +93,9 @@ examples: ethernet@10090000 { compatible = "hisilicon,hi3516cv300-femac", "hisilicon,hisi-femac"; reg = <0x10090000 0x1000>, <0x10091300 0x200>; + ranges = <0x0 0x10090000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; interrupts = <12>; clocks = <&clk_femac>, <&clk_femacif>, <&clk_fephy>; clock-names = "mac", "macif", "phy"; @@ -86,4 +105,15 @@ examples: phy-connection-type = "mii"; phy-handle = <&fephy>; hisilicon,phy-reset-delays-us = <10000 20000 20000>; + + mdio@1100 { + compatible = "hisilicon,hisi-femac-mdio"; + reg = <0x1100 0x20>; + #address-cells = <1>; + #size-cells = <0>; + + phy@1 { + reg = <1>; + }; + }; }; From patchwork Wed Feb 28 09:02:33 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: 13575085 X-Patchwork-Delegate: kuba@kernel.org 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 3B7F32E419; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=cmK6L70FWwqTyMTMuuMGc6wkgLK+r/HoJffSbrPpk1W989jMhHoVAltfTRNyY3qrJl6M/guomjFnIwL7CL0cWVbgSd2gLI1ufDazLBDcsZqQ0I+ULbuaQ5Tva5kFmzx5k9J63X/Ld15Y+kPGGv5Zh2sjs0v4LoaVNxN4Q1+vsZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=bb2xZt+30fqdXEdZ9V7XtTzgRG4KIIUrzd6gD3RtxUU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RHuDxbADUBdRAZEhcDXeM87fvz7uW03P2XsatOGu7vXewydjUexBRRXHvm1MKEBMTCvqk69QxeQqEYxtH+NUKk87fo/CeeIcme+7M1ezGdQdhkCpRU+uUcD9wt1I8cGc15VwJKNR4kyYjq6DXg7t5rxCbXMPgsMMTqRiLo1s9oM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IJe6AZHW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IJe6AZHW" Received: by smtp.kernel.org (Postfix) with ESMTPS id 112AFC32785; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110947; bh=bb2xZt+30fqdXEdZ9V7XtTzgRG4KIIUrzd6gD3RtxUU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=IJe6AZHWruFwI13hV/BLDkWWC4Zg9e7yGwGjIDoLUN55BQxAN/UCL0DKWQCNVrukC MSKCvLnlS+HRKbW+WoTMdGvDAIjiEkTY3xJpj/b73aOJMTHaGD9wFATSILSk9QbqZq wh/u7QqUofWJQb5DoIexBVqz0B2w1bU1mcWldceIM/3t/17Vz4lhRCPAwOg6UTdnV3 c0IQQGM0g4Q9Gos3R34KZplvZV7vzlYXwCr2JMGKKSXrbzzhjShMnkOAkzlWk2Pt89 zcuMnU+8k8TKa7HmZs1Qn4B3Ex55Jk83dSYCJE0Vk9A86/ViL8SkQ96FlIVTvp9Qfp 5HHCTojUQOEaQ== 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 F2B2BC54E59; Wed, 28 Feb 2024 09:02:26 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:33 +0800 Subject: [PATCH net-next v6 09/11] dt-bindings: net: hisi-femac: add binding for Hi3798MV200 FEMAC core Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-9-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=785; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=COJmDTQSvWrCuczgOVd8svTjkGxYhL4n6fAjqOWpCZY=; b=BRBk7J2qE7S7G9bi3QzqNa6odKfDqKNHbp6g03RevnuAm1PXeDcjwIgnbEdnYWEFqlTmbOifA 19dDDWgGvMLB/B+5oXomn3RkmpCFsYbrlxZX/8FveA2dg6TOXj8zObp X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen HiSilicon FEMAC core is also found on Hi3798MV200 SoC. Document it in binding. Signed-off-by: Yang Xiwen --- Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml index d56ff8538a86..0e5e62d2b8aa 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -17,6 +17,7 @@ properties: items: - enum: - hisilicon,hi3516cv300-femac + - hisilicon,hi3798mv200-femac - const: hisilicon,hisi-femac reg: From patchwork Wed Feb 28 09:02:34 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: 13575086 X-Patchwork-Delegate: kuba@kernel.org 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 6C84932C89; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=fZOtva4697n74/rQ3CeaxXdrHIBObONNALpy0ZbuPihS1eZ5ZD7JWX+/9b1h+Q28SBjC4N7yzElGk99JYyxXSqd8U/WmQZLcnT/qRw8Ufub4LSAMEaUkXf5YYlWX8Fb84ra+DZDZvkzU7DWwL7MyX7AwYzLx2DVLCsuW6FWBmJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=ywfgATgm0aypyBAKMXF/GcEFRJ1Eq1C35G1C0msdK2A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mpy1Ka5SuA5xoUybyewOXXmGUOwxl+/kI89mTgoNnL3kTMQIiaU+yF+UggR2XlxLl2quHT+VAes7vrfD0RCyvh79t6ih/al3bkvwIMIHaE4fVc2OlI5us4T3MaxIo9pLrXQCCqgpK9Q+Nt7GNANCxlL1AmpfUsYpbsTl23uS8KY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iMnus8JN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iMnus8JN" Received: by smtp.kernel.org (Postfix) with ESMTPS id 1B007C41639; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110947; bh=ywfgATgm0aypyBAKMXF/GcEFRJ1Eq1C35G1C0msdK2A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=iMnus8JNl8hg8ghv241W0MXxME+nwlsS9jPgyRefGyYH1O6n+mrOSPD3c+y172cVS Iu95099nB0Z5Ngv/Roltazjdykd79TpU6oh+1O0I1F1XMEk3a5FcWMn2AJa3QbICAu zl4NIqY11I9fkKNimn0VH6ysIUNFC377HEUKmw+xxm9uh1/0rainVQaRCkkh2JzGfG 7cxsNlRdtMpzL3BUfqIb1sszp2CvrimzZewA8AVxqHzY81Sb/Ti6KB/+6kAEv9zeE+ NFX2fhQsxL7NCws7e1qGRYkz/yll99aNsrwT7oIpdhKZudWAzMCFDBoFNDX2LkWcmD BCGEnqB9TtlPg== 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 0A0C9C54E41; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:34 +0800 Subject: [PATCH net-next v6 10/11] net: hisi_femac: remove unused compatible strings Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-10-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=925; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=XyfB6lrJfMVpxxuFf+mKc/YVrgV78wZeT48FTY5wNC4=; b=KmG/XzGwjdslAfqMDhYtttbOdzJ8IZPE82McrlvVeKESHLF+ri2yhsn6ce4awRZJjXiMLciG4 pmefFAqTF/ICav9k6kucrhy9DsT2/ku/kLq3viPYG/vv/1jcSpvI+CM X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen It's hard to get the version number for each FEMAC core and it's unknown how the version can be used. Remove them until it's really needed. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index 2406263c9dd3..3c5c095dad05 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -945,8 +945,7 @@ 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,hisi-femac",}, {.compatible = "hisilicon,hi3516cv300-femac",}, {}, }; From patchwork Wed Feb 28 09:02:35 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: 13575090 X-Patchwork-Delegate: kuba@kernel.org 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 6C89632C8C; Wed, 28 Feb 2024 09:02:27 +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=1709110947; cv=none; b=uzWFjSWwDuNRCX1uX9jVZ4QsLcRGXS8ENU7GsrBMMub/gMKiZc7k85Y0MBk9XtCptXmosT1AiIZZbovBDP8vVw4fa32oavHrggLjcTNrAoEnsaqzilIi4tVGq49skNse+yvD45ngyAXD3nQKbTrP9aUHHtNtk6TmnqSCX09buP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110947; c=relaxed/simple; bh=PXHHu4UnBXig8tiL8lcq7ENkSw5+VgNGvWGNzYjLFGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZHBRjIchEbR0n48DlwYap1wcHLY34MaeVlzUp1RGXujML1hkauMepYjE0g6pXl+n4HRaL7tgIeIAx8livEcSi2LTwlsytJOPF73VqzwEETU8iigltR0x59NK775NYeG1YOi/DpseEVgJiCZWExA1gUE7uLuuEb0G2iCcUDdmdNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZpnUeDn4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZpnUeDn4" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2684FC32788; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709110947; bh=PXHHu4UnBXig8tiL8lcq7ENkSw5+VgNGvWGNzYjLFGg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ZpnUeDn43pXJsdW6Q+St97El+Rf4R5Lz20ByYQbi97RBWc7IuNg9tXk1cA21Blg0I /jLBE+tgCQ3vgxyDfwU+KqDE4eb5TaC/Tt+JJO5/QDRkHgGEhQRkyN+VM0Ojwk3rwI GZ3ax2sDWWiNJoXnThYcsV8bXxFusyaSPKwawq1kVpsgp9JPy0/+HChQ/MIl1qP2e1 4RtfJJdOsSs7ZYcB80dgBHAsS7WzjgV5/cw9lUBAxOuek3xMGfFcMEMfwIno8WjDxp 3px9het+H5RcdmKsZhpvkE/FcQ3hv5zZXXk0G9o+tjCyVImcT9As4QGCwmt3Ou7V7q nJXKi1JI0ptjQ== 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 15757C54E55; Wed, 28 Feb 2024 09:02:27 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Wed, 28 Feb 2024 17:02:35 +0800 Subject: [PATCH net-next v6 11/11] net: hisi_femac: add support for hisi_femac core on Hi3798MV200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-net-v6-11-6d78d3d598c1@outlook.com> References: <20240228-net-v6-0-6d78d3d598c1@outlook.com> In-Reply-To: <20240228-net-v6-0-6d78d3d598c1@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709110945; l=7225; i=forbidden405@outlook.com; s=20240228; h=from:subject:message-id; bh=T0pLeFl9jyHKBrah+/aNNUzmDQQT/tOrG8U7+A+g/0k=; b=0HWZTzxfJeKsn2nkox9W1RdD8bb9U+Zu/7SbKMscTJwYEtEn6W5OIEj3bh88BNlie7b0NPWt2 6/yQ8vz4DzOAEtebw6rxyK7HI+XME/1QFqUM6pJjdHD5G1dZUzulkDn X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=KAWv6ZzFsT54MGllOczJgFiWB+DuayEmyn24iiVVThU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20240228 with auth_id=136 X-Original-From: Yang Xiwen Reply-To: X-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen Register the sub MDIO bus if it is found. Also implement the internal PHY reset procedure as needed. Note it's unable to put the MDIO bus node outside of MAC controller (i.e. at the same level in the parent bus node). Because we need to control all clocks and resets in FEMAC driver due to the phy reset procedure. So the clocks can't be assigned to MDIO bus device, which is an essential resource for the MDIO bus to work. No backward compatibility is maintained since the only existing user(Hi3516DV300) has not received any updates from HiSilicon for about 8 years already. And till today, no mainline dts for this SoC is found. It seems unlikely that there are still existing mainline Hi3516DV300 users. The effort to maintain the old binding seems gain a little. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 74 +++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index 3c5c095dad05..be2bfd06c8d2 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_MACIF, + 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_bulk_data *clks; 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); + clk_disable(priv->clks[CLK_MACIF].clk); /* 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); + clk_enable(priv->clks[CLK_MACIF].clk); } static void hisi_femac_port_init(struct hisi_femac_priv *priv) @@ -768,11 +786,12 @@ 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; + bool mdio_registered = false; ndev = alloc_etherdev(sizeof(*priv)); if (!ndev) @@ -797,17 +816,16 @@ 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; + ret = devm_clk_bulk_get_all(&pdev->dev, &priv->clks); + if (ret < 0 || ret != CLK_NUM) { + dev_err(dev, "failed to get clk bulk: %d\n", ret); goto out_free_netdev; } - ret = clk_prepare_enable(priv->clk); + ret = clk_bulk_prepare_enable(CLK_NUM, priv->clks); if (ret) { - dev_err(dev, "failed to enable clk %d\n", ret); - goto out_free_netdev; + dev_err(dev, "failed to enable clk bulk: %d\n", ret); + goto out_disable_clk; } priv->mac_rst = devm_reset_control_get(dev, "mac"); @@ -830,11 +848,29 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) 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"); + ret = -ENODEV; + goto out_disable_clk; + } + mdio_registered = true; + break; + } + } + + if (!mdio_registered) + dev_warn(dev, "MDIO subnode not found. 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 +921,10 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) out_disconnect_phy: netif_napi_del(&priv->napi); phy_disconnect(phy); +out_unregister_mdio_bus: + platform_device_unregister(priv->mdio_pdev); out_disable_clk: - clk_disable_unprepare(priv->clk); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); out_free_netdev: free_netdev(ndev); @@ -902,7 +940,8 @@ static void hisi_femac_drv_remove(struct platform_device *pdev) unregister_netdev(ndev); phy_disconnect(ndev->phydev); - clk_disable_unprepare(priv->clk); + platform_device_unregister(priv->mdio_pdev); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); free_netdev(ndev); } @@ -919,7 +958,7 @@ static int hisi_femac_drv_suspend(struct platform_device *pdev, netif_device_detach(ndev); } - clk_disable_unprepare(priv->clk); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); return 0; } @@ -928,8 +967,14 @@ 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 ret; + + ret = clk_bulk_prepare_enable(CLK_NUM, priv->clks); + if (ret) { + dev_err(&pdev->dev, "failed to enable clk bulk: %d\n", ret); + return ret; + } - clk_prepare_enable(priv->clk); if (priv->phy_rst) hisi_femac_phy_reset(priv); @@ -947,6 +992,7 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) static const struct of_device_id hisi_femac_match[] = { {.compatible = "hisilicon,hisi-femac",}, {.compatible = "hisilicon,hi3516cv300-femac",}, + {.compatible = "hisilicon,hi3798mv200-femac",}, {}, };