Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3166865rwo; Mon, 24 Jul 2023 07:14:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtn5Y4EuxbCQc6qXLQwwKvhhToKKv5C+REeI+UMx3CaK6JtF2svJk6PmDms34momXcpJzG X-Received: by 2002:a17:906:7a59:b0:982:be38:a5df with SMTP id i25-20020a1709067a5900b00982be38a5dfmr9212048ejo.63.1690208071645; Mon, 24 Jul 2023 07:14:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690208071; cv=pass; d=google.com; s=arc-20160816; b=VIjmM/MPjjt2B9mjQ5cjUn02P9deqpoX5KsRlExHh8KHxV6L1pw4m49zopJe2WWNr8 U+cnPB0coR88YZ0ZuzMdARHJORImvYHLqMHcVMgBrXi6abIl6N5Jl1RnVzXNbTdBe9Pm 2/G/e1UZTY1WXqM2aZBUyiOAWvuRoECuBbkEVsoqMEglSPdwgfCu5pY6Wka1r8jdyYwn Zh+EfR/43kbq9NXKIoCTPJi3YoXBKtjAI/BL/NjJpurE2zIANtvDtJAR1zTnpAk1LH4r ZfBhh/4oY0UCiqgRVJ1yWg0iU8Indx+q4iFH954pTpA9+lqtK4eTCPel5H40hOD/v1cW Tt/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=xFy0L8MoZBwANkRIemfr6qSiKUQ5BJs5PyQao4w9D9c=; fh=9TL3ePv7ffgB385RY0nduqpkZ4mJCmVXpeVOUW2W+/8=; b=hr/aFj5ahZnpoT7JoFcqhLIynWPZZDa9Aqm6PZZFMG3wVlcIAhYcsx2u3Y3XaUUzm6 4UoxAtS3hlV3XV96kBFJb2QWAlR/BSLch0Y3y7pqTqn8k44cz3J2xKA0S+6Maf/KP5IH rmS3umeuJVkB+gJCmVfjTEAiT381E+Ac/UunfnV7x2AJf7wDmA0PK00PhoG6+MYY99+E gokJpNGWSDcvLy0Op+2KxdV86X36DhBWsLPsaZygsbcaD96vIXWM7D30HPCvPpeg2lZM i4VekC6/QO59SXGbzJQh2OdoGTEf2fTz6hUPw8AFpPKTJL3LgyHCXzPDGuOpItxCF7EG nXFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="ha5/tYCq"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020a170906274900b00992f2becb47si6460792ejd.7.2023.07.24.07.14.06; Mon, 24 Jul 2023 07:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="ha5/tYCq"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231904AbjGXONT (ORCPT + 99 others); Mon, 24 Jul 2023 10:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231672AbjGXOMw (ORCPT ); Mon, 24 Jul 2023 10:12:52 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2044.outbound.protection.outlook.com [40.107.104.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1D1CA3; Mon, 24 Jul 2023 07:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XcwzDO7gTg5TkuGIYbQtQj79OJEYycyxyWIhYlZb8pBJHSk4U3bsf8DpZXZnokU2+nH3JqEEOqS7A8qvzIfVt+2B6iW1zOXSn32MfGLxMSHF2XCpo/kkdJQHZcwiFcoSaFBNQ7PQqWJN+v1wxY6nchCr3bThbRyfDm/5noxy0sPfciVIGZxSTmaMT3PocdMVHE0xS29u3kidkhtRGBKEuNtvHYHeFtQCaFoKDsP4LvBgP96tO4U1WH+scebg1hQB/LeW5aTfQKGqXWOtY7/Fx1y3lNLvJ6oCGAhpUEAyTFnPsAmb6YqXFZLk6sp7/wN0MELe8ovL0iHGC5dy04sKFA== 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=xFy0L8MoZBwANkRIemfr6qSiKUQ5BJs5PyQao4w9D9c=; b=dXTlve3c1zPYZly+fWRd68pzebkVy8JnkyHqK65QzNN//DxG+cVxqk1x1eu9z3c/NHF28NtaIASZU9gD9x/wyg9+K8xTn47sk9PXwAYHV3Utrit3sdHzSKugQlnJqL3hUj9fo2pqDQ/en7rGxDXNjkI435sRdLZsyqg064AtgQBq5A3g75kmu/VKKGMxw5trh03V4s+L0U8YBor3qVS/4JTXZFS3xCm2Ib0knwSsrbWNNqWXB8Rm0Z8AVhnjcsg7pGxCiqdp5LiFQRLfo3E3EPtp1yw2c8ysAy82AUh/09ItiWJn29tzsKyUL9XHjQkUut4End++aZ4KdUR4oc++wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xFy0L8MoZBwANkRIemfr6qSiKUQ5BJs5PyQao4w9D9c=; b=ha5/tYCqNfJUggVnOkmmwXD1fDACH+TdCyAcmNlCa9vaU1kzJoL83+XFOjcQUHgdbUve9Tw9cMAyJxgzECvdJ5g78WSGScK+mMtaXIDd3AZLSR9WFZaNnZvvvEuOnhqTXaggNYGkg1qEh/kA5/HDwevKdv/UPj5+P+1wQrxWIlc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) by AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 14:12:44 +0000 Received: from AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::74e7:6384:dbdc:e936]) by AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::74e7:6384:dbdc:e936%5]) with mapi id 15.20.6609.032; Mon, 24 Jul 2023 14:12:44 +0000 From: "Radu Pirea (NXP OSS)" To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sebastian.tobuschat@nxp.com, "Radu Pirea (NXP OSS)" Subject: [PATCH net-next v4 00/11] Add TJA1120 support Date: Mon, 24 Jul 2023 17:12:21 +0300 Message-Id: <20230724141232.233101-1-radu-nicolae.pirea@oss.nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0P190CA0009.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::19) To AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8954:EE_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: 38ede5a9-f006-4cb3-12bb-08db8c500c6f X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7TU5ffM5Ya+9fHgveB0QhM1TV6UG2HuiHZHwNEvVbSfNVyYdbqK8ESuYyshOAHup0vKLKoSR1WaJrWXwo7pAxRMlelHh1nLuxTujyZuVsgCsrh4RfFXZ96e2eu7nf6aVxPhH6PwJc1fJN+AqYPO8lw+rZ8fIYmmh83FE8NQ4oNUObdwBq+abvOp+drlc9XisFvPB3dyxu9yi+xVHQDQLIOhJosB/orgPlFAs+62bvC1XBxv+d/+i/Po6ZvqSMC9nSNjqr2Y+Rij3Mvra8u/rLCYjWm77gxX8YUQgxg8icp6L4LHy3jsjO8ihLvfxtqt/vEwZ9/7fNdDnwpGvAdPV0HJGW0omHCJsiAdhO1HwpSVv9Bo6psyvHsAoDi0MPo1MmS1TBxTaU61pFO8mKQg+ejFuAxbnY8kqE3PLVad8fEGd2VLI0qJXiHrh9hHiO1j1+7xQgTrVQpY3Glbnuakua3qdJU+a9MPOKBCrRO3buPRPmbibneLHbe8Gs/smlKDXT1vrr+ZOzI7xmOLW0mJrCtFINgSl79/tseWQdDGyTIhmQ+B9rJ4cJ+AcJlUCgZB0U3PZCCKM3pTInFT68+vTuMfD291BQv7kItUn10uGFeplwW0OO4wSdgjCEPhjiH7n X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8954.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(39860400002)(376002)(396003)(366004)(451199021)(52116002)(6486002)(6512007)(478600001)(6666004)(66574015)(83380400001)(86362001)(2906002)(186003)(2616005)(26005)(6506007)(1076003)(38350700002)(38100700002)(66946007)(66556008)(4326008)(66476007)(316002)(41300700001)(5660300002)(8676002)(8936002)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?89q88lVtmD/Ryy2CEjPNm+w5GRFGY5+b9W85aR5LNS7aHplJpSrwzIBC3fZ9?= =?us-ascii?Q?pksETpLhY4evq/FxNxm3tYUwWWITJRsj28pmH91UQs56Rs3u8v8T714+GFIS?= =?us-ascii?Q?QKLqXFPowz/tYm3oPq+v9CUcUWUbA8O5Byd5luGdtW3u0oKjHldeMbm47VRH?= =?us-ascii?Q?fBS18GjoFi629SbEh1GrQqPVtYlZF3Cm6FG8fV6mxqz1PGg6rmFmkT+/PCDu?= =?us-ascii?Q?xlwrjsFKnrjXDt+RMg4KQesQvrNAX+p+gInAbqCFufImlwGrBHet67FJ4wgM?= =?us-ascii?Q?w6gCYsqKpXug+LAtzs+Lyhv/a9Aql+L/GP2DAudm3vPEUzn8qM+5YdRxQOOG?= =?us-ascii?Q?ipRnNLiy4fwLp4UcQmzi6fyTllrxx7YhMBLDCv/3CmQg2z5ssBzxz+KcWFjV?= =?us-ascii?Q?94sWeNR1agFte9nH6G/QapxJRQ8YyEj4ZzbL+KUOKLBrkah/oN29Pl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DgtrvJG1BvrJOCFTP7qzTAEvZS8c7RsHCLd?= =?us-ascii?Q?OXKpF0AZowcXRuDvCC35ZL0k/G/QExw4C94oUSOtIScFFrtemQF3IogSnCD9?= =?us-ascii?Q?24DnFFObrNk90GzfR4e91Nh3I5Nfp27sfercZwgrlGA9ZkmbNFDL0ed091i0?= =?us-ascii?Q?ZMVOnCULS2/wuhHqIvsLTTNTQlqPzWFrrMOI0AYYmmbmG+Rq1G0I8CzcNoP7?= =?us-ascii?Q?hznvFVQifskLy9gWUIhOMQ/M5KFpsArNC0gNr/1NN93p/74THrxbWwXeEcIR?= =?us-ascii?Q?Hw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38ede5a9-f006-4cb3-12bb-08db8c500c6f X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8954.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 14:12:43.9853 (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: t0aSOXc7f/UlksxwpfOcSggujTpbGub0mLZq7O5O/QY4tKqR88fbbTX5Nky5EEzs8UeocEKbG/8TZYeZ6Pg6b3dz789CUQvpkSy2DIu46a4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, This patch series got bigger than I expected. It cleans up the next-c45-tja11xx driver and adds support for the TJA1120(1000BaseT1 automotive phy). Master/slave custom implementation was replaced with the generic implementation (genphy_c45_config_aneg/genphy_c45_read_status). The TJA1120 and TJA1103 are a bit different when it comes to the PTP interface. The timestamp read procedure was changed, some addresses were changed and some bits were moved from one register to another. Adding TJA1120 support was tricky, and I tried not to duplicate the code. If something looks too hacky to you, I am open to suggestions. Cheers, Radu P Changes in v4: - rebased on top of net-next/main - dropped "net: phy: c45: detect 100BaseT1 and 1000BaseT1 PMA abilites". Already part of upstream. Changes in v3: - merged "net: phy: nxp-c45-tja11xx: add *_reg_field functions" in "net: phy: nxp-c45-tja11xx: prepare the ground for TJA1120" - rephrased the commit message for "net: phy: nxp-c45-tja11xx: remove RX BIST frame counters" Changes in v2: - dropped "net: phy: nxp-c45-tja11xx: fix the PTP interrupt enablig/disabling" - added error msgs to nxp_c45_set_reg_field and nxp_c45_clear_reg_field - used phy_err instead of phy_warn in nxp_c45_write_reg_field and nxp_c45_read_reg_field - removed null checks for .driver_data and its fields - added 100BT1 and 1000BT1 features bit - replaced .features with .get_features - dropped changed on TJA1103 EXT TS behaviour - improved timestamp reading workarounds - merged patch "net: phy: nxp-c45-tja11xx: timestamp reading workaround for TJA1120" to 9 and 12 - implemented PCS reset workaround in link_change_notify callback Radu Pirea (NXP OSS) (11): net: phy: nxp-c45-tja11xx: use phylib master/slave implementation net: phy: nxp-c45-tja11xx: remove RX BIST frame counters net: phy: nxp-c45-tja11xx: prepare the ground for TJA1120 net: phy: nxp-c45-tja11xx: use get_features net: phy: nxp-c45-tja11xx: add TJA1120 support net: phy: nxp-c45-tja11xx: enable LTC sampling on both ext_ts edges net: phy: nxp-c45-tja11xx: read egress ts on TJA1120 net: phy: nxp-c45-tja11xx: handle FUSA irq net: phy: nxp-c45-tja11xx: run cable test with the PHY in test mode net: phy: nxp-c45-tja11xx: read ext trig ts on TJA1120 net: phy: nxp-c45-tja11xx: reset PCS if the link goes down drivers/net/phy/Kconfig | 2 +- drivers/net/phy/nxp-c45-tja11xx.c | 1134 ++++++++++++++++++++++------- 2 files changed, 863 insertions(+), 273 deletions(-) -- 2.34.1