From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2052.outbound.protection.outlook.com [40.107.93.52]) (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 E97BA3CF58; Fri, 15 Nov 2024 02:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.52 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731636016; cv=fail; b=nTIzmzpn/RgLCec2E3QUAGuuQH1YX1bPp9p3bxfUOinQ1C28uSb+ofYYRtVrZHs4Ty6QMF85U6D/cCJYr6UR318q0nuJdyyN6mvMqIlYJ+hJOIddktOmN7KT4wSJCwtDsiqe7lfiU8N+0Py8SBUMTK0HJ6eJlxHaqv3Jq7V112s= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731636016; c=relaxed/simple; bh=qcAShuVOMD7oWfVk3mMSSakMXQRwfA50hMlKuG4f6N4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=KjEGuG3oyswsL+JaQ2liOnQEar88GZU8F3EFgerlVmH6ddOIvYs3sMyysguc3kvu3l3ile0kPnOjh8k1WWYW89J8IRsfhFNHLuDvxlmfGZN3gGnbWryllCF3vFXpyFbu9glRJN05HCIOM0oWXEcLkLIW+rab7z2NPB9BAuexBeg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=JQJvYJqj; arc=fail smtp.client-ip=40.107.93.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="JQJvYJqj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WkSJP85x82DQCjko8SCCxxsmdWCzkf5blN5ot1BWIg0k0tKJw6ZWwPn0lieJ3n497YQ77SjzQK8mpaqltLiPNDMO74FnMrxW6P7nuPkPSIDCgA/raGFxs+i5yxSmpASzD00jUvXTnhI6ezhtaAD7iJfmCUa6wfEttYVGdtpR9mcsL+LP8HftWLMUtlbBVku3cVs+TxWRJU9dITtGdTcYt30EISXgv4ElExLDRTFfRG31wuhXI3SFbE0d+9mNgjg7ZGp0z2b1ceJmn02PFW10NRpbAxorPbGztkNeFjl5t5vToSrfmaipr9nLn4NjZOn7A+3FR67D2IaylvfxY84w+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=i8d8gvk0sa1cq72RlXmYo0hfB46UD85Ijk9jNvgFFd8=; b=cNbzDUIxCjfXna4wGe0GssJKkzzK0WSdVBl9ulY8Et6uzXHHcVS7X9K8i0yLFdmaWOhu+pESysAPthX/svfyE8nJma6VqWJ/k9TVUBAk+bmpEo4FlMcaQJ9Sco6gLhmh7Jl1trqWyIVjr4+ahqdVguMrYpvD/NCyCw6gKPyr38sk5CmKbnHmdTuVUoGlop7vhuzivSzWuX9ETk/LKeXRUBJILjgTbchl1nq6DqR1VSJolR2KOTx7qtxuqYDgkZ9vkEjO6yonVeDhjDuWWofYkuEprEKLtdt2nXqHLXg+16bvzIfwR+rv0MkzXdgDon7SK+mu9ztsQVb7M0tfBBuxvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchip.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i8d8gvk0sa1cq72RlXmYo0hfB46UD85Ijk9jNvgFFd8=; b=JQJvYJqjLfXmJDwdAvBhIR+BjWJTVcE8hr8+xcO5guTXkQEl0R8LvQjriwJB7Sbj3NrwCke4Kau8BjVx0XCus3MZK4NZDb7+kK/tl42FqAfFdCB16lUtErDMfj0+zGphm+k8QZsajhONGfBlb73CJ7+4mz2hf6HxBu8xNOx1PVTmZpJkulcvvm9cnZtH2KLt7Dc1kEHs1PQD4ETFNk+wli/CxqrtNtVQBg06mcgoegbayaeC1xgEHTcRZCau1ShRMqS0bVohpYujjOLpXfHGWcCY5SHmGbB2WkdgAT0Ibx/QNI8wO7kAlqldT40xnmWZvOlNxy935Qq4Tx121zpBMg== Received: from DM3PR11MB8736.namprd11.prod.outlook.com (2603:10b6:0:47::9) by SA2PR11MB4954.namprd11.prod.outlook.com (2603:10b6:806:11b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.18; Fri, 15 Nov 2024 02:00:12 +0000 Received: from DM3PR11MB8736.namprd11.prod.outlook.com ([fe80::b929:8bd0:1449:67f0]) by DM3PR11MB8736.namprd11.prod.outlook.com ([fe80::b929:8bd0:1449:67f0%6]) with mapi id 15.20.8158.017; Fri, 15 Nov 2024 02:00:11 +0000 From: To: CC: , , , , , , , , , , , , , Subject: RE: [PATCH net-next 2/2] net: dsa: microchip: Add SGMII port support to KSZ9477 switch Thread-Topic: [PATCH net-next 2/2] net: dsa: microchip: Add SGMII port support to KSZ9477 switch Thread-Index: AQHbMkqiYUyxAMrEtEGHh8l2mClPuLKvD0EAgAPmaUCAALlcAIAAy2zQgAGOUACAAZUvQA== Date: Fri, 15 Nov 2024 02:00:11 +0000 Message-ID: References: <20241109015633.82638-1-Tristram.Ha@microchip.com> <20241109015633.82638-3-Tristram.Ha@microchip.com> <784a33e2-c877-4d0e-b3a5-7fe1a04c9217@lunn.ch> <700c326c-d154-4d21-b9d4-d8abf8f2bf33@lunn.ch> <1fcb11da-e660-497b-a098-c00f94c737f5@lunn.ch> In-Reply-To: <1fcb11da-e660-497b-a098-c00f94c737f5@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM3PR11MB8736:EE_|SA2PR11MB4954:EE_ x-ms-office365-filtering-correlation-id: e3a908b9-8e60-4b9b-e461-08dd05193d6b x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM3PR11MB8736.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(366016)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?GyAod/mxFQ577Y+qHTZGjlB32I2fvUIbOvnO8JTTrrZwF9xssvp50s6gMvuj?= =?us-ascii?Q?JCngg2zbjrcewvxD558MS85oNs+K3ZIhHwt5Yx5cPWIPsd8MVQwRaBn3/TwQ?= =?us-ascii?Q?W3XUzH6P9Ygw/caDOCIKRGChWp+RxqAqTqeJnl/axEkkbrV1v2rpa0S4IU6J?= =?us-ascii?Q?wrP6/Tub8deiIenord9nH+b3y93IgrQMLn60IzsUPCeYXaM20ztT3TzUmd7e?= =?us-ascii?Q?1PUUkGDHqQ/PXow61fIQrVHs/8IjUAeTqTy7tGxgQDhtEVhOOVpfTvpT1lJe?= =?us-asc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EN80n4T1A6vGwYxdQMRacXI6mYI?= =?us-ascii?Q?Ukgg5e+EZJg0nwptfLQitKA8yTg/cj5f63OZLfgQhF3RPydacJtQGvmHum2V?= =?us-ascii?Q?vu1KEaB/O0pFPLo4SxXcmdmD+mxsCgutchiAv97W?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: microchip.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM3PR11MB8736.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3a908b9-8e60-4b9b-e461-08dd05193d6b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2024 02:00:11.9090 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6bfZhPHLmWW00h+zlPhlybWRD8v+ko1K4n7Rm4GS3Q7bjszWUq7jX1ynE54VJfVwvJOFB+GQW1igGkN7+Bvft5A2JxIthxDjF/hWR3DgouM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4954 > > When the SFP EEPROM says it does not support 1000Base-T then the SFP bu= s > > code does not consider the SFP has a PHY and skips creating a MDIO bus > > for it and phylink_sfp_config_optical() is called to create the phylink= . >=20 > There are many SFPs out there with broken EEPROM contents. Do the SFPs > you have say they are not 1000Base-T but actually are? If so, they are > broken, and need a quirk adding. >=20 > Russell King keeps a database of SFP EEPROM contents. Send him the > output of `ethtool -m eth42 raw on hex on` >=20 > > Now back to the discussion of the different modes used by the SGMII > > module. I think a better term like SerDes can be used to help > > understanding the operation, although I still cannot narrow down the > > precise definitions from looking at the internet. SGMII mode is > > said to support 10/100/1000Mbit. This is the default setting, so > > plugging such SFP allows the port to communicate without any register > > programming. The other mode is SerDes, which is fixed at 1000Mbit. Th= is > > is typically used by SFP using fiber optics. This requires changing a > > register to make the port works. It seems those 1000Base-T SFPs all ru= n > > in SerDes mode, at least from all SFPs I tried. >=20 > There is a comment in the code: >=20 > /* Probe a SFP for a PHY device if the module supports copper - the PHY > * normally sits at I2C bus address 0x56, and may either be a clause 22 > * or clause 45 PHY. > * > * Clause 22 copper SFP modules normally operate in Cisco SGMII mode with > * negotiation enabled, but some may be in 1000base-X - which is for the > * PHY driver to determine. >=20 > So the default is SGMII for copper SFPs, but there are a few oddballs > using 1000BaseX. The Marvell PHY driver should figure this out, and > the phylink will tell you want mode to use. Adding Marvell PHY driver fixes the main issue I raised. But the PHY support still shows only SGMII interface inside the PHY driver, and the ethtool module-info command shows 1000BASE-T. The only good brand-name SFPs I have are all 10/100/1000 type. I am going to get other brands to see if they get better or always use SerDes mode. That leaves the one situation where the SGMII port is connected directly to a MAC or each other. A customer once tried to do that and the SGMII register write was changed to support that, but I do not know if that project became a real product. Microchip does have a board connecting the SGMII ports of two chips together, but that does not run Linux, and there is no special configuration to make the ports work. As there is no SFP or PHY to tell phylink which interface to use I think the only solution is to declare fixed-link or some other phy modes in the device tree? I currently use fixed-link to handle this situation. There is another new issue though. The SGMII port in another chip can use 2.5G. The driver uses fixed PHY to get the MAC running. But the fixed PHY driver can only support speed up to 1000. There is no issue to adding higher speeds to that driver, but I think that is not advised?