From patchwork Sun Sep 17 12:47:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 13388562 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27C3ACD37B4 for ; Sun, 17 Sep 2023 12:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sWyKGnLfazBTlrdo/w7C4xp5WfvHYM/l3/3DVcdZor8=; b=eFfgKGeYpBFPz/ b4hJ7CIFMcYpPjhhOqXeO1cXfnXRVVCQWURCjYcePSpiGV4VHBOJMVGir2Zs/LbzjwY8wfxpPV+Xv ZXODvQhrUBcnV+l7vOUcRrdwL3lpCOYsxhyrsLwuuSykKX/XZAqty/vcQ2OmnmvlFOMp1wDQINhhW IEIC51Wc141NjuRaD8OO0dQRGQfAjQVSSwrjs5Ce7ndS8GUsytJvP9Ar5ADDAKbQRmDpqgtu7PTxG TQ4lrpwAgQ6OlCkyzJFODDHWG7AhHy1zGXM2ZaRBLE3jlW4Hl109tQGUbX8+w14h5A/zZ00l44cyS RHOlusi7D885i8wTvIHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qhrC4-00DezC-2b; Sun, 17 Sep 2023 12:48:08 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qhrC2-00Deye-19; Sun, 17 Sep 2023 12:48:07 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E7C3C0004; Sun, 17 Sep 2023 12:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694954879; 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; bh=Aq+pwsYFiwStYxtjQVnBxBzcUNTCMXjBxquvlKd5ZhI=; b=dU+jbPVzpXt3H6VtNT2P6FcrQlOnsf4Df+ssXytXV5pjq0RstMNPtNcn+RQlbMT2Lxp7Gj fmDzLM73gjnxTvIlafkC2FAIen6ClA4zYbIXRFXCNQIuVNOqbv7WpQKYt6vLZY6cqd5u9B rv8vWvHVRhfzWhQ11K9XFOWmH4Hk0COyGvL7V/PYohpp0q/HbzoyD4JlI1r9eRpGje8O+k TMxcTeTe1i+2knSZEEZw+JipkIkP2Cle/TB3lBp4nzJ7kNIV0u2NuABQ7pVgic/GYOF5qX l5DEMpOqjXCFaQWXWTfuRTn0/uqnsjLT5za0jh8ZMoQ3kgMLkaIkSmy0nEWIEQ== From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: =?unknown-8bit?q?=22David_S=2E_Miller=22_=3Cdavem=40davemloft=2Enet=3E?= =?unknown-8bit?q?=2C_Eric_Dumazet_=3Cedumazet=40google=2Ecom=3E=2C_Jakub_Ki?= =?unknown-8bit?q?cinski_=3Ckuba=40kernel=2Eorg=3E=2C_Paolo_Abeni_=3Cpabeni?= =?unknown-8bit?q?=40redhat=2Ecom=3E=2C_Rob_Herring_=3Crobh+dt=40kernel=2Eor?= =?unknown-8bit?q?g=3E=2C_Krzysztof_Kozlowski_=3Ckrzysztof=2Ekozlowski+dt=40?= =?unknown-8bit?q?linaro=2Eorg=3E=2C_Conor_Dooley_=3Cconor+dt=40kernel=2Eorg?= =?unknown-8bit?q?=3E=2C_Matthias_Brugger_=3Cmatthias=2Ebgg=40gmail=2Ecom=3E?= =?unknown-8bit?q?=2C_AngeloGioacchino_Del_Regno_=3Cangelogioacchino=2Edelre?= =?unknown-8bit?q?gno=40collabora=2Ecom=3E=2C_=B1n=C3=A7_=C3=9CNAL__=3Carinc?= =?unknown-8bit?q?=2Eunal=40arinc9=2Ecom=3E=2C_Lorenzo_Bianconi_=3Clorenzo?= =?unknown-8bit?q?=40kernel=2Eorg=3E=2C_Felix_Fietkau_=3Cnbd=40nbd=2Ename=3E?= =?unknown-8bit?q?=2C_Daniel_Golle_=3Cdaniel=40makrotopia=2Eorg=3E?= Cc: Krzysztof Kozlowski , 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 Subject: [PATCH net-next 1/2] dt-bindings: net: mediatek,net: remove reference on top level schema Date: Sun, 17 Sep 2023 15:47:22 +0300 Message-Id: <20230917124723.143202-1-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230917_054806_556868_37FDE4D1 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The top level schema does not represent an ethernet controller, the subschema defining the MAC nodes does. Remove the reference to ethernet-controller.yaml on the top level schema. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/mediatek,net.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml index e74502a0afe8..0b2cb1897310 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -105,7 +105,6 @@ properties: const: 0 allOf: - - $ref: ethernet-controller.yaml# - if: properties: compatible: From patchwork Sun Sep 17 12:47:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 13388563 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97FF2CD37B4 for ; Sun, 17 Sep 2023 12:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ex0Nal1x2aK0gIzxuaWDRqCokfxGQmwwtt/6TZE5RCY=; b=R+h1u2PPpLSNRL bO0iNkB7ZyJTtEKvaEdgXKXrMF8iB4uz01E/fYE6l6qIH7+ZEu78kn6fbkTHjPzug0fnLiTHJn3+7 Al99qOyTsYJ417x7cVCZ2hkqQ+jLLrffRZCoheilhZeRxMGeu6vNKqkg8vXs0N5j3cD23nU15rQQL WJJ5eKXBQQogkKlYjV8RMUps6Up6Y7YzHwNxKHjEaWIsyAAIAe9hq4YgHqTqD0OtWM2c8VnhQkfgI 0zzwQott0/fbapE4eUhCNqDstk274pYeDPAwrkS84OQ4u+QaxVuXs9XDn3IvfL/ivbsxovUS1UgN4 6cngBRWl3+udXLtwZK9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qhrCB-00Df0l-2T; Sun, 17 Sep 2023 12:48:15 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qhrC8-00DezU-10; Sun, 17 Sep 2023 12:48:14 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5CAA4C0002; Sun, 17 Sep 2023 12:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694954889; 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=AAozQf5veG9fcNRrq+yazpmSWFWK3c8BmsCcPtHQ9n8=; b=aqoyFajfqCCla3hh1RxRwP5PcE9fy9aHZJE+JpUZ7sksitMubsP93Qeh602LvI1QYeN2DZ xekhyIyxJHykKbeT+Udfu6Jl+T4UUgdWc+M5fNYVrcfdEkS52xDCPy3TRAXBu77GZTcoJC Va7kFC6lu1wTP7wIZpiM+0z1qk+7nEohD+9moSLnv2/MAsM18sVwdwmjc6oTTCEit8HPdJ Kb6CrP8kLzUvG3+H8cZe3F0ufLEbxcNDMsIrCPIPl122Y9ghUP45FmFV3KWNU3GrBmM3YQ rrfo45y4X4yaXHTdbDo+24Bd7rdUCTvW4b9oPjmQfAueZrmxIqcW6x+oaK9uMA== From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: =?unknown-8bit?q?=22David_S=2E_Miller=22_=3Cdavem=40davemloft=2Enet=3E?= =?unknown-8bit?q?=2C_Eric_Dumazet_=3Cedumazet=40google=2Ecom=3E=2C_Jakub_Ki?= =?unknown-8bit?q?cinski_=3Ckuba=40kernel=2Eorg=3E=2C_Paolo_Abeni_=3Cpabeni?= =?unknown-8bit?q?=40redhat=2Ecom=3E=2C_Rob_Herring_=3Crobh+dt=40kernel=2Eor?= =?unknown-8bit?q?g=3E=2C_Krzysztof_Kozlowski_=3Ckrzysztof=2Ekozlowski+dt=40?= =?unknown-8bit?q?linaro=2Eorg=3E=2C_Conor_Dooley_=3Cconor+dt=40kernel=2Eorg?= =?unknown-8bit?q?=3E=2C_Matthias_Brugger_=3Cmatthias=2Ebgg=40gmail=2Ecom=3E?= =?unknown-8bit?q?=2C_AngeloGioacchino_Del_Regno_=3Cangelogioacchino=2Edelre?= =?unknown-8bit?q?gno=40collabora=2Ecom=3E=2C_=B1n=C3=A7_=C3=9CNAL__=3Carinc?= =?unknown-8bit?q?=2Eunal=40arinc9=2Ecom=3E=2C_Lorenzo_Bianconi_=3Clorenzo?= =?unknown-8bit?q?=40kernel=2Eorg=3E=2C_Felix_Fietkau_=3Cnbd=40nbd=2Ename=3E?= =?unknown-8bit?q?=2C_Daniel_Golle_=3Cdaniel=40makrotopia=2Eorg=3E?= Cc: Krzysztof Kozlowski , 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 Subject: [PATCH net-next 2/2] dt-bindings: net: mediatek,net: move mediatek,mt7621-eth to another schema Date: Sun, 17 Sep 2023 15:47:23 +0300 Message-Id: <20230917124723.143202-2-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230917124723.143202-1-arinc.unal@arinc9.com> References: <20230917124723.143202-1-arinc.unal@arinc9.com> MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230917_054812_620969_EA2BA9BE X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The bindings for mediatek,mt7621-eth contradict with some of the rules on the top level schema of mediatek,net.yaml: - resets must be two items. resets with "maxItems: 3" at the top level implies "minItems: 3" and cannot be overriden under a subschema. - reset-names items must be "fe" and "eth". reset-names items defined on the top level schema cannot be overridden under a subschema. Therefore, move mediatek,mt7621-eth to another schema. Fix the order of clock-names items. Do not define the properties that don't apply to this hardware. Require more properties. Add an example. Fixes: 1cbf487d7d3a ("dt-bindings: net: mediatek,net: add missing mediatek,mt7621-eth") Signed-off-by: Arınç ÜNAL --- .../bindings/net/mediatek,mt7621-eth.yaml | 143 ++++++++++++++++++ .../devicetree/bindings/net/mediatek,net.yaml | 27 ---- 2 files changed, 143 insertions(+), 27 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/mediatek,mt7621-eth.yaml diff --git a/Documentation/devicetree/bindings/net/mediatek,mt7621-eth.yaml b/Documentation/devicetree/bindings/net/mediatek,mt7621-eth.yaml new file mode 100644 index 000000000000..4f39d7124693 --- /dev/null +++ b/Documentation/devicetree/bindings/net/mediatek,mt7621-eth.yaml @@ -0,0 +1,143 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/mediatek,mt7621-eth.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT7621 Frame Engine Ethernet controller + +maintainers: + - Arınç ÜNAL + +description: + The frame engine ethernet controller can be found on MediaTek MT7621 SoC. This + SoC has got dual GMAC ports. + +properties: + compatible: + const: mediatek,mt7621-eth + + reg: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: fe + - const: ethif + + interrupts: + maxItems: 1 + + resets: + maxItems: 2 + + reset-names: + items: + - const: fe + - const: eth + + mediatek,ethsys: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon node that handles the port setup. + + mdio-bus: + $ref: mdio.yaml# + unevaluatedProperties: false + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^mac@[0-1]$": + type: object + unevaluatedProperties: false + allOf: + - $ref: ethernet-controller.yaml# + description: + Ethernet MAC node + properties: + compatible: + const: mediatek,eth-mac + + reg: + maxItems: 1 + + required: + - reg + - compatible + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - reset-names + - mediatek,ethsys + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + soc { + #address-cells = <1>; + #size-cells = <1>; + + ethernet: ethernet@1e100000 { + compatible = "mediatek,mt7621-eth"; + reg = <0x1e100000 0x10000>; + + clocks = <&sysc MT7621_CLK_FE>, <&sysc MT7621_CLK_ETH>; + clock-names = "fe", "ethif"; + + #address-cells = <1>; + #size-cells = <0>; + + resets = <&sysc MT7621_RST_FE>, <&sysc MT7621_RST_ETH>; + reset-names = "fe", "eth"; + + interrupt-parent = <&gic>; + interrupts = ; + + mediatek,ethsys = <&sysc>; + + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml index 0b2cb1897310..dc6f2424002e 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -19,7 +19,6 @@ properties: enum: - mediatek,mt2701-eth - mediatek,mt7623-eth - - mediatek,mt7621-eth - mediatek,mt7622-eth - mediatek,mt7629-eth - mediatek,mt7981-eth @@ -140,32 +139,6 @@ allOf: mediatek,wed-pcie: false - - if: - properties: - compatible: - contains: - enum: - - mediatek,mt7621-eth - then: - properties: - interrupts: - maxItems: 1 - - clocks: - minItems: 2 - maxItems: 2 - - clock-names: - items: - - const: ethif - - const: fe - - mediatek,infracfg: false - - mediatek,wed: false - - mediatek,wed-pcie: false - - if: properties: compatible: