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.228.74 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796273853; b=eWy6/ipoIrJqE/t0qlwPjIIKNNR+aLISWHj2yZ9rSWeAGvvs1FLnCGAt8HtNMzCSox7I b0QcgOVOam1fHG9JbS/wDVCj9b6Ie4KNmdde40YjSGAPqn6uST3oDo9JJkplvRBZeL61q 3AyG8OFHQ4iJTaVJhSZV46cpnkPIjuzpRUvjUBOunVvne+qSUjL9PDHFfiMg4A1C5sGFw wajtBa6vAHgkmoNJFLjirPoe66heRI7yxknIOA15ZJ9kg5W5eqU/hTzzGt3xkRDDUA+tm V/CiROZOx2s0/h1UbI1lEUet6v/patv0oQn/m2bB+8jl2hT+QGhNitlfEhgeIeax6kA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796273853; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:Content-Type:Content-Disposition: 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=1sKPorKRBBSiz3bJo4s+Tdo3jMFMG9rFG7se+YKglng=; b=zALFFN7YoZ+6CdT1W1WP/11V2t8QlKGnXHOE3Ndp3+JXGBpiS4qO3ttPjsrz8sfhjEgX njLNdcbMfEokY4PK977HCcu+lDFixMuPEkzzjFul9PFt/9RdCgtpXbDicDZVobgGGBJwy RqLcyzmaPVzTKUMNoP89LsVmHXJDinrMxgppHrm9qxTqqVDHsrPCPsjkXKvjSBhefCv60 MKiNML8U31kpJrBmHV0dw/dwWnVdfc2VajLd/7wN4sJZfJLvT8yU+gg0Z17hEGEowIoaH r5QmoRO6fsG217nLTrBKqcKE6kQiJRMDwrGokYKCKsQ0naLKWGanedrANa4e5y6ILwQ== 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=tps1mYL3; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.228.74 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11020074.outbound.protection.outlook.com [52.101.228.74]) (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 7B98D606A322; Thu, 3 Dec 2026 04:57:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B98D606A322 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=tps1mYL3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mf6jwMdyl2Q7mS5Y3b/pQr8XZqnUo/aSdB20uUJr6U/4+eBHpOevrpVGvbvuONkEQTPVT6/XVpYQ55L2hEh5BB//i5xbSf6XMoekL2ulyXI5fVgW+iiqbxmRYYbFlF2n+WAm7ZaIaqTMdo80ectI1A85moE+nYOa4eh35Jz9o88lObU5J9ZztojsuH/KfCbtp6N7dTX+eO+f06EbtXGXoJtSRxtc/gXQLcs3bTphA6ANhJKyK8aaVgoPKX7apMn03/5nva1jOPsNL8gepkgbCZuEd/HTsfB3uADdxJiO/28QZuZsJJ+jjvnt+uMbrGjML4GFG2E08fV6PGD8fkR5Xw== 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=1sKPorKRBBSiz3bJo4s+Tdo3jMFMG9rFG7se+YKglng=; b=dXG4mYtmAYaGa8UCBIio7ge9jISTeQnYC/XU6eqDTsuvADqSMXgRgwDXOUhGQM0Wpv8ZmVga/cjH8vGh85Qm3guK+ctRhBGIl1El5HjYUmDwZL/sIFVYIX+i9ar+nnUaRlgtNUgX5QmWCrRdPiUw/xR3qdqSPr2bLqSd8M3tHfM2ltGJv7SkhwPo1gLmTRxaj+WsW+NNQRS9BQG/jUDnWpUH5spVxGoyZPFnB4/VpTYnvJ1eAQi6CWVVZNgdyiNrl/BEtwwQDNnMhGXouOkGK5CQTB/Y9VeECvtUCE+ikApXWRD9LyJbmB+HVyoy/5ssVQJiNmbHuEnnuer/iWWzzA== 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=1sKPorKRBBSiz3bJo4s+Tdo3jMFMG9rFG7se+YKglng=; b=tps1mYL3lQIQF5S/v7MX3w9H2Bew4N74O1mpqZy+kgBDAnsawfbB7rS+hkD2aSmHzgzxsdS3KLjmed1Fqy9INe1n9EuBq1sLqBqYvFQGklF2DrJ67jTD539nAONSR+GTLfpfl8n2t2ENu0YUE8Yit3N9jpumYrGr6NV9vxiD2fs= 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 OSZP286MB2428.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:159::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Thu, 3 Dec 2026 04:57:29 +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.010; Thu, 3 Dec 2026 04:57:28 +0000 Date: Thu, 3 Dec 2026 13:57:27 +0900 From: Koichiro Den To: Marek Vasut Cc: linux-pci@vger.kernel.org, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Geert Uytterhoeven , Lorenzo Pieralisi , Magnus Damm , Manivannan Sadhasivam , Rob Herring , 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> <50c4e389-1664-4fc1-9034-f59b8351aa64@mailbox.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50c4e389-1664-4fc1-9034-f59b8351aa64@mailbox.org> X-ClientProxiedBy: TYCP286CA0014.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:26c::8) 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_|OSZP286MB2428:EE_ X-MS-Office365-Filtering-Correlation-Id: a395c1e6-e1db-494d-14d2-08df50f9ee5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|366016|1800799024|10070799003|376014|7416014|10067099003|56012099006|261026140227099003|261022075727099003|261028144727099003|261022115727099003|261022105027099003|261021123027099003|261021121427099003|261026121527099003|261102123227099003|261009223027099003|22082099003|18002099003|4143699003|5023799004|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: 4XOuCdB0NHTZmo2DvQJTzYaJvSYar2FO+Z8+Odf9qV3+t9+ItTjTlcKcVyvNEB4Uks/tB4moCr7iyCX0RUPtOwDUpBDi2zUy99yPqALx1JbIkjvcpd3zo4FopW4ai9vP+lpUwsk56Tet2hjr7suy8FAZOW0OPUjHfHqWwYriNrpVALEmYoQ1hm+L4LkJy/aRX3cV/xyAtY24YTo/EB9meSYfjjY9NnHfv59uCxcK2VfUXFtxmfBhLkaauCXMUu7bwkQ5lyxZIJULYx6Mkyusx9aHMUu+a3lDofMAJQHHRBcbB5Nx5pZIX1DJt2kEjBzbpUbiSigygpLHtxGcKjM0JelO7z2W+AgZJHa1F02oKa+5O3hUAgdkH0fJtP+JImwS5XEvWsy9ljiWSxVZru40SxYICiqXMDBNVZC1MCbvBige1+xqoDK6HbEQehmOIqQ/Rz3crLbq5jsXeaOBOn1SIPjXYm57rgxbXv5BOIXXXfo4eDK4ndeVxhe3thAHG9aNU/A+jI3NdFUI1LYeO+GcqiqH8AGg/e3/ra9ISh+ZbVHoriZWxLFmENm4dHSs7zNGm8/fMqQZv689l/Gi3lfu6h5M9DpoRyiBWxt0goDGONtetamjHLHIPmiLt23VuV6Qg6HfI59MmxamlaOHVW29MuEy7xEyn+K66swj0FKBf+Y= 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)(23010399003)(366016)(1800799024)(10070799003)(376014)(7416014)(10067099003)(56012099006)(261026140227099003)(261022075727099003)(261028144727099003)(261022115727099003)(261022105027099003)(261021123027099003)(261021121427099003)(261026121527099003)(261102123227099003)(261009223027099003)(22082099003)(18002099003)(4143699003)(5023799004)(6133799003)(3023799007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2CkNDyldB4/9afYOxgRGqywVNxXyz9dN8bzlvSDiwCp10OYhTH+L2qg74R9y?= =?us-ascii?Q?k9IZjmEZPUAf9cqvjGbEJHAtERPgLrlC5e7gVs27ZSLv5itcZIUlzdzTKKCV?= =?us-ascii?Q?X6s3QZypU1SKYg9yBZ9X7FB4BdQBwrX5grrCv3rM6OTk0AXqpAkWInYC6mR2?= =?us-ascii?Q?vGmPP8fqXmEJVlWeEiNLALR/k3AZ2WVDlR9gehdfJikyMy+hJXYtS05FLDK/?= =?us-ascii?Q?bQn3bdUXPsoZv/rz+X/dwyng+vZbOVwjwGGgzmSEhVEKiM/XVKHpn6O6QO41?= =?us-ascii?Q?7k0trZsiiPhJyruyGXGPSZ8fs1HkPwDOx5RJTiAlIoTqLNleGu5GrWGDguLi?= =?us-ascii?Q?4RMcFcU6GiPPvG1zrJ+5p2VtsFG/urqtdZESMI2K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bCZ+NUuRLNUK+dEL7O1wBiAMD+3GWdq/SY8goiDwyU36GVSeB?= =?us-ascii?Q?iIy0kqOGEcxmvf/6VUSfYuQQkrDW/dL6cHNxo4bTFvKBjpV7b/nGiW9nI3IV?= =?us-ascii?Q?IJ+esYwbIH7jHOXQxHnOr8iIfK9sF7+32NBpmcVM5jl6rESpIoXrwAHdQhYl?= =?us-ascii?Q?RCDOY2WWkciJyvg37e3+qbDlCFd6ucotz7iXZNannZXnyjge9M9GkkIv/LIE?= =?us-ascii?Q?DdWAHirQJwifXtYbShwkrT4qoiAV3grWqv3ynqb6rmP2PoGpNNquzDxCTTO+?= =?us-ascii?Q?D72CdYh7w3jKq6Kj5/lVydEnzGxTUT3LrGmWQMX2CBaBWmcFWrv3rDSc32wv?= =?us-ascii?Q?4CVtsKYTS72/V8lDTw5HywtPsSG0q6vSrjjUsSWZdqsnZr7w1gUwP96pphS+?= =?us-ascii?Q?aFk98xJGcUv3MMnFsCiissQWESA9HxsYMZE+lUJ+cfpGwV3BHj5EJUgv1OqT?= =?us-ascii?Q?wJEjKkTVSb+nY/hNj8cpAWRxp9pDfU2RpNq+4bocuAsSj2U+16hF?= X-OriginatorOrg: valinux.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: a395c1e6-e1db-494d-14d2-08df50f9ee5e X-MS-Exchange-CrossTenant-AuthSource: TY7P286MB6866.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2026 04:57:28.8129 (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: BSMVEb0bLrH+XO2VmOdrYet/d7OaLMqg2JAV2I2zZ0KzuwaIfCpd+evDm0VqHhABHEljrCVa9HV0EXn3YAhcYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZP286MB2428 On Wed, Dec 02, 2026 at 09:12:41PM +0100, Marek Vasut wrote: > On 12/2/26 3:54 PM, Koichiro Den wrote: > > On Wed, Dec 02, 2026 at 04:10:57AM +0100, Marek Vasut wrote: > > > On 11/30/26 9:34 AM, Koichiro Den wrote: > > > > Hi Marek, thanks for informing me via cc. > > > > > > Hello Den-san, gladly, thank you for your good feedback. > > > > > > > On Sun, Nov 29, 2026 at 04:40:52PM +0100, Marek Vasut wrote: > > > > > Except for R-Car S4 variant of this controller, all other variants of > > > > > this PCIe controller set PCIEMSR0 APP_SRIS_MODE bit as part of their > > > > > .link_up callback. Simplify this, introduce .sris_mode flag in driver > > > > ^^^^^^^^ > > > > nit: is this a typo for .ltssm_control? > > > > > > This should have been .start_link , which yes, invokes ->ltssm_control . > > > > > > > > data and set it for all but R-Car S4 controller, and then set PCIEMSR0 > > > > > APP_SRIS_MODE bit based on this flag in rcar_gen4_pcie_common_init() > > > > > already. Removes one read-modify-write round. No functional change. > > > > > > > > For R-Car Gen5 PCIe4, is this really no functional change? If not, would it be > > > > better to split the Gen5 change into a separate patch? > > > Looking at the input from Niklas, I think this entire patch will be > > > superseded by something even better. > > > > Since I believe this was meant as a clean-up, I agree we can wait for the > > generic binding to settle. Thanks! > > Likewise, thank you for keeping an eye on these patches! > > > 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. > > I was always wondering whether you modified those S4 Spiders somehow, or > whether you simply connected them with an Oculink cable. Just the cable in my case. The two Spiders connected directly with a LINKUP OCuLink cable. I was told this cable had already been tested with two Spiders. (I suspect it's an Internal crossover cable, but I haven't checked the plug-to-plug wiring myself.) The boards weren't supplied as EP-only boards, and I'm not aware of any rework around CN16 (including R377/R378). Per the schematic, OUT4 of U36 (the clock generator) feeds the local PCIe0 PHY and OUT5 goes to CN16 on both boards. So I'd expect the endpoint Spider to use its own REFCLK even when the host supplies one at CN16. The link comes up fine in this setup. > I have multiple > M.2-to-Oculink adapters here now, but I never got around to figuring out > what to do about the clock lane, especially on the EP end. I was thinking of separate clocks for a two-board setup, but were you thinking of having the endpoint take REFCLK from the host through the adapter? I've had a quick glance at the White/Sparrow Hawk schematics, and the Sparrow Hawk one appears to spell out which 0-ohm links to change for what. I'm sure I'm not telling you anything new here. Also, I don't have either Hawk to try it. > > > 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. > > For Spider, I agree. Also, I think we might need to model the oculink > connector in DT, with its clock (control) property to enable/disable the > PCIe clock on the connector ? I'm not sure what that would look like on Spider. Do you have a particular use case in mind for controlling the clock at CN16? E.g. leaving it off at boot in a fixed setup where we know the peer EP uses its own REFCLK? I'd appreciate it if you could elaborate a bit, maybe with a rough DTS snippet. Thanks for taking your time to discuss with me. Best regards, Koichiro Den > > [...] > > -- > Best regards, > Marek Vasut