From patchwork Sat Aug 6 14:10:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938052 X-Patchwork-Delegate: kuba@kernel.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 3260CC19F2D for ; Sat, 6 Aug 2022 14:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231701AbiHFOLY (ORCPT ); Sat, 6 Aug 2022 10:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbiHFOLV (ORCPT ); Sat, 6 Aug 2022 10:11:21 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFE9211A22; Sat, 6 Aug 2022 07:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IvCrBkRkXUBdtksnjMN9/tdwPyRM6MgvJ6roMyRz4Z3mVAgCHfMp3Pbv+KqxvqygWlBjCmi6hE4EoUylrmvxaY1OGwHb9CdVdN6dSuLwYMOeko2cyYbOJBWve6U0OT+07k5eSL4YSKyOGj/hPkyWiesjoTi5Mu9oR+O5T+pblyV4k49qZnTCUZxvKJA0SHo4Hg6xSpf1/sfxyvmfxIEku2KDmm6zigVTcMSHcUYn/zH4DG55/w1dUo/yEzUiQ4otPYAv+rkfNYYmJkwZzU/HJ6Naz1Q/yY8Rws7KwAhXxh28/PRxt6L4qKSEYUa2ZgM7i0ZkLJNm7x6RNWOYhRgA2Q== 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=4FCTLrpXcpumu3j7inS5BXnNP8394/sXya3Ht9LhiuU=; b=aY/tW/G1wr7BOZlMC0qYzNnitJfeDtEgr5dzFAbqqQChpkMXMxF95ER4/IHKrQ53uW0VyOXKvGPY+SJoDtV4ihLVL0DxpWcMSjSOnrX/65czdCZq227ZSOIIs+IcvIVG+7IoGWr2PjFtuJvti8DdxmGt/tt8wSbMWFy4LfoBjUW5BQHGCY5cDbEeGQhgF1IVCptBfgCTvHd3jHKy5t1XBjNwuqIh2bWUDRcNNjHALQ78F7yazN5p/hQALaxozm9LbKVltn6lcxz6fRn3sdzHGWkKJxVwVYocFE4Ce72lctSkBcKmfCYE0I0LSVq83/zxy1eCfbtxBaF93Ntry82uLA== 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=4FCTLrpXcpumu3j7inS5BXnNP8394/sXya3Ht9LhiuU=; b=NhsB/+w5HxpK95yfpakbjZoxQ7c0dEIjHZ5zlxE7MBPw0gVXslM07ZzeM0VKK1+7GzIFXcZTwgDRFhaq1cpqJ988iF4VGu9BsPPC0ODKw5dYGzkbtz6S/xwp+D91GABSgtTliEyJQ6z+JKy4ABWDRfGSXCPCe2frHLgPr7X8hhk= 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:17 +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:16 +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 01/10] dt-bindings: net: dsa: xrs700x: add missing CPU port phy-mode to example Date: Sat, 6 Aug 2022 17:10:50 +0300 Message-Id: <20220806141059.2498226-2-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: 0c84877e-2140-404c-daa9-08da77b58700 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: /wEQ4E0H2Q1b0sD/HLyqKfcO7ZAGdDjnA9c6nYvlhVgpa1jFdUdiMG/WPDAtJE07C/+SdMdxXhTwWf78r8aqb9lVVDiv5u9rSaOVUluKYBgwJJJSl5ItEYdLoj1/Pyu70f6l4ObnGsa+wg7OWEbfjhNQZ2vD4NMElQBD2m8r7eK7VeyzOe6md6r+a49q+VxESOhwGxUUKIoTgUut/Ktgcvgj60M6T2BPHzZGtHVn0XoWY3rmYkIpwwlF0U+RI7kNk4cX7zQxW7UfrtM8OydUYe4Txz4A2KWLotDVIEat1JTGSYUwPQxHS7/Eck5IVCUq2gYZPE0Gv7wvGw4TjvGb4OtbsUiverNSLDRVPgdGk7LCcVJbykZfo+hEQTpM7Sb8M0LGojEApMh8JLqLdUbtJOS0VvgxhxVh7Rly/9xDcI5+zrA990Dc0KSt/Zs0kkmOvJPztMJrP+IsrKwbuGIZfsblBJFg+07Uw+rKdEKvYHROfQiPkFblilGutshXbJD/3WeG5t9zWsk8X31KVtlaQWMtUInv1Cu21xqLenG/zKEqdQH5xKMKS4qeX4B35mVxki3H5HBa7n6+tbteMkRy968gvGKthQCKi7HKTg8tZck7L4rQeuZ7qmnXamiClHBdIKPE/fDgWKbiXUSOH/Apx+yYNxmPdYKEak9mMKPplFibCRemQhrEOXALarcz+NH1VU7IWJiroalg0ok1Ec7Wv4QWjDmYn81zMHLRmsKUopXx894ZPXNCz1S6ivvsW6ElwYL9mRf/nkt5ZtvobV1OzW0MTSHs3nKv+u1VNoXBEFw= 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)(4744005)(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: 3Q3Kb/TJ1AHPFIp2I4/ZLMz7GYxOeDCyebZxjTa39tUH5aCw/k4JRo9gQMPqvS5Juo2d+jWrLOZV0mxkMOKvGzmCrnXCNeq6roJ2jq5LUa7HOCsQV9AUxp7wbbmDwOrkHiz9qKMheCJH6n/il5RYJF77FpOxQXghoH7naXwqbNja5yRtiNHp7+MgJFLg+Sjllg7JOGU66hddZdXVJ54WoAGYP3HGuPZVfGADfxR+rIwdd75m/zf5yqWl8pcib5fOKUE+BE2IupIoDR7gvJ/4MJRCaliIQR+so/lURqVbkkaEvfWXPKlfGBGvIhvAk8DxMqFd6l6vp9yoRQdIREo7yoc8DOkf/FKb+bLfYzOoXqEzKOkkIWvldfW9yvDrvt1tbd4RYaTNxYqpCKOnoG2rp56nRGiT293ev7b3Ld+68QmwcZOn/BUKggY1vV11776XyseuU3OkhCicqpC7DmFi6HIUNT+4rafPbSl0xdUA5/lgQRGOnPIxwaAorIXlVUHIJUjRR1NOuaLqeNGaebjsZr0KRDzpCqCS0Yj5+f8RAOfY/gV62Tx3HpVF+gwgnhtcLmFv7zkbg9DwRqDWDeu1GkRbFiXXCd0DGidt4PZKWW8FOXQkO32UFyDePOPfCmlr3vPoA4gr+SW5Gjj0ca3uwEOeD4/9EiEzvLb+uDFU5tYqz2bFm8pKeLlVeGKQ5/ojywMdcCEva5OIo+GIueVydA261NzC9CCevB6B2F/0zSnA46S2mPUtKfvWgmCEVDAZqrjmCTMiHYS2ef2sTZ6H7caMK3GMiN0NJFRWPNFtnqMGNDO63m5909FChtsQK6MYACFM+wl9GysV16cTTZaYJS7iK+7riZRYYNFyI7psCNoeexSBGcPdQApRhUvXVfEfBV2V6yDKSS6S83zVqBeYuks4dRtMjRyyYhpU87A0ipMYQN+ZQ2KVaRk2ITG7yEIdE8J6iuJ/bzwO/tqkJxZkz/IC9p0JLFDMNgH01kZ8/L8v6rAHD/hmMEasKpkGJ+OO/5lXgW7t4bj9jEr0/2NhudKIDEPrJoJmyy/Y1OOLXs3mk7BCd6QSHiJdQs5isy2G58JhqeBxGe6icwvnjo7YHEfY/iWfc198ql0uV7ViYah+jc2RqDTHbJMmUKw2yuzrGnIkCAe2+Uqusw3oORr/sX6PIsJXIf0ZVmKovbN67KCYlij2Oc407lOjs4KXaqFmk1k2ynoxfv7ZrYZzEy64Wx34oaggiRTYbPoLJciMsWxri2EvmL22JbnKvqrwYoZqd3U7EEXQdxT7rc+GQ+zuLAO8o9bpVPNCiJM2t6OGkuYHAszU1IRud8D/VP/8pR2mW9ZQC+FlqhXKyUOlt5BioCprNUyY3qHa7exIy0y9vSWjVHa/S0jM6EWJUtrOau3l9fekvi4aGL0eMEffPS4b8uNROLz6jb7EURZgOBhUoqP50OUZ02Y0Urioq19wANh3xhc57ZlNNqEsXqrA4o4MThJnHNyzRY1mQwgMFKqJfNTKBwByKEgrh7BZCPParcgayrcd9aju6wXHx8DIvMMcsTqaAEuxRQ68cVNV9fZKGWhL8NqFya+YDYOBu02Gr0vpIInSdz/jG18FDioD+xnZng== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c84877e-2140-404c-daa9-08da77b58700 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:16.8487 (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: bqtZ6usxK4PvLT+sA0W/1M8bU7/gZCTOXc3dohbLv/xeo9Sr8aZtbzmJ1SaPtDFXdpmRGL42cKMNwB2V8saF8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Judging by xrs700x_phylink_get_caps(), I deduce that this switch supports the RGMII modes on port 3, so state this phy-mode in the example, such that users are encouraged to not rely on avoiding phylink for this port. Signed-off-by: Vladimir Oltean Acked-by: Rob Herring --- v2->v3: patch is new Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml index 3f01b65f3b22..eb01a8f37ce4 100644 --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml @@ -63,6 +63,8 @@ examples: reg = <3>; label = "cpu"; ethernet = <&fec1>; + phy-mode = "rgmii-id"; + fixed-link { speed = <1000>; full-duplex; From patchwork Sat Aug 6 14:10:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938053 X-Patchwork-Delegate: kuba@kernel.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 A0C59C25B07 for ; Sat, 6 Aug 2022 14:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbiHFOL0 (ORCPT ); Sat, 6 Aug 2022 10:11:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbiHFOLW (ORCPT ); Sat, 6 Aug 2022 10:11:22 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F293A101FF; Sat, 6 Aug 2022 07:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1+UaWA6vs3fopxECGuhdEZAYpNI6DfveXSRePfXNPmz+S3ccPVJodMKP9n3niYWzwoETpa7xXsLRzii/NyzNIlpcRAODdBnWwyu2JgXnEq0LjN1JBXWWj0vwZzej0Z5vpmPk5L5fhvN2Hft/Zlys512aQNPQ6d/YhcEfes7bByL8yQLhcHBlpSSGqcPyRe9jW0neISwppbujvgwFyI0w442ZWCwEmb1nz+QZhXCdMDJ0b0o14f9TLszzce3DL9ds28wCaNYkafkpPkUT34UjCHUEXgRFslDH+6e/lHbkcFarAgKXHQ3pwEzKz6YDgJkSnk7IBmV8qbEbvKdw7OoEA== 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=dvv8DJU2hb6rKuyc2RUsxiY7kG8HaPbXYwe5Sk/NrL0=; b=n5ptDbSi2dfEfsOAe1euIbI3wb+ORuBsrruWdSxX3zixbP6CE05245ZkDgaeUKy3PVC5nCv1Olr7Mt24+YSevalP9rrBj5OMDjdbgIWsUM7i0W1/7m33FbWegHSOK0DF63fuJEe/LxdKL6fP4UatVdkU0Y/SZpZzFPoXdMzNQAoHY7ODGzIXZ3RnDIOXnC9t2l6bEBUWeoBvZ5Lwga97LjGxLDDpb8zobowipoMlJ8dTweBtQO+NlSs41IjM0v0qI5rcEWPrUfgGZAaxtrHihg5Rc7yvC41cabq3HIPLu7Z8MwvKXlGaxhWm1fNUNMQv9YiA1vxAybA5Wr9oZauYNg== 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=dvv8DJU2hb6rKuyc2RUsxiY7kG8HaPbXYwe5Sk/NrL0=; b=P4F6epy/Jc5B6dyOWugq6Lq1lpSaZ4y++K0Hh/q627i8mDPryJLiHUifV+0VH/EUNMxapYNtxKv7dGnnPqWkxkTX/mThxWuNBsd1eNFqLy8iSZPdW0ZNU/iHq7+tUQ6TG+UKAhe8tDEv6cQgVsaJsG/ym+C6TcVYOj6DVJmF17o= 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:18 +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:18 +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 02/10] dt-bindings: net: dsa: hellcreek: add missing CPU port phy-mode/fixed-link to example Date: Sat, 6 Aug 2022 17:10:51 +0300 Message-Id: <20220806141059.2498226-3-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: 6a15bbee-f854-4965-3b9b-08da77b5884c 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: +S/XBZ6ApUPptcsYjhZbEaJiwaGttkpJ2HQOUA7bP0lbVWg2hdRXcDDxl+EVONwF29DyfwP0H69eFxmc2kJ6GBn5mnNDBtG4G6LEuHKiiVBSABZe7LyDc/4R0eliaqdp1Bo++NS3lsa2ZbXJSZg2xhjOGbiAgojgdHU0/kEs7fqnF+h9NeP3oBQ9TYRoPyp4gmGEYdIKeYkzSszQi0kvcrTd5l1G/OId8KVlFEV6f1qWxvvIEf876VwVx5SfH7K0qQkIigqRavkeEjKbXdGCLp92r3ZMdkvFvdlcNVeBd6tcHJYa76zWkcbBWdokstzFc+l0L9LSMWu0s/LcVd/amnUj+s7Fd8EzSTC7cDXK3JlhUatG3YU85M1ZDusakDbJd6VDnUsD3elbjdfxCZ6tg4JTiAzq6Sow73LEF/N8Cnc6hrIW6qOBWZyw9++cz+n2J0ajx1gXefq4iA2jbBDb74mpkw3jAx2IQK/G1x6dI5/ptY5LtEPa5jEnEilp9Wii2xtKXQ0tPP+n1yd76E3365JCyH4sQynsw6v23dMCiFBOjPhGsOtRLaFJgud8zfl97MT6hX3gCQ9d1CPa+uTkHZO7YPVIZwVpWjd7Wmcte8n3qFM5lXlUab99Ag5K8sKWKh1aGjykE2dUFej9utyMEdGhAdTGWrPME3UNqYeu05p+dUIWgSOynbvQSr2nfAgJkh+iy0ie2D+wyyOwvSfpzzZwKaAaUR7CtFn6dEc/xtIyKTD69eXtJ+lyXPKjPXMQ7GgXzIr6L2ZJoWPtFPQ3+l+Np9FrUTDWbUH8BY92iJ0= 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)(83380400001)(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: aBJNKlyexdUYhyuYHDQElT+w4nA62Slz+np3s9xuStk/IdtekyS5VMyCHFBNiEsl+qZeJauMg1YbyE9/+6eMtILnXsgpDs4y4SaQEZzBeRBGKz7OAPMt58Xv3SG+iVHe8CDrVtXU6FzSEn5zOisGjRkvZBWks2Xsbjn6Hhpvk8Wq3m08pP9jXsHYYo6dH81tFXOnOO7yW566/NlsoNWj42f7sue/XYSUrnG5Cm5oV20ycPorlI6kTXpQY0B2QOwrDt/ibGSIuod9H0iFEvaeuhu3NpAOH3TeG9foLP4dfgXR8xtArI7UxawaV+Lkni6+jEcei7RCCb3Qo6GlfLMWnTvbFVjcEVJnSo2wTngmrzuBhnR6FiedPPvAV4ufJbEwmuXea7z7iaBFkB+z46jPfL0pNIGJGDkgC8lZvv5QewW95hw0yS3hAg8ZOrd7FDd+KREqHXTkKKhO/tBGXBh0aMdMvhQatErApcVZ8t2e3RnbFFtDlrF+ZH3WiokC8KojRzV0znqjj3mX+vf0GJN5QsvEwkOqPP47wUoI9psjbnHP6YJI7X2LyC/2bV6gg5xG7gf4dze95ugMhtLbghfDJiTuGz51WWD1vVb7htvhXzkN/MCfhqi9uKIgO93DihYeVX0b8TsKWxFomf1ZCsm+SDy4WFkM2y0yCIXGTen3ur3be6OkWj7OFTNYP5nY5l1Ilorayqr3maJHEmt4rDKfBGP5i4B6JoAgrqc+EOQkoyVcttgIFy4fXWJo3xTE/xnxjQ1uRwgoWQBqi9b+mgt9HcYlb4rdJWqkJfPEHRkbVr18zEpiRMPLMze35h/nfRd692QcvCTK5yDP55NKbn+sAowp6kfSxlK0AWUvJjjTVO/zV49WYjFBJ7uN9IbxbOZ16xcjf3RDFR7BAUT9pv2rvySnJM+cYO8QRtzn5uBvRvyWR9Awabs8xLkbC+gCUzf00AwEidlcC3l1B/vJheuixbOEo/HOcXBbkZa1WV4RCqCw0aGTySFKHqUsE68tlcjCFMbgmdvrp24DKOR2tCj31uyx+9ltYXdZ56cR/Tp2x/z+9Yxk9Wt/FYMy26RzO9D1ny+t9F1UjYIj2XzCsZKOZ9h9Y82uI5ubTE1tAv85hsY+sJ/RfapinFW1Azigshk/rPT3RZYFsdMIe91i68s2QVw8fV569Sitx+nYQG17lG5x/wm4MOICGDlNhcDEVbc7YPAf3+9kCrfMBQO4pFMjZDfO6AirKhSZNo7GhvgNZHV8MgzGmgDE79g7BoTislnbKtoQOImkrne0CCs6spFFTaEbklAKrRJPnqkSLGj4V6Bv5nNFUr8agzNWP3NfkGi8KoTJWbJZygVVOFJm9XeP2QSMLeb+/24boFEY3v2K1N6b8evAC7wRWTFKXw+RKKrR/z0Aap7oeaK71DFo7bPDXwyLdwfxlGRmHVAFCs+CwsLyFJSXLBZomcMnaongXegXKC6PDR0h2XNkfCbEnHuJ3AqyUR+MPOG3MDpo2nw5t0kDv2mtsVEIOhml51KeBz5+kR9XRqeg5xNbz+mnoDB3B7y2masZQzZ3gPpcQzycc0C4Fne1eXqpB845k15uDwtChVd1TlYcWvnBs1viQBnmJQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a15bbee-f854-4965-3b9b-08da77b5884c 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:18.8173 (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: t/0CZXWiRgmHb3JmQB36TB6PxggFzTDPi8jiQ7WAC5dlqdqDgt8pKpEQBOWikYzEcK3eOXuBHOzJ/Sd/VEGF7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Looking at hellcreek_phylink_get_caps(), I see that depending on whether is_100_mbits is set, speeds of 1G or of 100M will be advertised. The de1soc_r1_pdata sets is_100_mbits to true. The PHY modes declared in the capabilities are MII, RGMII and GMII. GMII doesn't support 100Mbps, and as for RGMII, it would be a bit implausible to me to support this PHY mode but limit it to only 25 MHz. So I've settled on MII as a phy-mode in the example, and a fixed-link of 100Mbps. As a side note, there exists such a thing as "rev-mii", because the MII protocol is asymmetric, and "mii" is the designation for the MAC side (expected to be connected to a PHY), and "rev-mii" is the designation for the PHY side (expected to be connected to a MAC). I wonder whether "mii" or "rev-mii" should actually be used here, since this is a CPU port and presumably connected to another MAC. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Acked-by: Rob Herring --- v2->v3: patch is new .../devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml index 228683773151..1ff44dd68a61 100644 --- a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml @@ -93,6 +93,12 @@ examples: reg = <0>; label = "cpu"; ethernet = <&gmac0>; + phy-mode = "mii"; + + fixed-link { + speed = <100>; + full-duplex; + }; }; port@2 { From patchwork Sat Aug 6 14:10:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938054 X-Patchwork-Delegate: kuba@kernel.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 E84CBC19F2D for ; Sat, 6 Aug 2022 14:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbiHFOL2 (ORCPT ); Sat, 6 Aug 2022 10:11:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiHFOLY (ORCPT ); Sat, 6 Aug 2022 10:11:24 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1699411A22; Sat, 6 Aug 2022 07:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6ofdbtBj/uACmla/9F7DBv7MYXpbGSBidgcmtuHOP9mAxWHMiuR0ixv3bN15BpkeuNNKI7x/PwUuYEAcBuHg/86MeWqJmdtBX1Z2JRtG+ANzYA0ktdkSPN/jbJSLp+4Mmr3tG3PZcVNyStfQgGGbbrZuhDDBlR3a8AftJ2IRXD9hb7CcBaXNL+/E8SYjedBWDLErmDXzuGFOU7aCtUUM5Ag5DdDwbhAS6p1SqV9vautuFHcQB94o2MB2XaNhTqAEBA7Z7E669tCddcfDIjPZByOCRkwtSnNVOOjqC7VwL3lAeRo5N5IP6aJVemn7k1a0TvR08oD0mSHlPoCde4LKw== 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=8SiC3GdpfMgHxIwiL/EgDiU+2X32cJeETN6FuoGGm+s=; b=aOsLqLnbWt4jsvuQKeF3pmbGc7SMmXiPY/+Mxdg6/kM82yzWBSarclRjb7dKnhtI7PyNH8H0kQ9UZAJSnpPDqnHEmInn9NvxqUEofqF+P1ZVcJKX5VHyLLRJTBIyiwLINwtRfJHFEVlzE1u6mjW6uJ+2okr6qCPElBC5qlk44rLCktb4Z3aFLQUVM2A5e5BVp4Q9USYrIv22oQabHqT9FIJBqjCoj7xN/3DUtO4IcctwQpVNyInd4IWuY7g2DLE3i+W5y41f/bEeac/lNY/OeBiC8tqMtwKrBTyIDWl1g9+H9r+RrzHD8jM+0UP5uZla3WDr8kSn1iNuY3+fgrBAlQ== 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=8SiC3GdpfMgHxIwiL/EgDiU+2X32cJeETN6FuoGGm+s=; b=PhMZVftnPhhOWsXinEcW2kMNVbe0f31mG6lbhKB7wIkz4NsQEIGMj8z8pXm8xq/nvHKSrIZQ+hSqxQtYCUhMrqgTtq4q/WswqRx4bdYX48+tXfE6kkIXhhltyvQlFP285yt8SyjjTXP/rN01dDHMhgXvcake6AcJiAIqa3Fqo4I= 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:21 +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:20 +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 03/10] dt-bindings: net: dsa: b53: add missing CPU port phy-mode to example Date: Sat, 6 Aug 2022 17:10:52 +0300 Message-Id: <20220806141059.2498226-4-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: a1557ba9-bbad-424c-00cd-08da77b5897b 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: IVvkzUOr5iYcATlcDqHrYYWaEHb6DwKDaw4NXb5n++Rum+92nXJ7drzYYevv+IEF3yHP5Qn7mf58Tbcyix8vsS2oFO1D8JSIip49ltPMsHCEz3BXZuXQ39hTuM0n+J5CFg6ZGEb13++4xrNPmtpmgs1CDvzHN45OKxAKcYj5GL93rJK2AWB6zfFChAYH9bvf+sr/H3LL2l2P+yifcU7F+849XQlE3wA+YCyTSrPA/wKeQE/txedX3IReXRENcyvSxJI1VNNRlfsdxEyjO28tPBQEzyPlC/pNkL/PvF74YBu5vSLPMASNJsBMmY2NAwOhBMYNjxF45Z4w4LqsBoZLq/YCxgrsueuz8qXXi47w5u+6qrDvqjLzr+cmos9tJ8nCD+K96Gi+G4sABMnYEAUQnAXyOMaA6PeI/OZmtGrdMpZhu+oJJ24HEkYi6lJKL7sP7B4ycWGbr0ksGH7DRlxmAjV14C41tlXv2SieDBB7iJaosuMOcrbZ7hrgChIWgKiGahQyM3TxdZCLN6lM5uuDmYlpkTJwWRAei7xa44pdHaOfHeIiKOAtN/BguXRyCt+ojsIkXBCbC2ezxjCwS/bSPOkzVGnHNK3/6wYW+myEwDfgwq2X+4UowFqrpyiVI9quVUxkcj3WLOe8NN8b+gTCTn73mbAxLLpnUy3gp20pzap1zMzCpwueuwvL/lkmjaiTX3HGDiC+lrH5p3W88ENeV8/ISl+7fIjGeroK2qZGKKdpJruJ0AtTDDajfCiIfO/gYy+8qgAlQdvH7gsTnJG9Ix0kjwv24mWdjhCtEMd4Adg= 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: lg+4GdL7RduS06REPuEDDjoN3xT2lyhOKur0SbSrlOqVllufZ1U+LQkI6dfG2ekcK/TK7o4M77/LisIBlBLgYObQgQ2R+ladyXI7BBgA+Qx1QDM4m6soW5hrVamyGU23bDW0wtNsjnxN28qitKL5anU3SxpcTz9YqmS7uZwOxWZD5JPsKS4Wim6KxtLwrQLP8HPz2p2nfq3V4b5utOwr/zfY9shcuqvHotfp/8W7b6cOfyANT/gMWeN/lQUeyQ0KxvGzILCEQP54pHJS1PkA0Wmyw4hwJYtVlH9d9+UN4x8Xkha24R4jF9rPSpfjPUCXGi+Xo82AWM2WKzcYz10W7zMO9ADQ74l3uKTh7aAO2K96o/aPN9wdHnjJXIfbiuitSnvIDDzDKzWl9xIQW8hyUKexrqHyebN6qK3FAjrRifEtI09n4KuLZUZFLknwl7E8+zm2jxETpzXonY8+OqPo93dIYBOzMcTTtfGfAhpaZAudtx5Y8Pe0/tYOtx6SDqMgyjoRRyVWftzrAacM05sMitikHXTBLL3hhFo7NozYfAR4rFUZkPJIWEJ3npZ/ortEtJfNypcPWz0nQ1hZCA/PWSZgYZzC9J1VKdVmiWpXUMDMw6V2IjrHADbz3IZmLUjHPHAAXNcZRTfI4OzK1qpZDnN6l4HuneHTlTIXggTnoPEpXzezC2mOFKFXvEaBS3R65VFhxUs1X+3Ss60piy1qjMz9SjcUMofEKrDEMocMk5f29bL9jltamwoBipTpolP7qN1ucfMebounrmyDTXQRe4Cns6fANVujGuZOinRdV+QCEYHa/OYYcpXTskq8eZfFH4ksygUCd6wrpSo+Pi1X/mMKgg7sNNIkT6yvZ4wCUsY3X/xTbCN/lhC9xsMbmiSBZx77nD8kkzYduXlwZ+tRL+5AQc4cThz+hquq1mEXsTNR6OhVRaJmJDoeSbc3TPDSQlVsMAA21gw/vnxI0MKMYD9wrHaPsD4Bpu1xhAuv2PVhYKHoIEkhcaGvoUGNZyIbMUCcZ+Bnv3ySY/wIyJ/lJdXYCzmQZr/a3Vfmv00XIN0nb4ueiyW8WtKGoMhPmMDO7zSXNujkoIMotP9/wXgrf6PZEWW7FLkgb/6uwFwRVTSr1890EGVcC4/9hk1aknWPO7/EmCAcHIMXYg4q1CC1NR/5qfJxr+0klAQwRdIaW4oZqhPHfJFTeEvQBWEi1l7fNANNS6D6wb3xqG5gUIb8oDMtnoK14/XymEMl7cNIrOdNyMs8v3VsNfQ7UPW32YrVDIt2cXjiL50vghBup/JvSUIBVP8r0cfe7XGB5kCfMt1J3MazRmRV2HDNLPD4vPFIhdBnu7GFBW+VYrC2TILEwlOEufP8pOifZ98rYBow3XAyfMTiWjLpJ/NxfS0/ARe9T17M7pNElbRMdbYWWls7nVuJk9yT3/DVL2ZSY2xg1nfadunFtnrC2KRD/3IPXJlpLdhgxhm4vIvlEs4nMYnuyivqjckQkkkHVRZPe+VUxwT8zZwpKmB5xGp3eGgyVBbk6UFp75jdvKogoHbq5bNq+5GCKkzUm/JIrk8Nc+Cn5/lczMylripW7hpFdEhn+GcDMCgsRTeIIUrqco0OQMY2uQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1557ba9-bbad-424c-00cd-08da77b5897b 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:20.8640 (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: 48A+TqYegfn+Il3WM9bdrwc2F43L/hDc9Vcp+jDs4PvT/xanGxIiV9xuSlJak+oCvu+Ms0QZyC6ZNGp9xVkgSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Looking at b53_srab_phylink_get_caps() I get no indication of what PHY modes does port 8 support, since it is implemented circularly based on the p->mode retrieved from the device tree (and in PHY_INTERFACE_MODE_NA it reports nothing to supported_interfaces). However if I look at the b53_switch_chips[] element for BCM58XX_DEVICE_ID, I see that port 8 is the IMP port, and SRAB means the IMP port is internal to the SoC. So use phy-mode = "internal" in the example. Note that this will make b53_srab_phylink_get_caps() go through the "default" case and report PHY_INTERFACE_MODE_INTERNAL to supported_interfaces, which is probably a good thing. Signed-off-by: Vladimir Oltean Acked-by: Rob Herring --- v2->v3: patch is new Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml index 23114d691d2a..2e01371b8288 100644 --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml @@ -254,6 +254,8 @@ examples: ethernet = <&amac2>; label = "cpu"; reg = <8>; + phy-mode = "internal"; + fixed-link { speed = <1000>; full-duplex; From patchwork Sat Aug 6 14:10:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938055 X-Patchwork-Delegate: kuba@kernel.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 A2B17C25B0C for ; Sat, 6 Aug 2022 14:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231916AbiHFOLr (ORCPT ); Sat, 6 Aug 2022 10:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbiHFOLl (ORCPT ); Sat, 6 Aug 2022 10:11:41 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130071.outbound.protection.outlook.com [40.107.13.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F292712604; Sat, 6 Aug 2022 07:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGvu0Q5Xc2kfymP4C9Axu2TrecoO9S9U5rh5mXVOk+HkR45imvBNNkqa9kidfvKHia4jA80m3+ApcTYF5ZW8dUGkwtx/K9DzSgpzdI+yFikRKW0PRlHdlUtZW4dcAA5g1/KjvTysBmLpOODTinNk2FQsSZdvw0iy4R9J7mq/TMxukeiuGNsBIQdm4fX28Me0Z+c/db9M1+Zz8d4VKZKTol5S8OWVmPS2oR/eX3HfnufsYG3OgGlPC7ISOh1Lp3BbixPqFebSmBDS9unjh0TC1vgntkzXxtxTxUrm8hIcI/tbdyUXoFq1ehDd6A8UXNRbNSS5sN4TA0PQZvIlOBHJLg== 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=9j1m9+uZLoW75wjkbY5+CJ6yI8Q1KYRDrzdtNSlMHWw=; b=FfyhrqZpzp3B5Crwk8JHKVCjGBGgLcBqBSdTD54WEL8OXC3iF/FN5tXqpJloCY7AWnajgtODRMIn44TlC1AKOAN6qXJXzY5bfZVhlqon6gG7BArDsNmMlkNuNPzQIdGz92cf2sNT2WMYzWOrlLB0iBrHc0OuQoRzjGBPEuPuxHZlkE+KaQDnaYHYyLSy7LLSM9MKOUADO9gJxGBndplQcNdieQylNuAjpWzqTfxxTmP6BhsMlS4WguPJMAWIZU+FYxl53or7voc1zaa8DNr55Y6bqCdedE7DL0EvyBpjjak/RVTzjN7+JejdtpBbKyDS33/PMZO7j3qnjImBTooZdA== 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=9j1m9+uZLoW75wjkbY5+CJ6yI8Q1KYRDrzdtNSlMHWw=; b=d4V+jY1r5tpnG6zXe/8z7M8C8tiPnwNN0fmw6jcaAJi8xzAHe68Nx6G+H0B6Mje9eQN2l6MyQUCIK7HTXmlzuFfdmc3zRLJzHP9AIkFIQfDP7Z/GTQZC7E2IP0BXNTipYXmhpK3mSIYrv80c8N6plPCBn1UBhKK76mesB8xRD2c= 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:29 +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:29 +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 04/10] dt-bindings: net: dsa: microchip: add missing CPU port phy-mode to example Date: Sat, 6 Aug 2022 17:10:53 +0300 Message-Id: <20220806141059.2498226-5-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: c21e9946-e191-4c0e-9d02-08da77b58ac1 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: q4+pjJ/CU/TKEc+IBA5utMVJzAH36wZnA6rB693E6pLCN0bvYd2QK8fOcXM9ZjhO8J/1DBCDtHq8egAyg/N8caH6lESywzN+fCsQsYVp2rqFGyVCnxFbQRkCvPwjIr1oLxj9e4A1WASVdwEpB5agBpuWsKcCFHjsNwKJMDtnVsUH/Tukfu953yQ3nCTd2idoDphvX32dFKQdk1bVuGtQhPy4sRfQ+3FH/YCu684OJaOudieJeR7VsI2pIUFJoecMYPH2pZDgnN7D8YY6p4TrSTBgB7FUOaXZTv7CrTe2QRKJtJwhcUGH8QSL3WNiy0Qzq+3KPeh5lXmOBm7wIdXbmPRxXKEvZ38JrwhAy9HFFo7/k5lqttgoU+9IVqUrQiW1Ay++Xtz1Tf84/yFHjD18AAnVfKeTxvga4ZbBhfNGazOOMS80YINnLT+aNLE5oZAI3BQpBTZu9czd6GcsQDohzlnBTorlXDEhyNqMnKXFCOFga5LVaS9czKaQanOHp3Q90jQG3SGXQyP4iQ33dfp6ld29aguWkVmpeiNl8OANmqoqNPSNCnVD8ohSFu0EDdyt4QJ7T5nTXJNYxxrJJAukDbwC8IGTJ28Bw4hWWlJrpVzgKtAln40PFuxUUswDC5m0fBmyIn31zkXv8dD2tJK/Qc5o+GKzDRqA1V+Jmh+CKsxPLAlj3zFt+1oGqbrXN2T5qIyz2Nj31dDTVk7/m9Px6ckqhRcE0mwrzymhSMgYEfw/cmYHHtgzEQZNgq4t3lrt5N2du22WvyigNdjPYODBLY6j92IHGryksc9DvC5sejw= 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: 7XVZ3dh0ZPJb469s4yHaxcSdNqI6SZvIq5h435PijqjcLf7WK/uoUJJLtm3OVB1bZNvGgdYtznBgTM4s7VqKg7GKGhXmYTWUl6qmVj2XXb81/P4CtEgxz7R0fNrSMYZok12iQ0SMgEpYD+z2M80l+2bQN4Jn2bjPnxaOuidpPeVKQEgT4sVnhywUEazteXW1jH+hab8RdjMXivbxIQGBA04Q2LZa7ebJh6I8nHgz5vvqRzwC0iyjVbfObiRtr513IhHl+jVl8PpF9ssw79oFMoccw8OxCabtQOBK/oCgzY5m9vlAJfEKbaAcwODugxzYSW+ghuE1yMZX8Te2hQiieLWDK9yLztw3wdB96+LWIhyssTmKCwOuNw7RTR1Q8pvi3JNSVaenB9ArSH8Sge+q4X1Xlhue+b2/ch40taWUnCv8GhTBLqyHCkDMC8uwlX3I4ds6ikwAcz7tmtLPk1hmUlTzLqVe1fg5wOxlg1KF4xDxHQkdk4qKVo/RInhnJJpZFMthM505NTNAzp4QqcClJKyUGYOSQTtBQSG2Etjd8p0AxowbdIw7o+IyrQW7qheazBHuYvo+XGRgQL6W8Jhhsaeu3xerLYVd8f7v2rLW2N6lB9MvrhQFk4OyOGNdCV67ZGCoeHLpZx2/W2+5ZCmQGa339uDyYKKIqi4V1ACGjJvQF+T58xRbXsAegMhIQdFIBub6rujl9E3nPMw8WT06pSipmNcaE4yIFcYuGjwlEcmyp3LaYVnKSVAobKN04rqnFT69orV6fELjGPigkA5MwIUI8hhB8JRB5Ascr+grG9MbLZ66BIuM2wfFAMo8kiVmbtrDvdzZyqb102t9bhgqKtd8WmrhctGdDUp+1684qMRfs2c6kr/Q/DS+VLqLCOj5jJhHV2TNGCAXkGqCPORz35iaOM130dHKCvoK48uFKN3iVChMZM5bvCk7TGdyWcmjfdZXkOhZQdhHn1srSarohW7SD2cpTbElnNNep3lm8P2N2xPSB+aVcz7TzcjOkd4AA+prMIdHhjVYRcMStJcj6H/rbNe6Y9UfqK5NOZyiir1xzMYnPwN8AFvrU97vSCEgbBqlhGPvIEWjXSW1DVTy8hz6IyNW5IJNAc0LNhKSQ5ebThI1ZTwR5n/xRzTryDIKviU9M09BPhCF7kefavyB2MDhXu2exgpvkZZiknJ7j+5xyGhfxXxztqTjDBJMY/IgesRaIPWv2983Sy9vRV884/yf0izyezTJvl41UR9882lx9ubcwdEjHtLP5IYeR2SE62A/AK8x0n/8/EI+waFV254Fxqyw/3hYrQhHFXQogYG1AEChaYLK2f2cNFA9HMhmgnNAvLhz2GQHwMmnsWsScWu0dQcR9wiO3FfU51NmsRA/M0VBV5Yg3Aq/Tc0MLWjz6iJm9L9pOzGtI30XLew4R2R/aipY6KtDFGls58Xf8EUWVzA05pRcXI8HpocIvbWc4OmAPm5ChxDC7JdcQ5Zxb1fU3F/cRb3d5wsqdfMaQnG5wzVpCAaXivyVeAxzjNHYtoeBaBPh8aTa8C+al6ZJCddNrqZTSvDd+1kRopSiHHykCX7n+5RdCGDtyWUYb3gMTJoMnx0EGw4mo8etf4jAdQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c21e9946-e191-4c0e-9d02-08da77b58ac1 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:29.1447 (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: 6lAtzE+yCBKsupQppTIQDJ4ZtVMyX4jgscwtQJpw/pIIh6VBpgWGzEHfPydyoq6UiMUkM/Sl0DavvF3t5Mz0xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The ksz_switch_chips[] element for KSZ9477 says that port 5 is an xMII port and it supports speeds of 10/100/1000. The device tree example does declare a fixed-link at 1000, and RGMII is the only one of those modes that supports this speed, so use this phy-mode. The microchip,ksz8565 compatible string is not supported by the microchip driver, however on Microchip's product page it says that there are 5 ports, 4 of which have internal PHYs and the 5th is an MII/RMII/RGMII port. It's a bit strange that this is port@6, but it is probably just the way it is. Select an RGMII phy-mode for this one as well. Signed-off-by: Vladimir Oltean Acked-by: Rob Herring --- v2->v3: patch is new Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml index 6bbd8145b6c1..456802affc9d 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml @@ -109,6 +109,8 @@ examples: reg = <5>; label = "cpu"; ethernet = <ð0>; + phy-mode = "rgmii"; + fixed-link { speed = <1000>; full-duplex; @@ -146,6 +148,8 @@ examples: reg = <6>; label = "cpu"; ethernet = <ð0>; + phy-mode = "rgmii"; + fixed-link { speed = <1000>; full-duplex; From patchwork Sat Aug 6 14:10:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938056 X-Patchwork-Delegate: kuba@kernel.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 5D373C25B0C for ; Sat, 6 Aug 2022 14:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231770AbiHFOMJ (ORCPT ); Sat, 6 Aug 2022 10:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiHFOLs (ORCPT ); Sat, 6 Aug 2022 10:11:48 -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 B4AA71274A; Sat, 6 Aug 2022 07:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/95ortvAc2yCQkssPKXLrDFqtTP8125/fDqcapjDpWFXRZk4VPxmWnOa+rCwSFzquR/75rOe1CKIFzIiYIPLHp+R3rOULuZnhq8EnHW1PhdxR2XUcfmYDs7qgOAD1BkCa2NHuT7k5qcfAp1lPLAaU+0SDcZ7Tvn6bCgHj16/L20XS+kg/cmtStPNwhjEYN/SkOBKBKTisth8wlBNw4V0enIGxRW7b/xNDHdOOIkamIgw9Qs6pY4s+bUQpRQXFSnjnC6yHvLra7cCyLE1fxwz1tP22SK1EStK/0I1eh7vFM5uDz7fPnzn2vRQx3i4U32wfGVGTIRO8Ko43HiUJDQ4g== 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=coyMylyqtZn46B199q2ydgh4rdZLG/ugusg8F87Hoe0=; b=KJBa283nr42XZXGHKwwxfbUNyaR97gMX63KVm2axT8V7RBj9sffDwvEu2F5Fp3fnSeuZ4j+WEUFOaG4Bp9Idw5jTekMES12/AfkqKkRK0ouYiI5NSVIb3+bocyFJfbYSG6Zg7eyU/WhZA3V5+H/kvxmxLV1bnxXAxvdaZT7azpZvEKeg5njmpvtpdgwKc6gy4vxy4vo4wxX64rmLQyyKauzPgJsuaYTLGsdcdy8elw7FwnvDMznPj1fn6OnWSRfMgjHCIRN+SVM2gVgSOlg6F0o6Dshk3k2LXjIosVCjtXpmqLzRN9JWOSHWcB0kh81i54VDiaAawWn5/+lj1KUizA== 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=coyMylyqtZn46B199q2ydgh4rdZLG/ugusg8F87Hoe0=; b=f7A7qKECZAWGF4ezGGbsoDcwII63HKaTzhgPunZ+WMIeOwW0KqIroBGO4v0/e2cBBIDjSRjeVTeNJ/ulA8KzD4rEl7iGteufSdEKeUeGE7438i4+WYsb2Bk5tr09raXJvw1QcETDjwbRyITs3aznHhQPbuqVlYLcHsEg9/+S/48= 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:36 +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:36 +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 05/10] dt-bindings: net: dsa: rzn1-a5psw: add missing CPU port phy-mode to example Date: Sat, 6 Aug 2022 17:10:54 +0300 Message-Id: <20220806141059.2498226-6-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: 60d6784a-53c9-4032-7308-08da77b590e9 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: TVQtc91uY+Z7Yr3TlZbTGrvyH9JvHaRbED3MOvroO2rkelEbQe3dsLHASz9eZsOU6JiNfOkx86ooAJ03/W9ZlOetP/3RbPl2rHOvgYAphgtxTYomrTpEMN9f/9ReSTHLdKQFiotM0oACvjSazWzgoFsO2UnIuxp5pJNlMaE5hNLkjNM/kF5dJ++aAQZzkBPuoq0T6u4M1ieqFWMIHTPsMpnTOo3efdxG7uwNZYr93QtnH+2uivCQzm9QWL5Or7tLWgC4fIBYI8YTZY2RQ6DOjZlMiZgIh5LwP85viJPs0bFaBkn3Gq9aiVQ0G/sLdA7B1ciRRKdya9T99waHdH9/NDr8wjPpMSEL8f/ak6Gt/tbm3P7wHe9XExqzNrGZKyKr9KxVB1u7sIYamgk9se1mJ0m6kuj9pR7IjFpJTfpQD037Pak9pw8+lE1Qdkotkx3W9NGWc2zUeduRkRxUUli7q18IXpFBjXRhcliG6vJYwIUSB2Udenx/szjrCC4irHTkolJl9F6VGatDEeNbxy8OCf+R7XJkpO5Jj5CziSupT17Pm7ZrMYwizjWK8Rukn2YEdc+uI2E+9jQaoykgMMofcKRn7FK6WNn8wVZL8foaGvMSr17KOVmf4uNAxji+CHXZpZ+7PhEPJEWXp0odj45mlNcuHAdF0Cls8U1WI8ZHeDHWsCibcj/v/vakL0Jqouz4LyaQdg/vKJ3CIO4SmSPTAfv7JlrZee3JyldiRU24amwZ9TE9cmsQwTm6fawIN0dkaKdOBKDPBnNR4X43vlBVrJbHg3jTW0ZZakYsKKiPJFA= 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)(83380400001)(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: 7jIlb6vcY1/uB9doH9D+Q6PucGFAHGsy+yYdQqaX152wKjCSOuA70GnXChTnKGOWhL3qykr80TqW4UxxxmTTYg+Vbee1uuJvxm4VtFixWsvhazLNpWYDx1+g/Zd8e/1r+c/RNSSPa9CgNyZDashLiHDcgX9eRNWRj/EsUbNclRhvfROkC7o3updztfpS4aHHcMhcYZRCgQ01ex4/DY3KJPRF+w7zQQffORRfOLBLNIAtTvnspV7ShSh4uZwnBLd8zfz6FMk7SMbcFrVPahLH+aaanUE4yhcSflKx1vzgh8kMtvvu5GIOkoqwkr3J9DNF6zzvFTnxA1HDTv4kSXnGBHDQ8LeOCR193oPODxZOv0I1gNOr8VExQISF28QlUKP+NtsngubPwBe9hQag8oiuBoFrs3l6wwdDc5om2NEu2NJUnjJ27W/AUDd0UlXA/XZuiyXRkITAhwc157dwADhkm+ZWnKCdBkh/nmkimHODxzJ6w+7Kf2gJnqcVRwgLgcg23IrtS/mvQ2Hqm72i4si9owm7hwk2ESpfyEnTx4+NdDkzo8CKXGy4qBtpRgze9NGUiaLw4KQ+mZKgepFNTf05hLYtIRIuEqCxnDLhgPIlBxAVr9JbyKwqQVA8QBq8iOVrns+M8B/UeAc13zKZgMjh4TAP9CDvWYVab0GHj3+ndUwNioVuy8KuADIRyutxwUeWMQAmJsnieA1HZQzSDKwrLwRxKbU/TSzoOYevneKSYRlrlWQYZ8+9HfW1ITBWwHwPqEk7lADDTeZJd6NO4gKe3kL3YANzHjr4naQv5zNQWYgSgSt/ZAGTf9a/CfLPUtllxqzyjHXS0Q+AleRUwaHpvSA6sD+cBrYVk9g+hErvfmMoAZnEwggu/wMxm8oLxv/IuHB50mPzwTznf+KMpnqZiKq1JiojCNIyQlRuoqOaw/wq2PzuYc1TXpH7jNzUl6p3UnxMsrzr5fRgW21ikDgii0RXb+3nGgeYSHcxBQxpoaHuTJZ5zMspFLVGkaqyfCpqwg1/YFj2IOiiZkOvtRRL7Lpt1pn/8Gdy+2br3VinRWBrogosZvjhae0bMjk0r3TL/RfMZ/e0LX3pj6MkatG9iJIBWhNdN/nWuVMXdJ8A9revdTy4xcugDgPfykXqvuDtbjvXXAU+yn485pdxWn55tNcXi+uL5Eq/wpraJo0c1/Mxe4k/5d5KetMgDOC7SxerpnW6xtksNGnQ4htZc89rgRAIetZkIZDKdOLzcpyzVGvtcgt9tugQEx25poOxlyn4zPgYCkJDUWNNPvyzGbCFctgADoO8TCYPNFDiaweNSEqGEiIUz3hLL8Jt/5bAbpxbkFyvOMzT/jMaz6Kcqr8NBjt59WceMYqwP5CM8osOFUrYZK+cvejPZGoAaHyOCCJ1YrYOMXgKZSEv/9mQ0gr+uVFKCQm2zyzv/4bUqqzXkB4WrnarmI2950TxASMj3LMv83wlR19ouVRDhgRSPhnL9jQ0U0ghttlb4QozMoBss9DLU6JouMskn1OO9DKMy537wWJfAD58Id5Z62Ryr7W7NLFqWZ8KSvA4wEyfbC7dofq4/aV2cYQ6y54HrY6hYDFe19UTA5Dwk03YJZXIxbtcbg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d6784a-53c9-4032-7308-08da77b590e9 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:36.1911 (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: SM07VcehSEXBWdb4vJ9R2lNPFXCJ/QfahcSyQrfH78p5DQKsskisNDtQVs54h1OCOtJ5p1pawGYZ+CH5orKYlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC To prevent warnings during "make dt_bindings_check" after dsa-port.yaml will make phylink properties mandatory, add phy-mode = "internal" to the example. This new property is taken straight out of the SoC dtsi at arch/arm/boot/dts/r9a06g032.dtsi, so it seems likely that only the example needs to be fixed, rather than DT blobs in circulation. Signed-off-by: Vladimir Oltean Acked-by: Rob Herring --- v2->v3: patch is new .../devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index 4d428f5ad044..14a1f0b4c32b 100644 --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml @@ -131,6 +131,8 @@ examples: reg = <4>; ethernet = <&gmac2>; label = "cpu"; + phy-mode = "internal"; + fixed-link { speed = <1000>; full-duplex; 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: 12938057 X-Patchwork-Delegate: kuba@kernel.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 952C5C3F6B0 for ; Sat, 6 Aug 2022 14:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231283AbiHFOMQ (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: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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 ... From patchwork Sat Aug 6 14:10:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938058 X-Patchwork-Delegate: kuba@kernel.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 73BD6C25B0D for ; Sat, 6 Aug 2022 14:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbiHFOMT (ORCPT ); Sat, 6 Aug 2022 10:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbiHFOL4 (ORCPT ); Sat, 6 Aug 2022 10:11:56 -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 1792E120B4; Sat, 6 Aug 2022 07:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7rUvoZicwen2+EquMsyaB3ShBct+9Qwu7liuOSQsh9Tl2KVcaJnNPhZJXPkd50sTInsSSNLpGkx+yAwejHX7v0K+l5g33sN4tRR5Mn1a1BIMX7IA+X/B723parWvS3nToLEvKnhXYjUVwJ920o0GxsA5MCx9mVrNFwyxOJm7gHjos+yA+90wb08c3U5464zYgMmQ8mklj6vH1ISGmqbqhl9bHfmwB5cTEA0y2hBKwWsoAxhG1pS4n/ZrCWKWfdtlfQbCUS6FICuT+rCSBymd3gibLV7tofohS3oTYAZ7/L2p45jSk91Jf4S3sl5EdqdjA2X6g9N2PiunQJM547D1w== 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=tESQFWlBU7lzyNVQzGvgfOoKq1bl40zezgwY+87T1w8=; b=JExAVp6oSeiS32jik0Ptfol8VIV+5r2PPOLeVZM3gpY+7KJtFRnCBacz//acFHmMUoFEFNTYqdGDwXIPcH5VBsoJ8G5G84+Iu1/F9b2R5/SIPsE0xkLnzQPhvnx0vav5HoIKkjZysDx0F9vFSKfQaqmxkxoAPVaY2Dy3tqR7J/70Hc+tMjFG3CfMhQK2SLmsRt8Nxcx5qa7+9/7z5ybSMQwCxzJcGOmfXD99vCmkWi9ppdeewixNogQfrP+fx8mgIHasWQO6r+K0LQufTI6DvCqTxAXVxQLQMYI3DluTG+UzConEYTS3te0wwGYeku6ubOolhhLmH4IhKtGbkKktUg== 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=tESQFWlBU7lzyNVQzGvgfOoKq1bl40zezgwY+87T1w8=; b=Zg72+7dBNo5qstk/KXB2pLaZxc6TjgoM3SPyIn8SxrHDnFMR6L5kkOFJVcuJ8ffiqs7XXcF8Jd0lBrcBtx5vNx4hv+LAdZFhCMXvmAhjyWYVGf9WVTX9V+we1vuw5C3Wz/7plgKt9zE/joSZwKJavRxQtnlkMfYUVCQ4ASP+mQY= 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:43 +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:42 +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, Frank Rowand Subject: [RFC PATCH v3 net-next 07/10] of: base: export of_device_compatible_match() for use in modules Date: Sat, 6 Aug 2022 17:10:56 +0300 Message-Id: <20220806141059.2498226-8-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: e17de8ea-156e-4e1d-c139-08da77b595be 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: GzdHR0kPvQZr57XdCbZHjcXu38oor4fEaU2vda9mpL8YheCE83LBrXgs8AFFjkkrdkW0fJlBZuk22emUO9retwt4YJLoLK3g9uL9lew5r2GUbNKgv0uNtOaZtXGleYSPn+0aX+YdPhH80kuF+mACJaS6Eg7uDXpA9lyf8mfioNdcf6/WuP2DVuz61mdScFkmFzaAUtPePYdelev2ozkXvkv/40Tzbtj4IkC/NhSN/kuwpE96T1WXwxkWIGCtZIaLQmjBeKdUen6F8E/w/uJAYMbVzJEC1kMa8DoZv2xIwY73jnvmtb7QLoZksok7t80gANBYW0SfU0lGedoZn2y90zJPcPFKMkSb0uaQ7k/8TQrwC4AsdXGpAa7MDhT9YC+a7Abx5MvuLYS7qrTxwvNnAl4oMrAcCWlbPJMpcIEGxmzgMCw0f3SfFxGYzplBzSCeo8sYYzK71+1NhqidmwlV9fWt9c2D3dXsMyT9cuQlfFrClb5AcDzQjbpQA8Dys4fLfYCZb7tGt2qm6vsjhBWz3a554NMYIot/K9WxQr4SFUHImCE+Uvq5ZRx+xB1PqQBOwvWwLUdRo/ZZTzDzXaLHDBtSCEsRuCJ4Y3XdQjOtE6KxH+etUnBRJ4XId8Mw2tZvgcs2giN8xeDyQ6w+YDQF57Ijm4KksxNdd2tg5KpTvSB2g8SwgonaJXl0aEZ2rE/BbZnM9k6VO3Dz3LwCEBwHFZ6XInWI9QSN77et+jRB7sRZlzjRkbB9sThjHSVH46NYt7wToEvA8tlWh1Deff6OT0EVt0YL2+uqlSGEPzEsrck= 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)(4744005)(7406005)(186003)(1076003)(2616005)(38100700002)(38350700002)(83380400001)(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: WS6OJdtl1YqdMu2gtIeckEdCIQAs8BWgdjRjmg7ffQZXTkeKZrhlO1p4hnMBlpNC69haSir/JeBHnwJercyCKcaso4EKiK3x6aYqr7EnQZ8yzXhkDPDYOyD4+6NRLCniG0/nZmvQobo2zwVGYTerRaNazNxlhRjTxwDcm9j1B+DOTFFJrguezEPWdlw/u54Hlwi8XRSF5kPs3pv0PB2hDutQxxhqj3iqAv6YUhtZS50+lG8kRGPlvTQTDd2m1muiRIrPNljFxEN3dxmWZ6hicXCyxZozYq6I9rIrciUlG0yTgKL52anHUqSnVqQt7xfoPpR68gjcPOKH+/86oCRSHQlesuRtgwgCV+WxfcSikUzei3lTnsfd7aQfbiqbVmKL4tSWC2tv92Abih18qU1relb/h8ImC2eJhkKrHnSwRBFVPPo4+XlQv6mpg8B1go5QyKWqXCVBwmSNBts8QyGYAOltJno1EuJzvWraKONVjZpx862DyvoRBWCmEh7FOt/QmW6uR1u03i9QpkjUSVs6xfBLoCNXnk+5V7UQ0j2Esd5xpST2ngm45hE1UHV2WtfnTavD2svK71tdJXgAu7HVPx09OdWbsiwV90YAL0USCpuZs+YD1J82uNCZSwfyS90gssf2vKFxsEdYcI3cwAFliWBDH4abbpyfo+dCzBEehYSSY7oT40cU/CjpU/xgZ4vI3SZ+rwxtSE1gdlroWmH4dH1M2DiyGqmTU7kBPPppAR5Tjf0w1BDAdWjSaoSmu76U9mBBrZcMnY1hcyrs9L29khvAnOnFIzVnGXMyIBtA/yLGVSCcWoMDQL8Sd6rtt+ojS1VBbEhEjYbbwbkUyA+K3UqG0pDIkAQ0JFxVmLMBWB/tUuGGNOwZUc8YvUiGmUvJmVnWkJpTqcjqnMKQSM/2eZdlzc7ZSIvUhdmXkVsUtmOXsYapUL6miCEzKodGEGYXgns4yE5xkXAMrBJWQk2qnTWDIcH9bm8dBBaNZfItlL3oG3HPnqeosK7PY6Jg5QC2VDDtzebq6cGZRu6Kvw6Idw5W3dRqiUh+9dDOweyzUi2IrGMGhVEdgsjomCk6+lb9GkCEq/rtLrOFklXV9iMtrmb764RbiarlisS4ln59CWDLExU+BGl6h6qqzcAKeEouxUc3vaATWKiVIiAmBdkIfhKGd7u26Hy7hTTJVV7UWH0wPblN3K0aAQzqUaoRxZHYiquEKAftpOB2KrGJoecOpd7VkCehrrTz8a0KoUu5gQ1ot9FufFs9jzpsRLhGUEN7pkztQOgaAL5ynSJqglBxlyLxzbxretIA+81EjDE/VDHBr44FzBhxucYStfBOqDTbVBdjS1tUMkza9LVRQIq9m1Xoig2zFfXlWJgvipXhpmShndHKzjytqYY36t/lWzn+xI/bMA9DvcVHHoQctFDzOpFWwPITzuRPX96u0UhuJ+j5QqDTLf98equLAUJUl01Kz/nZvtm+Rn+xES2f4TLmHNvpovJHXrX3rcYgvjU1CaJypYnCodPGjWvrjPZYWmlkfHmGOQJS6Cjr62rjWETfEdsM31xUTAXmyXxVq/ceDjj0v7Hgx2RnAa56w/LekmeeV8iblb67v7ca8ib/2fDuBg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e17de8ea-156e-4e1d-c139-08da77b595be 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:42.8781 (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: bBIwEuVzJDUKgZNOm+R4bINZswSge3H44wrXFH91OpgoPCoZwvzF1saQfBiax0/iMG5i/VirH7+x7lY29uSwAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Modules such as net/dsa/dsa_core.ko might want to iterate through an array of compatible strings for things such as validation (or rather, skipping it for some potentially broken drivers). of_device_is_compatible() is exported, by of_device_compatible_match() isn't. Export the latter as well, so we don't have to open-code the iteration. Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Vladimir Oltean Acked-by: Rob Herring --- v1->v2: patch is new v2->v3: none drivers/of/base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index d4f98c8469ed..5abd8fecaba2 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -578,6 +578,7 @@ int of_device_compatible_match(struct device_node *device, return score; } +EXPORT_SYMBOL_GPL(of_device_compatible_match); /** * of_machine_is_compatible - Test root of device tree for a given compatible value From patchwork Sat Aug 6 14:10:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938059 X-Patchwork-Delegate: kuba@kernel.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 8BFF4C25B07 for ; Sat, 6 Aug 2022 14:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232026AbiHFOMV (ORCPT ); Sat, 6 Aug 2022 10:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232039AbiHFOMB (ORCPT ); Sat, 6 Aug 2022 10:12:01 -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 04A1811A3F; Sat, 6 Aug 2022 07:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7rciMYXhiYH71GwJ6f7RYZZJ/Q9ieTvwPJJS0mpJVZ2GfF61D7PuQwazCz5pIDM0y2TtS1/GPY9PEFP4hUtJJZlrafjLe8a6Yjc2PTFcsKCYYjsPv3ik85TNvGjBT7gkECNRkLE7WZnDcXhbsQSi0pawgvmUJoZMbQcBYXzYhGgatoelWWabqPx+yh+KYxepzGLbNW/YfD2e3ihWMyK489ieR6GtrBnBME1yBD49d8s3ZJpYQZYmrE8k/IZ66MVxa9b65uX47YHtCD7KGAYWR5y3EDfTopILu/XfqmH/5JLjtE8anzKjkaueHYX+59AU0Ads1klVfGuhuybURuRFQ== 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=qLUi9UGhi/FTRnRZH6wTWctI45lKZ73jWygFrb2yztY=; b=NwHSi6n8iI079Vud1PrTTJ/OA8k3m87d+b+h3gwizOPitP/FlGeMJpzJrGRQgj9FkRkYSJQfstN4g2ffmSqlJuE4a/IS7VEZ29yITiFu04aqFcTIY1LbzDSpYwoURs+xl3qtiU/rfXL5SP2oZS9zg4W3JR882tZFqZVsbgMiUZXWdGzLrKAxZM/j3WgHTZ6/+nrs7gpeaXfPfP5qF3e9i2L6Brh2k1j27PPvO8dG9eRh8d8EdwS7vUKb+pECpsOtXLL0U1Pgyl8xQ2rl5eaui9AHeyKiFE+SR+SSNP95NRI2FAQKVZm1Xl5/bmUGE9/RvQwO3pPKwvXMA6JAjNXOXQ== 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=qLUi9UGhi/FTRnRZH6wTWctI45lKZ73jWygFrb2yztY=; b=RivOCPdqAjvCxyZ5mu3ml5KpcSCV88VvG7HWS/Qs+9YZObDNqYC7d7Gwpc/M0tEHPFeIv2b8cePeczi+rqGeWuLl7Tl69mk7VpdCkpbqMFocBB1mB7+shF7TB7qqyJqyp5va2pLU4zWaAdIq7qMrp0vRTgrnPvdJTx6TZitCA+c= 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:46 +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:46 +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 08/10] net: dsa: avoid dsa_port_link_{,un}register_of() calls with platform data Date: Sat, 6 Aug 2022 17:10:57 +0300 Message-Id: <20220806141059.2498226-9-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: 74bb33f1-6e7d-4542-d2d0-08da77b59844 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: HkFVoYdxfQAh68iW2adeUMNSJrnle2XYkHQo0OngF5NsJcjyaRzPDn5O0mQ7qO5sgwAr8ymF1u+u5yMraYxCQmCx0o+mDDyA/oedEPWojtSfFQfj1wS7myrJ+ww4eHc1Io8i797lxdRo24Z17K96gu1kpRCuLYe5p4btyprAMu4CHUwlWi9TaqcHDfmvMDgcaG42tqNdudOqTHYVNjXMu+PMLQf8p0k+d3Wso96THhcCiD8Unlt5bwNZrkYjcx5tlrw8sQ8K7tDIY/isDayUjDIq/yYT02H0f5Nuyen5CypBDUo3F82m9qRXYXYP0XYjr2DNtbhx6auh2bMXdhIB0qbBCZZxVlOMUgYcfyx+5viOqii1uDwOyWIz0/6t3++Zxdws6j/gK9PBPFc0IrPm4HFPczMdmsOFT9A7xeldrrixQ1BiYqNdO/LruAO4gt/2KmKRA1VgclVaG6vg8+Rw0tIBRGAIY/YS8Ns7U+twWdumTAE5zaL/0boVfHSR1AEctZBdjRUMogHTPSQp16AK4+iZxUqJSUPJTwMm8SFeeDELrSMbMyOmMCQPgFW8SU4LRp91Vpu4HjJyjm/XnpR8O0GuwDatAF4wfTCTADDUCaUa4rLQaPd9k8zNMR8lF49SDWm9KSNN1NgrHvFySrQYd8/qn8bzmpjl136fYnlQYtCRIRnsKPKbHSxxqXiCxiQ74pBgD5qm51897eBwf8HR4aia3TV97nSidlHIRvYR8rKzrafI1PyOVyf+w+E/mL91gElddIKCELS9itaZXkAxKLauCOF8gQMR8ESOKzGIJhY= 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)(83380400001)(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: f5PpFWSGgGmM0Z7x4l4FnU3MVmvBvrc6NZUYYLRWJqW5xXkAKFYw4wr1zmBTszp9WvdPoha/zV7lG0cLr2c4b6zjhDJSdLZwwTWYZOrSv4K9kaPfPAntB//JcS5SZna0v8uq6xRHgjBZS6NqhVR+6kbKvt9xOmXypXw1Q7lrRw+ouigGMjX3wp+vlF5wHpGicb4jKn5aNnypZ944EEM14WZoC7KuOCGd04TKHJU6idZwlwhHwtBkJtaoKpfafHVTwFUeZsDy5sN3lH/pd2gCaXXmirB4q6AHNMMi12N9oku7WZLJGqnNI+y1ZB4RkSajimcFp1ELcUGP8Z1D0aR9+u1THUxX96h0pKVBGUW2Jif2fgvSswkxL1ivmEpUKI1JXZF0HqRcdGNwhSD/5GFIgduc0clqlW98cBaAcxRZDfQwSzP651WXBOQe5vT7VAjnPtP5siTGmMWnKkuWLHWq2YZYnHhdT5j6wZ8tMFIYTZN4xq/ctTsmIvrNMgBCa02zyNT766bCG/OtgAsKkLfRnympDXJtb8T9TAJV/rT5QDY+VKo92YxVkCoV8A+nWC5bS2iyenbMDEy2qsXB/kKmOABy2Pjn24g0u6UGZiT1DqYHtVQpaeewJ0z59YTA0PFW2AtdLg7lfTkwtMW49FtjWffLQ4/PGee2Wce/22D8jCUo6TRZ6xFea02FLYLWya6kbxxV2zd4jrP2caU9pHGQUCzlC1CX9lGrMAWQ0ENgIMjwK/LWownns5+f/zZyuBpR1uHK5PVu6h3usXf2wwao4WOU76UUE1SWqxoymCdNOBvP3QtsVy+rQitSnt0XGc8XFA1jegLmlSJx6SMmLCA1Lj1B8Mn0qvp5DhXl7OthTP5FGYQ6GTs2EbGKovIqrhndOME6eXgF7i8h+ROXMBiWB67g/15nYaybBH3BHMLmKEtmAG4HbZOOn9ovzQ3bcHzvST1Lyto3Ri4/xiMvqxHMt+vA3aEXR5PvN149hzGeV8vp71aLjnXxWuzvEkoRn0zXXXPHUAOGLRMT04MTTsAHB+bjJ33Kawq5M/ZGstPPN19hzQsiry/MneCpHU3h3oDLl2VY3zzvAsMvL62/X202iRW2iRrO2nL7ifGnPeQhHr6WICxFyywU7nn51O8OZaeUfKxhGXzJuY0SitiKOp0F0Z1JqStlKXxyhTTXmgVr3bI4KzuJQu6TY2Fk4dCvoeC5NZ1gUvXXsBSoNDtaW4KEldySFItOHFuLmcPYgAksj1DCYMWjKi1waSRUyne1GsVBcZuhgbij6FqYzMRandSSXvJJ+Jrh4+RqCKgorjcLwGWuLP0qoe5zpFrW+8q6Z60WUToUiIlvFp0gEy/xCj9sFenP5VO7Hf3wfTwdsVtyBSzqmJbkSUQV7jJEIdAmJlz41dgOLSptBWS3yEVuEtFbLQ+bhvw8uLkw75HWbvK6IKNa9qaqMtL66YFwN59q6peWclXD+HKUB4c2mL1OgmQtVCKLghhtvHKb34mZW/M7Yq1MZLEx/IXqLl1t9939N0c3dW/ugqB6FCpfXFBUr+UUNMwr31Aj/7JHBwn8+MjFIwtge844yupq82m+GPbR7tzWRpvRm5MVPKGZCa4JTeXKnw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74bb33f1-6e7d-4542-d2d0-08da77b59844 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:46.5341 (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: YGYD6MxctDZyRHeXSivqBbKh4YcqxpEnBDOuEyjgWsSAbm3MUSKH17t9SlWYKkrCuwPzC0TOiSpqK5ENr6D8Xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC dsa_port_link_register_of() and dsa_port_link_unregister_of() are not written with the fact in mind that they can be called with a dp->dn that is NULL (as evidenced even by the _of suffix in their name), but this is exactly what happens. How this behaves will differ depending on whether the backing driver implements ->adjust_link() or not. If it doesn't, the "if (of_phy_is_fixed_link(dp->dn) || phy_np)" condition will return false, and dsa_port_link_register_of() will do nothing and return 0. If the driver does implement ->adjust_link(), the "if (of_phy_is_fixed_link(dp->dn))" condition will return false (dp->dn is NULL) and we will call dsa_port_setup_phy_of(). This will call dsa_port_get_phy_device(), which will also return NULL, and we will also do nothing and return 0. It is hard to maintain this code and make future changes to it in this state, so just suppress calls to these 2 functions if dp->dn is NULL. The only functional effect is that if the driver does implement ->adjust_link(), we'll stop printing this to the console: Using legacy PHYLIB callbacks. Please migrate to PHYLINK! but instead we'll always print: [ 8.539848] dsa-loop fixed-0:1f: skipping link registration for CPU port 5 This is for the better anyway, since "using legacy phylib callbacks" was misleading information - we weren't issuing _any_ callbacks due to dsa_port_get_phy_device() returning NULL. Signed-off-by: Vladimir Oltean --- v1->v2: patch is new v2->v3: none net/dsa/dsa2.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index cac48a741f27..12479707bf96 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -469,10 +469,16 @@ static int dsa_port_setup(struct dsa_port *dp) dsa_port_disable(dp); break; case DSA_PORT_TYPE_CPU: - err = dsa_port_link_register_of(dp); - if (err) - break; - dsa_port_link_registered = true; + if (dp->dn) { + err = dsa_port_link_register_of(dp); + if (err) + break; + dsa_port_link_registered = true; + } else { + dev_warn(ds->dev, + "skipping link registration for CPU port %d\n", + dp->index); + } err = dsa_port_enable(dp, NULL); if (err) @@ -481,10 +487,16 @@ static int dsa_port_setup(struct dsa_port *dp) break; case DSA_PORT_TYPE_DSA: - err = dsa_port_link_register_of(dp); - if (err) - break; - dsa_port_link_registered = true; + if (dp->dn) { + err = dsa_port_link_register_of(dp); + if (err) + break; + dsa_port_link_registered = true; + } else { + dev_warn(ds->dev, + "skipping link registration for DSA port %d\n", + dp->index); + } err = dsa_port_enable(dp, NULL); if (err) @@ -577,11 +589,13 @@ static void dsa_port_teardown(struct dsa_port *dp) break; case DSA_PORT_TYPE_CPU: dsa_port_disable(dp); - dsa_port_link_unregister_of(dp); + if (dp->dn) + dsa_port_link_unregister_of(dp); break; case DSA_PORT_TYPE_DSA: dsa_port_disable(dp); - dsa_port_link_unregister_of(dp); + if (dp->dn) + dsa_port_link_unregister_of(dp); break; case DSA_PORT_TYPE_USER: if (dp->slave) { From patchwork Sat Aug 6 14:10:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938060 X-Patchwork-Delegate: kuba@kernel.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 98C58C19F2D for ; Sat, 6 Aug 2022 14:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232235AbiHFOMY (ORCPT ); Sat, 6 Aug 2022 10:12:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbiHFOMC (ORCPT ); Sat, 6 Aug 2022 10:12:02 -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 1E10412082; Sat, 6 Aug 2022 07:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kZcqzgq2xE6snLAQgWMrf2NOHJ0nQJDx42e32h56vZQKnXd6CvV/ipP9n8ljJyKrPcQ5g17NQhrT2+alRNmDdvVbUIyGVVFUAqQx2HSUW2jH16U48/efXjG4lWEaMyGQGJLYJidgLi3jk4KitW5Ka3RpS1/GgFB/GUQaaheDSJrjqZndOBcCsmaqIR9MaWg51D0I0AeVgQT1PU93IeNs3BJrDdJtOzlwRPnvrp5saBG7MJx1TQkkTmx5IUT4XBbEP+NtywoqeALGWjuYUK0tJMgef8pEvTcGJAXvu6+rhJZTdNWjQxaqMBtVKqOsC5rVi7kbENftrD/fQno+8tnIFw== 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=/MOaTerI7qocPUhUSUkcP8OhrT5LH6S5X89g3peRpI8=; b=Q8764W/4RSQ9/jVxiNifWHY3InKhTpdwm2i0/1Vt4NJ/a+PlxF5PezVaeTC5bSQjRHA7VPfJroiaQ+/iNSocfK5ME6RH7MtomtlNUNfT2M1ajHNnLCRf06fJIrM1QEa6U4AsUWNJ5s7hCnnGARXuv+dqVw5M3QRRJxHSGONIZoIHdDlDBM110LsWR8jV+QjilPDXRCNV6/mVIl5MngSqPWMkPVQ83MCCCO+iO9Nbf2d6wV+WHOM7GepI33w5nvVLupOlfGsYY4tP7ZavsD7b5IU/nNTlrUFMUyRY/OcvBxC1RZh0VbgWWXyo9uIvK/d0lBhzdLSiPFubU9//Ujx3Bw== 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=/MOaTerI7qocPUhUSUkcP8OhrT5LH6S5X89g3peRpI8=; b=VaxEzIWRRBPOmAw5RVFC1XuMnxjf8Yb/KdYaAuwM8W7dzPvyBihenBnO0RV62+o/pVEiZYCb2O4xMMTYDyT8DFOhiapiu/TUzqRCLCDdztjIyZvTYygZkcr53/PkqZ7Tt+ef1To2luxKh+IB/oMRhvjYTCujDFXATvI9Yrdn9UM= 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:48 +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:48 +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 09/10] net: dsa: rename dsa_port_link_{,un}register_of Date: Sat, 6 Aug 2022 17:10:58 +0300 Message-Id: <20220806141059.2498226-10-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: f3139638-854b-4a37-4037-08da77b59a00 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: MMMyMZ4gBbOewKNm8bsRWp/eO6M3IxOW2gmuMYpMTROn3H5msTqKWHzq9vWju3eGYO3DPOy3kaRRpPkr58qsggJpDCEJmGTTV8PqpY2GCOp8PfQJzv8VWLM7U3kY3N40bhLl+YqlX0kbThIw4koTELB3OMp/4fGeNOV8YxwfD6PvIdUdp6uNS/O15s14TsRxAa4Xt2NVgZfsIjxmL4Y0IRTw4Jh1mAv1Id1T+3K7rjKqMYWQpMVKsi7H1t0JHX0mNalQIWqf+HsprfsqpR2ttdr48NWQ50Rs371DuVzpnO3qwqwFN2KWHsbw9dzNwG+1E8oRUcXyqY7Ba2nIOVUYTNj3na4fFGMJ3EWcll7W0n8ro/7/uOh35rRCfTuqtbgECZ+ylh5HCWzMGmFYj17zMZ2sS/gr3pdJNMyCTkD+dggk5/4KhVwzKC9Uh9QjonYlzFfqG6UuJQ8NXw3QO5HZ/iciT+iFl7uuOk07uO2kaqWdtlVDG11/xITcrctQDi0M3CLzTNrjLX6uA86QiQ39JQYloxAWPeQz2/xbW0WSNiu9W13X8UM8lTbOEXCQAOrh5wIBaS4+7tU0fgOBY5J1WKZxnJ5RS/TUshZFJXxoh8h1VssOub9tXrCoPBoxfa3W8GPS46NiVW3YkTlh+V7fDISy3PV8nH3JQntLtrwxJ4waGNmrx83wf74dI+9ar0j84fr20pAFciST8Ah+dKroVV1VZEjGKWyoQ5U1UcYp6Oh7XtDKo5f832KW8zWObk/euuDkB+bdshy+9Qc96fax/mCpk2dm7/qG2SCvGXzwer4= 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)(83380400001)(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: RcjXVd2plhgNBegFUZdkVwX0PViQnloSXYeJ/J1hAeCgWTWGe5uyXd8x//YB4U3GMoPSUytd002NY2ZNtjQq3Qx6zVrbaLOgKx8wPwkjlYTK+sCB9yEAicS1H4E5i9do6ui8UFxWUQshGtfqkOJeR0sdHleUfSGUSClrh1ExaSVFxOyBQWkvfXrO1a3jeuYLh5MHNjfErpK6C2Hq4bijjYBO3igNRbVU456gKUUvrjBUFr1rQvGRiX8vSCrUmCDxa4Y+/WweiMFNcBqokGU6Pkgg6tkLkCwJLNniA5ZEgx6SUfhOPP3VKVEIAG0ggjymFC+ZMHRNfqLnS6ThXwUORQ/RkjwQHA+MdE5KYEQMhHP4lx5GGqMdZqNgJAvBHU2P9AFDSHKmw8Vs2BqkS056rjc8ic67f7bfBd3y052PZHrtTKeUT3bawWOf8VhNMqrWw7e0CJ0cZ9wP/Q2d4gnrtglkHAxN1y08kw5FB88QFElBX9YkIM3BNoe1F7FeQ1INgYWqYA+y+88rWrwJV+z4TtayG3ntwGQW29fbdK34SQ1I+QccwD8xvmk1bEeLjwwgzECSCi9E6Vzoi8AEsqzQKZv9o7/B+78FBU52ELt00rLhJoZZXEyU0wt6JBYrI710XLUuDMVAx64AtOXyOMvgIqIBmrurxj+UBFfqVb4mzxT8bkRswQbxaJEz8WUxsFe70VnsQv0jwChQ0JbJRODIumF90eyjXCEWE979XGfgSfsugI18e5ctucYkxWVoWyGNWrdYirow6HEmsnc3oyi5IwFA+i8P5JI5d69zSj4G22Ne9XQYrQMpmMyTlo5X9Ta7yirhvumefI/jnmPS3Kgfuzw2h6dG9oaBIJ7ZPYkDQ69gPOKOenytiidlkU2QNlz7KMNw4sLfMexYcMTTMBL57e44qLnsfNl+gJBhHQUzSsEf2n2/jJrjjdakdDG2TGxSFsH3hA6HY9F9E3i9d8vNIXGNyX3YcxcfsOy9M/l6AWnEHNGbGHisc+lSK6rJXvNDbVirCEzTMVZGjkWhSmYXkV/2fumC3ChKi0J3Vqw+sdEtrPmZs8Sf5wdpD5z6ipWRpRpVF9Rb+owfOHXvuQTgyhs0wEmK/7rgSuMi+gjT0UA9Qlb4zmmSW3AvWG5infukABXtW4T3WfGqx/P0SGHwHfyVnRfUxUlGXMbJwcAwU6OfsaPaCC8hH3ll7NItCnorC8nw9g3IYC0zUxdzZBD2C6i+2VQ3ZcBBs8EKoZd37Ab7zXVe5IAI26yUW5r1FMTSGoRADRN/QXm5Etv0I7xDs+qYTIAv0mukrhhGZ8hOc8z39AhC02MhMLuYhEMHiLvLs2hACNuOV3JApizzI01NxtPhxMmB1Hg++K141Cz5+gVI3vZZis7hIoKZUN+bibI1AeJ478gNHJRRINMDIFmw2leFSf0kwKQL3zD/RpDzIOijhvSWCFEgn+WJRsSwkgiKf9ZZG8o2pDKuPrOk+w64SdE01s3WvnWYbVZ5oJ5jz0CSlQaNJXgkiKNN46TyKWsPfMaH0m/ZVUynotmbkzgCKQQ9zfGbmLFeyJBFxLYasT7Xno7AGtl58ZiDGWYr6uhBJ75PBaVDzzQnN7YBu/jMaA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3139638-854b-4a37-4037-08da77b59a00 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:48.6277 (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: 1TGglyAB9jdGw7N9G4wKyuSCPTXUjMlU+m4t4yIIkKdqBgShupBbTRHBXTnqtPvePNGTi/DKpUDbhUTRKZqtVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC There is a subset of functions that applies only to shared (DSA and CPU) ports, yet this is difficult to comprehend by looking at their code alone. These are dsa_port_link_register_of(), dsa_port_link_unregister_of(), and the functions that only these 2 call. Rename this class of functions to dsa_shared_port_* to make this fact more evident, even if this goes against the apparent convention that function names in port.c must start with dsa_port_. Signed-off-by: Vladimir Oltean --- v1->v2: patch is new v2->v3: none net/dsa/dsa2.c | 10 +++++----- net/dsa/dsa_priv.h | 4 ++-- net/dsa/port.c | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 12479707bf96..055a6d1d4372 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -470,7 +470,7 @@ static int dsa_port_setup(struct dsa_port *dp) break; case DSA_PORT_TYPE_CPU: if (dp->dn) { - err = dsa_port_link_register_of(dp); + err = dsa_shared_port_link_register_of(dp); if (err) break; dsa_port_link_registered = true; @@ -488,7 +488,7 @@ static int dsa_port_setup(struct dsa_port *dp) break; case DSA_PORT_TYPE_DSA: if (dp->dn) { - err = dsa_port_link_register_of(dp); + err = dsa_shared_port_link_register_of(dp); if (err) break; dsa_port_link_registered = true; @@ -517,7 +517,7 @@ static int dsa_port_setup(struct dsa_port *dp) if (err && dsa_port_enabled) dsa_port_disable(dp); if (err && dsa_port_link_registered) - dsa_port_link_unregister_of(dp); + dsa_shared_port_link_unregister_of(dp); if (err) { if (ds->ops->port_teardown) ds->ops->port_teardown(ds, dp->index); @@ -590,12 +590,12 @@ static void dsa_port_teardown(struct dsa_port *dp) case DSA_PORT_TYPE_CPU: dsa_port_disable(dp); if (dp->dn) - dsa_port_link_unregister_of(dp); + dsa_shared_port_link_unregister_of(dp); break; case DSA_PORT_TYPE_DSA: dsa_port_disable(dp); if (dp->dn) - dsa_port_link_unregister_of(dp); + dsa_shared_port_link_unregister_of(dp); break; case DSA_PORT_TYPE_USER: if (dp->slave) { diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index d9722e49864b..8924366467e0 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -285,8 +285,8 @@ int dsa_port_mrp_add_ring_role(const struct dsa_port *dp, int dsa_port_mrp_del_ring_role(const struct dsa_port *dp, const struct switchdev_obj_ring_role_mrp *mrp); int dsa_port_phylink_create(struct dsa_port *dp); -int dsa_port_link_register_of(struct dsa_port *dp); -void dsa_port_link_unregister_of(struct dsa_port *dp); +int dsa_shared_port_link_register_of(struct dsa_port *dp); +void dsa_shared_port_link_unregister_of(struct dsa_port *dp); int dsa_port_hsr_join(struct dsa_port *dp, struct net_device *hsr); void dsa_port_hsr_leave(struct dsa_port *dp, struct net_device *hsr); int dsa_port_tag_8021q_vlan_add(struct dsa_port *dp, u16 vid, bool broadcast); diff --git a/net/dsa/port.c b/net/dsa/port.c index 2dd76eb1621c..4b6139bff217 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1552,7 +1552,7 @@ int dsa_port_phylink_create(struct dsa_port *dp) return 0; } -static int dsa_port_setup_phy_of(struct dsa_port *dp, bool enable) +static int dsa_shared_port_setup_phy_of(struct dsa_port *dp, bool enable) { struct dsa_switch *ds = dp->ds; struct phy_device *phydev; @@ -1590,7 +1590,7 @@ static int dsa_port_setup_phy_of(struct dsa_port *dp, bool enable) return err; } -static int dsa_port_fixed_link_register_of(struct dsa_port *dp) +static int dsa_shared_port_fixed_link_register_of(struct dsa_port *dp) { struct device_node *dn = dp->dn; struct dsa_switch *ds = dp->ds; @@ -1624,7 +1624,7 @@ static int dsa_port_fixed_link_register_of(struct dsa_port *dp) return 0; } -static int dsa_port_phylink_register(struct dsa_port *dp) +static int dsa_shared_port_phylink_register(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; struct device_node *port_dn = dp->dn; @@ -1650,7 +1650,7 @@ static int dsa_port_phylink_register(struct dsa_port *dp) return err; } -int dsa_port_link_register_of(struct dsa_port *dp) +int dsa_shared_port_link_register_of(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; struct device_node *phy_np; @@ -1663,7 +1663,7 @@ int dsa_port_link_register_of(struct dsa_port *dp) ds->ops->phylink_mac_link_down(ds, port, MLO_AN_FIXED, PHY_INTERFACE_MODE_NA); of_node_put(phy_np); - return dsa_port_phylink_register(dp); + return dsa_shared_port_phylink_register(dp); } of_node_put(phy_np); return 0; @@ -1673,12 +1673,12 @@ int dsa_port_link_register_of(struct dsa_port *dp) "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n"); if (of_phy_is_fixed_link(dp->dn)) - return dsa_port_fixed_link_register_of(dp); + return dsa_shared_port_fixed_link_register_of(dp); else - return dsa_port_setup_phy_of(dp, true); + return dsa_shared_port_setup_phy_of(dp, true); } -void dsa_port_link_unregister_of(struct dsa_port *dp) +void dsa_shared_port_link_unregister_of(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; @@ -1694,7 +1694,7 @@ void dsa_port_link_unregister_of(struct dsa_port *dp) if (of_phy_is_fixed_link(dp->dn)) of_phy_deregister_fixed_link(dp->dn); else - dsa_port_setup_phy_of(dp, false); + dsa_shared_port_setup_phy_of(dp, false); } int dsa_port_hsr_join(struct dsa_port *dp, struct net_device *hsr) From patchwork Sat Aug 6 14:10:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12938061 X-Patchwork-Delegate: kuba@kernel.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 4B3B3C25B0C for ; Sat, 6 Aug 2022 14:12:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232402AbiHFOMl (ORCPT ); Sat, 6 Aug 2022 10:12:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbiHFOMF (ORCPT ); Sat, 6 Aug 2022 10:12:05 -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 5F24212096; Sat, 6 Aug 2022 07:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=houmruaJVZ+Y2Lla0L7dAiGoCMIs0wS+iMVOdeo1WN4xK7oOMVbXbDIVsTfYNiQMahcMgNEWzhgXheRXQvn1HPCelcoNK2zKOeifXa3mqpNAK440n47/orl3RgRhMYkBvlWRBxxuXj/1x29XQD9VdVV4Roa+Tvigx+pnnQVSKLZfIEf+VDojlvA5oqlTioNeAFVCZik38ZvN27os1NEotoUUk5cymRdZ7B5G3ZWeuZgDgVCLjopDMukuAfKCykwV8NM2FP7ICsjBbNYK7t26FK+LdIWKNjHMPzlWtVv0bsb2FTmEFg2sXUeodexuQTVYfe6ZO/q3qrdmFkE04fk4JA== 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=eLB0ALklhWhudqqN7mFyWYKYjsDTi0BMiKKl+PmQ06Q=; b=QSXnPBhNEKY6v7lAw0MlYTZq6JaKPn890UqKz2ZpO+JHd2UihvGfBBjRy1LeNj+nOkQ4man/uOPFfTCBGmcZgAmjDGETJpGjb1jFb8o7hT6YF2HZ3ucXc2QlcpMv2kIh/T8Ob4KaakQWCQat4x1cBR7zf8ZSa7e7b8iw4a3zkJZGHfzVPuV7e3B+Ee+edWdmIN7CTcz6rFn5DX4Xl2jZUle2HWfLSaKBTLivr5hXrjRj6llndtjdjU+pP3QxiBhVNG2BJYbBgXmFU6dPT9ZBFz5DDlnQo7TT9sGfhP3Ay2K9U1IiSW9cVThTFSr6FN8AxNj2J+Yud6PKFEpDQW72QA== 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=eLB0ALklhWhudqqN7mFyWYKYjsDTi0BMiKKl+PmQ06Q=; b=qdQpTMqOTA5jmMxgV7/7LkNZGzsF9MksVQMiwzQBpXSgeFNOUJMwyk0GnowNAVQu9DnaELdZigZNV5pljEoEmGKt0KSsc1R62s0AxkSEA2LxxvCf+7UoiYKhZKVm1CzsLn56PwNSxPwBFI12AivQj2tR64RcxUDYvVYrqaQrFa4= 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:50 +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:50 +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, Frank Rowand Subject: [RFC PATCH v3 net-next 10/10] net: dsa: make phylink-related OF properties mandatory on DSA and CPU ports Date: Sat, 6 Aug 2022 17:10:59 +0300 Message-Id: <20220806141059.2498226-11-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: 6e09fc8d-a28a-4afb-a119-08da77b59b4b 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: 0JiILupFTMMqLYP5InGfaG23V3XsgbiEI2EMOW0F1t38g6GqXXBGxQHjqp51zvEv6kXWKuR/cYB+O2tqjkL7yPENGbykumhjFWnr3ulHXGtX0AvgTS9Og7Zpvwr40B7HAN+pHLVL2wnMzfJZwXaOGVFX+h7rt7S9plb12o71ppIjKiH1POOio/BLJA6LiJCl/u7oLKeooa8Ajk/gcXmip/qWnYHYGIiHVJhKfj/F2qkHqoi6JEdMF2q1rUYzXY5NWXeLJ+aVR8hmSRQOqIuY+5QaBGeR4VuQ4R3EKHQbxDxnjZCkCVbU63MqG/aECUIdk/pNZcJe91y5Y7vK/6JsQMX9uIEA7E+Ezi2V2b+9MkiHh87NHVRyytbT6gU28tzuaJvQuRbFxp4RVIzdoNzOtyxm9WsA95r0FgMVF6B3AK/YISjmBxAgIOq23yMfl+hAzQJpFUqen8C+KJaDNkCkR6uscMSV5+8bK2WzynrSktgy57C6CRpX21RLSVoHGA2R6ZkTTUoZNdu0PqOTzNG31FSptqhGWEahsGRh4tY5WpkoX3DavZZci6XIuRsdPmqXTg+0CwMwavOZdaBOcLNpuMwVeIssaB2tAkAWbT7EmZ7DsQxD5YUctrvS7aizFuMMSlmQ5YGF4rHaJiTIVk7X7s5TvgTtkN1a0S5RFhDrR3wvjAuT8gRVoKlq3UtLUknVnPhFvxn73KXFYNjPTBy4KFZgf8V9XLp5J93oMuNxlGGkK64Fgji0yGnWDy3RahaN43Wg1CRq12kGAFmSRcY2n6tkwSyOgH8pdLXx2b3nGuVJFfDDe5eTblobyxKBsFsm/Ki1cXnCDnccbGxSxCilhA== 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)(66574015)(5660300002)(30864003)(44832011)(7416002)(7406005)(186003)(1076003)(2616005)(38100700002)(38350700002)(83380400001)(52116002)(966005)(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: =?utf-8?q?2bQ2iFhKsS3dTTXJlKnD6o7UDayR?= =?utf-8?q?BEeZhoZI+61112B8L92VBwLJI4ELJv2ENGKQPWm8hT1CyMZ9DJ6LOG+7ro25efQaW?= =?utf-8?q?Hi4Rb1IC/tJ+90L2Z0gJJjsYDIvjwtz6zrizEcrI7ZQgmRFC8Td2RuuoBPBu6fya/?= =?utf-8?q?gvCelpfR6H7Mw+jJd22n/2CbTfwckW6EUGcwE/vVfqOyqAkfWLkEAeoaDdu8LQOfL?= =?utf-8?q?MtrJ9BdoI7/+IBFFnTM54UNtdzUxqOD7lIvK8GY/vKiCPQkn6uaw0RycTNEXHMMIB?= =?utf-8?q?SGc52fi2XeqBpRwr8Ykn1DdN4ESR76lr6Bksx84GS5c7ibHA3oj60rxywu0bpmw+x?= =?utf-8?q?SOQNLos5H+FKmmNCj0gv23oVZWfvzNd5XfalL1AST5nVXJWNcGFQESsgZ2YTdjSuo?= =?utf-8?q?qmB/UmDWkI8XX/ktpJXj1R7X/315JuKXUGbEsELb1xXiEFbPjVfgWOZXKIqQIKkq4?= =?utf-8?q?qAvHSCiSW2UgbH1adLWYswdHwQ0HokuxzT3CknDQfkyCErzWrAS/2MDn/ZOxtZAvj?= =?utf-8?q?jXlWIy8iAXrECRmqrCIdlHqbPYpSbOfI+zW2FoOiEg7hdAnRzFoOLKbrHNI6Rxp6i?= =?utf-8?q?i+HMuWldgHLKuCj7/UzRTOa5AuPxS1suGFOSJbPBJVG/S/G65rJdxkOtekRbX9YlS?= =?utf-8?q?oU3rmCs3cNpH1AUS0DmIxMBr0+5MTu1Ur6mzWzB9YC2lStq01iGysub3lXtz7sr+c?= =?utf-8?q?xmrSiqui8kLjQZWC7LADOfz6LAXoXNdZCVRpuQ/L5pBizyq+wrPQAxhteNyjEEQHO?= =?utf-8?q?Y4u/t55uW9xruZZxLEhSb/9wRyU7jKiVQdv3rNFL6C2bH1/zVCwZScYjd7E4CmDy5?= =?utf-8?q?6m1hsb4ABLVaIzF7NFedMLFAL5OUYHXrOEWHGKkpaqD0JKihY1oHAoPMAAJfQkIym?= =?utf-8?q?jFybv3/8I/9zbbcyIXyVPXUWA+ja3JW562hfpwkM3J1+0NrngOCSPz8diepbZNtIB?= =?utf-8?q?LRt2Qd/6lUXl/1rpkYqrXZwjVAm3VoEyjiFiEOUXrkD+JCMFaGHNCDXfiP7FqYt+L?= =?utf-8?q?/hRGdoNMmRodpVAFBpTA1zJSRGz3K5EUj3K8JHAsZtRcgd2v0G46tlsZcaieKmWOk?= =?utf-8?q?1lGFpe6BHeP0CTgZrz1gWfRw4wLAswrxW9yZtwciwM/Rx61EsFTqZ005xxHl+ycRx?= =?utf-8?q?U5UcH7lGTrZQxajLmqx0VmKR7LKEIvB261L3HJa2Hkp0xSuFBolMmfjfRk37gPIEr?= =?utf-8?q?hqat3ldU4cOCLFbGxFS4b9vAuvu1kpHpL3vX5v797EuwuKiJ91KLKhr9xB4/E1Mbp?= =?utf-8?q?/AWeD8A3ll3bWwyHxZbQXBO4Bk+9A3YpQ2BYYpWAbUTg6RVe56yMDllGmN6LWWWPy?= =?utf-8?q?1wVvxDJis9IBuONacTMN0jxulnYejw3HVNho14T7VoIWmg7xwJ/2sDITQNtoCQttb?= =?utf-8?q?Pkv/GpVoJG9SbEEzmoifP7RGcuDQix8JGchbu83Ko+b7fdAXPCeKfABRxzIurGkBZ?= =?utf-8?q?rsqbEMlKn4nV0XRrSXXOvE2IlFbshwhQFyhtZtcabRNIbJb7RIKESSIaFJHk1e0Ir?= =?utf-8?q?mSWJ3H7hA266Ec4HNSJqqFR70a7hbVGU7A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e09fc8d-a28a-4afb-a119-08da77b59b4b 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:50.7838 (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: k9NknGy75kr84zidI1UfRmXBNTrcNFaoajjZwaNJo6R085fb8fDpVhpTLYU4b7FXsRWa153dOEXtd4N9PMOrsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Early DSA drivers were kind of simplistic in that they assumed a fairly narrow hardware layout. User ports would have integrated PHYs at an internal MDIO address that is derivable from the port number, and shared (DSA and CPU) ports would have an MII-style (serial or parallel) connection to another MAC. Phylib and then phylink were used to drive the internal PHYs, and this needed little to no description through the platform data structures. Bringing up the shared ports at the maximum supported link speed was the responsibility of the drivers. As a result of this, when these early drivers were converted from platform data to the new DSA OF bindings, there was no link information translated into the first DT bindings. https://lore.kernel.org/all/YtXFtTsf++AeDm1l@lunn.ch/ Later, phylink was adopted for shared ports as well, and today we have a workaround in place, introduced by commit a20f997010c4 ("net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed"). There, DSA checks for the presence of phy-handle/fixed-link/managed OF properties, and if missing, phylink registration would be skipped. This is because phylink is optional for some drivers (the shared ports already work without it), but the process of starting to register a port with phylink is irreversible: if phylink_create() fails to find the fwnode properties it needs, it bails out and it leaves the ports inoperational (because phylink expects ports to be initially down, so DSA necessarily takes them down, and doesn't know how to put them back up again). DSA being a common framework, new drivers opt into this workaround willy-nilly, but the ideal behavior from the DSA core's side would have been to not interfere with phylink's process of failing at all. This isn't possible because of regression concerns with pre-phylink DT blobs, but at least DSA should put a stop to the proliferation of more of such cases that rely on the workaround to skip phylink registration, and sanitize the environment that new drivers work in. To that end, create a list of compatible strings for which the workaround is preserved, and don't apply the workaround for any drivers outside that list (this includes new drivers). In some cases, we make the assumption that even existing drivers don't rely on DSA's workaround, and we do this by looking at the device trees in which they appear. We can't fully know what is the situation with downstream DT blobs, but we can guess the overall trend by studying the DT blobs that were submitted upstream. If there are upstream blobs that have lacking descriptions, we take it as very likely that there are many more downstream blobs that do so too. If all upstream blobs have complete descriptions, we take that as a hint that the driver is a candidate for strict validation (considering that most bindings are copy-pasted). If there are no upstream DT blobs, we take the conservative route of skipping validation, unless the driver maintainer instructs us otherwise. The driver situation is as follows: ar9331 ~~~~~~ compatible strings: - qca,ar9331-switch 1 occurrence in mainline device trees, part of SoC dtsi (arch/mips/boot/dts/qca/ar9331.dtsi), description is not problematic. Verdict: opt into validation. b53 ~~~ compatible strings: - brcm,bcm5325 - brcm,bcm53115 - brcm,bcm53125 - brcm,bcm53128 - brcm,bcm5365 - brcm,bcm5389 - brcm,bcm5395 - brcm,bcm5397 - brcm,bcm5398 - brcm,bcm53010-srab - brcm,bcm53011-srab - brcm,bcm53012-srab - brcm,bcm53018-srab - brcm,bcm53019-srab - brcm,bcm5301x-srab - brcm,bcm11360-srab - brcm,bcm58522-srab - brcm,bcm58525-srab - brcm,bcm58535-srab - brcm,bcm58622-srab - brcm,bcm58623-srab - brcm,bcm58625-srab - brcm,bcm88312-srab - brcm,cygnus-srab - brcm,nsp-srab - brcm,omega-srab - brcm,bcm3384-switch - brcm,bcm6328-switch - brcm,bcm6368-switch - brcm,bcm63xx-switch I've found at least these mainline DT blobs with problems: arch/arm/boot/dts/bcm47094-linksys-panamera.dts - lacks phy-mode arch/arm/boot/dts/bcm47189-tenda-ac9.dts - lacks phy-mode and fixed-link arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts - lacks phy-mode and fixed-link arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts arch/arm/boot/dts/bcm953012er.dts arch/arm/boot/dts/bcm4708-netgear-r6250.dts arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts - lacks phy-mode and fixed-link arch/arm/boot/dts/bcm53016-meraki-mr32.dts - lacks phy-mode Verdict: opt all switches out of strict validation. bcm_sf2 ~~~~~~~ compatible strings: - brcm,bcm4908-switch - brcm,bcm7445-switch-v4.0 - brcm,bcm7278-switch-v4.0 - brcm,bcm7278-switch-v4.8 A single occurrence in mainline (arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi), part of a SoC dtsi, valid description. Florian Fainelli explains that most of the bcm_sf2 device trees lack a full description for the internal IMP ports. Verdict: opt the BCM4908 into strict validation, and opt out the rest. Note that even though BCM4908 has strict DT bindings, it still does not register with phylink on the IMP port due to it implementing ->adjust_link(). hellcreek ~~~~~~~~~ compatible strings: - hirschmann,hellcreek-de1soc-r1 No occurrence in mainline device trees. Kurt Kanzenbach confirms that the downstream device tree lacks phy-mode and fixed link, and needs work. Verdict: opt out of validation. lan9303 ~~~~~~~ compatible strings: - smsc,lan9303-mdio - smsc,lan9303-i2c 1 occurrence in mainline device trees: arch/arm/boot/dts/imx53-kp-hsc.dts - no phy-mode, no fixed-link Verdict: opt out of validation. lantiq_gswip ~~~~~~~~~~~~ compatible strings: - lantiq,xrx200-gswip - lantiq,xrx300-gswip - lantiq,xrx330-gswip No occurrences in mainline device trees. Martin Blumenstingl confirms that the downstream OpenWrt device trees lack a proper fixed-link and need work, and that the incomplete description can even be seen in the example from Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt. Verdict: opt out of validation. microchip ksz ~~~~~~~~~~~~~ compatible strings: - microchip,ksz8765 - microchip,ksz8794 - microchip,ksz8795 - microchip,ksz8863 - microchip,ksz8873 - microchip,ksz9477 - microchip,ksz9897 - microchip,ksz9893 - microchip,ksz9563 - microchip,ksz8563 - microchip,ksz9567 - microchip,lan9370 - microchip,lan9371 - microchip,lan9372 - microchip,lan9373 - microchip,lan9374 5 occurrences in mainline device trees, all descriptions are valid. But we had a snafu for the ksz8795 and ksz9477 drivers where the phy-mode property would be expected to be located directly under the 'switch' node rather than under a port OF node. It was fixed by commit edecfa98f602 ("net: dsa: microchip: look for phy-mode in port nodes"). The driver still has compatibility with the old DT blobs. The lan937x support was added later than the above snafu was fixed, and even though it has support for the broken DT blobs by virtue of sharing a common probing function, I'll take it that its DT blobs are correct. Verdict: opt lan937x into validation, and the others out. mt7530 ~~~~~~ compatible strings - mediatek,mt7621 - mediatek,mt7530 - mediatek,mt7531 Multiple occurrences in mainline device trees, one is part of an SoC dtsi (arch/mips/boot/dts/ralink/mt7621.dtsi), all descriptions are fine. Verdict: opt into strict validation. mv88e6060 ~~~~~~~~~ compatible string: - marvell,mv88e6060 no occurrences in mainline, nobody knows anybody who uses it. Verdict: opt out of strict validation. mv88e6xxx ~~~~~~~~~ compatible strings: - marvell,mv88e6085 - marvell,mv88e6190 - marvell,mv88e6250 Device trees that have incomplete descriptions of CPU or DSA ports: arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi - lacks phy-mode arch/arm64/boot/dts/marvell/cn9130-crb.dtsi - lacks phy-mode and fixed-link arch/arm/boot/dts/vf610-zii-ssmb-spu3.dts - lacks phy-mode arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts - lacks phy-mode arch/arm/boot/dts/vf610-zii-spb4.dts - lacks phy-mode arch/arm/boot/dts/vf610-zii-cfu1.dts - lacks phy-mode arch/arm/boot/dts/vf610-zii-dev-rev-c.dts - lacks phy-mode on CPU port, fixed-link on DSA ports arch/arm/boot/dts/vf610-zii-dev-rev-b.dts - lacks phy-mode on CPU port arch/arm/boot/dts/armada-381-netgear-gs110emx.dts - lacks phy-mode arch/arm/boot/dts/vf610-zii-scu4-aib.dts - lacks fixed-link on xgmii DSA ports and/or in-band-status on 2500base-x DSA ports, and phy-mode on CPU port arch/arm/boot/dts/imx6qdl-gw5904.dtsi - lacks phy-mode and fixed-link arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts - lacks phy-mode and fixed-link arch/arm/boot/dts/vf610-zii-ssmb-dtu.dts - lacks phy-mode arch/arm/boot/dts/kirkwood-dir665.dts - lacks phy-mode arch/arm/boot/dts/kirkwood-rd88f6281.dtsi - lacks phy-mode arch/arm/boot/dts/orion5x-netgear-wnr854t.dts - lacks phy-mode and fixed-link arch/arm/boot/dts/armada-388-clearfog.dts - lacks phy-mode arch/arm/boot/dts/armada-xp-linksys-mamba.dts - lacks phy-mode arch/arm/boot/dts/armada-385-linksys.dtsi - lacks phy-mode arch/arm/boot/dts/imx6q-b450v3.dts arch/arm/boot/dts/imx6q-b850v3.dts - has a phy-handle but not a phy-mode? arch/arm/boot/dts/armada-370-rd.dts - lacks phy-mode arch/arm/boot/dts/kirkwood-linksys-viper.dts - lacks phy-mode arch/arm/boot/dts/imx51-zii-rdu1.dts - lacks phy-mode arch/arm/boot/dts/imx51-zii-scu2-mezz.dts - lacks phy-mode arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi - lacks phy-mode arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts - lacks phy-mode and fixed-link Verdict: opt out of validation. ocelot ~~~~~~ compatible strings: - mscc,vsc9953-switch - felix (arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi) is a PCI device, has no compatible string 2 occurrences in mainline, both are part of SoC dtsi and complete. Verdict: opt into strict validation. qca8k ~~~~~ compatible strings: - qca,qca8327 - qca,qca8328 - qca,qca8334 - qca,qca8337 5 occurrences in mainline device trees, none of the descriptions are problematic. Verdict: opt into validation. realtek ~~~~~~~ compatible strings: - realtek,rtl8366rb - realtek,rtl8365mb 2 occurrences in mainline, both descriptions are fine, additionally rtl8365mb.c has a comment "The device tree firmware should also specify the link partner of the extension port - either via a fixed-link or other phy-handle." Verdict: opt into validation. rzn1_a5psw ~~~~~~~~~~ compatible strings: - renesas,rzn1-a5psw One single occurrence, part of SoC dtsi (arch/arm/boot/dts/r9a06g032.dtsi), description is fine. Verdict: opt into validation. sja1105 ~~~~~~~ Driver already validates its port OF nodes in sja1105_parse_ports_node(). Verdict: opt into validation. vsc73xx ~~~~~~~ compatible strings: - vitesse,vsc7385 - vitesse,vsc7388 - vitesse,vsc7395 - vitesse,vsc7398 2 occurrences in mainline device trees, both descriptions are fine. Verdict: opt into validation. xrs700x ~~~~~~~ compatible strings: - arrow,xrs7003e - arrow,xrs7003f - arrow,xrs7004e - arrow,xrs7004f no occurrences in mainline, we don't know. Verdict: opt out of strict validation. Because there is a pattern where newly added switches reuse existing drivers more often than introducing new ones, I've opted for deciding who gets to opt into the workaround based on an OF compatible match table in the DSA core. The alternative would have been to add another boolean property to struct dsa_switch, like configure_vlan_while_not_filtering. But this avoids situations where sometimes driver maintainers obfuscate what goes on by sharing a common probing function, and therefore making new switches inherit old quirks. Side note, we also warn about missing properties for drivers that rely on the workaround. This isn't an indication that we'll break compatibility with those DT blobs any time soon, but is rather done to raise awareness about the change, for future DT blob authors. Cc: Rob Herring Cc: Frank Rowand Acked-by: Alvin Šipraga # realtek Signed-off-by: Vladimir Oltean --- v1->v2: print warnings even for drivers skipping phylink registration, move code placement v2->v3: reword commit message net/dsa/port.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 170 insertions(+), 5 deletions(-) diff --git a/net/dsa/port.c b/net/dsa/port.c index 4b6139bff217..c07a7c69d5e0 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1650,22 +1650,187 @@ static int dsa_shared_port_phylink_register(struct dsa_port *dp) return err; } +/* During the initial DSA driver migration to OF, port nodes were sometimes + * added to device trees with no indication of how they should operate from a + * link management perspective (phy-handle, fixed-link, etc). Additionally, the + * phy-mode may be absent. The interpretation of these port OF nodes depends on + * their type. + * + * User ports with no phy-handle or fixed-link are expected to connect to an + * internal PHY located on the ds->slave_mii_bus at an MDIO address equal to + * the port number. This description is still actively supported. + * + * Shared (CPU and DSA) ports with no phy-handle or fixed-link are expected to + * operate at the maximum speed that their phy-mode is capable of. If the + * phy-mode is absent, they are expected to operate using the phy-mode + * supported by the port that gives the highest link speed. It is unspecified + * if the port should use flow control or not, half duplex or full duplex, or + * if the phy-mode is a SERDES link, whether in-band autoneg is expected to be + * enabled or not. + * + * In the latter case of shared ports, omitting the link management description + * from the firmware node is deprecated and strongly discouraged. DSA uses + * phylink, which rejects the firmware nodes of these ports for lacking + * required properties. + * + * For switches in this table, DSA will skip enforcing validation and will + * later omit registering a phylink instance for the shared ports, if they lack + * a fixed-link, a phy-handle, or a managed = "in-band-status" property. + * It becomes the responsibility of the driver to ensure that these ports + * operate at the maximum speed (whatever this means) and will interoperate + * with the DSA master or other cascade port, since phylink methods will not be + * invoked for them. + * + * If you are considering expanding this table for newly introduced switches, + * think again. It is OK to remove switches from this table if there aren't DT + * blobs in circulation which rely on defaulting the shared ports. + */ +static const char * const dsa_switches_dont_enforce_validation[] = { +#if IS_ENABLED(CONFIG_NET_DSA_XRS700X) + "arrow,xrs7003e", + "arrow,xrs7003f", + "arrow,xrs7004e", + "arrow,xrs7004f", +#endif +#if IS_ENABLED(CONFIG_B53) + "brcm,bcm5325", + "brcm,bcm53115", + "brcm,bcm53125", + "brcm,bcm53128", + "brcm,bcm5365", + "brcm,bcm5389", + "brcm,bcm5395", + "brcm,bcm5397", + "brcm,bcm5398", + "brcm,bcm53010-srab", + "brcm,bcm53011-srab", + "brcm,bcm53012-srab", + "brcm,bcm53018-srab", + "brcm,bcm53019-srab", + "brcm,bcm5301x-srab", + "brcm,bcm11360-srab", + "brcm,bcm58522-srab", + "brcm,bcm58525-srab", + "brcm,bcm58535-srab", + "brcm,bcm58622-srab", + "brcm,bcm58623-srab", + "brcm,bcm58625-srab", + "brcm,bcm88312-srab", + "brcm,cygnus-srab", + "brcm,nsp-srab", + "brcm,omega-srab", + "brcm,bcm3384-switch", + "brcm,bcm6328-switch", + "brcm,bcm6368-switch", + "brcm,bcm63xx-switch", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_BCM_SF2) + "brcm,bcm7445-switch-v4.0", + "brcm,bcm7278-switch-v4.0", + "brcm,bcm7278-switch-v4.8", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK) + "hirschmann,hellcreek-de1soc-r1", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_LANTIQ_GSWIP) + "lantiq,xrx200-gswip", + "lantiq,xrx300-gswip", + "lantiq,xrx330-gswip", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_MV88E6060) + "marvell,mv88e6060", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_MV88E6XXX) + "marvell,mv88e6085", + "marvell,mv88e6190", + "marvell,mv88e6250", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON) + "microchip,ksz8765", + "microchip,ksz8794", + "microchip,ksz8795", + "microchip,ksz8863", + "microchip,ksz8873", + "microchip,ksz9477", + "microchip,ksz9897", + "microchip,ksz9893", + "microchip,ksz9563", + "microchip,ksz8563", + "microchip,ksz9567", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) + "smsc,lan9303-mdio", +#endif +#if IS_ENABLED(CONFIG_NET_DSA_SMSC_LAN9303_I2C) + "smsc,lan9303-i2c", +#endif + NULL, +}; + +static void dsa_shared_port_validate_of(struct dsa_port *dp, + bool *missing_phy_mode, + bool *missing_link_description) +{ + struct device_node *dn = dp->dn, *phy_np; + struct dsa_switch *ds = dp->ds; + phy_interface_t mode; + + *missing_phy_mode = false; + *missing_link_description = false; + + if (of_get_phy_mode(dn, &mode)) { + *missing_phy_mode = true; + dev_err(ds->dev, + "OF node %pOF of %s port %d lacks the required \"phy-mode\" property\n", + dn, dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index); + } + + /* Note: of_phy_is_fixed_link() also returns true for + * managed = "in-band-status" + */ + if (of_phy_is_fixed_link(dn)) + return; + + phy_np = of_parse_phandle(dn, "phy-handle", 0); + if (phy_np) { + of_node_put(phy_np); + return; + } + + *missing_link_description = true; + + dev_err(ds->dev, + "OF node %pOF of %s port %d lacks the required \"phy-handle\", \"fixed-link\" or \"managed\" properties\n", + dn, dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index); +} + int dsa_shared_port_link_register_of(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; - struct device_node *phy_np; + bool missing_link_description; + bool missing_phy_mode; int port = dp->index; + dsa_shared_port_validate_of(dp, &missing_phy_mode, + &missing_link_description); + + if ((missing_phy_mode || missing_link_description) && + !of_device_compatible_match(ds->dev->of_node, + dsa_switches_dont_enforce_validation)) + return -EINVAL; + if (!ds->ops->adjust_link) { - phy_np = of_parse_phandle(dp->dn, "phy-handle", 0); - if (of_phy_is_fixed_link(dp->dn) || phy_np) { + if (missing_link_description) { + dev_warn(ds->dev, + "Skipping phylink registration for %s port %d\n", + dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index); + } else { if (ds->ops->phylink_mac_link_down) ds->ops->phylink_mac_link_down(ds, port, MLO_AN_FIXED, PHY_INTERFACE_MODE_NA); - of_node_put(phy_np); + return dsa_shared_port_phylink_register(dp); } - of_node_put(phy_np); return 0; }