From patchwork Wed Oct 13 22:23:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12557389 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 7A5E5C433F5 for ; Wed, 13 Oct 2021 22:27:17 +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 2E271610F9 for ; Wed, 13 Oct 2021 22:27:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2E271610F9 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: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:In-Reply-To:References: List-Owner; bh=GJIulR14eKLKZ7ydBCte92nnG7BR5kexwz8/YAsMosM=; b=qYZl/XH6NkfBId a0hIfwcB+jZA8eGBf6Qu2pkjIT8gfQwkjrKRLmHRYE/Oija3WNrnLv9xgJV4aKP+zaT6xOc0ZLGIY sv6SG3krKtB+iQO4m8Qj5A+gQx92tXdJWiEna41Kxu37h8VmUT9TD5NH/rQAQRG6iscRVhWMzNdKL 6ErKvVCcmpfuMsbNI1ka+FziMIp0wx6a2xdy8jvROEvBGSG6ayv/ft7D8ejfEpCXYxkgkGUpHW0Vf a+iEQ+iJ7Ca1Yq5jxLkG/9FA+7Xv4t/rSw21No7ybtAUspxAjdNLb4uDVLBkfq7Gv8/lS2Q5uExWP KdhdiWn86gi1rvzGdTZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mamfp-000pNS-Bx; Wed, 13 Oct 2021 22:24:33 +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 1mamfj-000pIr-3O for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 22:24:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OqiOW7VmkgXLCwj8YS9068G/uFeZ7IvjnAG5HV/pfi6Gew55Gw1Xnsgbo+ptspEIVdg8DeYJXOwDZcXJaV8dwkCQGjoLtL8d3KIbf5gKeh7iJ+Qvfe0mhoQzmmJcZlw3WXZXSVq5FA7loFqj/ETTIrUmrIJ7ZZnY0FBVbOlZYWBQtmAws+nrjCpYGzYJjVbWjZ56VZnJzjlyH7WjwlkLpeoDJ4bJ1h7cgPAHX77N5jDvzhvVIglPcOcaiOcPDQf3yzO3Uf3koJVSY1cC4/ZNKQ3TW8Vcr/WIkzKtuPpeH3B6nfdKM+OHc9QCifkt9awmdmALyHTd17eFz2zpVhd2HQ== 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=oH3Cf0+kDwHP8HUqIRwf3yb965tCxPp+sCnKRScxRww=; b=g5HMo0xARwMZTlOYmlYzj6eMm6HRuznRZ4bF32cxOVRG+t43H436SpXwiRJ7khS3WFL35uH6vCqM3frYQpLOChFEdZsru0yx5KARISw6M6EHPYn9evhiQGo6gYHNH7uRyfFwU1aYOmz+q2v/2e089lez6xWmNfhygIQ1qS22WYRQs3sIbgz9t3Yxmp7BWl/Cw5Z39mTECrnCU0D4NYtxTrtw1z39esJYMCPJqFkGYC0GAifR9yxPeL5GsS/ZDWck5Pu5O3v7oDmXOBX3mnPaaKoXzkELC/Skscfpe2j/AKwQOh/eZBfXxFjZ7t1UWpLOIHqrrm4JuFNCIGaN3Ka6Og== 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=oH3Cf0+kDwHP8HUqIRwf3yb965tCxPp+sCnKRScxRww=; b=COjqUNQHNymt8Ubl84hg0+NoKd7xMmDx0VnAzrJGLtmPxm+Dg5K1AVgwhl8DTS3WEGri3mCKanPzKsGVEmaKT93E4l/Z1vfDjc4eYVwiS8l/OYRsONPiF1SuCyoZWrWD4a3xC+zJP2HsQZhXxvPBsL4arzgbUnkVKILuUTpMQLs= 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:17 +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:17 +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 0/6] New RGMII delay DT bindings for the SJA1105 DSA driver Date: Thu, 14 Oct 2021 01:23:07 +0300 Message-Id: <20211013222313.3767605-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 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:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9ccdfc6-1b91-459e-6aa5-08d98e9831a3 X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: 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: w0uKt0wn8MOgs6XSIws8YEdAcwXi3yCl5GscyR4ipa/viR9ei6RxkEhFuWkhHB30Rzqk9bHUCpDNn36+5IO1L9u4LVNukDkSxNQfyuAuAVyncRSwyl6ciwMHa7zrRu8r1VojU3O5QWw8foKExRuIbfSyf/tw7tIRwNXCWdoQHmz68fOz/tTWZYovvIPQcBQ+IQPQr2Qwd1IRHcBOnA+OKEVRABpQf81eSZK6+C6euu/bZ4GqzgDKNKivgLLXmKZ4LonUafh70AKrGrvHrj0nCOk87RKErOpc/M93/HMLkjUvP4tlHtbPkqPj73bDyZJawZx1JZXhcoXpEEOtuQdoXSfpdggeNV3tcoAzSLES9ogOZK+qkjJ0wZlL/d7wtKV9EA8EUFRdTxLde4NkOGH7eN483aLT6lRui+b7r3L3iBF6A2FyVAwsj/Xrh6zHI4RbxsN2kNzKY8EysjebOZGhYBbepfn+DMdGYaE43SJqzsgpZVn+YSZSC3Gw/EU5ejUhJkL5LsanrpqhmBco4FJjaaviitXfT1ix8pBzOH/tvJfzJHI+yf7h2DWyMic8mirh/KvCEa/KUF/U7hugDpAxLf/P89IBiAu8FgK0Jx93xVTyAbuXV//S+1dFJnTLatIE65jXYo3vLeOKxpgtUOYGgfNwQx8ljv5g1N8+tMheiHyVKlCO7UoMp0zNqf/z7ZEfwY/DqIl0bUv2V/MB93PoFKLHOmikD/dDocfA1FYiPL2G8pBCbGwC6VvDSfKqG3cKByd2qDQPNVvE0bqmZgcAQzOxYBQUDzWtrbsMARFBKkU= 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)(83380400001)(86362001)(508600001)(44832011)(5660300002)(52116002)(966005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L/6E3LJpqeyP7wQ3uVBWxfU6TPo7pg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emio7y9yQcgjHKYZxqqL3DFyMI/7WE2qKzA62dVQXvVOE9KrKVWprdqlB0mfm6dyO4e9y1wkihsczQWB78R8lWa5aBmjCHqTeANTsOIYo7zFEbrBaLRapSj53GTejwzWlbGITaCxnkhpt1zG8LiNud57okMEadFt1awRUIoFrr4g6ElyVqWAAdS9ukP7zYU4Fch5BC4PmaHhkOEvcgrNqKCv+PDArEhH9xgliKwBhpbwJbxFrtqXcFmt6iTeV/f X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9ccdfc6-1b91-459e-6aa5-08d98e9831a3 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:17.0491 (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: d0Wbu7tLWgCbHQc1sEjpTaLZHCtL0Ms9sEc4+J3bhWyzz/5Y+sY6VTIR7yt3DQmvCWMcHNOnwELTXp6Coe9sBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_152427_240749_F8E0028B X-CRM114-Status: GOOD ( 18.19 ) 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 During recent reviews I've been telling people that new MAC drivers should adopt a certain DT binding format for RGMII delays in order to avoid conflicting interpretations. Some suggestions were better received than others, and it appears we are still far from a consensus. Part of the problem seems to be that there are still drivers that apply RGMII delays based on an incorrect interpretation of the device tree, and these serve as a bad example for others. I happen to maintain one of those drivers and I am able to test it, so I figure that one of the ways in which I can make a change is to stop providing a bad example. Therefore, this series adds support for the "rx-internal-delay-ps" and "tx-internal-delay-ps" properties inside sja1105 switch port DT nodes, and if these are present, they will decide what RGMII delays will the driver apply. The in-tree device trees are also updated to follow the new format, as well as the schema validator. I assume it's okay to get all changes merged in through the same tree (net-next). Although the DTS changes could be split, if needed - the driver works with or without them. There is one more DTS which should be changed, which is in Shawn's tree but not in net-next: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/tree/arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dts?h=for-next For that, I'd have to send a separate patch. Vladimir Oltean (6): ARM: dts: imx6qp-prtwd3: update RGMII delays for sja1105 switch ARM: dts: ls1021a-tsn: update RGMII delays for sja1105 switch dt-bindings: net: dsa: sja1105: fix example so all ports have a phy-handle of fixed-link dt-bindings: net: dsa: inherit the ethernet-controller DT schema dt-bindings: net: dsa: sja1105: add {rx,tx}-internal-delay-ps net: dsa: sja1105: parse {rx,tx}-internal-delay-ps properties for RGMII delays .../devicetree/bindings/net/dsa/dsa.yaml | 7 ++ .../bindings/net/dsa/nxp,sja1105.yaml | 43 +++++++++ arch/arm/boot/dts/imx6qp-prtwd3.dts | 2 + arch/arm/boot/dts/ls1021a-tsn.dts | 2 + drivers/net/dsa/sja1105/sja1105.h | 25 ++++- drivers/net/dsa/sja1105/sja1105_clocking.c | 35 +++---- drivers/net/dsa/sja1105/sja1105_main.c | 94 ++++++++++++++----- 7 files changed, 161 insertions(+), 47 deletions(-)