Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5186328rdb; Sat, 16 Sep 2023 06:31:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0ncdURsARB11D+moPvvoxQJ5P3phupyoWstJ3FT+z4EqqYRKntsEmaSHqcHXqvAFpTTV0 X-Received: by 2002:a9d:75cb:0:b0:6c0:9e24:6eab with SMTP id c11-20020a9d75cb000000b006c09e246eabmr4868237otl.33.1694871099194; Sat, 16 Sep 2023 06:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694871099; cv=none; d=google.com; s=arc-20160816; b=1A48qd/rn18UO7vlvXWfTEG+RGph68fWuikByd++PZm1sNclfrzYYd1AdZ2q2AYxk/ tjXqxM+5tBkGQho1kvX7Qq3uZn4G2bou6eeWCb6uw+MEszgMETtf9QdAf62EpcmbYapQ g01pofCXXMEM9pPY3AMwi4ceq/pylkiNtDBOeDMXdYEDROQsN5Ya6U/hZu+8K9av0l3m lwgGGXj38C2jcvOEeez14wCI+uDfwcW4lP+J940kt1npemlnO6DfvKm0fFpsWI8Izdz3 ozTRxiMKzrW586XGPKVooN1f5/7DcvjJBxDrfwOKXFeyE034pnRa1F4GMGT6rcT9no9h 2eBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HAZCgeoh9KUduxxc51sEyaD/Ww3GnyAUx/PFLTVQyPc=; fh=xwJj7+GJ5325fRxBxTnI1lwwrmdk/p8s2IJTP9CHNEk=; b=iTS6ipgtC8mdZhMVDKF7gDeyvbFnCPdfMm53yKjwyl/kpHQ0Rpwc8Vad5U8yzPBNUD omWlgOJFJNu+1hvyo2k2i/g8WqspkdMkJOYP3Mgr03rc1WyKV5+AcfE0mtkOCS/7EZFu tKkgX6l5CeCRjhr1tfd6tlSZY7LYfPeZfIhCNAo+/us3TPpynq8kH1sXfWS5QS++Oonc ajz5SUmuPopu7OVLtm8J9DmNidYUKyK4qmgU+dmj5PUAmeN+20YBYJ1fYBx5CNDWk7um 3OPHYHfPQLseHb2xrX9c3Y7LmgbYPdaD+cGW4RmCrhToFtO38lVCMxeFenucM/VjqKAA ymQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=hKK2Wuk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id g8-20020a6544c8000000b00573fa8f2829si4908782pgs.383.2023.09.16.06.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 06:31:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=hKK2Wuk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D795B8061378; Sat, 16 Sep 2023 04:15:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239216AbjIPLOr (ORCPT + 99 others); Sat, 16 Sep 2023 07:14:47 -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: 8bit X-GND-Sasl: arinc.unal@arinc9.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 16 Sep 2023 04:15:23 -0700 (PDT) Convert the document for Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA) to json-schema. Signed-off-by: Arınç ÜNAL --- .../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-370-neta.txt create mode 100644 Documentation/devicetree/bindings/net/marvell-armada-370-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 = "marvell,armada-370-neta"; - reg = <0x70000 0x2500>; - interrupts = <8>; - clocks = <&gate_clk 4>; - tx-csum-limit = <9800> - phy = <&phy0>; - phy-mode = "rgmii-id"; - buffer-manager = <&bm>; - bm,pool-long = <0>; - bm,pool-short = <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 (NETA) + +allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink + +maintainers: + - Arınç ÜNAL + +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 property + must be used to identify them. + + tx-csum-limit: + description: + 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: + 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 the 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 lower + 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 = "marvell,armada-370-neta"; + reg = <0x70000 0x2500>; + interrupts = <8>; + clocks = <&gate_clk 4>; + tx-csum-limit = <9800>; + phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; -- 2.39.2