From patchwork Tue Jun 4 13:36:52 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: 13685330 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2040.outbound.protection.outlook.com [40.107.8.40]) (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 AD753147C76; Tue, 4 Jun 2024 13:37:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717508242; cv=fail; b=QR5vAlPkVDmYP/TmtnQRHMcm/gXUNMVK+d5/lzbVniQGATnWCDSpunpgRwVlIApGf44DYdhPV59YNTBjAkVmpmtzp/e3IIKeolGmh1F7eS0m+oh+LxloClxzh1lRKVBOy+n0Zz1zqGpBrT/wkXA9+pAC+iZqTmWTiyJtXQUs+98= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717508242; c=relaxed/simple; bh=AZ06KBNE2fF/6w81AnnwMxflls9XuUXNo+5aPZow2DE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J0sHWuzo24dmYsll7OM+htP3JIr02JXqoE1CFqU/wxZHzkrVdPhsqFIZSEV9PSxdMrhYaZ12YtlUJE0gpKNUx8qVVEuTD5dFASZAynZrWxGwEeshDhg6pU1myF/j9gi8paEnz/D07ckZ69KjTNHKVdAMhZaddM6TfW/JNIF3aL4= 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=b4z2I7MJ; arc=fail smtp.client-ip=40.107.8.40 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="b4z2I7MJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kQH9qZ4IZsbYw3opc3ATTRKyElj2QuEwqoQqdAVavwmon/cW1w2jR0s7aRYzTxDnKPsiwiFDUVOO5btAOS6uXlAJDG9vMzIG/TMwBVpGM0gKf2HUY6P24uMKHUkI7+fbS8GHPAqr2wa28mhSpstfD2FTzbQqE7Ro7rkEaEuC/1lWGPY/QpozDVqd6K4vuISQwz/zoNYqzcivG1A6seDUVGdHVJr5+ayBbFyEaMD0riWesQwFBuLHgdkKXgaaH3h454abXixh4+GYkuEzqMJlyUJ/nwlaYxqTNiotlMv4/yPy6xWMpqiQGpNXXct+cwC39qAoAkcUIYvAg0FbDT9zPg== 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=4Qk5HkWquX5hnH4oz0TZDo8Tx+l3Dq48d2ORsvVXy1U=; b=M/DGIZtDUHYFSaCqIAQLp/X+JR5MiZiPJjw4D02LX0LI0N4UUhCzUZY3R4AuPpz5TnIRjbKGKJQIsURAsVseCi3sXNRSC0AeM4eJ6H5e9pCGxVbAP8Rv+VIv0mm70aZWcc7z5diUZc3lq4uzRAmNlDiTyMsYD1Ps3OYCKBBXzDlCL0khE2EZED8Y+o47VEApxC+8jL/hAR50Sl2CtXH/1Uce5C7iwCcp5iMVYdLkIP9iEeWWcloANVKyDMDyY0d9T6YAQMbBFypK7lSsbreAYn6wz6KXFj8xo+IH2zV2JPabmrT57un84LK516sGzDW/ZfP0GyAvPFQDUiDgCVXa2w== 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=4Qk5HkWquX5hnH4oz0TZDo8Tx+l3Dq48d2ORsvVXy1U=; b=b4z2I7MJMCSBEMT4gT56YDDOPinQA93U0c3lA8ajMEceQO9umOr357yt1thpFt4A5k9/H3Jagjrg2UHxPom3lwqmyjFMiQJNi7Scxt0rievxvFsOGs2cWrnI6yxRPq9PztsadelhnCij35XIftViz76aEKrGFfMWZUYAKNSi2JM= Received: from AM6PR0202CA0043.eurprd02.prod.outlook.com (2603:10a6:20b:3a::20) by PAVPR02MB9569.eurprd02.prod.outlook.com (2603:10a6:102:305::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.27; Tue, 4 Jun 2024 13:37:16 +0000 Received: from AMS0EPF0000019E.eurprd05.prod.outlook.com (2603:10a6:20b:3a:cafe::98) by AM6PR0202CA0043.outlook.office365.com (2603:10a6:20b:3a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.30 via Frontend Transport; Tue, 4 Jun 2024 13:37: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 AMS0EPF0000019E.mail.protection.outlook.com (10.167.16.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7633.15 via Frontend Transport; Tue, 4 Jun 2024 13:37:14 +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; Tue, 4 Jun 2024 15:37:14 +0200 From: =?utf-8?q?Kamil_Hor=C3=A1k_-_2N?= To: , , , CC: , , Subject: [PATCH v4 1/3] net: phy: bcm54811: New link mode for BroadR-Reach Date: Tue, 4 Jun 2024 15:36:52 +0200 Message-ID: <20240604133654.2626813-2-kamilh@axis.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240604133654.2626813-1-kamilh@axis.com> References: <20240604133654.2626813-1-kamilh@axis.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: se-mail02w.axis.com (10.20.40.8) To se-mail01w.axis.com (10.20.40.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF0000019E:EE_|PAVPR02MB9569:EE_ X-MS-Office365-Filtering-Correlation-Id: b9d8804d-8c8c-42a2-7be5-08dc849b720f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|36860700004|82310400017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4EXQ6VN8NOiuRjesQQfbvb+RgIcRlRF?= =?utf-8?q?CJ0RZm9RP6jfGH6Te+CmXTWwB7cdIW2gPfo2ujnRUG2700cUgdgfgiMmTNThBe1JR?= =?utf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utf-8?q?rX+ujzX4yfzbHP98BcU3nTt7b+Rze40RHTSsHsMieFxDmDtrL3rcL6xm/CR3wtVJs?= =?utf-8?q?zuqDrd3uvxaV2WA0rT7VyAVhVLcLrfc7gnP2VKu5vmtrdQ3gSg789ScgWxZjBW4V9?= =?utf-8?q?OQOr7uVVBPMoXg9+ik5n8QazLTusvI2naAFnHPGzgblMq1NAWriE89vxID6AfFQO9?= =?utf-8?q?g/KVmv6tzRz19thm4FgNT8Anazg9a5lCVqwe3MMOwosug4n//rZFcXf7Gm3MmejyF?= =?utf-8?q?PqX4dKYuvWyLHNmJcJ3h2pSmLwPAuanUrjnO7lGqPRECmOSpENVrJUNA3eQGiPaCf?= =?utf-8?q?9qauc92Iu7xm6CTDnE1qcSPLdm5++f/K4VBo8Ww+StTpPFhojK9jYQUMjG79SpatT?= =?utf-8?q?6+7yRQamvUnK?= 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:(13230031)(376005)(1800799015)(36860700004)(82310400017);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 13:37:14.7713 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9d8804d-8c8c-42a2-7be5-08dc849b720f 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: AMS0EPF0000019E.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR02MB9569 X-Patchwork-Delegate: kuba@kernel.org Introduce a new link mode necessary for 10 MBit single-pair connection in BroadR-Reach mode on bcm5481x PHY by Broadcom. This new link mode, 10baseT1BRR, is known as 1BR10 in the Broadcom terminology. Another link mode to be used is 1BR100 and it is already present as 100baseT1, because Broadcom's 1BR100 became 100baseT1 (IEEE 802.3bw). Signed-off-by: Kamil HorĂ¡k - 2N --- drivers/net/phy/phy-core.c | 1 + include/uapi/linux/ethtool.h | 1 + net/ethtool/common.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c index 15f349e5995a..4a1972e94107 100644 --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c @@ -265,6 +265,7 @@ static const struct phy_setting settings[] = { PHY_SETTING( 10, FULL, 10baseT1S_Full ), PHY_SETTING( 10, HALF, 10baseT1S_Half ), PHY_SETTING( 10, HALF, 10baseT1S_P2MP_Half ), + PHY_SETTING( 10, FULL, 10baseT1BRR_Full ), }; #undef PHY_SETTING diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 8733a3117902..76813ca5cb1d 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -1845,6 +1845,7 @@ enum ethtool_link_mode_bit_indices { ETHTOOL_LINK_MODE_10baseT1S_Full_BIT = 99, ETHTOOL_LINK_MODE_10baseT1S_Half_BIT = 100, ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT = 101, + ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT = 102, /* must be last entry */ __ETHTOOL_LINK_MODE_MASK_NBITS diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 6b2a360dcdf0..82ba2ca98d4c 100644 --- a/net/ethtool/common.c +++ b/net/ethtool/common.c @@ -211,6 +211,7 @@ const char link_mode_names[][ETH_GSTRING_LEN] = { __DEFINE_LINK_MODE_NAME(10, T1S, Full), __DEFINE_LINK_MODE_NAME(10, T1S, Half), __DEFINE_LINK_MODE_NAME(10, T1S_P2MP, Half), + __DEFINE_LINK_MODE_NAME(10, T1BRR, Full), }; static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS); @@ -251,6 +252,7 @@ static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS); #define __LINK_MODE_LANES_T1S_P2MP 1 #define __LINK_MODE_LANES_VR8 8 #define __LINK_MODE_LANES_DR8_2 8 +#define __LINK_MODE_LANES_T1BRR 1 #define __DEFINE_LINK_MODE_PARAMS(_speed, _type, _duplex) \ [ETHTOOL_LINK_MODE(_speed, _type, _duplex)] = { \ @@ -374,6 +376,7 @@ const struct link_mode_info link_mode_params[] = { __DEFINE_LINK_MODE_PARAMS(10, T1S, Full), __DEFINE_LINK_MODE_PARAMS(10, T1S, Half), __DEFINE_LINK_MODE_PARAMS(10, T1S_P2MP, Half), + __DEFINE_LINK_MODE_PARAMS(10, T1BRR, Full), }; static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);