From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.229.108 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796351173; b=hI0RUw7TvfnO5VNsmwNQ3x82z2LW/dAP/7z+gUszIjJWd95asbE6eocuSb7QkrNOUWub 7TgGzB952Bk1FF2wiORtFIT7LyJxhql190S7F7B64ipjpH+lClFcGqzVB+bkB6hyW0ln9 RNslj2LxOHa3O5R7bxmWcpovAlO799iYHi/p/Oz8tu4Svg+N53q5tqA4PCq4Q5AkDENM8 7wE11jRMSwAThROzSxbHhbPywnRWUrWPh+bV29PSp7q5G1E1HQEICwuzzZZyOtMbDu9lM Gmohu1YYyyE6hHRw6fT1X3h4WGqzV12F0Qx0/C6/MCAqSwCDtYZXhefxoY4N5Fel5ug== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796351173; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=JuPYHqYtiEOEhqPODaGprVP8STSEmDcVTrOULg/wLas=; b=IcaQY75xN/nY5A1T1VozO+8msOoZJRSde2TlgworIzw9YFER9xyUhWnEgMBIiQk9XFd7 0ot7ORyGYOr3V68Bu2Fm9/uAFQ0S1dsmWLg2WfXbESjGmeUON2BzfhrJurlE2W1Fctqn1 p3bOml+3GRr+X1C+XkNtGAhsqGcw30W/F4lURF+WVbQ4zBu5P6FObE8652tRFOJPRV8KE aKc5vya0z3Cwb7YbkHO1pbKzVRKuSVpAF7XWfFgt+nS7tmdsH7K1sYrMi4EXJVA0X+BfF coWR1E/N1lQ9WFfdU2rJR6MIZUU8UQJKdxeGRb7XOZa19yWnxECzWEPEokfFrX7sm0Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass header.d=valinux.co.jp header.i=@valinux.co.jp header.a=rsa-sha256 header.s=selector1 header.b=RsBXJVw0; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.229.108 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11020108.outbound.protection.outlook.com [52.101.229.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A50AA606A322; Fri, 4 Dec 2026 02:26:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A50AA606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=valinux.co.jp header.i=@valinux.co.jp header.a=rsa-sha256 header.s=selector1 header.b=RsBXJVw0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E9zDjlX5Gvr8kAVSUKJGmyGzhwUAHyAk7H0Vq+MOms6DtMIZz7QcvnIBJtPFePR6woVBF8QG+UZwEgSWiVEmuZgp6Antegq6Mia9+e5EMgbnv0Q9SLr4Pc/qtU6z7xDjtKiyC0UNlMRixv0n4F++iPu/kRMEh41MNE5tfgoNkPlppGebumz6JwL7jepep2rlFl71NCQGcd60Yh4Z8mVLjFu1XY5HIoQPYoIi2J/dl7XFrA9vQhe9RoYEBWCxNOIM+FJIX5zlMTkPyDABGp6UrkjLpZxuCVJr2lX07krjTCvKw6sraXhwioHyhQ+miZ5Rk/r1U/EqQkpAg+Ugc63ZkA== 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=JuPYHqYtiEOEhqPODaGprVP8STSEmDcVTrOULg/wLas=; b=VhfWdLuzForLWeHFj4+0SWnwZTkgKGuVeupaY3mmIRPCQQ7b/maCrfykNBKevQE+4pWykMra6UOWElFAY34bN0Jpsww1rBtMTTXf4a3w3glN18dASekLE9YYCY2aMZNJZO4pnP3CYZuHMvWICIUBgaxDYKc6Q7VXONWfFCCriMz+s/w6Avj92dNNM9qQwbsmnBksjmnOyDoWI2pdF1RLogC2AJWYJAUURVj5XBO2siYAIJ5gHhXZNllysGRziR5coM0zWFyP3DwcrSpr9uFo7aS2cywAxjFVkxi2BoC6IlhRynwEklSD6vuyjs7NKhNyI2hBNJlwA9hmzDRHqEmigQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JuPYHqYtiEOEhqPODaGprVP8STSEmDcVTrOULg/wLas=; b=RsBXJVw0w+evlw/jIA0hkR/SMdDVQ5Ua5O8GGJ6H2l0nO018et7sdDu4cDxamdloDg3BMkKrfK1Qpi0+ZjvnlMO7JKIVgpYW3lcMrXaIKoL8M9LYKnDaqaI+GcJK9kvCjAJYnWtoqIb4zD3doyDuiMGtphfWiue4Y+mIGqP5Aho= Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp; Received: from TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:325::11) by TY4P286MB5533.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:282::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.13; Fri, 4 Dec 2026 02:26:05 +0000 Received: from TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM ([fe80::cce5:2aa8:53f9:dba9]) by TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM ([fe80::cce5:2aa8:53f9:dba9%5]) with mapi id 15.21.0688.011; Fri, 4 Dec 2026 02:26:05 +0000 Date: Fri, 4 Dec 2026 11:26:03 +0900 From: Koichiro Den To: Niklas Cassel , Marek Vasut Cc: Rob Herring , linux-pci@vger.kernel.org, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Geert Uytterhoeven , Lorenzo Pieralisi , Magnus Damm , Manivannan Sadhasivam , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() Message-ID: References: <20261129154135.277882-1-marek.vasut+renesas@mailbox.org> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: TYCP301CA0060.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:384::9) To TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:325::11) X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY7P286MB6866:EE_|TY4P286MB5533:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e50b04d-0960-4628-6cf2-08df51adf2b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|10070799003|366016|1800799024|376014|7416014|23010399003|4143699003|5023799004|6133799003|261009223027099003|3023799007|18002099003|22082099003|10067099003|56012099006|261102123227099003|261022115727099003|261021121427099003|261022105027099003|261022075727099003|261026121527099003|261026135527099003|261026140227099003|261028144727099003; X-Microsoft-Antispam-Message-Info: CUkh9RW9/o+22JovZn+831+2tIWcpKfZRtBITiB1jb1riCn11o0usCTmdsODXvhV5Vx9cfi2NCBtInj3JAA4BjYtsMNr0VjZ2j/EigDWrY32WazMor7EXPWVnX7rRTJgJ1G6hcT48Z5EPFEnxAb5+6NV9uhDX142Pldf8se7mdPVsDHAj73/nD8L5zxsFNrV/sNkzLHAVvcO+WjZcb9ReqDlYZwq0eIiqgmTuD+EZgQCwYPOEci2XfEOhzMJ5NHxZh9QnWRY/jx15OoY1VPCWJgnOJLi9TMeWB466n7UXXW3rSwwPPInUNqMY1/ZB8mCeBxr8ljka6Rp0E+IQs89BqRuEpxe0Ghoy6+ZFNMVUJdqo2RzEzjPOXXBZfrQFhczWqeNVfoWMUwXE4D+FQLwQ79w58zMJ/o1POQcK+Rc2NSDiyMsiHB7dKxMftpcvVdTRhNroTp+zn6scNfC6q6S2DxqiquxWtvgPZiQnIo3A+RpUSS+QZryr1iioz49y/kIzIbt8l/6cz38FFguKZs+HA1ugCbOT0PZ8kbdHAZrqA3r9TCRj+Z3kiDOytGn2P4HvY4kRpTlAtkY4Sop565BY85vwMPldnOVcmxzWqfJZZMNx4lMr3OXxUgNfEYajGV4 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(366016)(1800799024)(376014)(7416014)(23010399003)(4143699003)(5023799004)(6133799003)(261009223027099003)(3023799007)(18002099003)(22082099003)(10067099003)(56012099006)(261102123227099003)(261022115727099003)(261021121427099003)(261022105027099003)(261022075727099003)(261026121527099003)(261026135527099003)(261026140227099003)(261028144727099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bkpEQmpjNFlRV0YvV3VOTFlteForQXBMb01ubDZqdHcxcFlCNzc1MmFoVDdX?= =?utf-8?B?ZVpFcDl4TWxLWHFqUGNaSEZnOGFBWThEYmFXNi82KzdGUUZVWUJ2ZVJWYkJQ?= =?utf-8?B?aU41aVJSTXp4MTJQcXFhcjQzWURVWGJwNzZNWkh3b0RiSnkrU1pwZzNJVUJP?= =?utf-8?B?U0RVVUlwbGVCczY4MFdOM1lseUlYd1cwYWJjSWlpK2RWaHhtTXc2d0VuQTNS?= =?utf-8?B?OVFiOHBlUVl3QXdBMVN1dnI3VmFGS3JMYVQ5MzNyaXVuWi83endmRndUZ1Vh?= =?utf-8?B?YWY1YVlFdEhUYjViaEk3cDE5QlVpU0NhTDVhTW1RdzBEZ0w5S3E1RlFweWpF?= =?utf-8?B?RldydDB0RmZTdmFZK2xkLy9KeitLdW1BL3lkTWt6QmtlRUxRc3lOL1drSmM4?= =?utf-8?B?K0QxVkN4UkFOcTV5OFkxNjlab2NQUVJsampTS1l2S3d1R2QwemR2eUVaYTc0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nMnc5OTY4bHZvc1VlQmszcnBocGxPREJzakV6VFJ0V0YzTndT?= =?utf-8?B?V0x6L0s3dmJKOElHbWc5L3JWZnd0a2dsbXg4dWFPUXdxRmFrMGpXQUwvWG1L?= =?utf-8?Q?Sk22IEBb8QxsVIi088OOTdEVNRyxMbH3cqXmc?= X-OriginatorOrg: valinux.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: 6e50b04d-0960-4628-6cf2-08df51adf2b0 X-MS-Exchange-CrossTenant-AuthSource: TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 02:26:05.5994 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: riukucVL99kGcogIYAnBmyuObxNJJeFxBLc0vnk7mhGex0a09U5/xFS2o/aHdDCQnwWyMBmE9hkZA2pqU6oU4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY4P286MB5533 On Thu, Dec 03, 2026 at 05:52:59PM +0100, Niklas Cassel wrote: > Hello Koichiro, > > On Wed, Dec 02, 2026 at 11:54:51PM +0900, Koichiro Den wrote: > > P.S. Just thinking out loud about S4 and Niklas's RFC v2... > > As you might remember, I've got two Spiders connected at a remote site, one as > > RC and the other as EP. Going by the schematic (around R377/R378 marked "Do not > > stuff"), I'd expect each board to use its own REFCLK in the stock configuration. > > The link still comes up with the S4 driver effectively following the "Common > > REFCLK" branch in Figure 104.5 of the S4 UM. The same figure shows a single > > "Separate REFCLK" branch for both SRNS and SRIS. The host can supply REFCLK at > > the OcuLink connector (pls see c588e1c9846b for the GPIO control). Since a > > different endpoint may use that clock, I'd imagine we'd leave refclk-mode > > unspecified in the stock Spider host DTS with the binding as proposed in v2. > > Well, it depends. > > The normal case, e.g. for a PC, is that the the RC is running in common > clock mode, with spread. For an add-in card that sources the clock from > the slot, that is fine as the PC's spread would hit both ends the same > way and be harmless. (Sometimes you can disable the clock spread in BIOS.) > > The problem comes when the endpoint uses its own clock. > (E.g. RK3588 in EP mode cannot source the clock from the slot.) > > > For RK3588 specifically (with the help of LLM parsing the TRM): > > What rxX_cmn_refclk_mode = 1 does on the RK3588 PCIe3 PHY. The TRM says > that in this mode the elastic buffer runs in its "lowest latency mode", > and that "SKP symbol manipulation is disabled". The reason given is that > with a common refclk the local and recovered clocks have the same frequency, > so nothing needs compensating. The reset value is 1, so the PHY assumes a > common clock by default. > > What goes wrong if the clocks are actually separate. Two independent 100 MHz > oscillators may differ by up to 600 ppm, ±300 ppm each. Even at 100 ppm, the > buffer gains or loses a symbol roughly every 10,000 symbols, which at 8 GT/s > is about every 10 µs. With SKP manipulation disabled, nothing corrects that, > so the buffer quickly overflows or underflows. The result is corrupted data, > errors and link recovery, or a link that doesn't work at all. > > > With an ordinary M.2 SSD, the SSD uses the refclk the RC board drives onto > the slot. That's a common clock, so the default mode is correct, and gives > the lowest latency. > > With the second ROCK 5B as the endpoint, that board uses its own oscillator, > but the RC board can't see this. Its PHY stays in common mode with SKP > manipulation off, while the two oscillators drift apart, and the link breaks. > > rk3588-rock-5b-pcie-srns.dtso sets rockchip,rx-common-refclk-mode = <0 0 0 0>, > which turns SKP manipulation back on. The RC receiver can then absorb the > offset using the SKPs the endpoint sends. > > > > I don't know if the PHY on the S4 also disables SKP manipulation when running > in common clock mode. If it does not, then it is fully possible that you can > run the RC in the default (common clock) mode, and only modify the EP to run > in SRNS or SRIS mode. (Because the normal SKP Ordered Set rate already covers > +/- 300 ppm per side.) Hi Niklas, > > Do you see any correctable errors on that Link? No. With my AER patches [1] on the RC, I've checked that an injected LCRC error shows up as a correctable error in dmesg. I haven't seen any under normal load on the two Spiders. So the link looks _okayish_ with the default clock settings here, but ... > > > > If you have a S4 RC connected to S4 EP, then selecting SRIS or SRNS even on the > RC side is clearly more correct (assuming that S4 EP cannot run in common clock > mode), even if it happens to work when you configure your S4 RC in common clock. > Because, it really is a property of the link. ... I do agree that in such a setup it's more correct to describe the link as SRNS or SRIS at both ends. IMO there's no great rush on the S4 side. Once the binding is in, we can put together a follow-up and try it out on real hardware to check for regressions. > > E.g. to run in SRNS mode, clock spread must be disabled on both sides > (otherwise the link will not be stable). > If either side spreads, then the link is SRIS, and e.g. for RK3588 you need to > enable SRIS using a specific register write (regardless of RC / EP mode). > > This is the proper link DT configuration when using two ROCK 5Bs (or two S4): > > ┌────────────┬──────────┬──────┬───────────────────────────────────────┬─────────────────────────────────────┐ > │ Host clock │ EP clock │ Link │ Host DT │ EP DT │ > ├────────────┼──────────┼──────┼───────────────────────────────────────┼─────────────────────────────────────┤ > │ no SSC │ no SSC │ SRNS │ refclk-mode = "srns" │ refclk-mode = "srns" │ > ├────────────┼──────────┼──────┼───────────────────────────────────────┼─────────────────────────────────────┤ > │ SSC │ no SSC │ SRIS │ "sris" , plus the host's SSC setting │ "sris" │ > ├────────────┼──────────┼──────┼───────────────────────────────────────┼─────────────────────────────────────┤ > │ no SSC │ SSC │ SRIS │ "sris" │ "sris" , plus the EP's SSC setting │ > ├────────────┼──────────┼──────┼───────────────────────────────────────┼─────────────────────────────────────┤ > │ SSC │ SSC │ SRIS │ "sris" , plus the host's SSC setting │ "sris" , plus the EP's SSC setting │ > └────────────┴──────────┴──────┴───────────────────────────────────────┴─────────────────────────────────────┘ > For S4, Figure 104.5 in S4 UM puts SRNS and SRIS in the same "Separate REFCLK" branch. So I'd expect the S4 driver to use the same controller settings for "srns" and "sris" at that step. That's where it seems to me to differ from RK3588. (Marek, I'm sure you know much better than I do. If I've missed a knob in the controller or its PHY for selecting between SRIS and SRNS, please let me know.) [1] https://lore.kernel.org/r/20261127031145.2521228-1-den@valinux.co.jp/ Best regards, Koichiro Den > > "SSC setting" means DT property 'assigned-clock-sscs' on whichever clock > does the spreading. > > With a common refclk (e.g. the endpoint uses the refclk the host supplies > on the slot), it doesn't matter whether that clock spreads. > > Not sure if I should somehow add the above table in the RFC, > or try to document it more clearly in the DT binding. > It is already mentioned with words, but sometimes an table is easier > to understand. > > > Kind regards, > Niklas