From patchwork Tue Mar 5 07:51:10 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: 13581786 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 A11707E795; Tue, 5 Mar 2024 07:51:12 +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=1709625072; cv=none; b=JDDgn+Dc6uh3I5RwT/6CvCJ8OuMtqIsWgfMMgALALrlusqHQFqXaDRyIkKy7cZPuZ5eppC9AXmBQKexwnmRzicu1y35Z/4Ex4U3PnKHNV6615FPPoclINtkAhk+65Qt3zw8iKzSS1vuMJCPr4BtuZog5+UNdXenx92ghzNFgvbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625072; c=relaxed/simple; bh=3nX8fP3l7Bt65toEN0CdGwFHFH0sX3inF2oQP8On+7k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YZIEghUv5KUr8U/I3bfx7G5I1ZGIQiB6cCB8RUY3JVaEYPvsZASmpdx9dLwT7qmFXVhVxkBY90ult6Q+TdyFxjSKj36JJ0Dh3UAqm2G7aeeX2f3uiE/2RI5BpearhK2r1L/jLonePjhdfAsduDodoTQ13e8wElKWb7HriRDmJXI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MEvfZzt1; 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="MEvfZzt1" Received: by smtp.kernel.org (Postfix) with ESMTPS id 44410C43390; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=3nX8fP3l7Bt65toEN0CdGwFHFH0sX3inF2oQP8On+7k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=MEvfZzt1qfKHWBPwaJiwRnSi46xS4djLNOUc7r3aWaVJfM9qN7ll2jm2bCPUiDNXo H573k7JSwjS4JIZrRjgoYPys7+ujQ32wZRtgzzfJk8o6IC6qV1txFQ+NSC+CA0y09t UciVsKdXjUzZkKmOXWnX5xxZ/6ls1BROseg69MhZymxdk3MmYt/mRklmm2fXWDfyYX 2kUQMQmpCIlddFJIN+lIEQFN2GvQrg/k4Gp+aySi2l1nu+KnK6VlXWLVNibgTeNVsJ BN2YZw69RuaF9j6aqGg7ctfyeqaPkPVNSz5FVISuwby/AK8gQ1vSL7ctiaXhLW4Sfk SVWs0zlug/VVg== 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 2BEA2C54798; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:10 +0800 Subject: [PATCH net-next v8 1/9] 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: <20240305-net-v8-1-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=2517; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=stv+a/mRLJaLswc2WeXjirfjJSRDl5txIs38K87wIhs=; b=mljznLqdpJB/j6Qo9uSrnVVgf9fHHL62cVBkYnL0iq7zSHiVZhXn4ictBDiBxD9Yg6EfgL9o6 ycB2UepQilmBqCPFc2qfuECxxQMpnajTWPHICuS5KNG0YpHculaH9I9 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-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 Tue Mar 5 07:51:11 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: 13581785 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 A10E318E1D; Tue, 5 Mar 2024 07:51:12 +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=1709625072; cv=none; b=JE8VVDnW57inrFrITNfImjlLUOAzCOEcnw1K2+OH0ByBY6x7y8Ts0lg7w+1+90rWoqznuuIAN78hZTLuYSf+Tm3aTs8lIu1aOWUwBj3KbDF5Gkj8VYQF2TtA2XsWqVkKbhBPQnN+Bp0GCshqlbu26D3xnuLnYQh/vxgxtET2jhg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625072; c=relaxed/simple; bh=7PtIg95ncCvxMHh4b5Xw5GAtbDAZ3d89g3e/YJ0Tj88=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lrIGMPokDor86HGDAJ8Da2qpAyuwSke0ET1FqIDuyk3xtjyq8xzvhiWeqE5lnHNmrbcMaqavx0C+1vHoTdduio+fQNJDsUDrWmdREFzsZo4ABWjzyxaVpdHR/j5Pxt/VqlLTBf6Z4PbeU9T8W7jxtVk5hxqmvkTvUjflYphFyhY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GJY4LqPQ; 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="GJY4LqPQ" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4D811C433C7; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=7PtIg95ncCvxMHh4b5Xw5GAtbDAZ3d89g3e/YJ0Tj88=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=GJY4LqPQNmaI3mCPhhtrJx/x8oL9I54ycWY1vTD1Ye04ugdovyeO5FHAXWF+66yYm TSjV1jkmr+4jD/2UarluMNxXAezXS5pib+3Ws96BmbvABYXwwh7qDpaI4jtAriss7X dXL4+qAqUjS2KxHtj2+MyLI1Qbt40xfneaeH7bRHkJoKWCnNdtc3qhaQsAcBKIn6T6 NR2dB0Va/Ha+UaegGgsO+PfF24uxNxoL8+8DmxFU8MPuWEMOQtkHaDUZQzFoo9DM5q F1X4jga7YoChIRiArgmVVuf/t2qJCNNXKOGJJM+MrkqzywEIlCVO5eaNKriX9G4rCv 2lJvRWiQXB7BA== 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 36F7CC54E55; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:11 +0800 Subject: [PATCH net-next v8 2/9] 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: <20240305-net-v8-2-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=1118; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=zFRj07D287wM/dCKue4SsEqnuuC7qPQ9ydZbNJ2lxsQ=; b=7ZM4LlkywvpT9Sg2uxbbVgwRYe4NPQiS1o5MQjDpWXhrIUZxZGr4XbmI8qnJxc9sNvNQakdDF Nx5LVi1axk8D/vNnIk4rx6nGwBtNvo0krW4GnkCj7E+1tOoTRdSCKzr 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-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 Tue Mar 5 07:51:12 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: 13581788 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 ACE647E79F; Tue, 5 Mar 2024 07:51:12 +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=1709625072; cv=none; b=JrxUxLzguCXJKp3CFIuwcFnDhW6EAa+0WVAt3wO8SbqFZtqqyPRkzPvADB0Pjm3C6+pmYBiVqj6Uwfk//rtxWRb+y5WbhOBCayCmrD7N6nrKgA+cjehMRnU59X77hUkUkQpapFNmSBcs+UfDsR1CIMWLXVeWmM6Lg/upB1CkjKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625072; c=relaxed/simple; bh=vu47BKfN+xFcRDfbkn3C1v8zrm2ugq1RBZELrpt63GU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=R4x594pb9lTc4XFWKhh/mqfH2maU7pdedoecq0WYnb+erpgK+N5pdmOd4E1QzVib6f+mbIncMI7mpnGzQQ6dX0ZqMKE3ndWi3JeIBo19k6/SYeyd8hVWWaDoj2FqD7Ee1M4j37Smgdgb1LR3Iz+ivIzY1TTEJNcbdya3fxDXNpo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gGFLxhcc; 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="gGFLxhcc" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5F213C43394; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=vu47BKfN+xFcRDfbkn3C1v8zrm2ugq1RBZELrpt63GU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=gGFLxhcc+1VBu2Ct0DwKdbPy5M+XwFG/851rEpLneaqneDzYqj5m5cFb2ohL65CC9 K2zJj2fcNiRliyVKvd0pMP9cX6sUHr6Hoo9HdQVF1QbwyLPvzZ6gyH5E4a2nlDGYJj GJmOmKNKTjzaT+Ck4ldwqNU/IDmaoegDCDCKmBWR6WSbN78pItBVRU8SYKll1XwWF7 8+4DMPmeibcpF/BnPGlUPlTzx0H0JWM/aOpnVtSjE+N+xK5MXfntaBA4DksczRKNzo P8zJc4wYMJsAnT7QL9TAWieKxLAfGPLuCbIpi46Q9N/NZ21O0exmO7Xu/i9iVvlpFy LNZ5dCVAyKZuA== 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 414B9C54E41; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:12 +0800 Subject: [PATCH net-next v8 3/9] 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: <20240305-net-v8-3-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=1802; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=kdWAr70dNlF5sryokQxZlrJGOk8Z9nw7ekwi0I/9miA=; b=/mqF9KbWpKm3quAcbIMJUnUN/Of/eercZbXE8jFyAKYih7pgUNSV2jfukyep/5tDJ+hxqNU1w jXQGTX6sDGrB8JpL6HlpMt2ku7FC5WG/CsjssjREG7OkhLtctYIbEQU 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-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 Tue Mar 5 07:51:13 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: 13581787 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 ACEA77EEE1; Tue, 5 Mar 2024 07:51:12 +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=1709625072; cv=none; b=WfqgWWF9Tl/hxd/gmiWLpkS70VthdxX9nGFMCpvdvUsq/ImFxrefD0RhAI9EfpgeY9bvfeEER1nR7NQOW5qnWOoDwGmaPBThBW5JZjcUM6MKRzPps59MNY/96m3qUYwYzPpVQFVTXYD6QK3p/v/Ddn4nLN0BCCOvJKH+7tFdIOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625072; c=relaxed/simple; bh=Mv+wjnpaqjDPxpuudt6hmB75f7eiz4A9FMh4nOvAHfM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VNKU0qnDcc+9MKrSUrS+WWO5+PgAEAcvDUMecQVubn7bl/9YJSrneOQE4HaIiQKXWRKl9/rOcX3Vva5b89qO7lB+KK7BU3J/5ZOnZTw2QWtSS7y56XMFz29HLwiHc49eVEnr/whW3M7FXUvY3YGKOyOzAvCmnlFxhZc8KQ0U+gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DkQ1Exn2; 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="DkQ1Exn2" Received: by smtp.kernel.org (Postfix) with ESMTPS id 65E9AC43141; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=Mv+wjnpaqjDPxpuudt6hmB75f7eiz4A9FMh4nOvAHfM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=DkQ1Exn2ph24kwJKEFuSXiYt8NAtOo6jMFJ4V3RhGQI1BFnWpc/M1XdyRXTeSyq5X 1/+Gcr/9CodU/adj2q7UaowF+dTp/5GRMIV8wz5celFq/1RVEkdithERcMYjRbh3tw ycH4r1vQYkMO4kxkataFIWuBVi4azcLyyngl7csrbpshttNx/iZ/kw8XoQGkX8dv55 k3jgYuWeRWdghX4GFDxe12pkacUeg/KfinFw6aviHs0Vt1hCGPQkeiFKIsi+4I3I0i svkEx4VmVX+1omCt05qlhX+TNYs+Z1Wtl8nCofAtAQt4L6w43cSV1PRm/3x69AExYC 4wDfLcB0Wo/iQ== 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 4C3C6C54E5C; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:13 +0800 Subject: [PATCH net-next v8 4/9] 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: <20240305-net-v8-4-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=5303; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=Y31W+EBTMTCB+g3jeFUiVgLCSMs5MTAdgXmolrXBmrQ=; b=Aug3S6YnjDFnp7BTPJCvSRokxnH2+7b4NbmaQAIOQ3Bk9h2Py39VAmu2/07QSeXI+bIEvJ2ei QlvRVFG/7XMAFTZQTUMtT68HYeXyjgdO5m1i+ULdcE0GAiDmyadd1EX 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-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen Convert the old text binding to new YAML. While at it, make some changes to the binding: - The version numbers are not documented publicly. The version also does not change programming interface. Remove it until it's really needed. - A few clocks are missing in old binding file. Add them to match the real hardware. Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac.yaml | 89 ++++++++++++++++++++++ .../devicetree/bindings/net/hisilicon-femac.txt | 41 ---------- 2 files changed, 89 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..ba207f2c9ae4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -0,0 +1,89 @@ +# 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 + - const: hisilicon,hisi-femac + + 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 + - description: MAC bus interface clock + - description: PHY clock + + clock-names: + items: + - const: mac + - const: macif + - const: phy + + 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"; + reg = <0x10090000 0x1000>, <0x10091300 0x200>; + interrupts = <12>; + 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]; + 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 Tue Mar 5 07:51:14 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: 13581793 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 E97A97EF0D; Tue, 5 Mar 2024 07:51:12 +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=1709625073; cv=none; b=SdSvFKtU2FVdX6Je/W87ur7dGaUfgOyq5MdS541nUKJGnhpT1BO5SkoVz4rCGJxkHLCP/wfjEQOR0Winf5NVgR9BrPomIBwHZ/GoleHL7PeU/FaF5lJsRkBm/G8/sDr7Ao+/rgIkgoZ8XfFHTCy2yo1Cy/3223qLlnf2GFR2+zQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625073; c=relaxed/simple; bh=KBkbSBUYWsrzUyqKx9vXlQcN5p5QtPpYZGQe08xtkko=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AGPkMkaQxfTUsoLkZz7AoTRnBfXqL1+cKmseExyZ7U+nkFWn6I3DDX5ytWAcs+wwfTNc6o7QHJIfGEJ+IvSnuFkf7gudHT6I4FcUuxrpOUc21QZlKWWsqEx+C+cdOdQngohJdDuXph+a5bLKFm3hC91GRVMHpm4fJmD/Dcx8pwg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dSmLJ0x2; 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="dSmLJ0x2" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6D8E2C43330; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=KBkbSBUYWsrzUyqKx9vXlQcN5p5QtPpYZGQe08xtkko=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=dSmLJ0x2jw/a8G5bOS9gRrUXubX3Js+M+nLXCqI++/e3HToMlw2O1KlD7NwBFnCfc rjwjwRsXfLdvZyROHZ170flTpA8IEbvnmi7LGPye3osyvUSKz2BlQgNc+dQXRCY0Cc hyNIRWoswYgN58n7ukSRrzQx0xyzgnQIW2o/vTcY9krDgJs8dXgQpugq0ibcuwy95O SAOSNHkb7ZXz87vxCR67w/2qLWsEjcb9A616/GwVwfLpo3JTWeIF6ea8BZDdPtrUBe R+XCI68D6rvwswqUrNblG9ZnelgcxLlmXNNOfMDOc8t9ZNN4VZtax4LyjEfI1nAr8o jO5bU8DnIlwVA== 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 586F6C54E58; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:14 +0800 Subject: [PATCH net-next v8 5/9] 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: <20240305-net-v8-5-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=2313; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=S6obhoBKcsATY4ri5n0BubHFcd7WZY9xaY4+Ts8DAWM=; b=slQY/8XIF3Ek9MZs/Xbnyg3WHsVOtruFWskH0YxEQvGj0R5Ay7isYcUAFiGhPU0SpPY7svZmm eMsI1UC5fv5AmxsePl1JfvpD8OmlakH4tjAXUgkNIubTl+rJ3VLhWDw 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-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. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- .../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 ba207f2c9ae4..ff6b090ed34e 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-mode = "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 Tue Mar 5 07:51:15 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: 13581792 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 E980B7EF10; Tue, 5 Mar 2024 07:51:12 +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=1709625073; cv=none; b=q6ktrwyLygp80TvSoAcKptWXN4SOzihvJ5C+5//CDfm7hsA57qVLjKjI8EqnCKesnAQ4ua7Hy/iLRYrg8vn5KndfpxWas4JmE8jpQSH/PcwIggSmYQjvhSOMsSvqNTmOXNn8cV0cXCfBpj+sxGmwJruwVt4tMOXPB9Zgs/2gs70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625073; c=relaxed/simple; bh=gkNA5inb3gzyItpjdDTlzlxSK3vaHY84ceRjoy9uGP4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NiQMsGEh9CuU26bxm72D7+SUWDQzHuQMz7LoVv3RFejPU6LsH7gigJjbMlozZmFVfwu0VPtIowrahmg7E+me1hmFU4qyMqFFpSwpHXKERjr4udu+g4AC9HUhhRfrZPNMlNF80qDUItPYrbKTrLhNGM8qCzGakaKAY84W3yeTxdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZTCXQn3u; 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="ZTCXQn3u" Received: by smtp.kernel.org (Postfix) with ESMTPS id 754B3C43142; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=gkNA5inb3gzyItpjdDTlzlxSK3vaHY84ceRjoy9uGP4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ZTCXQn3u6QdWpy3Wi7JsZVX7JO/AQHvrrbQEYvN3odNDv/5D6F+CQNcHlsNj9RfRU kq3dYd7oJE4i6N6sBiLBORo861JBAwDNaeQXjxuSNSu6CPFelAKbbKTlLzqgUksaUT 7KePu/nq3UQVyafQS1ljZmIS+jcbpHiwSSIGWh6wzKqPi/U9GZFVm2j73CTSaOTXAq RYZt+meNFCu2mSG+VDrH0mRx6KYr6Xqiu6NP3wk8XXgYmhMCXCvswonPlj+zsPM0Cl 5iBdnO/y6hK+9o0Kk9s72QL+jGOlRZp2PrlUHoYbjk0WO9H6LqGELcLWU7acdE5L0s d1EueQJ/3icLA== 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 65001C54798; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:15 +0800 Subject: [PATCH net-next v8 6/9] 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: <20240305-net-v8-6-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=785; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=oXZR+lwkSXsM/Qjr88QbgRS9lNfkCukHdVr29JA1ajo=; b=itcoDlV36tm20BWjf6gNCXqr5a/EwpHWRe9U6NEoM3heTV4jVsE2/xYuSJdjKLdVwoCAAziuC 2v7rlQJvjBCBsTybsyTlUvayc42I/YXv3ivj56LRXaIRyndawqolbAt 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-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 ff6b090ed34e..4f51c5ec90b3 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 Tue Mar 5 07:51:16 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: 13581791 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 E98847EF14; Tue, 5 Mar 2024 07:51:12 +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=1709625073; cv=none; b=uhgZasJXeXwHRr9RY2ZwpW2VHkA8uQTygaOh3jQnATxNxp2l/o1gupscH1JO4oOpvk7AGLfHWKwZItXrdPg5MWcDVnw4KjqVVB+YqSStElW47CKo8l1RQ2qBFgjvqZWfKQg3GLJhkWMwkJC0tmCuHwZEVhOwQJ6ob8eMwS49Y+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625073; c=relaxed/simple; bh=9Khh/08IFLqiyY4llHeSF9dpSr+y2mbDaYQQexylJdQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k04WKjelqdd5cjwbCWrNDZrAH6fI/2LQB71Zts5jdpYmLF5Io7IZGmtP/8VbC6xqtMdx00CYoU5gCYFt77sWbNTId2IuN++uk4rgJFwwm1MhEutJDQXMsNMtR9sK6n01C/olHwRN7wsPGxqwdxrF/WozAakWoM69awx/+zCbPuE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BTGjPqr7; 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="BTGjPqr7" Received: by smtp.kernel.org (Postfix) with ESMTPS id 904D0C41613; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=9Khh/08IFLqiyY4llHeSF9dpSr+y2mbDaYQQexylJdQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=BTGjPqr7Jt3wu8tr5nCeqHVu9ii1ohkz/vocm8RCYU4G0zuuk2vgsOPFK7RX6eE8C wOcZzSi07snQNwJFidVUaHe/qeV5sh/3tzVOd5xBICaaT9SucDJh8IYlMh0ZqqyR/M 8nuIpWVXxxXhwIa68zMlAiOQrDqpRgTc0AE47k5GtcNwCwxA0Ec0Xto9USnHyQA+TB SzMf+OL0GbpOw8cSf5LJGwX5AxdMdIQZmnW8QhAvI/gHe5/YCOtRFevO1rFkgpbMok HqAZ9nt/Q/SbWoEeq/qFVjLdKUB9/cVovJ2ZKpYmKG2fHCR1zGrnZYnItkWhhPmMo/ JNC5MMU1rNaqA== 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 7D958C54E5D; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:16 +0800 Subject: [PATCH net-next v8 7/9] 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: <20240305-net-v8-7-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=937; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=aaQRrOl6ezTfgk2jYZxmgPEEzwU/YKquwXnutXaPBpI=; b=1vU1xw9mdYje6iKA4xX4QXA1ULcHxrhm/Sh+Trhc/gkCzGQm6p8f/h2Pi+1PBI65CySzmDN9Q hytHwzB2j4SDMdZ4sb7Gx/hp8ZCTHYCASnc8XS8hwGzHsuJQiVjjn6U 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-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. While at it, remove fallback compatibles and only use SoC compatible. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index 2406263c9dd3..9bf4beba7987 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -945,8 +945,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",}, {}, }; From patchwork Tue Mar 5 07:51:17 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: 13581790 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 E98477EF12; Tue, 5 Mar 2024 07:51:12 +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=1709625073; cv=none; b=u0X1vYTDtWV+GWH6yI4tA9rBXt69TkRF3W/ggKqRDH4C3IMmuiJ0zBtQvKJPEnC+n/jZrHbEgzOW7CdgNmqO1Bc7FHZlRoB5xA0Is/tGCpStQfWX50ssdOo9/r9v7UlAMzffzj/05HooiWkeVoIV/tc8vlA/2J6fsb0TBqjb8lI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625073; c=relaxed/simple; bh=xFguqMewgLv699i3A05fv1Nem4jn+AqwGZ8eZNYn1pE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lvv2Meyk6LzKorEUuQhQ+kg9CkJmNrV2gUWZiUmBZW9XeOGDqQOG5tlrLNZvxnYQhFu4f/v4SXuLPhlLAItQwGl9/XDrVwqHc+49FVz7t0Akb7vZaR3MQmcU6e/0jPrwSAPM/Ea3xdSj2rGT0czAYGw1Jc53OnOaV9CzTYHUwT8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aHrKQ3WM; 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="aHrKQ3WM" Received: by smtp.kernel.org (Postfix) with ESMTPS id 972B1C4160D; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=xFguqMewgLv699i3A05fv1Nem4jn+AqwGZ8eZNYn1pE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=aHrKQ3WMWy1B7KguSYXQ6EzCrTV/KVh8Sux0vb7IOSWstv0gMW939XLxYHVGWOOXb 2yZ71aiEKuzPi1/lUqDUueR9QSo5r6xPIfRitKkpGdbZ9cF763Udia7K5kIhZV62cU EAiEWxsQLlK9cwCAD8mlr5uXGuD7i7+LCiTkFEkqhK5X47/g0ghx4oKn3FdOYuGz1H hQ6MriYDPKeVdbAEDWLVrptQhzpoWeXoi7b1I2kqOcXdihqPQM/OsUCg+yeI+gVSBL WoR7JFUmq9/oNwiX+qprcGF7Eav6HYQMagF9ZLpjYWHStX6w9gUHaDpgm5DytSMuJV 4TU3CawkgONdA== 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 87A1BC54E55; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:17 +0800 Subject: [PATCH net-next v8 8/9] 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: <20240305-net-v8-8-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=6833; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=JB/jq7y7ekKYQqQCVfF3Bi6IugEdAkkTOA3ttrqRJY4=; b=Hdq5c+6vSJLxDW66JlEfxyFNw1lXd6fiZu4ALxFqMZODDhuJTnVNCkIM/daiMHJd4mbtZb/V4 xTB+kR8FZ1ECSpkIR416IRrEa31IR1ZCVgIFtDD6rifO55AGXI3aJKP 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-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. 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 9bf4beba7987..a4f856710d96 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); @@ -946,6 +991,7 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) static const struct of_device_id hisi_femac_match[] = { {.compatible = "hisilicon,hi3516cv300-femac",}, + {.compatible = "hisilicon,hi3798mv200-femac",}, {}, }; From patchwork Tue Mar 5 07:51:18 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: 13581789 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 0F2ED7F476; Tue, 5 Mar 2024 07:51:12 +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=1709625073; cv=none; b=CgrV8HjoPjND+qOBfQ6GxeSfyXm/YaezOFk/dPXRxbAZS+MNjdbAzFSDboO5QXemGw8mhujol28Njtz7GsLt8C198cyYS5eO3mmtSS3vZ7bSZNxqq5AVcFZzp5Jh6IYNNVfZd2cqo6S7jOmkXE+gNv/nspLBF6od36Y+Q5l+YLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625073; c=relaxed/simple; bh=QDh37/hypKzqzSrGrTAeVEghHDvc7ycpYvDwVjDq178=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lg/LyDcR0lpVMkSG5kF4nkOLjuC4QhztOBLMIruJuSa0fqPWPU1NZ4eUD09FzUdG0KeEE3yIpBPquxqGnPxjER8Bj03lZPgGa+1pWnAvcYxF+tpqhfLvjFnuw7P5t2zpS5ZhwJMW2L1UOhXaVfPLF5psb3SWDdkjeYY1o97evjw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TpVVDPZN; 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="TpVVDPZN" Received: by smtp.kernel.org (Postfix) with ESMTPS id A39D7C32787; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709625072; bh=QDh37/hypKzqzSrGrTAeVEghHDvc7ycpYvDwVjDq178=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TpVVDPZNLvOWwLBiGWzMobgo8QFbD2HtIFgHNJhEFy8bfZOvEj0Fd3b8/ua919/ad KJI7Nos9ELYJxxVORm2DQGo8+ewpZe5aNr0rmfcDOkkQD5uOBDlKVJvH/ihDuQUdG8 PMP625X6YUd8jqHBF4T/LGZrmJYNiasDws21uELOQUCzRJbeD3F0U9dOC2P6ostAQ+ DSHWx+BgNTHTVkYE0hPsxM49Enhn55uw519hrGKLR9OEdHP0tEw2ZyS/ehBFW8jQeR ZPkBhTExPxVDoV0rps1xUkinbRu+pHpkfWE0uiTxmUXugDcwqd/xNGJ1o5xmgTssaM YdUFS283RbZcQ== 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 9361FC54E41; Tue, 5 Mar 2024 07:51:12 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 05 Mar 2024 15:51:18 +0800 Subject: [PATCH net-next v8 9/9] net: hisi_femac: remove unneeded MODULE_ALIAS() Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-net-v8-9-166aaeea2107@outlook.com> References: <20240305-net-v8-0-166aaeea2107@outlook.com> In-Reply-To: <20240305-net-v8-0-166aaeea2107@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.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709625070; l=761; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=dDYro7mR0AilpKVwze2YXBVItXvJMbJiAARD8z9wFaE=; b=BeUD2kK+uMFGXzTas40KU2U+vEaLDhYUP7EOP2nwDx+5ZlWez0w7QYlXS6M4ra9Pr0NV/EIQQ 52uVMHFo+q+BZHozbNe77BQ+Ns/oKGuptIDqIHnu+rr9Xq2eJCOG2tx 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-Patchwork-Delegate: kuba@kernel.org From: Yang Xiwen We already have MODULE_DEVICE_TABLE() that creates the correct alias. Remove unneeded MODULE_ALIAS(). Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index a4f856710d96..ea8f60f292c1 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -1015,4 +1015,3 @@ module_platform_driver(hisi_femac_driver); MODULE_DESCRIPTION("Hisilicon Fast Ethernet MAC driver"); MODULE_AUTHOR("Dongpo Li "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:hisi-femac");