From nobody Fri Sep 20 11:59:13 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44BFFCD37BC for ; Sat, 16 Sep 2023 11:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239225AbjIPLOt (ORCPT ); Sat, 16 Sep 2023 07:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239219AbjIPLOR (ORCPT ); Sat, 16 Sep 2023 07:14:17 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A031BD; Sat, 16 Sep 2023 04:14:04 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 89478240005; Sat, 16 Sep 2023 11:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HAZCgeoh9KUduxxc51sEyaD/Ww3GnyAUx/PFLTVQyPc=; b=hKK2Wuk79GoaUo/hY/fuO5GNEsYpXvHQTmZHzkmUu1psjYgV5XTyUjTmWeR3yNV65L4Ghz kQB0p3rthYgY0/1iJ1iTHdBtt3XqWLfmGTwb2cQTywTU4YqVAi5uQYhbNk7NK/b0s7wch5 o3R6bt5DMAyUXaAkMcviVr7aHL8KquFNdxeplIiYsZKYMMVXrxtHkocr3elHkU4mPcuJqK 21vBYwU+gVEk/OLBULj3WcOF61OeP3y7yC+8z+plp1vHHwnnZbaTiVNcvxSGNrMqFtf+FM p6uiuukzlQvtFjbmaBTjXA7kM9QiyQdGrD7nVsUCHlmLE9UgQKwalLOkDla9Pw== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , George McCollister , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Kurt Kanzenbach , Matthias Brugger , AngeloGioacchino Del Regno , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Marcin Wojtas , "Russell King (Oracle)" , Lars Povlsen , Steen Hegelund , Daniel Machon , Radhey Shyam Pandey , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Geert Uytterhoeven , Magnus Damm , Maxime Chevallier , Nicolas Ferre , Claudiu Beznea , Marek Vasut , Claudiu Manoil , Alexandre Belloni , John Crispin , Madalin Bucur , Ioana Ciornei , Lorenzo Bianconi , Felix Fietkau , Horatiu Vultur , Oleksij Rempel , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Grygorii Strashko , Sekhar Nori , Shyam Pandey Cc: Woojung Huh , Steen Hegelund , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next v2 10/10] dt-bindings: net: marvell-armada-370-neta: convert to json-schema Date: Sat, 16 Sep 2023 14:09:02 +0300 Message-Id: <20230916110902.234273-11-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230916110902.234273-1-arinc.unal@arinc9.com> References: <20230916110902.234273-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Sasl: arinc.unal@arinc9.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the document for Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA) to json-schema. Signed-off-by: Ar=C4=B1n=C3=A7 =C3=9CNAL --- .../bindings/net/marvell-armada-370-neta.txt | 50 --------- .../bindings/net/marvell-armada-370-neta.yaml | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/marvell-armada-37= 0-neta.txt create mode 100644 Documentation/devicetree/bindings/net/marvell-armada-37= 0-neta.yaml diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.= txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt deleted file mode 100644 index 2bf31572b08d..000000000000 --- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt +++ /dev/null @@ -1,50 +0,0 @@ -* Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA) - -Required properties: -- compatible: could be one of the following: - "marvell,armada-370-neta" - "marvell,armada-xp-neta" - "marvell,armada-3700-neta" - "marvell,armada-ac5-neta" -- reg: address and length of the register set for the device. -- interrupts: interrupt for the device -- phy: See ethernet.txt file in the same directory. -- phy-mode: See ethernet.txt file in the same directory -- clocks: List of clocks for this device. At least one clock is - mandatory for the core clock. If several clocks are given, then the - clock-names property must be used to identify them. - -Optional properties: -- tx-csum-limit: maximum mtu supported by port that allow TX checksum. - Value is presented in bytes. If not used, by default 1600B is set for - "marvell,armada-370-neta" and 9800B for others. -- clock-names: List of names corresponding to clocks property; shall be - "core" for core clock and "bus" for the optional bus clock. -- phys: comphy for the ethernet port, see ../phy/phy-bindings.txt - -Optional properties (valid only for Armada XP/38x): - -- buffer-manager: a phandle to a buffer manager node. Please refer to - Documentation/devicetree/bindings/net/marvell-neta-bm.txt -- bm,pool-long: ID of a pool, that will accept all packets of a size - higher than 'short' pool's threshold (if set) and up to MTU value. - Obligatory, when the port is supposed to use hardware - buffer management. -- bm,pool-short: ID of a pool, that will be used for accepting - packets of a size lower than given threshold. If not set, the port - will use a single 'long' pool for all packets, as defined above. - -Example: - -ethernet@70000 { - compatible =3D "marvell,armada-370-neta"; - reg =3D <0x70000 0x2500>; - interrupts =3D <8>; - clocks =3D <&gate_clk 4>; - tx-csum-limit =3D <9800> - phy =3D <&phy0>; - phy-mode =3D "rgmii-id"; - buffer-manager =3D <&bm>; - bm,pool-long =3D <0>; - bm,pool-short =3D <1>; -}; diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.= yaml b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.yaml new file mode 100644 index 000000000000..9283ab74cdb2 --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/marvell-armada-370-neta.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (N= ETA) + +allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink + +maintainers: + - Ar=C4=B1n=C3=A7 =C3=9CNAL + +properties: + compatible: + enum: + - marvell,armada-370-neta + - marvell,armada-xp-neta + - marvell,armada-3700-neta + - marvell,armada-ac5-neta + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + description: + List of clocks for this device. At least one clock is mandatory for = the + core clock. If several clocks are given, then the clock-names proper= ty + must be used to identify them. + + tx-csum-limit: + description: + Maximum mtu supported by port that allow TX checksum. Value is prese= nted + in bytes. If not used, by default 1600B is set for + "marvell,armada-370-neta" and 9800B for others. + + clock-names: + description: + List of names corresponding to clocks property; shall be "core" for = core + clock and "bus" for the optional bus clock. + + phys: + description: + comphy for the ethernet port, see ../phy/phy-bindings.txt. + +if: + properties: + compatible: + enum: + - marvell,armada-370-neta + - marvell,armada-xp-neta +then: + properties: + buffer-manager: + description: + A phandle to a buffer manager node. Please refer to + Documentation/devicetree/bindings/net/marvell-neta-bm.txt. + + bm,pool-long: + description: + ID of a pool, that will accept all packets of a size higher than '= short' + pool's threshold (if set) and up to MTU value. Obligatory, when th= e port + is supposed to use hardware buffer management. + + bm,pool-short: + description: + ID of a pool, that will be used for accepting packets of a size lo= wer + than given threshold. If not set, the port will use a single 'long= ' pool + for all packets, as defined above. + +required: + - compatible + - reg + - interrupts + - phy-mode + - clocks + +unevaluatedProperties: false + +examples: + - | + ethernet@70000 { + compatible =3D "marvell,armada-370-neta"; + reg =3D <0x70000 0x2500>; + interrupts =3D <8>; + clocks =3D <&gate_clk 4>; + tx-csum-limit =3D <9800>; + phy-mode =3D "rgmii-id"; + buffer-manager =3D <&bm>; + bm,pool-long =3D <0>; + bm,pool-short =3D <1>; + + fixed-link { + speed =3D <1000>; + full-duplex; + }; + }; --=20 2.39.2