From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=80.241.56.161 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796245775; b=Qob2ESa/GA3aznyNm+xi/mQ9QKL2zFLnXjhI7bjQNxr1lsz2Ok1NbODVXwnaGu4nuuTF myChf23txyYbUrhXpkj4l1tSBX7kXNNopylWTCwYPTpDptPGs7yAnoLuqtEM4QiVeOF3X +9R6hPGNW6uvK2fmzobWLkmNc682b9VvmNsDhSTDZZllkhytr1aMBQIohUcXO+1xYPmJZ tSD/dz7rHRa2QdmPdFpFsAtNHxGRr0fsCfPsM0uffo3qBSdvxEl6cPUJJtVj3268XCg/N pLZQ/Pjwdyj7zwIxOqZNwkCs6NIndl1pNdpw20b44/oZ3Vv/dKFmp7MGsZjskLz4Y+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796245775; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-MBO-RS-ID:X-MBO-RS-META; bh=2Gh/cLbLF6z7fOTUImloj1AvJL992tuOGE9TJwgZ/UQ=; b=1vRocsUqzwjJRQ9IPcz45fHTSK5toW8fn8j3f19VSaqbOfrL2t36morAqTHWpnlDikS4 em87Scnvukg5D64Vp+KXtiTwCTaC268rsp7uWs7UeUs8vHi649SOij3paUTGGOWzw+5TE A5Vm0SYxJleiRh+PnwNp65i3WR5rjZR8JPkbwdRwDPh2W8+rJ0mBEQVX5SRlhMCo8HOLh +OEGD4LJkgVgwtwS+9ZbRUcf1wwPsMjtH025GZv2FFw2aDQOgJbLIACIufmbB6XjaxtUf UDDLbLOW/0q8SlUTotiX4Nv5k9s0EOB8ikXiTj7mbMSQW2JeHUKVxMwcjFFRfXBYfoA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=ovTrkQoO; arc=none smtp.remote-ip=80.241.56.161 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0D3D606A32C; Wed, 2 Dec 2026 21:09:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F0D3D606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=ovTrkQoO Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4jfr3v3ct8zKmMt; Wed, 02 Dec 2026 22:09:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1796245771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Gh/cLbLF6z7fOTUImloj1AvJL992tuOGE9TJwgZ/UQ=; b=ovTrkQoOe/+1G4sZ2eCqB4b6b2r+iVrTctAqyI17uGSJcuH/VkeSdVxOKJo080lZG0XB6C 4OiOf0xzjN7NJMWE9Y5GM0nyCckr5DKLSkR5REvIHrPPEL0d8iDSPZx78uD4O4TcnZQX3E tU/3nKqQMcG+PKtgl88FZCopd8mqnSjwT2XZhbA4TV5PE3SIlP80fQaR4CtQc51d1Ndcr+ kjR0/vrrUnVcaIVDlgEiYBnH647j5yRWqJnMlUD8nnoPDbOxM+6OHuMyzDKkcjalBO0vO7 O3xsoNAnfYSRJ98Sx9/bM/b42xQrNp0pyOz4t/PbLmpYGR/3+BckidxuCaYAzw== Message-ID: Date: Wed, 2 Dec 2026 21:15:34 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] PCI: rcar-gen4: Set SRIS mode in rcar_gen4_pcie_common_init() To: Niklas Cassel , Rob Herring , Vincent Guittot , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Cc: linux-pci@vger.kernel.org, =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Geert Uytterhoeven , Koichiro Den , Lorenzo Pieralisi , Magnus Damm , Manivannan Sadhasivam , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org References: <20261129154135.277882-1-marek.vasut+renesas@mailbox.org> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: 8f2d362911f831124ee X-MBO-RS-META: i4snmka1ja56tgdb9rdszjrc1txfo5tf On 11/30/26 9:22 PM, Niklas Cassel wrote: Hello Niklas, > 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. I agree with 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. I agree with this as well. I think "[RFC PATCH v2 0/3] PCI: Describe the reference clock architecture of a Link" is the proposal ? (I need to catch up on all the threads yet) -- Best regards, Marek Vasut