From patchwork Sat Dec 10 03:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 13070231 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 2C954C4332F for ; Sat, 10 Dec 2022 03:36:49 +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=GHWkXobq9kpVX8wMPKOYdLEUfqR7Wt6BusLDus4a9LE=; b=pyU5h2sLH/2TeQ zmehd/f23uxGaAjrGXp8fe1HZ4ixM7P8SF6JwVvtiKkzrneJ921JEW7j5+VCx69uBKTLVx4ArE5s9 z6skG1StvH1KApYv/QMt30CuCA3GnX8GCFHzvNSXGuukhRDGzNNLaxBbbEGupZdlwHPk6OiCB35pm pW56a4A8QF8ziNtohONgR/pC3TkvNctz6RNYuhU7R6iAUnUIF/AgloRUxBtRDgP8O2xGfG2PDSME0 RnudlWAe9UeFPcMxn6AFsXDmzet/A5xQSmM1yavLIXCEpJKI3ck+5YdBL5rXQXkJneUMY+Vm/l0Bs Wuw5TFJKIz06zROMl2pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3qe5-00DrIi-LS; Sat, 10 Dec 2022 03:35:26 +0000 Received: from mail-dm6nam11on2114.outbound.protection.outlook.com ([40.107.223.114] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3qa1-00DpXH-HC; Sat, 10 Dec 2022 03:31:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UYY05e+LgWPvEqDUa34nzTalOkl7BxiLns8F6jhRJZdKxSV0JhtlQ+VoZge8aecOQo9PWA7gR+/6eMlFCKLqAZ1MteqwwAN9fSUaOhXc66Td1Ee+vts+TpmTVl/2v1cwFdr8s+8Z3Jojl8wlN5ikJe2aU7cBmwkk5q1L581kPMailMsU6CsbcSsrOy7wMZqtfed5XcV5Bc4tb85HR5d0iUGd3tp24JGfw7cQ0b3XYPrWPlsqaE+z/DRTIWbtVMDJA8hhtG6MveahjTxsdq4iiPyOkv34d0GqfWesHOPMbaa1tqgH5IpQx8+Lg85vEjyptzpLEzsNKtN83DMIZ03tbg== 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=wAirJbDJr7zZ8tDqd4iQ9SQesEA26DHxqg9/Gsefstk=; b=jpIm6/bEarG4BjY5AfJ+snCfu7Pi6PN8IdeO/+j7S/1bMPPWtSsHunJ40jYwPp7OFxBkJpVyso92jHIvnOCYXm7Q6aAKUeS3wr10MnhlERYLckEnJNjmzFgHKMj2fdjMxPrwNAeY7lfQhrSRcvkBqnool7jyK73n0+Ctqm5PZgcEoEHOlo4QBB+H83X8uRyGJ94dDPA2DJkr/G1NwcncKf+mwcGKUQqJA+SVTmw2bCGTcq2bB8bCxLZnJ6xTGgLqlCif52LdbTrw3eXkhcjf50V9dFrn4miC/+eH/SM7NRX5ClEJMewjwSoVxs0In3SUb9JhDAQ/4eW/myCRMg86jA== 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=wAirJbDJr7zZ8tDqd4iQ9SQesEA26DHxqg9/Gsefstk=; b=WjmLWGdwc5GMv1pnd9qmeQi6fKXOEwHwL/fpqAi2qUISZrrdlDiRMWMInrwGV1TltGmtUm78KjroAiCQSrC0v6hRpb+o5OYqO4JXQD5tZRzhMmPEP4TEMLRqdG7Hf5RHNNebT7ffoJN0r7STslleTmztFn0RHzkQX6qpbrSEojo= 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 SA2PR10MB4779.namprd10.prod.outlook.com (2603:10b6:806:11f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Sat, 10 Dec 2022 03:31:09 +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.5880.014; Sat, 10 Dec 2022 03:31:09 +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 , Rob Herring Subject: [PATCH v5 net-next 09/10] dt-bindings: net: add generic ethernet-switch-port binding Date: Fri, 9 Dec 2022 19:30:32 -0800 Message-Id: <20221210033033.662553-10-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221210033033.662553-1-colin.foster@in-advantage.com> References: <20221210033033.662553-1-colin.foster@in-advantage.com> X-ClientProxiedBy: BY5PR13CA0002.namprd13.prod.outlook.com (2603:10b6:a03:180::15) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|SA2PR10MB4779:EE_ X-MS-Office365-Filtering-Correlation-Id: a4f1d31f-b964-40fe-f629-08dada5efa5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LGoZKSJaoYMkQkGgVU/IoKSvX+7WEFRLo3XOY0AX7F55xK2OQ0JaivNKo6Vie7n/mWub9a+40TRF/1i3kemq3uDNDmSTJk5zMvMjv+NEqh38j/1YZhIfSd0r5ha1qMHQPb2AueRFahws6aAIEOomHMpuHGbZylpEHtFBpKvsy1ZEhmo/9+b1Gx8+G9ju93xsNsZjR1Fnr7FlWNsPAAdJHVKXlPSRctHw6zLe2qgY2Q+rXTvgr/HvqhTxJixuhiIpGlSdq/0Wuv/4IkIH0uEkUOtcFXdHz3oWHplAcJ2+KX3qMFpvFXKjzDL5UG6wuaLN6X2+MEBKE5K4UI10/q6wf9LZh7I4LFknWve3Z5qZmYE5OBogHdObYycGYADoG3vEyM5qlmRzPFmvF2e5IWaEtD+0on8yQe8vdJbBkr3ZjGgCNG2ZSPZZ4+2oACoXZWlkw/Q5KFHoli7Nki2TvMybOl47BwEEpwAUQG0ZukfJTMlPw87Qmcm2JKYwcGhC4JhW3UeK9Fi6RcZnTKvggH1o9muPqjqD4k0F6f0A0zQV0lcuX91p2yalUVtw9KWMlwM/eODg0eBqEvyB6n6oXawFTbv1zBdwSsUdD+OERbEfF5ErgPKLp+/Uercfp/xq9rhHmRH2M4/Ptwjhk74xvFlOo1ViBnJdnlkZAQ/2mZOOhP8yOxjj+jv4AdV3FHPhyBuPE22phBn2KHtpLVinT/MyrlnmApW05mNhOVdoRvh4zQNHvqW+exnaF7V5t3bbJbIJ 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)(39840400004)(136003)(366004)(376002)(346002)(396003)(451199015)(6486002)(966005)(478600001)(52116002)(2906002)(6506007)(6666004)(86362001)(36756003)(6512007)(26005)(44832011)(186003)(7406005)(7416002)(8936002)(5660300002)(38100700002)(1076003)(38350700002)(2616005)(4326008)(41300700001)(83380400001)(54906003)(66476007)(66556008)(8676002)(66946007)(316002)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jaf9WXF/vU+ZWoQnidbKnuuYGJsxGZ7auFNWItwTu8ugKA3e2cP3w3wHJke0tYbTRt3GWdu+H4j53NUT/OFvEtNSYKEYvogt/hz0lNsCwDxbDcyGB9CyMd6TeLa7uVX3yttzPmEGnGE8H3SErgsPofXnWgBEUhFVEGRrDNp/loEckOsAdWL9RhhgJ8VT61tBY4h6VzZS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qPNZ6rWkyoV1CBJKS8No5LEWb43CAA4YgkUdz59+UkI8binI1xuZyMoUQbFAglQZb/M+Hx4Q+T5GbEsFM0cOJlv40EvV/8wZPJy0Wi9wQgRQyj4LMYfaKsZyURSN6NKXACnJPUeZ3jCz7KlwDC9nR4dXXDbS352qYIe02+M8xdyhyJ7v7c3OsjaMO9ScOgDeS5vEFGjqVSxWAJ/q3HQMOWvg92UlhUXZy/aOAXFbQg0mYnSQw85co3lQ6kikURGNf0GuQ0stTzlka0fyLLNaG+LcVHm4BBB9QGlpjaJIcGhOTMl0p5I6zBe6IYSxIy6MDU8NV26lUaBGV/ETsvktZttpsGdmfNDtzFza4QKJeqbd/gKoQCQUSoA5SRBA= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4f1d31f-b964-40fe-f629-08dada5efa5f X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2022 03:31:09.0439 (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: Sn5r5POVYsYb8Gg5TtpNLFSI1tbNPs1ro7kxiktYzgdJrJ5yHdn/wmCDSZTaCaUyqXXER1Sn2wtFxL3mvcCl8WAq/CFlv1Vv7sWAExGSnFQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4779 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_193113_625111_0E123812 X-CRM114-Status: GOOD ( 16.92 ) 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 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 Reviewed-by: Rob Herring --- v4 -> v5 * Add Rob Reviewed tag * Change Vivien to Vladimir to match MAINTAINERS * Capitalize all words in title line (Generic DSA Switch Port) * Add better description of an Ethernet switch port v3 -> v4 * Add Florian Reviewed tag 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 | 27 +++---------------- .../bindings/net/ethernet-switch-port.yaml | 25 +++++++++++++++++ .../bindings/net/ethernet-switch.yaml | 6 +---- MAINTAINERS | 1 + 4 files changed, 31 insertions(+), 28 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 2b8317911bef..8a29b4c140fb 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 @@ -12,10 +12,10 @@ maintainers: - Vladimir Oltean description: - Ethernet switch port Description + An Ethernet switch port is a component of a switch that manages one MAC, and + can pass Ethernet frames. -allOf: - - $ref: /schemas/net/ethernet-controller.yaml# +$ref: /schemas/net/ethernet-switch-port.yaml# properties: reg: @@ -58,25 +58,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..126bc0c12cb8 --- /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 + - Vladimir Oltean + +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 2466d05f9a6f..a04f8ef744aa 100644 --- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml @@ -40,10 +40,6 @@ patternProperties: type: object description: Ethernet switch ports - $ref: ethernet-controller.yaml# - - additionalProperties: true - oneOf: - required: - ports @@ -60,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 d574cae901b3..fe5f52c9864a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14337,6 +14337,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/