Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp495859lqi; Thu, 7 Mar 2024 03:36:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVLDz1uyO2bD6ng4ogTlNFL2Bd9wFdsrtT3za5dGYmKbvqtgCjxpkATsJhTuY3/H43axid/TFPU6Kx1J9vpEiHXYAtgkgaDOW9RptuQBw== X-Google-Smtp-Source: AGHT+IGXZzq8L0EAbBOtCCs+5bIKjmJsWGqCzHFGFN4F42mmdcG9nW8lgmmYhHhTAuPo3ukjmnBp X-Received: by 2002:a0c:e3c8:0:b0:690:93ca:5387 with SMTP id e8-20020a0ce3c8000000b0069093ca5387mr5006876qvl.46.1709811381994; Thu, 07 Mar 2024 03:36:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709811381; cv=pass; d=google.com; s=arc-20160816; b=cO9yOn53t/ranP7tbF6mJfuNQLn2/LKeOXH2JblOG+JhlfR42M4i1Lrc+jv471mtZt gUwNLr4/cEVvEZhTUbIA/7KyjFOm/odgSg6qa2W0vb10cAR2R7CYV4TsO0YGI6FC2O6w ye9Cn0iUEfaXz2d0JLJ8s2NVzMIO/6bkGLO7BcEgtJptjhCHLCHZWOPZGYuV0EhY/rkl 6ED7cKog9KyDkqCi7VZchGuoVGD0SBXD9/51rIgm4S8DA1BDdhspNTeyXD7yUUKfDm2A eLLq9df45ngoK4RRUVno+Wp+uqDyLzKoap9ByE93WK/th+YzuHNtT3yo7KYK88dP2vGV EAsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=KXsRxngeVVselak9OlD7cDM8f+xyt4Ag6YULslSQe+I=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=uofvUkmY5H7OLJAdfVzFmiueFC8U64EaoO3LfkPgdN/wvsw8h9p3PUbdxs2+gF4vCE Vil7OrIoOa3HMtsXnSjL8X4iu+tHkIao9mzFSkJAl+WrB5rydF855otpFBcB9IbkuREA 5HoNX3vxebZu3eekYvpdqak/dxbBjkZn0YsLLNoiSx8ZiLUUE8fvdh4lYCFRhMzXtJBV RmpMWh7TlefXczkwxMeKmQY6pR1+ub2c2HQkmM2pfyv2/q04j95EWRbxG9yb+BVGh9dM dqtAzt4wae8eaiR/VuX1XJlrxHRI7nN8elGIN0Q9+iLIFPoVOmSOjSsv+7m//zR5ffUK SPLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="on9m/SjU"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jl11-20020ad45e8b000000b0068f10593ee8si17209679qvb.599.2024.03.07.03.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 03:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="on9m/SjU"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C5C3B1C208EA for ; Thu, 7 Mar 2024 11:35:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3D9612B14C; Thu, 7 Mar 2024 11:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="on9m/SjU" 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 C5A331292CE; Thu, 7 Mar 2024 11:34:49 +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=1709811289; cv=none; b=dgo31IK7PogLlJpj/zVzAZRvFML/MDGPyyoX5BSpJoisvf3DXKn2AsO9iVk56qqmqkXt/te8lveZvJUtdKlFgVmvy3AQqY/9YTuMzK0yeZHi1XBpEefo6rgtKO2XsUxJH3bh/P1p8IWRQlMwiyATqEvegHrIEuYVXfbzCLTxUP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709811289; c=relaxed/simple; bh=c01HggYsG7UVeihptCV7G01V4aTHo04UjLf74pTqkvQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=auz8SwcYzlXl4h0o/D3fkTeBy2/ubdRDfX80tjTwGCr8W2YAN07+YxGY8KTfypak73eSBRtSA0/pbczRPLZVfuUskIz1eb56PIgQ0R+dRnAOOVeTiCktSNp9rdXZyJypr/la1p3OXjNshJLu17lPsCVXgI24ufujLdMtRWfON/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=on9m/SjU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 6FB42C43330; Thu, 7 Mar 2024 11:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709811289; bh=c01HggYsG7UVeihptCV7G01V4aTHo04UjLf74pTqkvQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=on9m/SjUODPRzPD8K+bdgJWPTmavAHeTFgNWE2BYja2WkJELSOVGJD/m/mwBMMeWs 7TZNSvtFXQZleWAe0ilXBjRbwuPSVxW2XyuJk5AnlRsq+g3a2rX/kxrrBbeGAQqvkx myLI/KpHU7zFJi3bpPtQh0fi67QRRgikvf1PllWFGfsgIWWgzTY73cUhY573JilSJa W5iZ4tcY6RwnOz/KM9Jnw7Jue7XT/6TyPpgOHQ4sh8pQGYb3rLLpl0L+O/BCrtF8V4 ZaN74DXljr0X65kGb4KSYvQdPYlRN+VZuube6KcPEtxuW39Kjb39M6HN505YGNJh2m 6BsUXndJDoI2w== 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 57D02C54E5C; Thu, 7 Mar 2024 11:34:49 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 07 Mar 2024 19:34:50 +0800 Subject: [PATCH net-next v9 4/9] dt-bindings: net: convert hisi-femac.txt to YAML Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240307-net-v9-4-6e0cf3e6584d@outlook.com> References: <20240307-net-v9-0-6e0cf3e6584d@outlook.com> In-Reply-To: <20240307-net-v9-0-6e0cf3e6584d@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=1709811287; l=5220; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=uiezMY2DCteYHM0P+l+HGnsL5XUDuLgoCSyIIdl/Lc4=; b=HummQZy6B+cyoBBY2k7pxtBhG3NUCeUvMyaTQZH7zi6VlZzwUpUI1Arv15UsVOfXy0JeFfyzr yQkZhqgAvAPAxd3CuOGzQWzaIIjflUr72W+IHJaxkno1RuHY8vtcJCW 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: 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 | 87 ++++++++++++++++++++++ .../devicetree/bindings/net/hisilicon-femac.txt | 41 ---------- 2 files changed, 87 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..3344d3bfefb8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -0,0 +1,87 @@ +# 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: + enum: + - hisilicon,hi3516cv300-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"; + 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>; - }; -- 2.43.0