From patchwork Thu Jun 13 13:20:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?S2FtaWwgSG9yw6FrICgyTik=?= X-Patchwork-Id: 13696773 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2061.outbound.protection.outlook.com [40.107.247.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7566D1448D8; Thu, 13 Jun 2024 13:21:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284883; cv=fail; b=hl+FN2c/IqcFQF0HVDo9MXS7UQjy/25M1JFwnnkWiGS+/yhfTU2tCLignVM5wkIwlGv95ndeSF2HneP6m/Wv+wNIc3C24ik3LR8JPoPrpyNLjAJRJeymA9kChuxjNYQMhFt6qkcWSlTxe0vLrLdaYjU/cPpMaKF5XrU6YymwVnw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284883; c=relaxed/simple; bh=LHWBRv6Kz3LgR6SydWvZSGzLiGDL0uN6OKpItSYvNhI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BW1bdigmDnt24oKmMfCrdMsiAhxD2lhJbdw57kAQv7BNF6kD7U4os6cWZwGUA3c9WPHi1+2S/fqohTd8BonDQMaHvP6/bNfhGls07kDclHDYkFY2E2GFvKQQ6XSab2/uFOZFx71nJEZXOMWDjd0f+1ZspsolCqqIX/Wxjk0azjM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com; spf=pass smtp.mailfrom=2n.com; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b=QaEOGIsQ; arc=fail smtp.client-ip=40.107.247.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=2n.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b="QaEOGIsQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i7OwsxeNHPvq7U/JsascOAHqjzsb3tSJ3/rNU+CREWHJcpe27B2kZ45G8d4IBycoIe5JVCPrOuaUDYn8chmYwLWFApzyT0HpeEqA7cnaZ5lnv/Q1D7hnHOxwrkStBFe+I6e+z59Z7bZoTsKyxX03wt7VFKP1RhIM/dLJ1DQGkCFyZyWLVD4orwzwU7dQFQAnWGannGmtgtElPm3aDaR1VKHRSCGnDZQDE+7izftDMin7NvFodPljbF0jbaVg4j3W0QXabf6q8UxTweslr3kXeBHFGeH/h0dplw4pFU9JukYmdl+EkOCSNKaNeGLXfKdHrA3/9BZgVt7DtYLF7CtsPA== 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=5tUdOrxT955PQwT20/EJZ1RoJX2UwtFWOTcvsmbA9NM=; b=H3DYmPwesBPzd1f+dm3myjzI7NsC8MLaQEyzKkoxCnzTQv3dHV7GsRptbiKXyMEqj98QMxboo1pAxnY2Ns5QmyjohD2QpLvw4tXjttnz/ZGeNrNegmHmZmNKNRkogmztAagjiX4hNq5Nu2zzkKZfTGnaDtNsQCGdhPcUX6IJFupM4x5PVz/wW56ynDokYP8Oadk1VPlifP+/TRU7TaTV1Rh9mwiFCgkYjANvnH8B7zqb5vQb38NRI9oW2CQ2UQKCVDGDGtoh/KFIF/hvzR5X73wREx5NZAW0Xu5Lde/nKm6yGa86xRpmZ37bbnX1AcZWGiOVmMiwZv7mYhzxsXXPMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=broadcom.com smtp.mailfrom=2n.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5tUdOrxT955PQwT20/EJZ1RoJX2UwtFWOTcvsmbA9NM=; b=QaEOGIsQ/McAs+I07uRN9L2h41KcmtrhL1u7xahYJyIblcpwFEv8mT+WrydrcvKellOsVXcHNDTN8KCS0yPjOjAOo2V1kjjVu0vHTl64rsUN4cLj2gEtI0QvkfQImX8bcyHZuaS2gNPeJ8iyjuP1M9BfZP58RABZDYwYKdyE7kI= Received: from DU7P195CA0001.EURP195.PROD.OUTLOOK.COM (2603:10a6:10:54d::15) by AS2PR02MB9955.eurprd02.prod.outlook.com (2603:10a6:20b:605::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 13:21:16 +0000 Received: from DU2PEPF0001E9C5.eurprd03.prod.outlook.com (2603:10a6:10:54d:cafe::2b) by DU7P195CA0001.outlook.office365.com (2603:10a6:10:54d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.24 via Frontend Transport; Thu, 13 Jun 2024 13:21:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=2n.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of 2n.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DU2PEPF0001E9C5.mail.protection.outlook.com (10.167.8.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 13:21:16 +0000 Received: from pcczc3457tyd.2n.cz.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 13 Jun 2024 15:21:15 +0200 From: =?utf-8?q?Kamil_Hor=C3=A1k_-_2N?= To: , , , CC: , , Subject: [PATCH v6 0/4] net: phy: bcm5481x: add support for BroadR-Reach mode Date: Thu, 13 Jun 2024 15:20:51 +0200 Message-ID: <20240613132055.49207-1-kamilh@axis.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: se-mail01w.axis.com (10.20.40.7) To se-mail01w.axis.com (10.20.40.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C5:EE_|AS2PR02MB9955:EE_ X-MS-Office365-Filtering-Correlation-Id: bf74e0a8-7ecf-43c1-32c7-08dc8babb491 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|36860700008|82310400021|1800799019|376009; X-Microsoft-Antispam-Message-Info: =?utf-8?q?tnSHwMSjCNoo1TtVkSIWVljWazQ3S34?= =?utf-8?q?N5J5H4PGW8ZyXO0ukyORdCiClrbeTb9RBdeDN6wiwHV1t5XeFfQ9fJY3YOjC4OP8d?= =?utf-8?q?5nezP1lLwKriRcAMWs/gxnHZPzwmKUVyP3VP9/JlubrjrdEYhIaHGN+Gt0X0mtOXm?= =?ut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q?qXlk7QpHe7gATX1D81PQi/waOteFgJfJVqggFPK4FtzRTBN8CAGyuXC1JXaUeLOaw?= =?utf-8?q?JesfKCRDVMbocB5qaoDP4PcORWSv5m8uhswnHU+xx8SWd1uCd0essa+MnRTINu0Rx?= =?utf-8?q?V1Jq+Dhc32KRXdTS6MZO1iHg7xL2HP+RLIl2okgUKpt5s80jc8mmiCHBQmb2l+jLP?= =?utf-8?q?5Gl73xuzMH6ZeQzVdi2D8O15zq4Efe8P++JeELKEn4zf4sgqgTQkbpHaGKVpPCiiK?= =?utf-8?q?1ugxd3tGlhZSsA9wUeGZMYRkE2F2k7lNpUplOlGxF26q2feKwtKGUSVxNuZ3LbKtu?= =?utf-8?q?hxdOvs+4oxYz42QcReXY4wp48Zy9zDXXZg=3D=3D?= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230035)(36860700008)(82310400021)(1800799019)(376009);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 13:21:16.4069 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf74e0a8-7ecf-43c1-32c7-08dc8babb491 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF0001E9C5.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR02MB9955 PATCH 1 - Add the 10baseT1BRR_Full link mode PATCH 2 - Add the definitions of LRE registers, necessary to use BroadR-Reach modes on the BCM5481x PHY PATCH 3 - Add brr-mode flag to switch between IEEE802.3 and BroadR-Reach PATCH 4 - Implementation of the BroadR-Reach modes for the Broadcom PHYs Changes in v2: - Divided into multiple patches, removed useless link modes Changes in v3: - Fixed uninitialized variable in bcm5481x_config_delay_swap function Changes in v4: - Improved the division of functions between bcm-phy library and broadcom.c - Changed the BroadR-Reach / IEEE mode switching to device tree boolean as these modes are mutually exclusive and barely could coexist in one hardware - Made the link mode selection compatible with current ethtool (i.e. the linkmode is selected by choosing speed and master-slave) Changes in v5: - Fixed the operator precedence as reported by the kernel test robot - Fixed doc of bcm_linkmode_adv_to_mii_adv_t function Changes in v6: - Moved the brr-mode flag to separate commit as required by the rules for DT binding patches - Renamed some functions to make clear they handle LRE-related stuff - Reordered variable definitions to match the coding style requirements Kamil HorĂ¡k - 2N (4): net: phy: bcm54811: New link mode for BroadR-Reach net: phy: bcm54811: Add LRE registers definitions dt-bindings: ethernet-phy: add optional brr-mode flag net: phy: bcm-phy-lib: Implement BroadR-Reach link modes .../devicetree/bindings/net/ethernet-phy.yaml | 7 + drivers/net/phy/bcm-phy-lib.c | 125 ++++++ drivers/net/phy/bcm-phy-lib.h | 4 + drivers/net/phy/broadcom.c | 370 +++++++++++++++++- drivers/net/phy/phy-core.c | 3 +- include/linux/brcmphy.h | 89 +++++ include/uapi/linux/ethtool.h | 1 + net/ethtool/common.c | 3 + 8 files changed, 584 insertions(+), 18 deletions(-)