From patchwork Sat Aug 6 14:10:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938046 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 036D5C19F2D for ; Sat, 6 Aug 2022 14:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231951AbiHFOMQ (ORCPT ); Sat, 6 Aug 2022 10:12:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbiHFOLx (ORCPT ); Sat, 6 Aug 2022 10:11:53 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130085.outbound.protection.outlook.com [40.107.13.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 792A212089; Sat, 6 Aug 2022 07:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YIubBo218Ne4bCUV+JssS6qxdOJc9Yjc+cz4lhdndbnNTp84h2Qbk1VNT3zUkht9c+CQGNdscoY6bcjeXOTMoj/cjX+p8KEcl3eOBBPRv5zOSY0MC3fPEwFprhsJ3u5/tAa8bx3pTRhzQORMGBFCr/LB2tluH5e7NSZ6Aays9k3LOLtKTbvxfSFTuOp1Mi58bw4ptUq9AmszIILuyCOgrgQjF+WVF6yvD2xw9t2NW+QdeOAbPvsqxq98kwRuKTFbFQH2IO5IkC0fASF2Yw8kmn7xogLbgXCXtmtQVSoKGQttDz2z/ywfuWliWWARd/LZ5i+ohj2vQIP4hSMgnXgVBg== 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=BOECcxE/wuitMXPLospeENTd0YtUoIuYKlSSxSnhZrA=; b=kFLqzpeeiQtaBcxCdkJCpP1q+K6UE/YJFPDnjS/40+LzJ+wM0eCw8gtJwWutcgNYjvq9yu+hYEf5W4TwIi1EJisZeSfqrvuIBX5oaEiMnJftnyR/Wu7dGOq7uMGmwWCdDGFQOPY/VUGQHHpt3Ap3GVlOP6L74tBTe02nAA7/Ofw4YXmJHb5gRp6fPe+yaky6ekmegeZWwBk/eZfc5/PxtVSquOU5k+pjE0TKvilP6VVXe2k3XQfwEg6yzbLsPbN1mkPBRJ3LfyIgmsbH5pcb6bwglsn8+Y1nxl6s+clGHa0KdQFbUhnyr8NbK5lFON1Mw0ohKJStCTOIEIslnGSI/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BOECcxE/wuitMXPLospeENTd0YtUoIuYKlSSxSnhZrA=; b=StWNPtRn+L04WNdQp/qGW/fMoF2TNCmLpYvjhPLvgkFP1n5Rb00zYglquqW3ZGvLEfZlgb9yYnuiD3nJ113obPs6saHmcoUJjX5kHNTuX+28zA1hbWMy19LLfn7VDwtFq3Rjf/W6GXUyNRU3Fv/dUuDwappxZWvvrVlh1LPj8Cc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by DB8PR04MB6988.eurprd04.prod.outlook.com (2603:10a6:10:117::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Sat, 6 Aug 2022 14:11:39 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857%4]) with mapi id 15.20.5504.017; Sat, 6 Aug 2022 14:11:39 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Rob Herring , Krzysztof Kozlowski , Oleksij Rempel , Christian Marangi , John Crispin , Kurt Kanzenbach , Mans Rullgard , Arun Ramadoss , Woojung Huh , UNGLinuxDriver@microchip.com, Claudiu Manoil , Alexandre Belloni , George McCollister , DENG Qingfang , Sean Wang , Landen Chao , Matthias Brugger , Hauke Mehrtens , Martin Blumenstingl , Aleksander Jan Bajkowski , =?utf-8?q?Alvin_=C5=A0ipraga?= , Luiz Angelo Daros de Luca , Linus Walleij , Pawel Dembicki , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Geert Uytterhoeven , Russell King , =?utf-8?q?Marek_Beh=C3=BAn?= , Marcin Wojtas , Marek Vasut , linux-renesas-soc@vger.kernel.org Subject: [RFC PATCH v3 net-next 06/10] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports Date: Sat, 6 Aug 2022 17:10:55 +0300 Message-Id: <20220806141059.2498226-7-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220806141059.2498226-1-vladimir.oltean@nxp.com> References: <20220806141059.2498226-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR0802CA0016.eurprd08.prod.outlook.com (2603:10a6:800:aa::26) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f187b93-569f-4d5d-d70f-08da77b59469 X-MS-TrafficTypeDiagnostic: DB8PR04MB6988:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4a2Z1sbR+AnN8em4BBJb2Koi3zKp0HwP8X+Q1t2dzT9y4bBg67acSj3JXsjXDj5RiGitf9N4yw2DrVP+h5o3ejIgveTnUmAGasNLkDDrt9g+OaSzQiwcxSJAu+EGhNd5v7tH+6diKuWswaUv9DQbCwY+TqgQSMD+zWFQXl64B36mEDOk+XBUqSZAEu4vkMEUIF1LJcIg4M8QpMvqMioYx5qbcGP1/UZ8WG2QNi/V2F+FHNS4wQAP8xQFi/Z4FgmwvodMpiTYhjpGs0DDZ9yCB3beUBnKk9amQftSkO7c/sLxTXP+3/JHVmy9y4pRKfoSYCXahQr53hAfGS8NxJXg1Bs8GD79QUPQJ6g4iiC0K7/4LBe+jhQfRS6UyWLakxCRT8h17yQMRnPfnMRuQh0v0AQ5edBqdQbTmqVxrKtIP1acfZjWy3BXiiynIB/B00sw4BhjCvxq6LCSQ3F3Rg6BU9Bz4Jey466PkZOZcEbCI9B7NqGjyAou1iEJd7QkLMhCfvWZmzuHYFfywg6q/+0S8Rhb6C1/lD0mH2t2yYst+4cLdNbO5hWhhL7PIauFn+dGJ+bdmkwz/Tr5uJ3e0NTa3idAB17EJ/3ocOvU53gB6K4V/7xdsh6tE35X1OLGNw7FaYJNl2OBfDnToZu/GhYLQ8UfcLZmDin0ICWgTtMpe12qd8ha6v3iloOts6ZbKo839I7VBoSsH/a8u4xARb1v7/uenn6OsnYW5jdyc4g68/TvqPcpdM/YnuLm6rCghbiGIdIkOquFSW4eykAjoGUyE59H0zoFF/d5oCJXre8WpUE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(396003)(346002)(39860400002)(136003)(366004)(5660300002)(44832011)(7416002)(7406005)(186003)(1076003)(2616005)(38100700002)(38350700002)(6666004)(52116002)(6486002)(41300700001)(316002)(36756003)(6916009)(54906003)(6506007)(26005)(6512007)(66946007)(66556008)(66476007)(4326008)(8676002)(8936002)(478600001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rdKZ7enVYRGPbnnebOw2wy1xVlt5NWpinKCUPyP0YBGZoYFoYYO2ltWecZuAGOElEiaKPHSvFxBLMnZ2KuApXZG3Vg+vRjk/A7WHXfY/d9nKkvHlBupimD0J3Uc3oPz+w76fOyVafmKsH6msoisO8Ot5mCBTltGMEGLply7XMtXnyWPMXVN7EeKnpYrkzxEPDpHKyWd1l3dJr5Br/SEfDPx/4vmCQCbK3p0rixujCmit30jFhVPaq0nVtVPMoNpwQBo7j2IQJhvoVht9M+qm1BUInjimt0S4YnCfFIurE3Ij1bh2Ym28s6zhmtv6iA3sFwxQmNfvR4RGOyaABFwpJxrd6olNUFsBlOPchEVTBYdOuVZFmn55YQbMiKx1FxMQgxF3QdukLVhJ2K08aDYaB/WBy6LzHcfFd4RgoGbHguZ7h2HyBH8AgAzZkKH4gBNZ2s9b1GcpjR0cIJmwcXX8W6hK5uhw2PRT09Aduoc0fp47SLfiZpS9oyPf+XLPaMVaaTqGEX5EXKp5W0+lDNCgaMsyDCGRnaogdb9i6T841fhG5rUH5WML4wZ7piR3hQQnuCEyJycmlxEYA020x9DkcvLI1G/0VsJBDE78XRqiF2o+3OMJcRnPYAJIDt0GUSeCydMAJ41CihYyylpOaqNC4TzvZ2VPuYXlCjX/VmoWRNl2u2rQx2KVvbjACpubTepM96RTTIYyjjUM1MBgb7478eZqHo2pJDAVQkPjSxbQEIX8utICzqUZmP2YMYLyMUi3ToV20UJUTDQjI7NNRX52UAsuNP8NhQGgXsILrvcKM3UYyDEyThdZOp6FqO2lrI3FBljXTboQT1VgW9tUW80SmRCIS7lTJBgQr3XLcPqf2rlTHWDS48r6njKjINtItLfyrtDyUr3rxutg1Xe1iFfGLe0B08+QVOQcR3oaSAz8BIgosHqxN/2m9HhsVCSj2m6+0+/S7+LWV6G87lhaS5trY6nAnxQxsxP64SbkJosOhI2YlIGIGkuM3O9ISWViMZHAbMQhQngZstKbkiwcVXdvZnv03fdhpGCEbE+XjxkwRyAaa2pNwcjvNYeM2ujfPEy1p0V1bYk8XJIVZKaF89AQgh68WJK7/TiXubmVxiH7nkijn/HEU/vhKlwSj7coBdrG1HgdDJWF7PviN/kLpDtcfLXkWVaVL+mjJupmZSPHLHnReeM9okODQGyCB4LPRhW6e9iwfVlfyuoQkl6JxiwNfO02kYpJvkPuUWswEc+Otfdt468Idqa0fmu9Vpu4nvEshAk0EhbwmLQiwhMp0hkOj4FCnby9MrZ4Xnd/NNfulH5H6MCm4nH9rImgSVoFcqIENJuH/VSJtkaj4XNkq1AqShn/gtU09Kh11z57cSrvZOzkGf5XS8d2hPhTh4ggHHtbKTG7UA9IXc/bGLc+wOOG7LeyXZpB8Cwb3KlK/JyHg15ecR2cVM/m+cQdRpV7EGJ+UZ8kQj2AL5XglcQMvYALLjumkMSTpt8vbgzg7NNIHMfe/i3XvCVkuDDWwMcQD0Gwxqtk0o0LZguQN/+XI/o7rD5lN7qEjKdgX3T7ZrHfJvzDB1httQy7wz0Or4vq+Md1Wd7MRBz4dYvwN8cU2GRT1g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f187b93-569f-4d5d-d70f-08da77b59469 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2022 14:11:39.1440 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NcEFgH8M1UP3ImMZcMvXi1H+iW8dznkkPf2gSsWHyIMd2MPXOE1FdUxMuWIqIJffwfJKvmh3Onej2iTci6RQng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org It is desirable that new DSA drivers are written to expect that all their ports register with phylink, and not rely on the DSA core's workarounds to skip this process. To that end, DSA is being changed to warn existing drivers when such DT blobs are in use, and to opt new drivers out of the workarounds. Introduce another layer of validation in the DSA DT schema, and assert that CPU and DSA ports must have phylink-related properties present. Suggested-by: Rob Herring Signed-off-by: Vladimir Oltean Reviewed-by: Rob Herring --- v2->v3: patch is new .../devicetree/bindings/net/dsa/dsa-port.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml index 09317e16cb5d..10ad7e71097b 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml @@ -76,6 +76,23 @@ properties: required: - reg +# CPU and DSA ports must have phylink-compatible link descriptions +if: + oneOf: + - required: [ ethernet ] + - required: [ link ] +then: + allOf: + - required: + - phy-mode + - oneOf: + - required: + - fixed-link + - required: + - phy-handle + - required: + - managed + additionalProperties: true ...