From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796070132; b=x80XI6uJGZx5AyXqfcSo8Kx19jl+pBwCbxs8wvKB6o5/ORBPQVLv0yemxxvnTDUS9j1B sGhA0EOBm9DiipCoNF6+tAZDxqJjCtXMgR4XHCnO86VJCDaiIIxQQbsiy3bkQV+PDZfKk yf5HcS9XZ9kVrHyncU18DnyXNQiCu7lI6Y1mj/77fGxLOafrAF7fhTNog/uQW9xr/QopP +iOpWbK08n8Xxne5N5h3uNqoG8HCo2v5WPVyw07nv4mYkYgFRYRsQnGAILuuqxjeJJPzk VU19Qi2HECGrs0YdHHETqAaPpjyefeixO2U8YYo2zprnPzScyn8Wesuh8RwgXrR9EWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796070132; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=PqAO6mYWvUn9MucK7C60LfkreqByUKJ2bCHuOdpcRbE=; b=5BAYuFm8RShPS+8NDIN9Qu5eJmyZqcY5liJGXM8yf4q22PJTJ8IJoWmi8yulDdRI+uzK dY4l4WhKYiSlxPcqpU7uMispSaftws8AkOa0GSOwltSQRKBL05hCcdOHlm0TTFJ4u7uwm 78PgvOYmIl06jCzxf8PNk966FpFN082nsXvhhdq135hJE2aOei2+6+U3EL2bsveyKO0gN Bv27017lXbzV+qGV92www3LqQHDyk6FbFY/q0fcVIlooJ/yyqReOWm04kEOQnDx1bcgrM Z8WX35vEJqwV76GNsmjYPjzy6aFJwc2Dd21hfLz0z56kpX+0Xst2DvtdKyoRRVVoiGQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="MF/sDEjp"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3E9D606A31A; Mon, 30 Nov 2026 20:22:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MF/sDEjp Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE9941F00897; Mon, 30 Nov 2026 20:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796070132; bh=PqAO6mYWvUn9MucK7C60LfkreqByUKJ2bCHuOdpcRbE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=MF/sDEjp+TueE+KwrGp9U2xZwQrFs/mi13OaGp7yTbaAgXF/1kQ8pDaFGhCg0jfAs dBRg4uyoQZnWx+USdEtKp+z7xd2SMVcVHoEWbP1bvLKyj05PQtPYkg/nxp6eeF7FJe xWt+0rdpQOehuTb9uLHanEFdevRX9bwL3IR9GkFCS4U2+Qz3FqoD11itMP4heaIiw0 rSLDYlARWSYFcO5tOlbT5Bq9l0UgWIFPC4w9rmLX8gv8bKgAgCGrUETNQbIuFqVnSw rtEuJqz0J8Yc10kq/7ZoS0JHwqYMl7LSb/42XgNbx2dlUe7O441SHNJmYa/imOg5+K W9Zp6/9fkqQqA== Date: Mon, 30 Nov 2026 21:22:06 +0100 From: Niklas Cassel To: Marek Vasut , Rob Herring , Vincent Guittot , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Cc: linux-pci@vger.kernel.org, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Geert Uytterhoeven , Koichiro Den , 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> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261129154135.277882-1-marek.vasut+renesas@mailbox.org> Hello Marek, 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 > 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. Which clocking modes a controller supports is a property of the SoC, but which mode (Common Clock, SRNS or SRIS) should actually be used is a property of the board, i.e. it depends on how the board provides the reference clock (from the slot, or from an on-board clock generator, and in the latter case, with or without SSC). So I don't think that per-compatible driver data is the right place to decide this. This is even more apparent in endpoint mode, where whether the refclk is sourced from the PCIe slot or from an on-board clock generator is entirely up to the board design. We have discussed this a few times before, see: https://lore.kernel.org/linux-pci/aCQ9ge1eROhh9RVE@ryzen/ https://lore.kernel.org/linux-pci/aMp0hNnBUwTV5cbp@ryzen/ In the first thread, Rob agreed that this information is needed in DT (although he suggested to describe the clock source using the clock binding, with SSC described separately): https://lore.kernel.org/linux-pci/20250519145636.GA2090206-robh@kernel.org/ In the second thread, the S32G driver dropped its vendor specific "nxp,phy-mode" property "until we agreed on a generic binding", and simply uses CRNS for now: https://lore.kernel.org/linux-pci/20251121164920.2008569-1-vincent.guittot@linaro.org/ So rather than adding more per-SoC hardcoding, I would much prefer if we could finally agree on a generic DT property for this. At least Tegra, Qcom, Rockchip and S32G would benefit from such a property as well. Kind regards, Niklas