Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp146232lqk; Sat, 9 Mar 2024 04:27:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUCWw2dzf/HZeQNaGokb2bvUt6rvrPcPOPj19qd0mJhN8nM+7kqrBuZ+IeW+8otzDTRwKWZJU0t2mpdnUMCGEKjsV4ZjEgH0wQ/ongUoA== X-Google-Smtp-Source: AGHT+IF2MSDoKIFPwb16vH/x/M4VzGkQwHLyACOeR2D1SFdr9r1PIu5pvJ/0JLMnqv2zRv4Mhwj6 X-Received: by 2002:a05:6a21:3942:b0:1a1:4aa9:96df with SMTP id ac2-20020a056a21394200b001a14aa996dfmr965410pzc.30.1709987240899; Sat, 09 Mar 2024 04:27:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709987240; cv=pass; d=google.com; s=arc-20160816; b=w9fBWGRIKkX5/fYHvUkrT0/4rc8iJVh9BM1xwBDuv6pMu0qkF2d8t3umy2bytTvAt4 fz5KTo9k/mCa/Z4vJLAfEkkh4KuZXlHyhhXrl9HwNGb13fzFshpPXFfx6RFEH17fb/FI 66azBIbtoia0jmJzWWuJhvI9w+QVfPwtXnYhXChnn8aWMy5VJkcO7klAJOdLdLaTzfS6 gtB1SzNiBLc4Lce4hIDvvCayivSvSigqjE1RZGG7Wfa4IAEZMtKD0cHLn8ZgRO2Iczk+ Xng5dWdhKw9pgRwfixQCzcKRSpsVq2sR1R1mElTpUd5YRxtO9NGGcsenOXaPDZR0/cIC 5UDw== 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=p1YQFCAHr/pQwUdy8aaDtmFKeU62caW9QZdLBZnJFew=; fh=TR7t0/HIFS7TJMgggPPQqyHSmBG4J3N9Yyv99IDuaus=; b=gePiwDFXjT+rf7m7kzWLJc57wvyapHzKcSrsAlb6f5fKsoZd8YBRrZQdYNcrnPPJeh /B76P5PY6DExtZ9bIcChwzx5hNNZ9/MHUmUPv43tcfd6+EMr+IEEmsGxeZkhbLTurps1 jQo00Rlob3O4Bre0mCEjQktEWirxVcDntbIiadQJ9PgWHazmaunE7WCKDjaroDLQ5NBy 3GVLEg5PH/uAAzpU6Cs1btU4LlhrUlzvpKin5IUVZHR1l2sqIEBgDHEcyd/fnlgB4EaX lrm1QhkO9hl/p8TDlUhw8PIupamMV5EVXc6pczOjAFhS59Lm/D1Pk+fU0hXS8by76nVJ WVnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SsG6KwUX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id mg1-20020a17090b370100b0029bc591424fsi1265179pjb.125.2024.03.09.04.27.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 04:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SsG6KwUX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97880-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9F1C5B20F87 for ; Sat, 9 Mar 2024 12:27:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E21144084A; Sat, 9 Mar 2024 12:26:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SsG6KwUX" 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 C83BA383BE; Sat, 9 Mar 2024 12:26:24 +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=1709987184; cv=none; b=CG+4wcUS59uln3B0nsXvuuUjQ3cdMzOCQA9kS6a0MDceBdfeQ1Yu3XA8cQ0rQOd+hpUGe6lLgOgUVdleS1uR2yIOFXntbtLMJSlOOWR9rVDPLkP4S35Ti2tcL6utJBQv4ua4Wxm3PVpBaVDhGadkSuGxCvmLVGmNSUnnwCWPP5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709987184; c=relaxed/simple; bh=e0q0yGSRFFLkhf3KJ0mtgBe9DUGdlUyvkBBfylc5F/Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fTP5KYXutclOqA/ynrcXlMHVDXvZvEVz7Hak8yGO5uCKipkQWMzu+3BndtqFc6raI7GvExx8tGIDLbHhFO2a72NS0De4Z/Kjs0SqrQ2SaFwqseCf/LbyPKRisUFHPsxBwMluxp8NCIxB/o4RGkOr8sNb3P0c5dSwYhK/O50RQus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SsG6KwUX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 69FA8C433B2; Sat, 9 Mar 2024 12:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709987184; bh=e0q0yGSRFFLkhf3KJ0mtgBe9DUGdlUyvkBBfylc5F/Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=SsG6KwUXMb0GuZ0YTQ3sHlRPnz521INSJLNpij/FwFsBKtgSV/8IplPQBTvOxrYi7 WEH5VtI6Wn080L0fH7iiTeR6Vl5ay5uqGildkojzir3nfRZAZBOXKRbEql2x4nQWO4 ExaV9hGEUjg6pa5NFc4e3HNhShvim0lLbbjn3plUQ5Cg+k53uiHrl3boySfZ7fqH3g tLzdzz/u8gnXja9jThyraM/ePxxxSpeHy2RtrHG+kNaykBMLmhtNHnWT4poK/XwGjP QzgS4iui8kBJbdkl/FeKBliO3g7S+ZSrlAI8q2wcMhUma9UuO0GUlCSTAH0+zxOsst v/xAd4INmidww== 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 4F191C54E5D; Sat, 9 Mar 2024 12:26:24 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sat, 09 Mar 2024 20:26:26 +0800 Subject: [PATCH net-next v11 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: <20240309-net-v11-4-eb99b76e4a21@outlook.com> References: <20240309-net-v11-0-eb99b76e4a21@outlook.com> In-Reply-To: <20240309-net-v11-0-eb99b76e4a21@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=1709987182; l=5287; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=FclGbNt5IHnTCzv0cmPEOdaR/+V9vDaeVaHJ31VX4FE=; b=f1/QbCf0lOoaAD0ITLMjJRxOButfePhQsNssr3b0UuyBDzIS6NhXGX0PI9Jqt+2uiXWS0+6E7 /A2VbO5H3GcDCLBBV8f3vdLmX0UkG4inWfB4ukUv1yL3KDTdmw7Pp0j 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. Reviewed-by: Krzysztof Kozlowski 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