From patchwork Sun Nov 27 22:47:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 13056913 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 7011CC4332F for ; Sun, 27 Nov 2022 22:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding: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=RMf7QBd+X8dJtGT6Qj4r2JP9k1YDWoNGjjYMcR7Y4Ik=; b=mFkKDOvv1j1hrsKw0xdu+Y6I87 J/xThUOqgB+upTSVd16OX3JW/Bj/U3p55ZiGLln0aa/kql5bGc+wmdjt3xljdjMEmeboAA9zyweEM xcFZUswMYgfstvdlzV/7xV0+iEzvS4SRUuVHLHq5rCi1ugYBOG9tPdiGsgA2PUK8uZp4qKbx2xDWS XiM+HHc5vF4IBk4Tvw3CmB7riVobNVGV6jNQyequLWkeb/cWUBzZB+2zlURCchW2XVgOCLUEyqBMG sefOdubQzxhMX2wLnzKA8VBmMkJF2047BV/BnC1KvV29madaNkcJ8Hqi83GrrmuC8tYXxHzy9SXSz pKTvx+FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozQWx-00E30J-42; Sun, 27 Nov 2022 22:53:47 +0000 Received: from mail-mw2nam10on2072c.outbound.protection.outlook.com ([2a01:111:f400:7e89::72c] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozQRT-00E0cz-NY; Sun, 27 Nov 2022 22:48:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NpAOLCi2Ll9errsMzUA5v0N/ryCL26uJ3PDkSA+VciWDr65plwlHp6an1exHb2Hdwi/lxrQf2DcrweE4pZAVgWmcOIV9UuWp6cnSbYtdtynZtEyvl/ZYxoKLe2Bl8hVevuHcSVpcUq4LME0e1k/jPFFcoNP9I/YYKkVWKtgEQSP5sDNXzCMiASHaUj1BqVVNpUDzE12CNXwOqomTuvQD366GQe6+CnE8P7kaKLnXKv9wsprRK5qiA7ygWMDblHXuhvu2m4deZ6HrAeyfX+6rsWsI7f0PwRExZlcEtcUdKpcKxeHaUheeSlBwev/l6R3vBwjFAFTo+1t9IMRHxn48Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RMf7QBd+X8dJtGT6Qj4r2JP9k1YDWoNGjjYMcR7Y4Ik=; b=Cjo+gtfhaZtY3+TS4iIRuviZkSkwOZmoj83PFMG0u+ku0mAAXZ1RdDmQuM2oU18cr1KS8qass9V5GCgZH3cOpfvDgalg69L/MSMmmG2NIfmdMEmSPGZESVX8G4vIHMaUlZjkCtKZaqcveWZmgPNURGOIbENdFskPHavocom+JIhtMArr5POxE9PI2DkGMZYmj7vXw79fH+/IIHjtOzoPEsQXi2MgmQNxEm30+Co03MakRavhQvaGdKYqDXfdjxYz5eRnbw0GouCLOv9ZYuP0ADzwzZ4kVaX9N0rQqkpTwBbLKf7stL2xnPTpCIsGgxrGIjmh1o4AuLENRzRLffU8Yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RMf7QBd+X8dJtGT6Qj4r2JP9k1YDWoNGjjYMcR7Y4Ik=; b=vi2FNgVIHEMXDdv56CqlhKat1QosoZZChyiHUotQI6yCgIbjEVsNaIGgFIaRietGAUBsx/sWcMTztjPejt6QRfZ47r5UOlPCAidtrkFIbl2kPFLqHCAimRo7a/j/Q+SsZN1IXmSts66NMus72tDb2I25ls/sfeIRkLAesIrdb/g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by BN0PR10MB4998.namprd10.prod.outlook.com (2603:10b6:408:120::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.22; Sun, 27 Nov 2022 22:48:05 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::45b5:a860:9cea:a74c]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::45b5:a860:9cea:a74c%4]) with mapi id 15.20.5857.022; Sun, 27 Nov 2022 22:48:05 +0000 From: Colin Foster To: linux-renesas-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org Cc: John Crispin , Alexandre Belloni , Claudiu Manoil , Marek Vasut , Sean Wang , DENG Qingfang , Landen Chao , =?utf-8?b?bsOnIMOcTkFM?= , Vivien Didelot , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , =?utf-8?q?Alv?= =?utf-8?q?in_=C5=A0ipraga?= , Linus Walleij , UNGLinuxDriver@microchip.com, Woojung Huh , Matthias Brugger , Kurt Kanzenbach , Krzysztof Kozlowski , Rob Herring , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , George McCollister Subject: [PATCH v3 net-next 09/10] dt-bindings: net: add generic ethernet-switch-port binding Date: Sun, 27 Nov 2022 14:47:33 -0800 Message-Id: <20221127224734.885526-10-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221127224734.885526-1-colin.foster@in-advantage.com> References: <20221127224734.885526-1-colin.foster@in-advantage.com> X-ClientProxiedBy: SJ0PR05CA0027.namprd05.prod.outlook.com (2603:10b6:a03:33b::32) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|BN0PR10MB4998:EE_ X-MS-Office365-Filtering-Correlation-Id: 122e8ba1-722e-4bb5-36e7-08dad0c971de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nAPTf8/7vhPhHSyHpmU+xV7dV4yW6PVbhtrbSYY3G8+VTvGaujGM0/piygSVZ6Z4n3M3A9OzWCqRq2lhpNyKky8SOYuilYyghFR7WvkN9BTJr0jb7f3aMOfdNfo8LFpYKVvvdNgYb5WNayE2hG86ZPXfP4+47d8dgecF6OfwPmIEUu/ScN8RcZdeEj3S8D30DAQVQ8kC9gLLAzq/nOg0MLLhOGdWr2kuShmM9KmTAVtVgOOydo/MKVaWpY5aHfv44dz7xco5KfkG1y0gc0UP2wgiYBaIiNFHXuwMVL2fU9zQM2Gm330XYxmc6uV7Zff43Kh1hGSQpEw9m6KASj3mbHeB43zNVcOYkhBz9AilQK4/o1GFAzYfL4x70ViseWKJ07SWGb6Z28FSnragRJDrOMA4tt0VlDZK1FDxcc/kZpLjA5jNjtbGadMPaEgdCtedyHTL/2pfV776URd+9FEetPK27KgVomtUCjBdo8tDD8mYTpEhxUf6h3fyQNwY79az4GF62UYTqV5ylZBJB+ChG74BwN/0Vei25G/Of6FnQ7MwkRzquyNQMuAcq9RySXlZvOxiT7ygYQEuFiBi1xWt6ohzNPR6cejxIXfsUPcw1gePQpGBG+oELgrpjqtALURqrypKcxE8Wl53+R0/2f1RxWvvQ4G/Vyg+lNuCHgOxYmQzKYTMMKIftERE65QYOzy9G0irontRR3ErTDK0YFX32eEKDkegsY+AJ5e5dpKPDKCGTgKBZcQI1NVaBeGtNNcl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(396003)(376002)(346002)(39840400004)(366004)(451199015)(6506007)(2906002)(36756003)(86362001)(7416002)(7406005)(966005)(6486002)(478600001)(52116002)(316002)(66946007)(66556008)(66476007)(6666004)(41300700001)(4326008)(5660300002)(8936002)(54906003)(8676002)(44832011)(38100700002)(38350700002)(2616005)(26005)(186003)(1076003)(83380400001)(6512007)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: w4hY00u+Yd0/VZf2YiSeV7mCD+gVRyflB4wvcT3WFtjHo93rom6AtiWZwI/LugTgj/NiKfAUXiwHy0d+KwZ9HFAAItSpY2oaAPzxQl4W1DyFncO8KSDWPyTG0SiHUIPPYg2u21oQMAQa8yvQ08NolN5URGzBaz6kk0QOCzQN1WBmeKtf3A5kCKBIs5ZmrnvYpZRJ1aOuleW7iNjQUhBV894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73gQwb3CkFDQTgZwIH8Klk2gTRHqH8mVHcEtWWSfrZ3142AHuAVnFeNpjha4ITq+1F7n9ro0Xz8xwrK7jzvtTQuxE/ge8oDqfqBD9loUMulyVexaM20k3HtdN8z6Eqa5y+eaSAQlmAioZD0NZpPpeClV4EbjaXg1Y9uyZK2ld/Oc9jxqQPoJVbSD13CoCNSs189mXKXUsPTDAOtDteprcsDHtjSNlbjptVURui0t/DhLLt/D3WAC0npa/khsF5nUVlM6223WgBGD0p1U2R0q1krYaIJLTypoudfvDMJ0v1NsPsK9QhRQbtEkfqnkQXaAe6/q3IemrD2N9QKVuO3ZIgl8/l4= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 122e8ba1-722e-4bb5-36e7-08dad0c971de X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2022 22:48:05.0300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qWlQqF/dDNQcpQmDixqP38DnuHTUfPR2UcoXvKtK9dZbslqLB/xtzmv9iERzMYl/WfHALJhTPVXoiech308feUVtRONEU3wbcX3HDe2kEHk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB4998 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_144807_842032_AC11E1AB X-CRM114-Status: GOOD ( 16.42 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The dsa-port.yaml binding had several references that can be common to all ethernet ports, not just dsa-specific ones. Break out the generic bindings to ethernet-switch-port.yaml they can be used by non-dsa drivers. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- v2 -> v3 * Change dsa-port title from "DSA Switch port Device Tree Bindings" to "Generic DSA Switch port" * Add reference to ethernet-switch-port.yaml# in dsa-port.yaml * Change title of ethernet-switch-port.yaml from "Ethernet Switch port Device Tree Bindings" to "Generic Ethernet Switch port" * Remove most properties from ethernet-switch-port.yaml. They're all in ethernet-controller, and are all allowed. * ethernet-switch.yaml now only references ethernet-switch-port.yaml# under the port node. v1 -> v2 * Remove accidental addition of "$ref: /schemas/net/ethernet-switch-port.yaml" which should be kept out of dsa-port so that it doesn't get referenced multiple times through both ethernet-switch and dsa-port. --- .../devicetree/bindings/net/dsa/dsa-port.yaml | 24 ++---------------- .../bindings/net/ethernet-switch-port.yaml | 25 +++++++++++++++++++ .../bindings/net/ethernet-switch.yaml | 4 +-- MAINTAINERS | 1 + 4 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch-port.yaml diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml index 9abb8eba5fad..5b457f41273a 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Ethernet Switch port Device Tree Bindings +title: Generic DSA Switch port maintainers: - Andrew Lunn @@ -14,8 +14,7 @@ maintainers: description: Ethernet switch port Description -allOf: - - $ref: /schemas/net/ethernet-controller.yaml# +$ref: /schemas/net/ethernet-switch-port.yaml# properties: reg: @@ -58,25 +57,6 @@ properties: - rtl8_4t - seville - phy-handle: true - - phy-mode: true - - fixed-link: true - - mac-address: true - - sfp: true - - managed: true - - rx-internal-delay-ps: true - - tx-internal-delay-ps: true - -required: - - reg - # CPU and DSA ports must have phylink-compatible link descriptions if: oneOf: diff --git a/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml new file mode 100644 index 000000000000..3d7da6916fb8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/ethernet-switch-port.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic Ethernet Switch port + +maintainers: + - Andrew Lunn + - Florian Fainelli + - Vivien Didelot + +description: + Ethernet switch port Description + +$ref: ethernet-controller.yaml# + +properties: + reg: + description: Port number + +additionalProperties: true + +... diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml index d5bf9a2d8083..ef7503eba95c 100644 --- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml @@ -40,8 +40,6 @@ patternProperties: type: object description: Ethernet switch ports - $ref: ethernet-controller.yaml# - oneOf: - required: - ports @@ -58,7 +56,7 @@ $defs: patternProperties: "^(ethernet-)?port@[0-9]+$": description: Ethernet switch ports - $ref: ethernet-controller.yaml# + $ref: ethernet-switch-port.yaml# unevaluatedProperties: false ... diff --git a/MAINTAINERS b/MAINTAINERS index 3077c5af6072..59674eb07491 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14332,6 +14332,7 @@ M: Florian Fainelli M: Vladimir Oltean S: Maintained F: Documentation/devicetree/bindings/net/dsa/ +F: Documentation/devicetree/bindings/net/ethernet-switch-port.yaml F: Documentation/devicetree/bindings/net/ethernet-switch.yaml F: drivers/net/dsa/ F: include/linux/dsa/