From patchwork Fri Dec 2 20:45:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 13063247 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 CB30AC4332F for ; Fri, 2 Dec 2022 20:50:52 +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=BBhctIN/+O6WIVDNZl1LP3cCeEps8G/rQnpmoNBwA3E=; b=Nw/ypcFeo6LwKM ES9M/PSCJfxrIye2PO5PtNuDxt10SWiC9rxkPBKM0Z4NxRKIG6+AmR+cXRM0HRTG9HIMPxRwQffsd C8gr7qyhsVMwB4+qX0G2N6GZydVvg5Hd9Jq7Z7Vd0L8Exu6L3k//iMgM1VdIJ5aelRMZQP+Ac9Jyr K3Ia796LhXto3n/VmNt9Tq2Rj2TlZd34x/Y30e6zAneSlOb6ohW7Jrtqgc1FszJRdspQOqdU4tG53 gh6IpyeT5evOTtSG9XAsZG2CAkGvOxaz8gi3yVMiF7MWqhBj5l3K0ug3dwWMK7Bf6RuR6i+hu3oc/ Vaaw4lPO+sK588e2pfQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1CyX-001Dwc-Kd; Fri, 02 Dec 2022 20:49:38 +0000 Received: from mail-dm6nam12on2070c.outbound.protection.outlook.com ([2a01:111:f400:fe59::70c] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1CvV-001CeI-Ua; Fri, 02 Dec 2022 20:46:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bsrzRb/Vu9FuDAAApE61SZxjUKbX3UqOEgdE/jWHTwYLekXC3G24bDSqtymWcm8tvZPrCC6+qrx22By8DtaDSgCxllkXliLiFncGZN3hHNWYLOT4Iaj5cTatpaqNlzQ9ItBAq1j1qRJiU33sQpsjpvtHozNU7wLxgxn7MvR6UiSZnC0HkwH6Oxi15Ouu/UT98gtKH9QVio6mOt6uZKI0/zHhANeiAlQ3/Ad9Wq5gF9yB2P7PeicpnDiAhg9zb/04pUdIw3ARzLY58d6pX3Tx4Sp8sFzn6KMtBWyYgcG5YNW02C52S5vDIEQDRbAE3hp2mn3c1l7RXE1F+FycdbzBnQ== 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=psN6fFa8QpKmg29sah/pAyvCcII6SzIWv+35ik34oF4=; b=n/eF+iObwasl7eC5ek3ouOD5321OdnFdB41Raz2ChLZmBHUCodvbDnydpgb154YhvISxwJVNIRfQ+cBubNecICht8h9Y6+DGa1bpTk3+4GWDkWi8jLsVozqsmY6d58yhobZFSZsFiUARaemJuLTbP17Eo4YNNx0gcCQjqrgdT/SNvPH5efreV8WBI8XBOsw8ueI9n4LGLYNHIqS+PEQU0h6qJJVWN2nz8J1r8xeYbhV00v7nGpWHuZNngvlSC97NdOrRmyaZdFxpbRYDPLjD2cH0JxiKv6Y8sjx9hJEELLqUrsGqsBRO2LueTKpstvRvLImmV9xnZjyId/QYWadC7g== 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=psN6fFa8QpKmg29sah/pAyvCcII6SzIWv+35ik34oF4=; b=i3fKAZxvAa41X2ZBv2zRraNJXfrNq2f3CFYWEpsEsFH3qv8SUAy2OdhgWVO7YBeB1vp96nZpp4NLa7mbXiwvtG7i5wSTDxwvfUecI7SwrbPU3VW3rb13ASp5CrCJ+JF5jKvIWfLiX9764iyCDpP6b+JQENmKPVzVohCswKVk9/w= 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 DS7PR10MB4944.namprd10.prod.outlook.com (2603:10b6:5:38d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.10; Fri, 2 Dec 2022 20:46:24 +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.023; Fri, 2 Dec 2022 20:46:24 +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 v4 net-next 8/9] dt-bindings: net: add generic ethernet-switch-port binding Date: Fri, 2 Dec 2022 12:45:58 -0800 Message-Id: <20221202204559.162619-9-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221202204559.162619-1-colin.foster@in-advantage.com> References: <20221202204559.162619-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR03CA0201.namprd03.prod.outlook.com (2603:10b6:303:b8::26) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|DS7PR10MB4944:EE_ X-MS-Office365-Filtering-Correlation-Id: d6901ae6-10c5-4daa-2c44-08dad4a643a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VdPRFIe/4oxYxE5sCp+5DUFuyTSAWymiOJSb7s42Yok3skKmnvvIMiv2ngFL+DgyVw64sVmi8maoN17QvVoFV52ERbiq+zHfrl7QgyBmSublQZbjxk7nWbwOdLN2cyh162fW7AxT8xKumcP/Iae2knlJ8ShZ2d0S782saFserkQiorMdojBjX1fjjMXl8hvp5YN1xuSXOM742RouWgusO1oncrruPR5fdINiab91dBK1PoGbvQK9WmxIC+XTPmozQS8oY9EWS0JtFPjfwVJfSJ0gxTcMqxgD+bRhkP6gRmZWX2inbQZ5PXPJHSIgdLdanw6dDpHEvc44PsiIuSZyf6uvcm+HDN6yirA4pmMciudn02iFI5E5pbaw7JeJVdNGCsynhjpkjFdUX+EdGgNtGbVpEXprPB2YR4MJlaswRnbL/dui37cRjBiUrf159XgzNB0EwKVSpnOmPdkp0o515cRV3XMvCdezOXhg+iuMnGmIWBwP0JZJSoidk9e0R4JZOYQCnvYzdaBuMJfaMsFSdgRno3m2plfTxeoR29TH1vw2Ekh9zf1SMHKSi6snFarLvNcDRaLSq1GK0BupXHdOxMxa9XVaK+YVTNnrAX7QqhMkPv3b6v3Lr85MQQPB3RM2OcB/UE5HySZ5tCV33bkM6vgeeC6t5EAiWXIrQYbgh7rcGPis0FZ8ZIiiIywVRP3i4PemVtOISvB1oWEOfGWwSysckWX5SgbTwnILesXN98YeIm/CwnCWY/tfxOzN4dNJ 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)(396003)(376002)(346002)(136003)(366004)(451199015)(38100700002)(38350700002)(8676002)(66476007)(66556008)(66946007)(186003)(26005)(6512007)(316002)(4326008)(54906003)(44832011)(5660300002)(7416002)(7406005)(83380400001)(2906002)(41300700001)(36756003)(2616005)(1076003)(8936002)(966005)(478600001)(6506007)(6666004)(6486002)(86362001)(52116002)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1Z4LPcbtpymuWVKb6YmIDwaSluJYoJs0AO8OpNbPAcTAYbU6xLIXKLuX3cPCCb6g2wv6Yx6DI84Bt+0LU2+NroSNIRgIabb00S70Y7Wiod1Rp7wG0L+q0TnyAEBDT8/6YGgL0oBxyzF4AM6ap7YpMXIK+pLNfdcEwTSTYtrQ6C0SCSuutUgHVPfkejvZS6ntEflzbF3pd9ubsZbW6gXypWwki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32p9PzB81b1Y2EZ5jos6A308VTmnnG9QUamlo8OS7z4z2CTXKTzk2nKmtSDkf4X64KPOLm5Pv/wYrQgN23FmT8yyZM8WA7HGBWDrMVC1BHyrHF0zvv+g8c5l2w0M8Ih9gTqEIFrtz0dVnD7JDrQTVxrquM9H7tjtWjgEdtkzA9B5lPmH8k9fdncuPIlXfHXWTf5yL0Urj/gjGTpMwjf/FejXSB8ub9r5sA4rn0f/kCrzEod0dSVg2wdESU7nqmPHux7c2yL9REIx0/5p2VgVDZk1OeFumkkJZHJsy5p0Hx7y007Bd73bmLdnr9PgDOFwB5owmvM7W+ozxNg86CRlWi4GeCB7PZJ8= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6901ae6-10c5-4daa-2c44-08dad4a643a8 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2022 20:46:19.3132 (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: k8ojPipjvJR2ShRBGotNJptnSaGTdBBnxD36JpDXUVCaJWGOThlpt6Dy4JyGzjOo6V9t4bAGxR5RO5G21XVfWV3XmJ3VrR7F2GA+/9Sv3Wo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB4944 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_124630_018546_ECB0AF83 X-CRM114-Status: GOOD ( 16.24 ) 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 --- 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 | 24 ++---------------- .../bindings/net/ethernet-switch-port.yaml | 25 +++++++++++++++++++ .../bindings/net/ethernet-switch.yaml | 6 +---- MAINTAINERS | 1 + 4 files changed, 29 insertions(+), 27 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 afeb9ffd84c8..1e8b7649a9b2 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/