From patchwork Wed Oct 13 22:23:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557427 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BD80C433F5 for ; Wed, 13 Oct 2021 22:28:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 663F8610F9 for ; Wed, 13 Oct 2021 22:28:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 663F8610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q+IV6f0Y7gKL9gAi2igQynITVuccY14FZP69a+dpi+Y=; b=RgC+FmTCrbwVlX DtAdje3M2+4fJEcqoxxwcySojBeqQdQhfToz+SzpShiYy/zNtHZkkHE0puZfJQkBml36KLEZ3xaMY 4RHYo1zQVTi5UclcgJqq5WushkjCPJ4InUN6tbPhqWTgbQch8wfaBndp/2DVd6rQ3b4wYo1Xme+39 YSQoJnIPPJGrzTnGXKuw7eVNRpp7hE3imGKgMgPRjQdCCugfCmCCEvNkqJ2tvBI5BDUkA96l71bWO 89yquXPOCCE6SrIoDgxXiiiQti1nED5CZs4bRzHP/0dYAuDrozZWa1BSwU1AdrSPBOHMMaL5Y2QGF e8PQU5JqTRXWkGlzxIiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamg6-000pV2-5k; Wed, 13 Oct 2021 22:24:50 +0000 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfl-000pIr-AP for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grbdgIMDJ3ugmCHlEJRxoW227tNXwN/9w/bBESKmXyajVJfSy5E3bMoLotSwTKX+Ref8kkKP36HzKDsWgArfmpoFxdKbn5Vm+ZCFmMtvvZxYl7BzdFu7/y+By8jwEFPJn1dX+75b5sG1H04c2TQZrFdHRU41ZkzRzD6Sazc3rxaw58rCa3xdY78IuVajuDaYK83RVqNF1KMffLkOrP7gEASJp8LM2Oy8QekVASpCQ5Xj3zvaPusyH0kaYvE2WxhDAvTQnHhTMu495b123pu6s/dsEZKiPEn+AJ5lrmFSOy1qEXF+KgISGH8a1LJvDlfq3zS4VqIPB+EB07g1J6CSiQ== 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=Kl7do2Qv+fBvZ22Y/KDeKyEOx1UeobzRRvJNw73EgHY=; b=aawL9SndOb5gweLP23a6wY73ifWkHwJErOXpmhbebUuj53eZmvM6yeJCUdu9ZIZqsFe6d/TtIFkAVqRTzr3CHK/2DHHEFUzdYWukPwfgTDj0mRQcGvlGCL/TAg9FLnMAbMquzey2yYg4x78FykdbBFQKp+0F6bVaOB1s6F9stjVJGP5E07h+pPdwFki7UPFWETSpLmMVErEx+eJ5GmGleGdGbYx+WESETWp4+9ts0qq3JnrcOzZJoJmGKFMeqCTXLYh6Wza1v6Pv42BmGWnpzRAFBxB5nwY7xl3gnUtK0sZy1Hrn06AmN7GfeIoU/VkDmIOUzTMu0FyciAkcQuBXbQ== 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=Kl7do2Qv+fBvZ22Y/KDeKyEOx1UeobzRRvJNw73EgHY=; b=Lp+5/jOFVh9BZNfoGTRI4E/VEsWcKqfHmnsnbLmk2yrukiZn0TfqFmWWMoewS96mqslCR9GSsplbHqW4Ed1QA7dSshkLiCRbBgX/elrYXY+yGJCSyqOQpE9VfZst7O6AZKVulJgsurc7OIfL1SKGbxVqTMBlec1M0Zzqq0Vcwck= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:18 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:18 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 1/6] ARM: dts: imx6qp-prtwd3: update RGMII delays for sja1105 switch Date: Thu, 14 Oct 2021 01:23:08 +0300 Message-Id: <20211013222313.3767605-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1874b378-37ef-4b29-6ac2-08d98e983297 X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FmnPROKrWgtlkld8wjjbD0xlBgWdx49Sg4Q+2xv30DqonqesYge+XRxHGr419Nd6kGGLdPDuzxVUeBufM2ClTBl/pYfKRfIEWC68iBfBSPDV4i9oanzWpreo781vQx8VHWMrLotz1OZC1CEpVuLi3XutZxEDmZcStPoaDZoDJiWBTOV6atOJO2qaja5jq+MyRKUnVoK3eZuCuh8jbWK7pkLfoDFBXG72wm8B6vKzfHkhxhYSubjWeHExGxuQpQEtnmMoKKa8R8f5k3r+skXvnmXBfCV/KiFIgTl4KDY0XthzXTftLIa1HgVtXvWJ9SqZ422MRV/AzhOcyY0qbg0CxGrzdzDcm/7XzCsbnQjL1zMqbyzUtGjDYxQQ+YbnqQ5GC9d0VmrecH3w/kbK3xsXq72cfNLCUMixXE5CxPpXRi6zILJx9u2h779YbbJ9D6RVil8DJUDNLP5VgQHfr9jSmRZ35qXulEu6Yp4z6dQq1q6YpUWrCc5Ouo0jArYRqSjHsH0gWU4IyOCFY3fvwDoe6OAJcndTvTeiwvCaI4E2eaRLl+e3LXVNnHdUDB9M3v7qv4Jtd+g+OH7F/8uvTZOSS30r5BWq3gNM7K2qfPCC9AUnOEIIjAYj2mVsyVfJVQF63B2fTI8w0FWPQLrBWpIga8EwenToMR97wLeIWqZEea8iMpajK58CiGtPboaueyNy63jjSSGvHr56lWmZ2zZR+GmQl7NRNKBNZjZBD1hwJ8g= 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:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jx94hoRRRwp/MTZPFHLWQGzKAffMlbsfNZD2EdjH0x+V7UJSzltocCPGHyBp14YH21UECUBcZGeVZejn7q2yQVobEfjq84EbqhqTY+/gMsBNYvXoyVBFvqYX4tD5EbKUfWVIqu3uUQ1HCMbgLr9BQ/rSUX0pf2MhH8NmpjmgJ+/6GfbonwvJ/SWHRqIGOMOSaOc2jpzwJ0/nIO+BmsIQODcauKy+QcGkypE63bTKDl/ktKnHQBvT3Y4Mwx+TqFgfz+rtuf92LQGCSA6eWMDnPKjCkrfXb9B731SY4y6eevzUQW0CKyzV+bxBcxiwtU72PuPSTFlMeYlWz9pG6gJ63A5I/VAoVcNZ2zbBE1+zqB57A0G0a9Kk2mHpUK85SpToMSWWaqWMyY/GCXtOM4j6SwQ2TUmCNT54gr1eb0MKNBTttkahZnScLB3/lU3nFmcljS3jMFEH3RgVJfEKD1Bafsfwfp4WBV7JsDHFhWEiPDPtuJhETlIkkVyta83aPXRIA+wBcgfTKrrVFqpAiTHOBANWbCejWnYpT2f/RSNf2qT53VTeZSCedYOoZC9czSPEFziHFVVuXUpxPs8JvpW2/Pq4vBEn8MRIar3RkLZnMKA/ZLwm3IngdWklIqu9nYeG47Z2LVyH8SuAPlyZuUOSQen+yBbXncnhPdaoFA1UZvqHFdahY3XI2LgVhLS/vC/2UeBWm57Y3Bbv8/3bh/2uBeGt6XbxLIhCGal/hOO0vlufKBkqz9KfJVIqLD8EJa+dm3+EVj07ixI+S9WLvknqnMvmUhVvmQIQRhcKjPPMiaHjJxMkCTwXnzaRsY5zoIa+hLLohKv0/d1/zU8wkeQVFCpTwXuaN06jNg7XwVEkyQlLR6d6OPax7xrZQUtl/LpF2WOv1JEw/I8PEGM6IAgVyz+F4MDJ1rFtyt2W78h8GMgUrnMCjM0kz2brqbMzqZv1HrJWvJnzPGqKvTC1vNasBr4faFAnNcGXNg+cn+SNkOpM76ictwxalvlHmZgWAj0ewhn74wKZOfPB+7fOB9UutB/K3FgVM9IFxsS0mGxNMYrUfEvfhEMIo0+s9TF7fUnZx1mx/c+U+UOG34gXFGm9tHW8A3ngHIC9LP5+i7Vl+BKaQdD/eIbpKGu3Ms4wIpAwNdD3yzel9RPCtPBG1FVUKloBkVkSYM5xL5XGQBZ94aL78QQxZLqnZb0qBvm+gLfVaxOAMVUexRJQcWaMBomNV5zJsy1sJ7zb9BFehX5iHPO0MyO/3N2aTPB/grE3lZrlFhQBtN2g0UQ6MTrhLvgPn+l3b1+xO6bEr9z9y3S2vUoIH5E58NCSYKt+/4xC/0Ef X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1874b378-37ef-4b29-6ac2-08d98e983297 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:18.6631 (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: i6Whb7QV+FqEByHlYmGoiuXdUUDFF2QDgXRome9/R7qS97QucyOG5JPWC/b1NR/LULyOKPo/SgbfL/gl4QJgqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152429_402255_80C60BE0 X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the new behavior, the sja1105 driver expects there to be explicit RGMII delays present on the fixed-link ports, otherwise it will complain that it falls back to legacy behavior, which is to apply RGMII delays incorrectly derived from the phy-mode string. In this case, the legacy behavior of the driver is to apply both RX and TX delays. To preserve that, add explicit 2 nanosecond delays, which are identical with what the driver used to add (a 90 degree phase shift). The delays from the phy-mode are ignored by new kernels (it's still RGMII as long as it's "rgmii*" something), and the explicit {rx,tx}-internal-delay-ps properties are ignored by old kernels, so the change works both ways. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- arch/arm/boot/dts/imx6qp-prtwd3.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/imx6qp-prtwd3.dts b/arch/arm/boot/dts/imx6qp-prtwd3.dts index b92e0f2748a5..29dd59bfa73d 100644 --- a/arch/arm/boot/dts/imx6qp-prtwd3.dts +++ b/arch/arm/boot/dts/imx6qp-prtwd3.dts @@ -178,6 +178,8 @@ port@4 { label = "cpu"; ethernet = <&fec>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <2000>; + tx-internal-delay-ps = <2000>; fixed-link { speed = <100>; From patchwork Wed Oct 13 22:23:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557425 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6443AC433F5 for ; Wed, 13 Oct 2021 22:28:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24DD161151 for ; Wed, 13 Oct 2021 22:28:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 24DD161151 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2/HDpFmIK9VZx4vhRc5XTfIb4Oc8eqfhrwT6bRcsKKo=; b=c6ZL1t47xgI05L tdecwlMowXntTuIB1WiMvgP8EceF7xQvRXIXM2bERtTf9bhs2QPm73e5gAPxPja5sro8GF5vNRn2r NlVQIjx1nm5sFuNwVBzE73SH1rZEh2707Qmzc4DOwnGuho0uQ0CpVLLciyuRgXeltwncG2rekcR3d va5jb8ieQNU97tVc4ZyMHL0LZqEbD/Cw8VV26+Kb85lIJlMQ46V7WAc4KMECfqnhJf265Gi6FBEnU VLOEDhBM2PziNQSV/gce7L2ncM+V9E3YHRDB+X2N+ahl2AFBObJn2yuWbNRdb9vRzU/PFH6w4prUy /mRsVExPBHlId6G0WYtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamgM-000pcR-QX; Wed, 13 Oct 2021 22:25:07 +0000 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfn-000pIr-0E for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TN+jJZvpt895zFa6rD8XmxK/zr3mYOj2A+YiSrKE9LwldgOf63yiz+Q0l17gqHsCf8DxbsYKJoopIc2lRAe3npbERYO9OIYagQF9xKx/mgk1ocuDzBr1p0bH/J6cEqm8GV5ro5E2KSaU2/w3BkOECGsXZ9dyEG3PHheEuV3AkFc3nyJlo08cjjiVYGZdt/IgcqNzXqc0APqv/71GzPsEJRvYb4O8JZk7k0X5GuBCI2aXo2hJENBpzgAv6UDWDqHaHPQyKpqCxMQ7y9boILMqOmPT923cT9ENR3W8dhqxkg92AP6AH6gcJ8fCfe8baJzksPU9U1xJQKTVwoMkqiWr2w== 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=6F8epih5lhAR022H9rADcd/SiukwZ03CiW/TM6uGRZw=; b=nCMev5qrK1EvBmOCg73msjXW6xBm9LpIbinkJNX2T3OidpJZ+QC5R+aNujtAmFQzV90JlsURtHHoXOTLSlBmbWQlcnhr/2wAOj20YSoiCzr4Zv8uKPyVWkR5ArSBN1Ggip1QpUuZx7SOdvYvHD8vRhVMg39VAozX80lxJsiN45lMrmjZ5k9AibjgJ9vBzrfg+h+HCpKN11LP1qQ/v9yHGIrOjEntZpo386WRiha1+MKy0jv42OLcUdb4qITr5LPNUc4SSPumgYgt/JFqXG+7o3AZIkhEvWI6OVL7cwk3U6h5BJyoMQUZqQDn8XdyZ6I3pRW7T6raUkRWWws3pw20LQ== 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=6F8epih5lhAR022H9rADcd/SiukwZ03CiW/TM6uGRZw=; b=OrfTknPXJt4tY6Mjw5BrztFsK047GAl5XoI22BsQEiZKgk8j/y/cnGvG8Fi5O8FtY8wnEoFPl5SFbCWFCW+2aiBrDosq6R/Ps5YvP5abVo0GaG5d37ZALEX6xeH9ywvBUavg+l7RFlsHlxF78n0EQSKn7KB8Ux5F4dhNelX7Axk= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:20 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:20 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 2/6] ARM: dts: ls1021a-tsn: update RGMII delays for sja1105 switch Date: Thu, 14 Oct 2021 01:23:09 +0300 Message-Id: <20211013222313.3767605-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cebc3b88-6e8a-4146-ecce-08d98e98338e X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ElgbmRu+fXpyVZ3IoPcO/h0XBN2wJA1LJ6NxnvQRcLjf/kODxdf/J5vhOBWdUvXmRDY63a8qinNer5xPUCBp4U+0tt+JAl98+lWnx3SYmHFkXqIrKxfQKULXfp4aw0jW4YHDdCBZbgyfcaP70AJ0Ou9ZM5D+9ucFxbTP/cUt1Lom09Q89ptvG3xunc9pQbzaWu2hFDJ53ahJLQiVJqfYyzTO5OEN/AAYQRqkPXDz8F8aY3Sk9W7Sx1T1YWZY6aY2FzDWIr9H3jB2c/rowWUkAQmr3zIRpI1R5LhUT7UX238JmHNGLEf6mE/XWWEQiCmnICRH5K2e2nfXmzvgDaUr/QFHbavxlsOg1EF+EMyVwSo4KUZgA6G0FUdmuXnoXio10xKVOfbMx9/3bX2NDf1+DYYd8v81V8XuL65df9TUsMikpBzMFRTftgFCZlmk2LRa0YD6j4BHWfCC33g5yay46IDppy1kOQF/QMn4s5hkNsnTgsGLEsPP7weJFeQvOo8gEU/7Kv++Wc4Zz/ZX9GOkt6ynobPCMu1793z068y72NskbCoXKAyagbeRr+E+LG0I0/0sYDRF9J8BTwYHym01CsSbEdQosXUN3hRw70WEQTPuTWYyU+aZ3zoqEpcn2hh1Fuk+mhWAqPWCgNfD+Et+4ic1EV46Y0aQ+S/mop7Zrc/Uf9tuew4yESWscemT3G8/E0Kvr544NbLQt10nT1pdvg== 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:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P/h041JbknUVmQsvxAkfrjnjEtxy4iMYb29yYpOUwfJvYoQVzZNqGGaA2K9j5Ng/HWOXNY/OXIfLx0GL7/kgZAfZ89jr0eYPOfN6ywNRnv9XnYuu3dpvQ+zZNzRKvsOq8iBpWmVvudVJQZq5d+LkF8jkifYxiIuyFAjPDxVaPgq+MKHJMwbKqMxhzVuWPWSXHeYoFaAFoZcQhYJGHcJKPUjhCfhU1jYYPAAHvFnREnUgT/Xf3X6auyEMv8MpL87Gn4klZckV40hyumM65gbOHey+dIzKs7az8IkutdNvSvq7J+Fav+ZZK2Q0gCo09Vx8EzJNuuNgOfn8N2aLnhMVCAfPXrZW1csXIrauallewMl5kcNFwqjHI3vl095lgvxW0wHT+f6Qt1T+KRDZUU4BID8CtxsGXxoJhEHFq3SSa21vOxgKL6k4Q8iphVkN2rNWkoAf9PTM7wtlqY9xmIhSO9WciMjj5F11oRKENwLQHLBC1v9xP+Eh3MmG0MVjYQwd7XLQiELJVG272TyelXrxgw/E1WvdRiPvcFkfYDbcbBMxvg/djF0rPij8onvUOV3K2DSGb8il/o9JfAhUGV9Ipespj3Xuv9D2WwPxit0BGUWPrcNPDxwormZi7XAjNQtqeSN3hCN5GcP7m1ZO5az1G4qC4qsiYsg0N2EXeRUnOBlp5x3OEX8qQI4MQ1Qj20857Lah2b4AcwAaFOK1YANZCz8Rrn+cUPnVqzyIW1fxVT5EB+USqB/vxcX/RuKJ3lY8ZmhKYZ6+0JewFvjiaawxvU/cta6i3uyq21xUjFRoiKQb6DfaF+CBp+kWtKhxh/B1ZHoh66Z+dNW5juPCx+DhFNwMjKmhuOvpW3avdoOAQLQMRHBQtZ99poK2xaYSs1MLU70ammqw3OyKlbVMOI1/wDee5Dg/To2NRi7asHP7/FGntpJBcdQd2dl8EOAUD7jCRYlfJSVp8OAMTyVQAzA8t4jrFPJKHANj5n+1WbwIvPWj4V1THbXMxi6iBahXlSvBvWoTRz5MSvZuG8FRiPi43j2ET8F/kjrB3vAFtsD95PwB/r+5HnqExfff12Ve/Umnb84jwFrbHnETRF3k37PMfgU17Hj49taBfsEZMM6d+l8FLPv5Gu0Q4TY3lFPoeoTgSnZxDoB7Xcd1G1XHwOVKhxtayfcpd2iS7veJXMaZg3VKcUHNIJY7f7ylLuBG5KpULN57ekNScpA3Xkr3sDjk6OEv6VijBvOsZ7JiXER6M1Ml6eMipZE4brShxGxz3e9XAqUTMGQef9+lreglpW/KjBP+8FOV6lZqZNkiXSdV/wT9ojS5SLlZ1BYNkN5cj8H0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cebc3b88-6e8a-4146-ecce-08d98e98338e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:20.2672 (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: n5CfpsIOOSk5jw3JHI6T/hrEPYEfLHrAGsKJ/8Cs8s0JAv/Ycz7o4fu0nM0vX6y662lxp39OXoHK3ea08mTLAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152431_099311_8786BA6C X-CRM114-Status: GOOD ( 14.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the new behavior, the sja1105 driver expects there to be explicit RGMII delays present on the fixed-link ports, otherwise it will complain that it falls back to legacy behavior, which is to apply RGMII delays incorrectly derived from the phy-mode string. In this case, the legacy behavior of the driver is to not apply delays in any direction (mostly because the SJA1105T can't do that, so this board uses PCB traces). To preserve that but also silence the driver, use explicit delays of 0 ns. The delay information from the phy-mode is ignored by new kernels (it's still RGMII as long as it's "rgmii*" something), and the explicit {rx,tx}-internal-delay-ps properties are ignored by old kernels, so the change works both ways. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- arch/arm/boot/dts/ls1021a-tsn.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts index 9d8f0c2a8aba..517286073451 100644 --- a/arch/arm/boot/dts/ls1021a-tsn.dts +++ b/arch/arm/boot/dts/ls1021a-tsn.dts @@ -90,6 +90,8 @@ port@4 { /* Internal port connected to eth2 */ ethernet = <&enet2>; phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <4>; fixed-link { From patchwork Wed Oct 13 22:23:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557393 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42BF1C433EF for ; Wed, 13 Oct 2021 22:27:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10C69610F9 for ; Wed, 13 Oct 2021 22:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 10C69610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DzfAeuPDhAqiZyXJ9vNID1kn2BihlCcb7Q1f0ftRFCg=; b=Cw/zASf1iXVQuX nE3TtM6nfj9tfk4xOlnPl/70ZB7TDBqR51M3GxbfzxVJQPhrwzBv9dzc7g5xgmv78UVL+w57vpRT2 6R/CufVzZziUffisJRr32j7G/KvEF1nssMBY0KXhOCdxuydBkwOST16Btty9Aw4BZt68Raz7LHNxi +WrYcMkH8y4kQdeHOf5sJ2z260ogUTtfRfB+AdCwdkBAvwFZC+Y8vTyJ0k9RX8gdEB8doDDDyRrnu Q4QrhRMTNiGWUQJkGU/F8MS7IRdKAHhCI/YpQXP5oQIIgn2ysmSnyFBDzqhbDrCm2ObtC2QRMnQV5 cnJp6BOE0B+nmvP6YvIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamgx-000pou-Hy; Wed, 13 Oct 2021 22:25:45 +0000 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfp-000pIr-0d for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LO5cQbqtVSIE54oJNe+/4fupfqH8Vmjz9qxFSaeyCPpyu0niBnTIyFAZdVLZlU8AFAs9k+Lr4qaXS4XShT9ogx1tjaqs411rLdHXiWrdrfK+L5X/2h/xMPVrYHU5sE5vasaln/KRI8x25mhPY+Q5XzR/+1vpCT2bmSP1O+jPtFTpH/miO1bLGkOpBAGbODANV0+oV/VQIawZOOwPA3c4bwfM6UF3WeU18rWRPNq6YjT1kiWHWXm3YUxyANRYBcIWB3t9kgaiXYGtI3UKyI3ncJHbaLU0uSIQ9T+80UQy3rv+mkjU2sc+CJLy30viGkOg7XynYUmtvNa7mROoBhru6g== 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=kv6GUC7Bu+h+nrbx44u37bzvSSfiN5LhFjqLrR4GIwA=; b=d68QKPram1qcp8hK9eLaFrdHM6VwfPp1Mg37H1kBjCXSAW4U7JSAeVNCrHDC/guMa/FAneZhGKZFLEOuAOicwgYCjGwC4LPj1n0dOKqyO4VGB1+mWk+GBcOZdd2IoVQexNnkv5nDvjhdLcE+ba3LPWtZHh7R9IaF2MDmR/w56do8mr4OSXPKhdwXk/NZlxZQB6oLYybCA16P5GCR6Rqp50MMayTpWTsCeEK9Cu/ctd1c82a3KpB7Mrom8M4M8DNLdcqXC1VmwzTnIeiiuT52h8qaPJybAZS2RaZwpC82IfetSs2f7DS9ttcTZcOwRNux9JtS19OUSLlAtgBZ/eheoQ== 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=kv6GUC7Bu+h+nrbx44u37bzvSSfiN5LhFjqLrR4GIwA=; b=jVoakJHJIf8Y8jIlc44oX7ESPmn6b+tb9aH3yz1cuzsRyuh26Y6u6ycjYEejikaxhUROVIEhTnaKj9SliiFfUJcXv+jbPYaU8N/XtZZQT5P9+amRfFMr3Gkf3qZsYo6klrMQAdjWYzKlkF5ia/NdQJF0MwGRwRqNqfZCXblKvnU= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:22 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:21 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 3/6] dt-bindings: net: dsa: sja1105: fix example so all ports have a phy-handle of fixed-link Date: Thu, 14 Oct 2021 01:23:10 +0300 Message-Id: <20211013222313.3767605-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e94dcae0-012b-4d63-6683-08d98e983481 X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IAI4J6W29mSelUWODsBZeYUDzgMmfLmrUdelrQweZzJ2Kyz80asY/siZmIuSFRfx/37UCHYjbvhhi3QSVzNDILR14h9PCCN1rCosHa5SjxXaHr5+C8wg4MfXVHQ1onnp2xb04Fh+BEyB7LmiwLib5jN8r22rLTX7PknzWNXBhWMjZZyqYIRhzMO3lSvr9Zn/RaQo5IGvtMcKKvLRX0mxUc/hh3HG+PBB5+ZfAIe9H33gVD3T8lkrRwEnswY+OnSOIa8dWsGx3mZH43p6BfYnyG4WKd4pIadgITpGkpukRLqRj2NDJnqQG80d83QePLoP1USy8SAJbzyjTeQmq6dDlpTaxfDyTCIwCfLhjf+kCqZnSoMhqnjq/lGdr6ReaFVwuzhMQ+SBO1GACeNHOsHBKJtC+sIpJttTlbx3ccLx4Hc7uMZ3sf+TnpC/y2eMmMwIRWFdyutESas4xq+KMHNnx6LkCepWkv2mXheMRSPHpnOXSLi3VHUbBk6V25eTF27iCGzyTlz6I3FhngL+hG7zKIpJOH0O31NW2kVu3/upADQCsrfd2LpK5IM4ltRFbQIvQbBjyV6iHaYK/5h5aqKh1HBNWK71YG05lw/x09OYbJVMp5rQHfWqI9bX8oT7hQWAeleCUKkm1dTKeh+TBFCKC5VEieOH2vMoM465ObsAkgrh51pFDknQS8ZiTvnKMJtpEkP4b1x9KRXf7PJMmr1CRg== 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:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(4744005)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4dPYJM1NTQaLu4Bfv1svWk1UHS5zvGBDh8Z2NHdksAI9Kkr7s+b/XNkQmk9/TcCGb+luDSCkkTciXK+IxDbNpy2CAaJsXNStqUaHj2dmCtk5T2iqzTsQFCHldBkA3ragpEVkkdhTUDXM6ptKACCfRCaIT3Cq6FFRSh1kg8NkRZtwaTNbe6N1RYlRLihNVvns2+7DobPqxkEH6BXezh74ebeZvRWGRcodn6NIwu/OAvxo8F9jKSOTKa0GmdF69UhmsMWtjhCuwPU5gSrC4YT9MQx9AmewVRq6HHD0em2ibeCzWutI9rnJSGx4M5SNaIechEr6W9JOhd7bK2WEX4k1ees7qXOZsA/V820IgODuJLLHIeaZQ8GDjZSMFS33Gr/1/mvbbi0SZSf43nL48FqGm4k7dBA2M2qHulwq6K3QU0QdsxBf912+qZgwRnGS+JejPyxV8WgtAmOc1QWFQm2wbG+8v6G7uXpoto9pcdMlPWJ3Wh4ll4vpM+Rz2tO4jzHfhH2qLsVHtFFpLbh9ULEGTe/bz0f5efUmgfiuUJl32gWqU35Gx9S2CxoIZaMoaV7VIYckxNnsXiULw+dGL/4ZzlYnuW2fILPMpkCHdn5EKA50jeV4Nj6jU2eSbsbbiT044Sp3o2V8hZkpiC//hs/ZDkJQU+Ul4m7mPEA262b+I1q9uisJa8cpZavs+dkccJlMaZp4lFro9UwZi/rzDTeF5SY/80ve2WBcEuMbB+NefU+oHOM0fkXioHPR083NPE1EqhSLoLSRBUM5zwDvb6kW91fq8u9GGCZnl3O3ZuKmciNcdL8Pf+9xXTr+Fvuf+K23rM38t0P6XjI6VyLLb26ZOG8Q9KwN2EWvSgJ3qG8sooG0pE3dpSeMxDYCxidqslRLPdCayzr/ZXgLNM1ymqLZKjznaVV6zG4vjW5C8XctQOBCKq1PcLdrrs4/31EXURkQGTEci96ljUoHsIA2mWZRrhQjoakpm+qV9c3c+E3yaKp4ITXOLCaQTfdV28/ujFye2OLxTu3sXnU1ER9ohCdWT8C+aVd14IiLS05v5cfHIIAyjXIqhf3E5XVW70I2HPOOee9rZI5QLJLT6x6EbdoEI6D2OrX5MelHSZzE+wAHVG+9m+iTog49ABJWnSQmrbh08rnkMaLYEZVkwer+VTySdGwvDlHWfoXEk3oj5AKYXc2s+JwjZh9G/ni3w7Zf2ZrpIc0WDQ1Mo2cGg2v36lmj+17qr1iO16PNFA17HKMU9qoQjgtkm87WZd6o4kRYKgHOqWFMf3/9+PVN48myzlNs5PHOORQholg8pFCO03ewMB3dKo4CNPvZfAg0zD0Z205e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e94dcae0-012b-4d63-6683-08d98e983481 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:21.8783 (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: haf7lE2GqI/+ZzIOcvCmYD1yFy1hoKw3YavJB4mNXGKO9k9iz+HWX1jHLVY2BPwNfCRcllyXJpX8poannxz72w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152433_118753_1C28E497 X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All ports require either a phy-handle or a fixed-link, and port 3 in the example didn't have one. Add it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index f978f8719d8e..f97a22772e6f 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -113,6 +113,7 @@ examples: }; port@3 { + phy-handle = <&rgmii_phy4>; phy-mode = "rgmii-id"; reg = <3>; }; From patchwork Wed Oct 13 22:23:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557429 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD1F4C433F5 for ; Wed, 13 Oct 2021 22:29:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88740610F9 for ; Wed, 13 Oct 2021 22:29:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88740610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ebun64wqCPJZXP3p7HvBXc6cNceyQM4PS39ghEoZ8ko=; b=U7AftZctGcvu+J /fcPSSrk4QosaAloLuUA1lIiTzGJnF0hypAW3EWYnhCRELt+Y1qheEuHeU4/eXyuGjllNCyzozYbl 1n4wEkk3GWCVV3AwH1N1zGdnPeYuDYaxX51ObRmQDKqK+14xyQMpvyEPRWcZpRrtsLWj3zaZKRUHO 7Klf8wCom3CVlBQXZIqm+fNFvMI4ssi3foSRjkizQnW859+2KYx6cN2G+7zNBzITevLNBd0QuSo+g 3oITfrlxDdpB4U0n1FNRtr+5S7/gpOXkn7sMdCdl/cJJMqnIA/1SMfpMp26SQNDWiSqw9KjM7KGeD tvM0DPoMquLRBeTQ/MRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamhV-000q0p-OY; Wed, 13 Oct 2021 22:26:20 +0000 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfq-000pIr-NO for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmLyCT1a7ct4CZWeQtNZn52g+G6ISeNzqdbQYhAC6jThOHujM/T5TJRZA/dL+5wNefWcdHxYtImEDn3jp/ET0TVPkbRmACUoFUUtCpto3jZWhEbnlqFAAASD2+N5Uz8gUsVCln0byA8hdOWaDdLd7Ue5gvd3y7JwrJmFyMvM3N32Ep+7+XiE22fg1169tM4XlEHHLJWLi9vpjS56eo4TreQoR0O9YwR8tS5ZOnUI8xeD4GlFkCeTJVJ4D3wGToSj6mbJy7SxdXa56VMbO+iJzjMv0g2I2lx5Un9tfDbvFoU/M4yJZ/ICKXsHGNYBO9X9POFzRXU9I2jUUYJovCx9Dw== 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=UPT7TNgzaDUXLgX1Bh5MQZPBlpTIaOnX09v4AExYD/k=; b=oV6WWSjBpPJe4uSTPUvvAlbQsLgvvjsi93rA9axgrqKwu+hesYwpLTdkUmz4IbErLvR66IBsoha/HLwa6CNha80Q4IBlX4V+YaFYDEUzZlbl7m2aPGJHqlWxf8D/YaWW88sS/xkqNwWIeeVbFVLGnqe7+mNFpVYxevjUTMd+WCuD9N3NhqiamFMpCTE+xFULoEBeXAWySF9DSlgjQnRiVTmYhO8nZIWG2EXpX43NdZcEeREyeL0LLFcZQFUJjk1h6RCkFcZcZk55KNcYdlIrgyX7eUrt+BdTd9U89ZkoaeFTAOHLZo5N28S7Sjr27tYnUQzD/6aUBY9yMVhezn82mw== 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=UPT7TNgzaDUXLgX1Bh5MQZPBlpTIaOnX09v4AExYD/k=; b=o+jTm/i78ZzPi8zim5XLNgPLCIqqvFRyoTcMbVPyKHdZrkWWtCXpPUEquIkyyKNTbO9gXq5ix5pmBLeOaLGQG62AlXkfHAGZpr0eFsiBn+bbsxqzSLRFQHX5XWsDRurn5dxZ87xvAaSdQgFLC8ELSn+X/Km4ivJkI/hzCxoqB64= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:23 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:23 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 4/6] dt-bindings: net: dsa: inherit the ethernet-controller DT schema Date: Thu, 14 Oct 2021 01:23:11 +0300 Message-Id: <20211013222313.3767605-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9c73f9e-cbe4-4418-4c63-08d98e983578 X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8/wKrgIb6q8JywUS+EgQizqnEJssnYWt7j0w2o3FlMX9AcsVEtyOk1g0wM6nJ84AZdtOtUeGz69GHzHxTiQdWXcFg01tlyiEKIQDKgztHMfndPskeV4u8A1n9ZH7rc2rKGGE5GqSQSRleh+Am8XZ8xk7rJ5yfyMWu1JYtG6k7wCiXt+uObunUxGC6Hlklj2ASlg4Qo/mWwIF85VlbzrLkPg7+zvucHeywelBWu6CIHP9JA+LjCTXJlCYK3iBGMHkSmSuRO/3PzJ2g/pJAix4HWAypKgh6hoHYo68jSbOVBdY4u1CsIUpPDDSgr7DYR2UbmVCy6pwl7i4uFEY8MJzZZS0JJSkVB0bJaT4InQHVK4sqyj5xG47b4DPTN35EQQYZJHBHOo6QWhk7+sCmby8sG4GwDZy5hsxFfqUBBRhUseueskE0uY9lDt+7hyR6o0K+v4BWbP0foC15mcm9oh9+uU8Rg7Hicca72pka7nPTqJ+SrnYZzxlWQBgWDmsB2o2gl40aIof1a1NRWBoTFxv671VvmR6eG1JIeUc1i3hpmnJxgFTZK0NN8ZsGcluMeLvTZiq97AdzxDuMUagd4KYNpWcCDK7xCZk0QNyFK2exzhdHKzInUJNC7svYtZ+wiFTts1NBYEN4ANAXHwHfyrcEaayNPY1SeRF/02Qe4BZxZ8OAKLer6dpfzvsP/+yI5NshHFdZl19nQqZTmzxzN2WOzg/PQbaZ4Qy0hwKIPOqk1ubZzjrzWllsy47LV3O3FBlmri3uGXJkBAszxk+S4hjruvVcVd+Q/FGf4c9e37GcnU= 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:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(4744005)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5vPXiOj01mStcYmZ+3BXBQnjY+mSDj3G/5yGuytIDg7/bDZKIMma6FNoAmSr9mCZ6lrLMk0vHSTdvQwrT8YMn1DG3q+JqRF85qNuGDPJeHLWsBiOMpcmVQf8eUJsXBryaREECbsiJEwg3ReKTjyKIluV4ckXyCXn2UcMTkk/OLIxml7xj02wSt9chKOb/HMy+c5pXexJNEozAzTU4/wk7mqZSHB+HAcXKmyKdkuggats3rjcO/fDI0m5EpEijZ9gNz9CDnA6c84BN0klfEFp071kH2QZBLll8i8lPKxDEXh5gWuUouxU5/L5XeVWc4JzDTyS+aD1Ny1uHuuS9WSwnv8VpUY2ONFKuWFAPaCnjDWUseHdnKE19pTXQ5VFB1rv1SS3FDlH4qsrnKA5oU3hEuf16kJzOhVjDKkcvdASrI43AnCq1Ku5aIcQ/i54jGWZyPF1qzSHkPlYPqY/rD/kH9pvxizjdOpWfeMh2T9Pd3uXk12uduzMx9udsGROv4Y1g2Z0qt3O5VbC0aGsAEqx/gq8XKKmeO0vSePTjhgumKbfZzPKFvQwf4tdtytk5o8Kcd0yVLkUxOY9kICx+9nrZR69QkvhLBMjlBnqr/hQuEJLflYF5Sbr/sBNGhAhDZbzBgTDh8VqjXiAN7jIpz+f/YGE/IZ9PCzVXFAXUiJQaUKHlE14O/8CYD9neSCTXERCmHPA8rlG3qcsyLHeftPpuvaYn1Wfs47Y4kj6c9SEPQZE7faJF/TQFdyrLy4hZIxrJsAGHL7nvqrMwVescH3Uj9DQGxr0A25tWoivyGXsJ00fup4J7jjLBV8CLhxg7f+m60G7dV4T/+mz3sInVq32SXwNt8PNg4ndxhcuAT/LlmcB0TEutOYAEu0xaIPG0UfhSo881CKp+bwestj82FZ392WSnDciqRg1lPidNdNBniSIMKRoZBlGBehHGsAje7xKo3bnVvp5X2f2EaJauz4ILYLE1qN/Zc6p9/xLa0h4Qt+yOfrORazZvSN3P3j2dZuOrkaPSpy2DPp2YVIpiyS8dmHmhfpyia/Pym4VqyTEYSJCUJ6QV4sL6MhuGQY1NXE/XRltAByrdWWnD+qYqxW3M+zyR5xR//hGBz33tG2jyfuMrzGAr+8DTcMOCE8dZ5zU+4R7sO0IVbenB4APyMNa9L8UH5xXX/I3/vhZ1bNJaZ20pJrNWdnqpatUCoV770+n81lhKtTBau7UFU3hvqRblaJlReUWjpmZB1C90fGCNph62CxcT6+CWN45Y0ZPumfWxe8XCuaCZAVps6488FfEEFWmaIDn7otq4WJX6YQGbDlWr+Ts1Oz+9GiXNKlw98/t X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9c73f9e-cbe4-4418-4c63-08d98e983578 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:23.4634 (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: b6QhpZk6LkMmTjK5vU8IMSP8mGH6zMd3vwGYrEE0X8s5eXl8O/s8O65OUYFPebNDCvnZzXKNYym5GPg8wu9oqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152434_803558_852C7B24 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since a switch is basically a bunch of Ethernet controllers, just inherit the common schema for one to get stronger type validation of the properties of a port. For example, before this change it was valid to have a phy-mode = "xfi" even if "xfi" is not part of ethernet-controller.yaml, now it is not. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/dsa/dsa.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml index 224cfa45de9a..9cfd08cd31da 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -46,6 +46,9 @@ patternProperties: type: object description: Ethernet switch ports + allOf: + - $ref: "http://devicetree.org/schemas/net/ethernet-controller.yaml#" + properties: reg: description: Port number From patchwork Wed Oct 13 22:23:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557431 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7C60C433EF for ; Wed, 13 Oct 2021 22:29:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5B8561152 for ; Wed, 13 Oct 2021 22:29:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A5B8561152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IXtEj4ZvuyEXvU0/kpoHpQizU+UdXA8PJzvQg9H/Ats=; b=EqiIvYTiOKSasY oEpas09MJgSYOSwkBDXvyaVbPuQipjAfiYo/gk5mF8AkE3Lttx6FnrDOv/Zbg/c+B2ZMQTkWPmpU8 j9zFk+wl7zQmlhPuh12nqimCScRvYpQdeSbZGEogfh9AWCcaZKXSSjAdZq2ghH9E+lAlJM4Rs7No3 ndkjQRAeZb97BondCIc54gPA+TOBatMFZycIO54ne57/9fYFzb3r8SAjIe94xFbwesuFwEfg+VPFR HKLmGUFJscGE9VQP9PajhTiqwi/HndZLWmeN+oOxLxf09mVzDuE7ezKmV7K4pnOCcVZKuRgLoDrY5 keF7I53LEJeaNkhOwSkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamiK-000qLE-2S; Wed, 13 Oct 2021 22:27:10 +0000 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfs-000pIr-IV for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBLsbaEaknpqFY7sewK3Uvx/mou3FzXgSoV0eRHw3kOYqp9RIwlujZyNtpJfGGCLFpRB5Ie58ilSzyGYGwIUFnPuRWKDI0QTTxtJwwOCJKB2qBEXQxhCoAKdOMJRnSRzq8IHCR+RD2CqZnOZWlkpNqkwKULsMjoo4Bj9gl6ZvnD4XJA4MSeg97gdbuuI1yvuOEiNACzpONH4wWkMXLcSSZ47xj8IpPKptSWd4lAVlXNdBA8Y0VXYQiARQ5cJEStpOn6CKDxpDCralWD56t+caDhfpI6eX0ay6+fFI9LGiVfnN+0euCgDshBqmIKzv3UwSfdrf79H1GahR9OWR2gN3Q== 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=fP2W43y4NZhUeiHwnoOz9f1Gg3lG4GAcNsaDHuu8td8=; b=nP80FVYy3UovL3WFyBOB+PbEENWEBgBZKhpcL3l1PkWI6hnOKZwoCHnPcHUsJw3puEyqVnnGV23fhgukxDvMate6O9eZwqLOSX+ClNcYGkHV0wTjnxXaHG8BivlV2rd1CkooFhaLowuap6UCBBrMEvi1e6XS6Wcadg87hg+WOTyupnNGHKP6Y7vxHb0jOzi8jNr2dkwW2mZfcfQiB+ycKW1WWqTwcj3yKiIoeGWam9oyXbNIlv/HREGDc053oy0mZlu42Yy7E3C42zIEAeZ5kjOhRfIjaa/tcTA9Mmyd+isLGPiIutlC8xM+/ZBk3yoIzmhVdY+qijhSSkO7KKSXUw== 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=fP2W43y4NZhUeiHwnoOz9f1Gg3lG4GAcNsaDHuu8td8=; b=g6n44D3F59rmYlKYa0RBcmv3x9fpsDt8pJsMrw/OZwXv0NPfzHKPAe6kHDfpY8i40fkBNXZiVrGgq81QFhUrszW6Zj/4vFDC6rxuKl7r6sEnUfkttrVrklO4wxpQ4tUxyagUqnCoUBXhOklezHYudKS0pDPM1VUdZL80OsVTQ/Y= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:25 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:25 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 5/6] dt-bindings: net: dsa: sja1105: add {rx, tx}-internal-delay-ps Date: Thu, 14 Oct 2021 01:23:12 +0300 Message-Id: <20211013222313.3767605-6-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5244aee5-9555-41cd-2571-08d98e98366c X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +ErV0lFk03rRGOtptc+25nydymfxbTZiexGL5H6lq77ApaVZj14knmt0SVE0udQjug21ZY2bUYf4gaIN5WN53SkhkfC3D6ghRLGfoCv+26VlMMyai4mqGdh4mHTLUba1lYywnB1M84n4NUCfMMiA4c1q+Y5D/Mb227YHwd4MO9XGtkEx1AKWw672WR8dfSpCxJ5D4O30sqjG5j8lCkvql+JU5jO+zCANYqULuD2GYFgKf0xsfcbWNxdP/l2NAHSeRWUyJp2WeK/BT4ZP60OZnYiWdT/t8mTBBL1SWcqQwgCgicqnGCHxh422dJFQWZCxJKOoqXwPZTSOMExud67O+2RAXWhOdM0OYfLQoGgzyZany7YZiiL7aITYpamtJFkfk8hhej1yf2EkX4EaG6lDgNyAb6t3i2nbhSTY448H61/dgypQOgSHYg8+YGS+jh9WCjz/bN5ogQQB9SdMLgaisHxM/8HCrT4YwFxfFWW1HUno6agWQ1+9KoGUonqX8sJrxtM+vl5+T6HAHsVMiQ4yXL00g+KLuO9yqq02wziZlAiIyX+8IZlArnw/jVQGe4TsfMHrS9fynb6jEOZ3Xz7dKGGpZbnG7K9twwjspIdm/ilLMWR6n96NKn8CH0E0osz7xIWTqCySCpl+nEQnFKfbn1+gcBDjQbIn0KtzQKp98F7Y0b0xK+p9KkM8DSJAFa2ArZnVDkDpuzcDCHP8BalIvw== 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:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FtMbOcs8uRORZa77Pd9z/avsBR1m5idoDeaycp1ULDEuzlCnpY/AynuVibAlBL5sv7fFkKZ6JeduL7gIQi3LifMxfwxl2QC2+KFpVFNUsi+C/yMfU3CXIx1imnOHCoLWkebu+CGm08QpbGN862hwTLQQW5qJsupeLTUoeZWcuuQa+qy3+RcQlH1A+cra1j7fKY8NnFMp8l+0RMaMJbeRmH5YppEYyJ0R+GgqiO9Wv9XXQdxzm3+6G2WJ2JKEwQmlEZ8MRYes0LW+BVBIe31SoLbO6GfPSgCpEEyvCzFN14+OgZd+hmKYMsmuCyR/qGyj7lpC8e7LmGjG/y6/xh9I3itJV/+eXFW9ORYiLIMHTQfkRBS+DAEKmObVh4oLUP09uWu0mvrEr4uJ3UJ1tWUaEdJwpkH6R13aXRYcVSo0SUa9CwG2t47yfiKMfgRBB2HDDqbM2ZoIUHaH5KRC0wtMo+WTVrDRQb22yOHLlEuzh+g4m5FyRF5Slz7iJ3aRTelnUS6x4EXuwbGrrGkraN+4HqLI/JiWB17SVO7j6667I1qg1u/0dsY8yupX2bQIqJrqcXWYECtVNKnvA+HkWfCnH3EA2tjPavKthTrXnlir3w+XdL/hxMiOQQ82JasQCPgLht8/9cBnde23fRXlFq7n5yqc8E064mbCsULsFJaT9vSh78b3oeU1b3Y16asEb6EDmFnmcPL3OOM+0lCVO3hg5fpoYqKoHExXev7R0dJ+arzTTiuGkJu4bV2FNEkJeIeS9QnFLfSVvbFTGnITlJzjHBklK3IMzzPJcGuQOnrYs9YwBdK284tGfXZ8YOJivaMUiBMR0muZndydIz6x+8SPKnk7U78T+TTelmC7B7hmYg9hyPGT8eReL1iIx5sX4SV4u6jIdjmUFHXVrOKI6KyI6eQ0eQdI7NgO49UJj5U/8Xxlg9K/rYUyfAHfIo18Zu7pGOpSF2h72PO9tTAtQddQztXXwYha/ohRYo0Jk3q1QFrHb9skI0joGTsNHzlPapQH15yu8+3Pae/KCtsYxj2mBIA4qqCgrBiaO2WxzxUl81GhTW6uuwjKNia3NgZPIid0Pt39PkBgG+qtJyvVFnR2jFEBrGQdVORgKGMqlFHpkhn0gNDEUzggvMzMLVxgvgqu6VJ+lkp/z661evg40WMrOMsjqDUVw8AqxFJGXmlgjS5TYZ4oKW6RMsxON2h4JP4PObUy7r+xcJEYhMZj7s0T6+Sqaixz/f6M/XQOEQ03nWc7++yHFIOrLuBxukdPf7QzgyQRmT9LvGKGpgdbSv5VrfcegI1VTlEhrLsz00sxIT5X5Oh2jjxgYzru0q+lu542 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5244aee5-9555-41cd-2571-08d98e98366c X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:25.0235 (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: Zu8P/M3oWUIXBada5goXS4rCwr0sH3RLvK6ARsspgBq5wqt1arnrVhe0zwxBdp5jiYNBuRhc9XnMINj2kkeaEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152436_680064_C01FAC2B X-CRM114-Status: GOOD ( 13.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a schema validator to nxp,sja1105.yaml and to dsa.yaml for explicit MAC-level RGMII delays. These properties must be per port and must be present only for a phy-mode that represents RGMII. We tell dsa.yaml that these port properties might be present, we also define their valid values for SJA1105. We create a common definition for the RX and TX valid range, since it's quite a mouthful. We also modify the example to include the explicit RGMII delay properties. On the fixed-link ports (in the example, port 4), having these explicit delays is actually mandatory, since with the new behavior, the driver shouts that it is interpreting what delays to apply based on phy-mode. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- .../devicetree/bindings/net/dsa/dsa.yaml | 4 ++ .../bindings/net/dsa/nxp,sja1105.yaml | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml index 9cfd08cd31da..2ad7f79ad371 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -97,6 +97,10 @@ patternProperties: managed: true + rx-internal-delay-ps: true + + tx-internal-delay-ps: true + required: - reg diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index f97a22772e6f..0bbaefacdaba 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -74,10 +74,42 @@ properties: - compatible - reg +patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + allOf: + - if: + properties: + phy-mode: + contains: + enum: + - rgmii + - rgmii-rxid + - rgmii-txid + - rgmii-id + then: + properties: + rx-internal-delay-ps: + $ref: "#/$defs/internal-delay-ps" + tx-internal-delay-ps: + $ref: "#/$defs/internal-delay-ps" + required: - compatible - reg +$defs: + internal-delay-ps: + description: + Disable tunable delay lines using 0 ps, or enable them and select + the phase between 1640 ps (73.8 degree shift at 1Gbps) and 2260 ps + (101.7 degree shift) in increments of 0.9 degrees (20 ps). + enum: + [0, 1640, 1660, 1680, 1700, 1720, 1740, 1760, 1780, 1800, 1820, + 1840, 1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, + 2060, 2080, 2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260] + unevaluatedProperties: false examples: @@ -97,30 +129,40 @@ examples: port@0 { phy-handle = <&rgmii_phy6>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <0>; }; port@1 { phy-handle = <&rgmii_phy3>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <1>; }; port@2 { phy-handle = <&rgmii_phy4>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <2>; }; port@3 { phy-handle = <&rgmii_phy4>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <3>; }; port@4 { ethernet = <&enet2>; phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <4>; fixed-link { From patchwork Wed Oct 13 22:23:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557391 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55C62C433EF for ; Wed, 13 Oct 2021 22:27:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21396610F9 for ; Wed, 13 Oct 2021 22:27:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 21396610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DIrOdXK46OjG3yA0E8d11m1rLMv32DPunlVi93Wyn+Q=; b=fV7xoGF1FcPsNJ zHY1+aUaZRigt6kL399X1Fykbovx8hXWUCwn9a6X5Rj12KCiyYpdJwtFKZoupqOYAe7W2/6XrXSRs Yk3BuP4qbylTHwlOJ2ddrw7KBPSQ4wvh6NGy7cZEHnXj4e5q0ZoBznG2r+o2K/9z6wrUkCJn0A45l u7cyGcCqLGA8/4IwWFH/ebbuFXcShYinyNw/HSGp4gr57REaxDDj3KjW15XMkMOltrsb9G3YOP99i vJ4WbKzl/KDeUU55elw4r4yOhlNFY1uIEKP7wIpk4pezVZLDWzFuUO0XiyIviVyzwfa/l++xobeQw p4yNGMCASScT/Gnr/O+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamgb-000phR-UO; Wed, 13 Oct 2021 22:25:22 +0000 Received: from mail-eopbgr30048.outbound.protection.outlook.com ([40.107.3.48] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfm-000pLe-T6 for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K6bgP+x59s11Rjx++fcf4yTWTpkF772jMWzqSwSpKWehl4xl16YVFdE9nYJeYEREdd1iE2BuePYJN35W2pER+eMCRIu/fvmjCDJxh7/LCw37oQeFJfNayYLsKNTmge4iUPrOIkQqGaRqd1oqLI/6D1O1zJgk1suS7q2OHkdW1XCZmD1gVGyCpiCGacxEAlr4jDc/UbhsbhAP+Xcg/pW+1jQ9+1xG7n5k5BpAcjOlkBV7ceMGAI+fPMUDo8OWX6V6XCtYPB9mrePNgvgOr/2VLEYtLtGPsx2WlLjDCAgP1V5n1V1BpAIUKAHmgJZLadFJ2aG+Lt6UBCbr8Ykb66wNyQ== 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=2+ua+ROmFSdcH2R0zRmdfLGawsLv4uFJQXLHaojFAOM=; b=HoiQW6lRNTl9/q5slz4hpu4Xn4F6kqiFPo5ryn1sW0F9Je0YRoM/9f/P+3nWqpQi2GD5WfZ0gPJvUfKN2svRJUdjPNwgaYTY2XlMg5nNvsAK3eK0iBmawAl/+uj2oIR/4Qyx9gD9Tq1R2NaAoZoOKLhyzdUJEO1IAd1d8j+fknid5zVmpy0SOvv0yriiTWjNgHMGlZsf1wg6v0eRvmLVYVr6iwQnU2JGnXySIU8N7U/V1RwGtcyqMj2xjSHc6f/cz4Llb7f6tCFbzt3YLeQsNTjYMnlizfRZr3daPqBh+z4n2UIriQ2E/ekpLPT64JagAIHrjEG0MGS0EYZX4Jq+3g== 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=2+ua+ROmFSdcH2R0zRmdfLGawsLv4uFJQXLHaojFAOM=; b=XR0EumTerXmwbaFC2RtGRpoLrA3fElLpRhE9bPfslp2/BcvkDO7dFTQcdKcrDhYVMvpxPbMLB0yAj9HXq7zDda6d9PqcqPEwefonwMk9n0ke1/pUJOe/wv6qDsYmjfSRKSGBcsJUZUQyUE060jZRxM2aaUiS96ciPHgsn2lbRMU= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VE1PR04MB6512.eurprd04.prod.outlook.com (2603:10a6:803:120::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Wed, 13 Oct 2021 22:24:26 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:26 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 6/6] net: dsa: sja1105: parse {rx, tx}-internal-delay-ps properties for RGMII delays Date: Thu, 14 Oct 2021 01:23:13 +0300 Message-Id: <20211013222313.3767605-7-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 50e0c9c2-3955-49b0-bde1-08d98e983759 X-MS-TrafficTypeDiagnostic: VE1PR04MB6512: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5eej9RzUs7YAp5dZCcMLq3y7Us2C6EM/XwrnxgZnv31Obe1UTMLb5eEhgAh3lZesouQWJUGph0fn61YiyzgG6vnZ2wsHGSFdyzAFyWy9y3u78S7sjx2vrMD2ToOiTTTj9Gk1uCrzS4QWArnEa5XUBfVz0A6fvNT5EFpwRrdlw95y7hb9SEpXf52lOBhqifn437CisR30F6kFpnRVMsMErYm2kmrYIgEBLaOM3mVbsDe67FCvc4iutqFtME7s7SgGs++s9WoROBR7kJx+qvWk6TrnBIcZ4F3Q7Btbp4IDN03Pz2kbInoSv2ScaKFCHuTP7mV/M9/ILKassA09Fl274cCTH14D67xbRhn3ipWuuGF00+lD8EVpbJMzhEYHxUEzZ0Ep23DW7WY5JwUmicKptd+v8lATz83vg/dwbpzTYF4XrosnCYcynL4msDE1RHuqkRHDZR27rmJYBlsBWwoXwxNG1IyB0k3Wbkn7NEtkrsWbVVYj1PQ5SCZL0R55J+R6YOUg780BYLtIaIwo75/Zk1KgSWnpEW3xgfM5wRDF5FeyfK1MmTb0FSXw2totpV0+CwEnuAB0D/fGsfiM1qQQep0Qh6RohgrMBbSiAc1q6ZLdQu5Pkn/Yb/JWdLTxqxLtF2s8blyzA89xqj5GZBTVdP8UJm+NTWhhbH9oYSI4ojfQD0xNZThYb0FqUWKR4DlbFrUyXkyBnt1iKBrBWHc1ETY405zU1algtG9ymI2q8FdbGq9Tsda43JoC3budZ86RKxGMqS/4snA10Hb+YjJLwgnohRnfQNO9nH7ylrrdJAxgBi+IFkeen9dRJszDhcBcI8ueq0DzjcEDU1moOnSs3g== 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:(4636009)(366004)(38350700002)(6512007)(5660300002)(6486002)(38100700002)(966005)(36756003)(66476007)(66556008)(508600001)(6666004)(2906002)(66946007)(316002)(44832011)(2616005)(186003)(26005)(4326008)(30864003)(7416002)(956004)(1076003)(8676002)(83380400001)(54906003)(8936002)(86362001)(110136005)(6506007)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ci/NySSJgNus81XfNuGKKm474iMkfvChL5Le2v0S1H8qZlaqyfhS8qxwA7775syKObie1y9uEZ+urxXib3KrEu0gfLga54+3r6NtY92xRWSb8v5Q2SgVcYV6NvSmKaruXu9kqjN0VSHkrJoe41uqeeT3hEbDA5V4iPqrDOkyBRMGSt5KDrqcNoLbVZV/m0ioY2O7TdX6eCXgc7B1tAgDdngnJyJJLNkIKSevorHvLxizzruIf7/rUTqOb5DBk0qVcMn8kO9ie4rbYMMIB4ODPagX/WuL1n8mbORMc6yd0mFY7Bn8e1IcZ9IwrQt6UDeppl2vj4hpbzYbovCQZvBMOa7U4g2wCpnQyO8hCRoGh/Y9Wb82Vq+VreoDnVD0OY7aWdou3alIJNrIJQJA2y3JfOsszAUgZEILuo/+JWar7YtAt6OXDkjrQsuWDCAzdhyRwbpyiChyBDhCwoR5qbYoFBe4R0YUS2z9c3FwwtdDCXwoT2PQQ7Y0qNzE3J87B15e0Ryr0Bl22xmhge+Q+JD0pm/ykHfGc0LNLx07UXTex0HXChZeXqxU91pamrkW/dpzl++4cSpefoN02+LxmFPMAOb8aNHTmpbSom1k1RxHSX1zbhHv+EdYr148lbcuTK4rDiv6c2nA1NX5zdZUZo/vrhsohXEqRYJnjbalg3ZfpnbFLDPap4En6XJ5s6UblPUtg/Kzu4etV/cZ4ahyGjzwae61oiJi9KotNd5kptx0IS7AAZM+1TXgXu9vVtMZwE7OrOX8GxKNNB7JdJgO89qM5djjzA3fwebOAQFI5JJi6EhLKXZoiz425pTqDSbkEVPivJfN9I79NESXrEriUt1XJtCN1zuYwCC3gidNo54LLTGlyS1xQfJJZUzNcuquAblSmlbMBh5x52O+A9zQlsQCveqNVxyc2beOW1thStZRLbD0EQl8t4U56TQOd91ey9OTA5xSSj9wDkG6bzlmP3CQpbXA7emrx8KJznA9LEss/iJ/dCHzkfqTlVMp52mpl8WQs1cAsV0HwBv0Z9gRXK+fLTkYpZLIOjomuR4hQN/NGp8Vq17pDZZ4Uv8TSu0aGoR8CFEvODydOr1O43rPjii7ZRM86adiWRQgwcK5yhM7rE2KemnoJdnf93qdTL7FyVeI8bQW/hbpfpgB9HQgIeCGYFSy7LE/Pp30N0zgO8zNum9EnNSz9pcMs7VALCy1k3PHbl3zWlS1SgTot82XRYekahY0aM0S/GTnmCtZhMRh5gKBjJJJRP/T2BQdr6t9IeUrwDrGz31u4EVkrmBzUzhMOcvfELAbWVxiw7VJRVPRrcRUTvvNd1WeuidxlVElR66V X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50e0c9c2-3955-49b0-bde1-08d98e983759 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:26.7125 (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: iYJGOEIHzkOizDtzL+bediruql6VgXJw/xZDUpx23iLG04Bw+N/nvDfVaKFEzoIr6gaqKW/Bf0fbpJCJHop3cQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6512 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152431_199581_FC9F24E2 X-CRM114-Status: GOOD ( 29.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This change does not fix any functional issue or address any real life use case that wasn't possible before. It is just a small step in the process of standardizing the way in which Ethernet MAC drivers may apply RGMII delays (traditionally these have been applied by PHYs, with no clear definition of what to do in the case of a fixed-link). The sja1105 driver used to apply MAC-level RGMII delays on the RX data lines when in fixed-link mode and using a phy-mode of "rgmii-rxid" or "rgmii-id" and on the TX data lines when using "rgmii-txid" or "rgmii-id". But the standard definitions don't say anything about behaving differently when the port is in fixed-link vs when it isn't, and the new device tree bindings are about having a way of applying the delays in a way that is independent of the phy-mode and of the fixed-link property. When the {rx,tx}-internal-delay-ps properties are present, use them, otherwise fall back to the old behavior and warn. One other thing to note is that the SJA1105 hardware applies a delay value in degrees rather than in picoseconds (the delay in ps changes depending on the frequency of the RGMII clock - 125 MHz at 1G, 25 MHz at 100M, 2.5MHz at 10M). I assume that is fine, we calculate the phase shift of the internal delay lines assuming that the device tree meant gigabit, and we let the hardware scale those according to the link speed. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20210723173108.459770-6-prasanna.vengateshan@microchip.com/ Link: https://patchwork.ozlabs.org/project/netdev/patch/20200616074955.GA9092@laureti-dev/#2461123 Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/dsa/sja1105/sja1105.h | 25 +++++- drivers/net/dsa/sja1105/sja1105_clocking.c | 35 ++++---- drivers/net/dsa/sja1105/sja1105_main.c | 94 ++++++++++++++++------ 3 files changed, 107 insertions(+), 47 deletions(-) diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h index 618c8d6a8be1..808419f3b808 100644 --- a/drivers/net/dsa/sja1105/sja1105.h +++ b/drivers/net/dsa/sja1105/sja1105.h @@ -20,6 +20,27 @@ #define SJA1105_AGEING_TIME_MS(ms) ((ms) / 10) #define SJA1105_NUM_L2_POLICERS SJA1110_MAX_L2_POLICING_COUNT +/* Calculated assuming 1Gbps, where the clock has 125 MHz (8 ns period) + * To avoid floating point operations, we'll multiply the degrees by 10 + * to get a "phase" and get 1 decimal point precision. + */ +#define SJA1105_RGMII_DELAY_PS_TO_PHASE(ps) \ + (((ps) * 360) / 800) +#define SJA1105_RGMII_DELAY_PHASE_TO_PS(phase) \ + ((800 * (phase)) / 360) +#define SJA1105_RGMII_DELAY_PHASE_TO_HW(phase) \ + (((phase) - 738) / 9) +#define SJA1105_RGMII_DELAY_PS_TO_HW(ps) \ + SJA1105_RGMII_DELAY_PHASE_TO_HW(SJA1105_RGMII_DELAY_PS_TO_PHASE(ps)) + +/* Valid range in degrees is a value between 73.8 and 101.7 + * in 0.9 degree increments + */ +#define SJA1105_RGMII_DELAY_MIN_PS \ + SJA1105_RGMII_DELAY_PHASE_TO_PS(738) +#define SJA1105_RGMII_DELAY_MAX_PS \ + SJA1105_RGMII_DELAY_PHASE_TO_PS(1017) + typedef enum { SPI_READ = 0, SPI_WRITE = 1, @@ -222,8 +243,8 @@ struct sja1105_flow_block { struct sja1105_private { struct sja1105_static_config static_config; - bool rgmii_rx_delay[SJA1105_MAX_NUM_PORTS]; - bool rgmii_tx_delay[SJA1105_MAX_NUM_PORTS]; + int rgmii_rx_delay_ps[SJA1105_MAX_NUM_PORTS]; + int rgmii_tx_delay_ps[SJA1105_MAX_NUM_PORTS]; phy_interface_t phy_mode[SJA1105_MAX_NUM_PORTS]; bool fixed_link[SJA1105_MAX_NUM_PORTS]; unsigned long ucast_egress_floods; diff --git a/drivers/net/dsa/sja1105/sja1105_clocking.c b/drivers/net/dsa/sja1105/sja1105_clocking.c index 5bbf1707f2af..e3699f76f6d7 100644 --- a/drivers/net/dsa/sja1105/sja1105_clocking.c +++ b/drivers/net/dsa/sja1105/sja1105_clocking.c @@ -498,17 +498,6 @@ sja1110_cfg_pad_mii_id_packing(void *buf, struct sja1105_cfg_pad_mii_id *cmd, sja1105_packing(buf, &cmd->txc_pd, 0, 0, size, op); } -/* Valid range in degrees is an integer between 73.8 and 101.7 */ -static u64 sja1105_rgmii_delay(u64 phase) -{ - /* UM11040.pdf: The delay in degree phase is 73.8 + delay_tune * 0.9. - * To avoid floating point operations we'll multiply by 10 - * and get 1 decimal point precision. - */ - phase *= 10; - return (phase - 738) / 9; -} - /* The RGMII delay setup procedure is 2-step and gets called upon each * .phylink_mac_config. Both are strategic. * The reason is that the RX Tunable Delay Line of the SJA1105 MAC has issues @@ -521,13 +510,15 @@ int sja1105pqrs_setup_rgmii_delay(const void *ctx, int port) const struct sja1105_private *priv = ctx; const struct sja1105_regs *regs = priv->info->regs; struct sja1105_cfg_pad_mii_id pad_mii_id = {0}; + int rx_delay = priv->rgmii_rx_delay_ps[port]; + int tx_delay = priv->rgmii_tx_delay_ps[port]; u8 packed_buf[SJA1105_SIZE_CGU_CMD] = {0}; int rc; - if (priv->rgmii_rx_delay[port]) - pad_mii_id.rxc_delay = sja1105_rgmii_delay(90); - if (priv->rgmii_tx_delay[port]) - pad_mii_id.txc_delay = sja1105_rgmii_delay(90); + if (rx_delay) + pad_mii_id.rxc_delay = SJA1105_RGMII_DELAY_PS_TO_HW(rx_delay); + if (tx_delay) + pad_mii_id.txc_delay = SJA1105_RGMII_DELAY_PS_TO_HW(tx_delay); /* Stage 1: Turn the RGMII delay lines off. */ pad_mii_id.rxc_bypass = 1; @@ -542,11 +533,11 @@ int sja1105pqrs_setup_rgmii_delay(const void *ctx, int port) return rc; /* Stage 2: Turn the RGMII delay lines on. */ - if (priv->rgmii_rx_delay[port]) { + if (rx_delay) { pad_mii_id.rxc_bypass = 0; pad_mii_id.rxc_pd = 0; } - if (priv->rgmii_tx_delay[port]) { + if (tx_delay) { pad_mii_id.txc_bypass = 0; pad_mii_id.txc_pd = 0; } @@ -561,20 +552,22 @@ int sja1110_setup_rgmii_delay(const void *ctx, int port) const struct sja1105_private *priv = ctx; const struct sja1105_regs *regs = priv->info->regs; struct sja1105_cfg_pad_mii_id pad_mii_id = {0}; + int rx_delay = priv->rgmii_rx_delay_ps[port]; + int tx_delay = priv->rgmii_tx_delay_ps[port]; u8 packed_buf[SJA1105_SIZE_CGU_CMD] = {0}; pad_mii_id.rxc_pd = 1; pad_mii_id.txc_pd = 1; - if (priv->rgmii_rx_delay[port]) { - pad_mii_id.rxc_delay = sja1105_rgmii_delay(90); + if (rx_delay) { + pad_mii_id.rxc_delay = SJA1105_RGMII_DELAY_PS_TO_HW(rx_delay); /* The "BYPASS" bit in SJA1110 is actually a "don't bypass" */ pad_mii_id.rxc_bypass = 1; pad_mii_id.rxc_pd = 0; } - if (priv->rgmii_tx_delay[port]) { - pad_mii_id.txc_delay = sja1105_rgmii_delay(90); + if (tx_delay) { + pad_mii_id.txc_delay = SJA1105_RGMII_DELAY_PS_TO_HW(tx_delay); pad_mii_id.txc_bypass = 1; pad_mii_id.txc_pd = 0; } diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index 0f1bba0076a8..1832d4bd3440 100644 --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -1109,27 +1109,78 @@ static int sja1105_static_config_load(struct sja1105_private *priv) return sja1105_static_config_upload(priv); } -static int sja1105_parse_rgmii_delays(struct sja1105_private *priv) +/* This is the "new way" for a MAC driver to configure its RGMII delay lines, + * based on the explicit "rx-internal-delay-ps" and "tx-internal-delay-ps" + * properties. It has the advantage of working with fixed links and with PHYs + * that apply RGMII delays too, and the MAC driver needs not perform any + * special checks. + * + * Previously we were acting upon the "phy-mode" property when we were + * operating in fixed-link, basically acting as a PHY, but with a reversed + * interpretation: PHY_INTERFACE_MODE_RGMII_TXID means that the MAC should + * behave as if it is connected to a PHY which has applied RGMII delays in the + * TX direction. So if anything, RX delays should have been added by the MAC, + * but we were adding TX delays. + * + * If the "{rx,tx}-internal-delay-ps" properties are not specified, we fall + * back to the legacy behavior and apply delays on fixed-link ports based on + * the reverse interpretation of the phy-mode. This is a deviation from the + * expected default behavior which is to simply apply no delays. To achieve + * that behavior with the new bindings, it is mandatory to specify + * "{rx,tx}-internal-delay-ps" with a value of 0. + */ +static int sja1105_parse_rgmii_delays(struct sja1105_private *priv, int port, + struct device_node *port_dn) { - struct dsa_switch *ds = priv->ds; - int port; + phy_interface_t phy_mode = priv->phy_mode[port]; + struct device *dev = &priv->spidev->dev; + int rx_delay = -1, tx_delay = -1; - for (port = 0; port < ds->num_ports; port++) { - if (!priv->fixed_link[port]) - continue; + if (!phy_interface_mode_is_rgmii(phy_mode)) + return 0; - if (priv->phy_mode[port] == PHY_INTERFACE_MODE_RGMII_RXID || - priv->phy_mode[port] == PHY_INTERFACE_MODE_RGMII_ID) - priv->rgmii_rx_delay[port] = true; + of_property_read_u32(port_dn, "rx-internal-delay-ps", &rx_delay); + of_property_read_u32(port_dn, "tx-internal-delay-ps", &tx_delay); - if (priv->phy_mode[port] == PHY_INTERFACE_MODE_RGMII_TXID || - priv->phy_mode[port] == PHY_INTERFACE_MODE_RGMII_ID) - priv->rgmii_tx_delay[port] = true; + if (rx_delay == -1 && tx_delay == -1 && priv->fixed_link[port]) { + dev_warn(dev, + "Port %d interpreting RGMII delay settings based on \"phy-mode\" property, " + "please update device tree to specify \"rx-internal-delay-ps\" and " + "\"tx-internal-delay-ps\"", + port); - if ((priv->rgmii_rx_delay[port] || priv->rgmii_tx_delay[port]) && - !priv->info->setup_rgmii_delay) - return -EINVAL; + if (phy_mode == PHY_INTERFACE_MODE_RGMII_RXID || + phy_mode == PHY_INTERFACE_MODE_RGMII_ID) + rx_delay = 2000; + + if (phy_mode == PHY_INTERFACE_MODE_RGMII_TXID || + phy_mode == PHY_INTERFACE_MODE_RGMII_ID) + tx_delay = 2000; } + + if (rx_delay < 0) + rx_delay = 0; + if (tx_delay < 0) + tx_delay = 0; + + if ((rx_delay || tx_delay) && !priv->info->setup_rgmii_delay) { + dev_err(dev, "Chip cannot apply RGMII delays\n"); + return -EINVAL; + } + + if ((rx_delay && rx_delay < SJA1105_RGMII_DELAY_MIN_PS) || + (tx_delay && tx_delay < SJA1105_RGMII_DELAY_MIN_PS) || + (rx_delay > SJA1105_RGMII_DELAY_MAX_PS) || + (tx_delay > SJA1105_RGMII_DELAY_MAX_PS)) { + dev_err(dev, + "port %d RGMII delay values out of range, must be between %d and %d ps\n", + port, SJA1105_RGMII_DELAY_MIN_PS, SJA1105_RGMII_DELAY_MAX_PS); + return -ERANGE; + } + + priv->rgmii_rx_delay_ps[port] = rx_delay; + priv->rgmii_tx_delay_ps[port] = tx_delay; + return 0; } @@ -1180,6 +1231,10 @@ static int sja1105_parse_ports_node(struct sja1105_private *priv, } priv->phy_mode[index] = phy_mode; + + err = sja1105_parse_rgmii_delays(priv, index, child); + if (err) + return err; } return 0; @@ -3317,15 +3372,6 @@ static int sja1105_probe(struct spi_device *spi) return rc; } - /* Error out early if internal delays are required through DT - * and we can't apply them. - */ - rc = sja1105_parse_rgmii_delays(priv); - if (rc < 0) { - dev_err(ds->dev, "RGMII delay not supported\n"); - return rc; - } - if (IS_ENABLED(CONFIG_NET_SCH_CBS)) { priv->cbs = devm_kcalloc(dev, priv->info->num_cbs_shapers, sizeof(struct sja1105_cbs_entry),