From nobody Tue Nov 24 11:35:55 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459426; b=EEtQLwpK0H7tpcp+BMLPNw1o8tYftJVfeAi9VhnavoGvPiIvPGS4saiNPG8gAyjor9cV R8/67A98rJcNRmw8F+/TQ9fY6HhosWjT6r5iR4ajQbfs3JsQMsFdTDEZpaKzuIflBDdh+ 76Hw1GSFDoLoZxZeT1y+acFnSMD/Jry9D+CvyT62ZwqFdS5zg1vtFd2/FqiBQtkLxC2fF MPVDNYntjmoUwatZh84TAkSwEZP6NZOodvvU6uGMYfIHQ7oBCUqHlc+FfCO8DZSD911/p B0xIQKw+fywGXzxHwn58f5MiUoaBcJPWKbD0Qmk8DUKRI+TqG08B++PJl437cVFU9Aw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459426; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=9tyMkUr9+zYWv3mAdl+/oTYNIcjMUy1JAChBbK6vIio=; b=y2aDUMRSuu0Gp0yg+5qE7lvgTcuZ09rO0r02hKN7Z9LnoXgF/oMS7h696vZa0mkb8uj0 XiJFGYZw7r1HNPetikcMM2x4awt/SHrGwsMRlGUWzVRZaoVpeSK8L/fQFtna90/QEXnMi 6fITldozHh46KPrtliEWQN25jzDFCcnr0Va67bziSCQuon31Q+NoqzEzjq+aRBilMrY+B xaSl/X6MAp9EYv/CkA3uXY98oODBwIsxRk2Rm4B55hMUuoDT8eGHvmIvhbmZoPBcQhBeH yN8MZafYxHdhaTh6zHvY3pfLnxOTKx1lZ5K6C1a6IQoAjBTDXr+T2dxJEr2A8rkpK/Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZaICRG+P; arc=pass header.oldest-pass=0 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 4A93D606A334; Mon, 23 Nov 2026 18:43:46 +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=ZaICRG+P Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459425; b=rS8/BpRu8JViWn+uNqzMThet9tLlOrGwVslpiPi3R7aqJmTiCv8nnIRmz+z80SVxEOSK usET9LKy8Ap9o4w6C5KoIvjRCU1ztJBKfBKF5NIO7We4tQ6dSh3ZzU9qwA1mkLL9cdSx5 L9sJV/nwKXi2FijXyZyFZlTAdjhihUyYug4NBtN7+psz3dTo+U6E8cWNAandl00eb/K91 81KH1yim8xOedZDzsrAZYb5RLcjM0vS/ZOjR85lYgJRQASffLXBHvFb0pgRS+idC8EE7X kbrMvUmfUZfXlellOf5aJlLMdUw7NkE9Q+eV//aLqa2QGmZyPuw61OY0DnB6g5wDMoA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459425; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=9tyMkUr9+zYWv3mAdl+/oTYNIcjMUy1JAChBbK6vIio=; b=oi8DjRiejntaobIbm6ARr0zB0EKoDT22uDDLVvonQP/+ov/UUSHAz6/fsqevH47P6KlN Ail1aiNPQdjKLbTIhsi8gkefow5oElpW+kwI2kUPRXNCD+05wTQ2DcRnZtk3OS0egMr9Y bn5Bm2y+tstKrlY+q16EBC3m9rbXnheHLnK+Ude0axrrYTdTIowXW3krAIaJmXWzcSpMl 4kdSuS6bhMKsYm/Hsk+75iNhFUUz+Xnv6IRf1IlFP0E1NFC4VNg3vRKJamwaXKGFIO1Xa pHxj6hZ12thBx3nEeSdRiLA+S0vE2sKbiYTq9ci4NwSk5XCfP/EH0AbPEFm9vynnm0w== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 5A1261F000CA; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459425; bh=9tyMkUr9+zYWv3mAdl+/oTYNIcjMUy1JAChBbK6vIio=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=ZaICRG+PuCQK60fTxvNdKR9GV0MoPdOeTGvRCALhWL6hhkHfcAthrT5/PgBL6SwCX 7Z5/5dnwVajLkhJsKFqNTRSrxA4GzpryMYUjGYXqW1GWJWD3ITaBeWTRnOoEJ+7dYr LjirD/7nTQ3vmkkJFJVIHmkrg5fQ2yN8eve6K7vH1hoQAe0AitGOWeF8vXfSaMqG9M 77qO0D3TtCnIP+Qpb23IR8i4t91nnlMsfjTe4rSVi636CA3vPgkOM54v2P3UftkdHj YdZ9LRTM18Q4Yb+iArm3YXIAhySYqZ8aUP8qer17f+grXkSVvUhe5xYYJ7Y3os1RC8 TmSZKddzNNtVA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id DF6F94C5D5; Mon, 23 Nov 2026 18:43:33 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:29 +0300 Subject: [PATCH 1/8] PCI: dwc: Export the multiplexed MSI interrupt handler X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-1-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=872; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=Mna9V2FvctfGCov2fj28CrWMP+FmQdEcH5a5uq4pt5U=; b=qNvzbOacLh6x0fSN7zTi0mn1WbwON1SuHXMEhUFL6l3FtIOVmrgsRFMGLDeZuslgdgYoJHppc LWit8E7cf8GCfJgcPzOkf0z529lNCweFuB2AAzTM/guTvcrVyYhMeW7 X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Allow modular host glue with a combined application interrupt to dispatch the internal MSI receiver without installing a second chained handler. Signed-off-by: Fil Dunsky --- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index bbb02458a..1d076bb62 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -85,6 +85,7 @@ void dw_handle_msi_irq(struct dw_pcie_rp *pp) generic_handle_demux_domain_irq(pp->msi_irq_domain, irq_off + pos); } } +EXPORT_SYMBOL_GPL(dw_handle_msi_irq); =20 /* Chained MSI interrupt service routine */ static void dw_chained_msi_isr(struct irq_desc *desc) --=20 2.53.0 From nobody Tue Nov 24 11:35:55 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459427; b=Z3ZAbe4BZlJ8z3muijNM73GXrNdabPlUc8ew3uNIygG+SDmzykwMaL4/k+qEikQqUDOj Ldd4EhNsTs4XFpGbeiR1KnW+ghy9l3tHdp/095T+5TBVqBx88ye1qqRpZkQHq4qaeNe3J A8NNDZ4U0azNw4QnZTql5cM4lTFC0f+wNdAAGJz6/5WuMfIV+mUD3sLonGGk+92T0M5m4 fqSiAatdT39n26IgJyQ0o99Dd/oW5BWtt0+Me0/GbfJcb7RbHS21XU3P3+CghQU8xcRMh mzm375LlQQITrzreAUKF3TPWYrMiYm0ivufb7WitfTd5O+7g5PvgMJot2FKTZZTv88w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459427; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=gu594QK9/935sSCpF5t7yefSjrcj87y2uIapAQYrgGI=; b=i44oOitiNZyrkHdyZ6lUCYK+VTPUu0pdigcx7GG85hX76UsaZ3DUopTakOfspPUesqtU yjbG1zhmvE/Lx4Le/ep/IZOF1LatYyk+MIdeJvta9TbiGSpUbvateaQm1elu4jOEG9uun SBqyxeg8uAnpnRJO1LqC43bZDD73aXcc2+fraLDmFIkIbLDhXIznzVSijYRtuExM+U0F/ Q0yW2zWqo5FnjVaaupuKoOevxofi45g+knpY6cdUMpKoZjdLFtu89ffrARet7/tUmkElR O2d0CmMsLedjkT52BstYixPl6JLQE1MyqETYp38s+FYR6jKfQz9Crgyr9bIw9vyclhQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="VlACv/oR"; arc=pass header.oldest-pass=0 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 7AB0F606A693; Mon, 23 Nov 2026 18:43:47 +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=VlACv/oR Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459427; b=t7GN+2I3RQAhJ9ta8jWKogRxwpJwbh+IKL11i92HIA4deGIDvY5G/hNSAIiI7xCkTkF6 y4PD5hnEXrsN3o3KGNuVIJ8F931S9e3uTHC9NSVeWBYyi9x4wPapejrxEgDz6DTTe/iKG UdKbI2ZIJBD/rfjxhliIrtOAkq4fceaAoufvCAkxqBAILxZfCLMBp5RqVCurISesuvAUi cofxJo4m8Qa58sOTL2HLZWQzmYYstv4hgcGOkSEFZgfLmqL/6o1n1jZS0qYsOOYnk2f3G g5EyuP4pv0WmmLGmOxD6YlJaqN73NViYH+Uv0Zdaxw99p8rLT+MfqdDA5t9hYddMS7Q== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459427; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=gu594QK9/935sSCpF5t7yefSjrcj87y2uIapAQYrgGI=; b=wQVybN8s2hR+qmta5+0IWUxZWBU66gCQqQE3OYQ0ZfDXdhlxEw+yG8rfxgfz+iM8jP1/ IwUNCcotbNpZIFdS5C8FtPVu6VYe4xeCG6vDcoabD3znQfp6tXwC9kzzCYD9W5HbUgXfv s5IY6CpDwTpjrfAmyS0x/2tklkXxkLD2G0Z75bGrTTzGAIxYkfUn1E7A24l8p7g/4UE2r VEleT+EENywDom5uSkZFqvhoDPNG8jRC1ME23vQZRaPB43tr15JEW0IsZYHITVzYroRsk FDEzXlsSY1YJ4CYN9MJzEZXDy/phhRdoGsbSKVRJgSuXmI7VMTJllvxv3N3pvUKQPWg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 76D4C1F000D1; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459427; bh=gu594QK9/935sSCpF5t7yefSjrcj87y2uIapAQYrgGI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=VlACv/oRkn6x8Q1rMx8/E6E+qmZzQ1aq8CmDYqh4hcjkQfyxKv9LblJXZC+ZpRTLy e8o3BNY85mH/37yjekVBoeMY7Ye/pnrxurhTHiklkKkIIFHioFGV2NHh1QE3XK1MWu PJ8zmTXoiN/ioCnP2EIWLC/mZ/ruK++4+P7Gmb/MZJKOebn5jun/ixwI0fMpPeH6u+ HcOMC0pG5hXnVCBi8CMzZYg/WNSMq8I/zuqJwDVwB0QYfWa8PCiRRuf42WaNDOPjXk 2sFW9oXObTDRe1+RScTIgnQ7XdyfcosSnzujo4I/W14f7uDW9hRUS+fTcTojsXieTG b3jA9sOwOXG9A== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 084814C5D1; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:30 +0300 Subject: [PATCH 2/8] dt-bindings: clock: Describe CS7542 PCIe gates and resets X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-2-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=2658; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=dF63p0NESwL1d1J31nL8VBK3t0TGBHI629QHDWtLN0M=; b=q6YlorCM1VBJY6HWBaHuUxSchohP8M3owzFdU0wZ3abL+U94253u7AJ05ibgw+fhRjZiJCnkx RIBeAIGcQ6PDydvok9cq/tniNsbiJLPke+G7ohjoqjLYBWnbFF4OdcT X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Describe the global-syscon child providing three PCIe controller gates and reset lines. Port indices are shared by clock and reset specifiers. The gate-only clocks do not claim a source frequency. Signed-off-by: Fil Dunsky --- .../clock/cortina,cs7542-pcie-control.yaml | 47 ++++++++++++++++++= ++++ .../soc/cortina/cortina,cs7542-syscon.yaml | 4 ++ 2 files changed, 51 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/cortina,cs7542-pcie-co= ntrol.yaml b/Documentation/devicetree/bindings/clock/cortina,cs7542-pcie-co= ntrol.yaml new file mode 100644 index 000000000..08e0214d2 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/cortina,cs7542-pcie-control.y= aml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/cortina,cs7542-pcie-control.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cortina Systems CS7542 PCIe gates and resets + +maintainers: + - Fil Dunsky + +description: | + Child of the CS7542 global control syscon. Clock and reset specifiers + select controller 0, 1 or 2. These clocks describe only the controller + enable gates; their source frequency and rate control are not described. + SerDes reference clocks and lane reset controls are separate. + +properties: + compatible: + const: cortina,cs7542-pcie-control + + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + +required: + - compatible + - "#clock-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + syscon@f0000000 { + compatible =3D "cortina,cs7542-syscon", "syscon", "simple-mfd"; + reg =3D <0xf0000000 0x100>; + #clock-cells =3D <1>; + + pcie-control { + compatible =3D "cortina,cs7542-pcie-control"; + #clock-cells =3D <1>; + #reset-cells =3D <1>; + }; + }; diff --git a/Documentation/devicetree/bindings/soc/cortina/cortina,cs7542-s= yscon.yaml b/Documentation/devicetree/bindings/soc/cortina/cortina,cs7542-s= yscon.yaml index fb074de87..52597c4e8 100644 --- a/Documentation/devicetree/bindings/soc/cortina/cortina,cs7542-syscon.y= aml +++ b/Documentation/devicetree/bindings/soc/cortina/cortina,cs7542-syscon.y= aml @@ -29,6 +29,10 @@ properties: "#clock-cells": const: 1 =20 + pcie-control: + type: object + $ref: /schemas/clock/cortina,cs7542-pcie-control.yaml# + pinctrl: type: object $ref: /schemas/pinctrl/cortina,cs7542-pinctrl.yaml# --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459426; b=11K15e41go8DU74UfC7i8WqMcJ4IT9wxDO/CxmgfY/uDIGPwLdMOekO8PBGAVQk2cejv LV3e7sMgT/eOT5b+0n+JQzPeaSADIZLC4+NAM0H+tD1Ua1sMpqCTNBvTEjwguLKAbOqvX 7VLt9sTTorqHmEOnyck1rkfQO6wo/s9/kPsMv6RTp6CCtW5rn0ms1nVnH74rfTLHyzgpO x1i9KybZWGnCBQN0DMhiHDpUQUpAsb9/buZDBXtHO3nGSoEBcrV9I2W5vn3qt0/iOw+n2 2P+emkN3db4uKKmJkF46/bM+IJDqoP34omf9V7T6LQS/Cmm74V5qzZkNYl0cY1ewBgg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459426; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=OZXKO8Nlv27l8dDCmCRPLPT+qtuKAtiKetzeFk5MY4o=; b=JcqLHX8XCOa/zro44VPdA3THPKtzC4MtrmpjSYl/d96GgCvv5x42cAS7zd3kHmsaeM/+ Yo9YLiT4o0XxkKWgGO7VDCt3bI0+rNyFHcnNNC9HcHJT1XhnnDKwgsPBCt/C3ILdkhAUW ql7H3MtSYJJNOkwjFwub79lkHWAeLo3f1TZAQcnixu8tEfKK0jcaYgb5pmtPc8jm63J7k gF3MGb5Vqcra/E2a5AagzgMjFbQIQ47hPVrWTUsZHoaM1iMS2FWCJwoBncX5JWSXLkCN7 0wZ/qPnffiB9jF/MthwvTzi+dc7Im1BSLYJ2fRVWI5gE+xiQ9mq3LEFY71JFxahHMxA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ORixFn38; arc=pass header.oldest-pass=0 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 773BF606A33D; Mon, 23 Nov 2026 18:43:46 +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=ORixFn38 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459426; b=OGZmdBdJI0O9tzhag8085ftK0aN3fYlUtG7QEcywaAN0DvNR6E2EUpXN8Rk57bJnc6MH T6jXxNhgBzs6aN+tc3DC9+dJNjwdQePORxtqrt8syKYiPoNVb2lwVhBHVnZPdSlld4eI7 LBZBSAhqElKsBhA55qz4JdDQzvYtyMmdhHhwhXuVDYBV3STH9tS5BYyhzQvVIDrhKmYsz RyMq7cp9seKp+TBL46rSrwRdnWJwe8d10E2MuCc/SI3O3cXqWY91uQ+2tkNNlMUxewhDm JT1RMWuOjYRILDec60c56Gerft0BdRI1vupNbNlnxX9o8bR79zggaQIIGeENLe6yroQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459426; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=OZXKO8Nlv27l8dDCmCRPLPT+qtuKAtiKetzeFk5MY4o=; b=qAaI/e/DXM42HszJYICqVoyPwqgknnOMSuZOrt7toNpYqbhV9BIMp6JEmRF6HAsAk7XK Qc2kyQeyNp3WK0b2N3A3dAHSjMAcP6XallNg5ApEBa73DkstDofi2jAJqf8brHJhdZiA2 Kfyx3V5mgjfJ79fNNClnZu5i1dfHdFRHhH00hTewFeGb3GWaTCkeCYXDWAIZZEL/zk27l CxkyOSX8Y5ptwI/PzHoP+J6TofNYx8ynw3OeFN6QuboUo07uqSPGvsI1Fazph6CVDtQ8l r+UmzsjDVEL96HJ8XyTqsLYh2IsZEtyTocEM2K0gQrMfTZLNMsjljTKmeu/3a+50+zA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 98FEE1F000D2; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459425; bh=OZXKO8Nlv27l8dDCmCRPLPT+qtuKAtiKetzeFk5MY4o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=ORixFn38aXMQ2DM02ZdDyRg003vO+Xm07VafMDAX6aoZzHDXahhUP4+NaUVn2RvAo yX+OsuWtTn1RU0UzD20jBnSEaRaDyaurra44/EunVmWwpHzOUXW5slOPf5scHn+4aE JEWYfWnnFRVXl22S2EFY0/RGaJdI4WeumQ3MHhBZubZ/bu2hfifscKSwjaS+l30qSO sqCy9IXATw++UXNaXnZ6THWcu3fDzsG6b1ZCvsavpgA+Y8g7BuLhn1OKCcFRivc7QT D4Zn+MbX7agE2rRl55SJ+eMicEyA/iGUyPAfGJ9AS3oiQS138PA3VwbLDSDNCUNHyh IAvyn+w24DCew== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 283994C5E5; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:31 +0300 Subject: [PATCH 3/8] clk: Add CS7542 PCIe gates and resets X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-3-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=6867; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=IQ3oYOkjhHmvjI099J9lb0QbUnLsKlUN+CsHrOCPogE=; b=bBrX5NDk5ovSGT+tLFaV3zfxL6wseB3LnVHHNP2SUFSz95ISHr57Dpw2LjCtsKecVU+I9kmDx UQjG/nzmimsB4na7FHqEBMZhC34rIaABbK1hTYE7RVDGeTgD95cMzDU X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Use the shared global regmap for controller gates at bits 10, 12 and 14 and block resets at bits 6 through 8. Keep the AXI reset-disable bit and SATA gates intact. Expose independent gate-only clocks and exclusive reset controls with the vendor reset pulse timing. Signed-off-by: Fil Dunsky --- drivers/clk/Kconfig | 11 +++ drivers/clk/Makefile | 2 + drivers/clk/clk-cs7542-pcie.c | 168 ++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 181 insertions(+) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 47b5265fe..4abd81260 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -605,4 +605,15 @@ config CLK_DIVIDER_KUNIT_TEST help Kunit test for the clk-divider type. =20 +config COMMON_CLK_CS7542_PCIE + tristate "Cortina Systems CS7542 PCIe control" + depends on OF && HAS_IOMEM + select MFD_SYSCON + select RESET_CONTROLLER + help + Enable the three PCIe clock gates and controller resets in the + CS7542 global control block. Shared registers use the parent syscon. + The clocks provide gating only, without a source frequency. + The module is called clk-cs7542-pcie. + endif diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 16b1168c8..8ebb794d0 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -187,3 +187,5 @@ obj-y +=3D xilinx/ obj-$(CONFIG_COMMON_CLK_ZTE) +=3D zte/ obj-$(CONFIG_ARCH_ZYNQ) +=3D zynq/ obj-$(CONFIG_COMMON_CLK_ZYNQMP) +=3D zynqmp/ + +obj-$(CONFIG_COMMON_CLK_CS7542_PCIE) +=3D clk-cs7542-pcie.o diff --git a/drivers/clk/clk-cs7542-pcie.c b/drivers/clk/clk-cs7542-pcie.c new file mode 100644 index 000000000..c39977a25 --- /dev/null +++ b/drivers/clk/clk-cs7542-pcie.c @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Cortina Systems CS7542 PCIe clock gates and controller resets. */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define CS7542_PORTS 3 +#define GLOBAL_RESET 0x04 +#define GLOBAL_CONFIG 0x10 + +struct cs7542_gate { + struct clk_hw hw; + struct regmap *map; + u32 mask; +}; + +struct cs7542_control { + struct reset_controller_dev rcdev; + struct regmap *map; + struct cs7542_gate gates[CS7542_PORTS]; + struct clk_hw_onecell_data *clks; +}; + +static int cs7542_gate_prepare(struct clk_hw *hw) +{ + struct cs7542_gate *gate =3D container_of(hw, struct cs7542_gate, hw); + + return regmap_update_bits(gate->map, GLOBAL_CONFIG, gate->mask, gate->mas= k); +} + +static void cs7542_gate_unprepare(struct clk_hw *hw) +{ + struct cs7542_gate *gate =3D container_of(hw, struct cs7542_gate, hw); + + regmap_update_bits(gate->map, GLOBAL_CONFIG, gate->mask, 0); +} + +static int cs7542_gate_is_prepared(struct clk_hw *hw) +{ + struct cs7542_gate *gate =3D container_of(hw, struct cs7542_gate, hw); + unsigned int value; + int ret; + + ret =3D regmap_read(gate->map, GLOBAL_CONFIG, &value); + return ret ? ret : !!(value & gate->mask); +} + +static const struct clk_ops cs7542_gate_ops =3D { + .prepare =3D cs7542_gate_prepare, + .unprepare =3D cs7542_gate_unprepare, + .is_prepared =3D cs7542_gate_is_prepared, +}; + +static int cs7542_reset_update(struct reset_controller_dev *rcdev, + unsigned long id, bool assert) +{ + struct cs7542_control *ctl =3D container_of(rcdev, struct cs7542_control,= rcdev); + u32 mask =3D BIT(6 + id); + + return regmap_update_bits(ctl->map, GLOBAL_RESET, mask, assert ? mask : 0= ); +} + +static int cs7542_reset_assert(struct reset_controller_dev *rcdev, unsigne= d long id) +{ + return cs7542_reset_update(rcdev, id, true); +} + +static int cs7542_reset_deassert(struct reset_controller_dev *rcdev, unsig= ned long id) +{ + return cs7542_reset_update(rcdev, id, false); +} + +static int cs7542_reset_status(struct reset_controller_dev *rcdev, unsigne= d long id) +{ + struct cs7542_control *ctl =3D container_of(rcdev, struct cs7542_control,= rcdev); + unsigned int value; + int ret; + + ret =3D regmap_read(ctl->map, GLOBAL_RESET, &value); + return ret ? ret : !!(value & BIT(6 + id)); +} + +static int cs7542_reset_pulse(struct reset_controller_dev *rcdev, unsigned= long id) +{ + int ret; + + ret =3D cs7542_reset_assert(rcdev, id); + if (ret) + return ret; + usleep_range(10000, 12000); + ret =3D cs7542_reset_deassert(rcdev, id); + if (ret) + return ret; + usleep_range(10000, 12000); + return 0; +} + +static const struct reset_control_ops cs7542_reset_ops =3D { + .assert =3D cs7542_reset_assert, + .deassert =3D cs7542_reset_deassert, + .status =3D cs7542_reset_status, + .reset =3D cs7542_reset_pulse, +}; + +static int cs7542_control_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct cs7542_control *ctl; + int ret, i; + + ctl =3D devm_kzalloc(dev, sizeof(*ctl), GFP_KERNEL); + if (!ctl) + return -ENOMEM; + ctl->map =3D syscon_node_to_regmap(dev->of_node->parent); + if (IS_ERR(ctl->map)) + return dev_err_probe(dev, PTR_ERR(ctl->map), "global register map\n"); + ctl->clks =3D devm_kzalloc(dev, struct_size(ctl->clks, hws, CS7542_PORTS)= , GFP_KERNEL); + if (!ctl->clks) + return -ENOMEM; + ctl->clks->num =3D CS7542_PORTS; + for (i =3D 0; i < CS7542_PORTS; i++) { + struct cs7542_gate *gate =3D &ctl->gates[i]; + struct clk_init_data init =3D { .ops =3D &cs7542_gate_ops }; + + init.name =3D devm_kasprintf(dev, GFP_KERNEL, "%s.pcie%d", dev_name(dev)= , i); + if (!init.name) + return -ENOMEM; + /* Gate-only controls: no source frequency is described or assumed. */ + gate->map =3D ctl->map; + gate->mask =3D BIT(10 + 2 * i); + gate->hw.init =3D &init; + ret =3D devm_clk_hw_register(dev, &gate->hw); + if (ret) + return dev_err_probe(dev, ret, "clock gate %d\n", i); + ctl->clks->hws[i] =3D &gate->hw; + } + ret =3D devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, ctl->clks= ); + if (ret) + return ret; + ctl->rcdev.owner =3D THIS_MODULE; + ctl->rcdev.ops =3D &cs7542_reset_ops; + ctl->rcdev.of_node =3D dev->of_node; + ctl->rcdev.nr_resets =3D CS7542_PORTS; + return devm_reset_controller_register(dev, &ctl->rcdev); +} + +static const struct of_device_id cs7542_control_match[] =3D { + { .compatible =3D "cortina,cs7542-pcie-control" }, + { } +}; +MODULE_DEVICE_TABLE(of, cs7542_control_match); + +static struct platform_driver cs7542_control_driver =3D { + .probe =3D cs7542_control_probe, + .driver =3D { + .name =3D "cs7542-pcie-control", + .of_match_table =3D cs7542_control_match, + }, +}; +module_platform_driver(cs7542_control_driver); + +MODULE_DESCRIPTION("Cortina Systems CS7542 PCIe clock gates and resets"); +MODULE_LICENSE("GPL"); --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459426; b=bjmZQNDOaTCqIv4LTuF0Ztu14jj7j80aT2u+q6EJWSyJVQii0iqbIOxceFMqYOGwjD+F zJ/VyXoRzdox/vVe/XNnGkWSASClFmrw5Y91Hkm40fUzY2SgZfs9y5jZX2IhY4XfqmlKu nbWM+aDNofLX67KqLVJOOJJQV7+Bo+Qy9YHy/gmETEKEqd3Cli38g0vO0Vj14YoIuevs4 rkplJm3Oareig3aqvdDCK3ogtHAIpd1mBfO0HExI9FvDdqRNVdcBt70Hx4SRRiNGV6/Ct ezgmUzkz7vfyDD9Pzq2tcwix2NfWekP+oc5MZEZjFZ6+Er4/jCzFDsMhdNa3rqohCYg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459426; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=lSA+wX9NNEY3sTm7hObzBOSDNhatk2iNQOlIwAan+js=; b=ZVHwwWYsA/6g3b1IdYtSVOSkwnw4Sk3lv53dcdELkoKdohYFk7ptT8d/M8JsuN8kPDWZ vFIpXVRrZovnWeq8cFuB06wRrym7uee5BnsmripyeMTQ1Lt/74e7A9lFRw0oQCTn6/tyO xu8ErMtfAWcBidY5Yrh+6kGDZcATDPmy2HFFMS7bcQfKTIHc+pBzRLyn+u38UYP7qR2AK HNlx++Zr6NDmUe0jSwWkxQ2m0pW9m2C/rE1vPMyqt7UmaFPBMs2p5R6u0U0pEr7DFTCvu kky1Ed+novbR85Lan2sHIOWJaCcGRWN9RZJnGZW/N9hZO17Z5IDMPEf5r/WHD9ab2wA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Un8myjU0; arc=pass header.oldest-pass=0 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 3A7F8606A332; Mon, 23 Nov 2026 18:43:46 +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=Un8myjU0 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459426; b=tJUOWqYO316FGc88m6d2uModOhYdYvMQCjnuY5k/vy2u+nMCFYFW6Cyyozi+KhYFLdOi Kib1eU6J/qNHp8eH/sELu7a2y0jnfxpU+xyYQ1XhQUw0TYgQYdPwWnYcY7TQHQGS6y11k c8ECoYz3uIfmIR33FeFKvcHpjDyURfV5iz88GWJnInGc8uXmZzgos+Ref92vRPu251ZbV w5/un42+1KYZWpivwlO/ZSEuzHCvRNM4HQN++kLLozZAVAkmpaYOvkZhrLL5EDBbRdGE+ iCfOdh84f6Mz0DHQAQkj656CmSdCWPfe1DEKByP+MZveYM6NecDiOBVWmeukf+/xmeQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459426; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=lSA+wX9NNEY3sTm7hObzBOSDNhatk2iNQOlIwAan+js=; b=gLvjefVOaUpqydN+p/gmd1HH1I+a0T7295Oq8fCM9yiJZ4M/e1kfLlUMNQtTIb5G+MOg ZOUCIlFInL1M2NSShKaSlqjK6FOj2krwu6uAtVKGm9M6m/0qBXIEVno7VqdRdVdsgwl6x Da3W49e/YeL72PLZwdgZjAHsAhWZr4z/tTKxNpXhYHC3ruNVq87EGmDZFRheSJvj4CpG2 Ju6hz8LYrwE9nSASsZquAYD5ZfItf9+6IevxmU2RrlBCdqKb1T9ag0dFDN8XsJVwisGnp YypKr64JTVA0UYwAhoVHmk2rNd49XxGt4RZ1R0257/5gsEJ9sMwtGBxLSE8ph0jrSeQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id B38FE1F000D3; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459425; bh=lSA+wX9NNEY3sTm7hObzBOSDNhatk2iNQOlIwAan+js=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=Un8myjU0scak/jaKb2yaqjXYn8Oi648okTOXq9LHmhxryXovAzNaUMfm8OtChf2Q1 486FpomHlEOm8cKohMOlnKMDRHlDiiYey9zYvcE08pahHidMqOzgrXx9NQ7PVOIGGp JfHH+w+4Td676GriEEJMvXAmECSxp/tWi8kwHH8B7voWdYvAuCWZP1F8kkF3gLcDTS MMbDGsR17KIOdd7HasKlVC/LzuHIg9/c2pxuiy7XhPPic94gMENf8nvSkZfKV/FuVf tv3nkUahCQfODvw8K/EakZY+34lAxsJ9D8yP7GDnJ1Af7rLhI5XLz3Jwsl1zdsMh/p r1uBWHFGRjMmg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 4450B4C5F5; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:32 +0300 Subject: [PATCH 4/8] dt-bindings: phy: Describe CS7542 PCIe SerDes X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-4-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=2484; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=MyL1iV5O/zQ+yKb0w2UWGAKIr38mntIf4hXKW1lxhNg=; b=CyfGYps0N0F18Ogfls7Z2cKPA0iJsxM7CQiMoFc/TJzEWtC25qzOYNTxxH81X6hJBysGBSLDN TU81Lt4mtIRDulo+kyHKPPxoAmXXT8mJlbYOLX1OPihK/aFpDL2ZpW4 X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Describe three Snow Bush lanes, their shared status bank, global reset controls and 24 MHz reference. PCIe is the only supported operating mode. Signed-off-by: Fil Dunsky --- .../bindings/phy/cortina,cs7542-pcie-phy.yaml | 67 ++++++++++++++++++= ++++ 1 file changed, 67 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/cortina,cs7542-pcie-phy.= yaml b/Documentation/devicetree/bindings/phy/cortina,cs7542-pcie-phy.yaml new file mode 100644 index 000000000..9ccde6e05 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/cortina,cs7542-pcie-phy.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/cortina,cs7542-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cortina Systems CS7542 PCIe SerDes + +maintainers: + - Fil Dunsky + +description: | + Three Snow Bush SerDes lanes shared by PCIe and SATA. Only PCIe mode + with a 24 MHz reference is described. The PHY specifier is the lane + number, 0 through 2. The status resource contains the shared PHY + status registers, with a stride of 0x80 bytes per lane. + +properties: + compatible: + const: cortina,cs7542-pcie-phy + + reg: + items: + - description: Lane 0 programming registers + - description: Lane 1 programming registers + - description: Lane 2 programming registers + - description: Shared PHY status registers + + reg-names: + items: + - const: phy0 + - const: phy1 + - const: phy2 + - const: status + + clocks: + maxItems: 1 + description: 24 MHz SerDes reference clock + + cortina,global-syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: Global control syscon providing lane reset and mode selec= tion + + "#phy-cells": + const: 1 + +required: + - compatible + - reg + - reg-names + - clocks + - cortina,global-syscon + - "#phy-cells" + +additionalProperties: false + +examples: + - | + phy@f00a1000 { + compatible =3D "cortina,cs7542-pcie-phy"; + reg =3D <0xf00a1000 0x400>, <0xf00a5000 0x400>, + <0xf00a9000 0x400>, <0xf00a0e00 0x180>; + reg-names =3D "phy0", "phy1", "phy2", "status"; + clocks =3D <&ref24>; + cortina,global-syscon =3D <&global>; + #phy-cells =3D <1>; + }; --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459436; b=RQEBRSyXH7Rbawpq07cUiTrz7ukxQpcCj5UDdrO86DINDvUBo72tmXzToxeFTODCuIt8 4/h9wA2N8upbIoOOI7uCRj3ZuT1hCkhP8dNMjTGXuWh5IPoVGiS4yH+snONml3b6ll3s0 y9894i/+1xjS2ItPLkwqtTqtzdDwGOmvWSbNc6yI7JWjyDhvmHDS0n3Nf+ifLbWVFnZel Pa+au2Z9orIqT0OX5JFpzSbF5IpiKvF4bnKwChcGbCSJFE+Opvvr5tfZB38jrwe1fMjs7 eW2r3c0eqvCVug710jvcMFYJ76b710unkssgFsP+p0C8BmmyhLEE8gY3kSTmE2QSmVg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459436; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=Zz6L92ZDSFMnlI2YQdsV7kK/kM96g1+mYDq69MPiFmU=; b=TOPkMS/HueZPmZkGggisC1AJ3H0KzCGiDJ+HZqe1epgFaFiqs2+ZBo+HLg6kx1pccwKr dtPkEmchekX6ohVHOBDOB/xiPIAr9pSDIh7wpPoGMd4utF5oCbWxzhZawcnDJHjNMU3N6 g2ia0MVTat4hND6f0ZmJAfbqg6+5iRrEuf/0UB01N2+pXsElWEzM3D71eRGnEfKYNG/VU dEfNgn/879b7eGW/pPH+LwiJ+MvanRlVrJDPx3p7gNE95TXnmRm6pmZFctp4xQJThGtXh ngwVbjutwIfqBXuwy0dyauOacQ6I/a3loIC/ucOUwhuAqeITdhuQ2G4Sq2jFkxbyTrw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hsmhC1xI; arc=pass header.oldest-pass=0 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 A4F6A606A31F; Mon, 23 Nov 2026 18:43:56 +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=hsmhC1xI Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459436; b=O9XgfmgaAqGaqgWPTMlhCEDYmWd/n6R4CMuvIg02txGqFIFpxPSEfMruf33T+5SPpVhU Whrk671Vvb6nUaWVcpfyGNSSglaIQhdHEbm7DxjHoBNVnMGc9f/8FyB9QlQdqFXNfYxm8 mTGoTKV4/IVES4F+rp1nms6z1ylenL04aAvPvJ05zQ2d2QEjyanBug71+IQnkFMtsQPq5 dIPL00tDHcoFGXcmoN23+zJQm849vJkwQ0mM30IaLRw+UWQh7ODOSKbH0hFVAdAsO/TPO Q/A3a9ZnwtfDN8GPu3IOJ2qjqmD+itX0vXcYJMnj7WVM8qKaNyWFpSkfyskCFfD/B7g== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459436; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=Zz6L92ZDSFMnlI2YQdsV7kK/kM96g1+mYDq69MPiFmU=; b=uQMbRZx84R8KMxaeHPGLcOoNEet2zC0ZuQQm6UVCWsKh23ahuyJQ1H7Bh9qd0NLHUr1J GmNUVE5ziB+IMb93qRTxK6GqDttL4cEzisK++INBiuSrAZsjvlZqA+ukRYc3t4WhwUwdp HOnuplag/TKs3//sW4pE8QRtNA55nxj9q8a/+2p51mV2e2OJeZ75q9unGe7sSTN6rg3Tj wW0takPHL4kXLwfJh4frZtT1xBiDMi/OHlj11D9s1O6E5RfkzqugVC6GGw0a4tUMQJ5l4 lCuZ8YfFi3qSQirNQbSHbEWabDPkMx7dpLnnoqdBzK/VicSqWo2q6q2dz89LcbflU6w== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 5C7431F000F4; Mon, 23 Nov 2026 18:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459436; bh=Zz6L92ZDSFMnlI2YQdsV7kK/kM96g1+mYDq69MPiFmU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=hsmhC1xIgxnY8A91iySaz0uK0wbbFQnGvuv3WvgzY5gijcSBPQwX2HEZx5tlc8U/p mARtf9QvJmG707ASOrjm+npsHCAGjUyoDYnpb0He+C8ChcFVMgwi24CRCb0kjkbLZX YsMbgz70D3QhTRnhFL9nCBZ2Qa28MQyd1plGeRKyFbO3sYqPGkb7IkEIpVXiMxXwMH 7feWKYzstj36rl38qGQSP0ZQGIogUdV4CkPqtEdtWvAte1hYs5o0MbyRxQhDjYSTEo Dv/k9GZvUfxCbn92buZB9nUBmEAtJChiM712lDdMDiO/XFDSQZzeMnxhFYBaZmhyVa HeVR+YxIkafzQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 621DA4C607; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:33 +0300 Subject: [PATCH 5/8] phy: Add CS7542 PCIe SerDes support X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-5-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=9297; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=xbqhgVGjORFnQ5gPtfVS3sFJz4weZ5kVBK/LGnXuSak=; b=QNVgNlvbBW934POdhUTwDtWsSN8OBXryNPi7DhDOOM/dEJnB3LmSOCUmXp0FW0JjbcvIJPfR2 c458jFRiOygB7kW6ewdsWtpFux7pV8liLuO2eTYcgVb0W05tzeH1dxn X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Provide per-lane generic PHYs using the vendor 24 MHz programming table and revision-dependent value. Sequence power and reset through the shared global regmap and fail on CMU lock timeout with balanced power cleanup. Use the shared PHY status bank without overlapping PCIe wrapper resources. Signed-off-by: Fil Dunsky --- drivers/phy/Kconfig | 11 ++ drivers/phy/Makefile | 2 + drivers/phy/phy-cs7542-pcie.c | 232 ++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 245 insertions(+) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 105fbe408..77cff94fe 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -204,4 +204,15 @@ source "drivers/phy/tegra/Kconfig" source "drivers/phy/ti/Kconfig" source "drivers/phy/xilinx/Kconfig" =20 +config PHY_CS7542_PCIE + tristate "Cortina Systems CS7542 PCIe SerDes" + depends on OF && HAS_IOMEM && COMMON_CLK + select GENERIC_PHY + select MFD_SYSCON + help + Support the three CS7542 Snow Bush SerDes lanes in PCIe mode + with a 24 MHz reference clock. Lane resets share the global syscon. + SATA mode and other reference frequencies are not supported. + The module is called phy-cs7542-pcie. + endmenu diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile index c6dd02003..54df29e74 100644 --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@ -55,3 +55,5 @@ obj-$(CONFIG_GENERIC_PHY) +=3D allwinner/ \ tegra/ \ ti/ \ xilinx/ + +obj-$(CONFIG_PHY_CS7542_PCIE) +=3D phy-cs7542-pcie.o diff --git a/drivers/phy/phy-cs7542-pcie.c b/drivers/phy/phy-cs7542-pcie.c new file mode 100644 index 000000000..d027baa93 --- /dev/null +++ b/drivers/phy/phy-cs7542-pcie.c @@ -0,0 +1,232 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* CS7542 Snow Bush SerDes, PCIe mode with a 24 MHz reference clock. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define GLOBAL_JTAG_ID 0x00 +#define GLOBAL_PHY_CONTROL 0x14 +#define PHY_REFCLK_MASK(p) (3U << ((p) * 2)) +#define PHY_REFCLK_24MHZ(p) (2U << ((p) * 2)) +#define PHY_PD(p) BIT(8 + (p)) +#define PHY_CMU_RESETN(p) BIT(16 + (p) * 4) +#define PHY_LN0_RESETN(p) BIT(17 + (p) * 4) +#define PHY_POR_N(p) BIT(19 + (p) * 4) +#define PHY_CMU_OK BIT(18) +#define PHY_STATUS_STRIDE 0x80 +#define SNOW_COM_REG0 0x00 +#define SNOW_REG0_CFG 0x00090006 +#define SNOW_REG0_AHB_RESETN BIT(0) +#define SNOW_REV_REG 96 +#define SNOW_REV_REG_A0 0x5e082e00 +#define SNOW_REV_REG_A1 0x5e080600 +#define SNOW_COM_LANE_REG0 0xc8 +#define SNOW_LANE_REG0_CFG 0x400290c0 +#define SNOW_LANE_REG0_MASTER_RESETN BIT(1) +#define CS7542_PORTS 3 + +struct cs7542_serdes; +struct cs7542_lane { + struct cs7542_serdes *serdes; + void __iomem *base; + struct phy *phy; + unsigned int id; +}; + +struct cs7542_serdes { + struct device *dev; + struct regmap *global; + void __iomem *status; + struct clk *ref; + struct cs7542_lane lanes[CS7542_PORTS]; + u32 revision_value; +}; + +struct snow_reg { + u16 off; + u32 val; +}; + +static const struct snow_reg snow_phy_24mhz[] =3D { + { 0, SNOW_REG0_CFG }, { 4, 0x000e0960 }, { 32, 0x68a00000 }, + { 44, 0x50040000 }, { 48, 0x40250270 }, { 52, 0x00004001 }, + { 100, 0xf0914200 }, { 104, 0x4c0c9048 }, { 108, 0x00000373 }, + { 124, 0x04841000 }, { 128, 0x000000e0 }, { 132, 0x04000023 }, + { 136, 0x68001038 }, { 140, 0x0d181ea2 }, { 144, 0x0000000c }, + { 196, 0x0f600000 }, { 200, SNOW_LANE_REG0_CFG }, { 204, 0x0000003c }, + { 208, 0xc68b8300 }, { 212, 0x98280301 }, { 216, 0xe1782819 }, + { 220, 0x00f410f0 }, { 232, 0xa0a0a000 }, { 236, 0xa0a0a0a0 }, + { 240, 0x9fc00068 }, { 244, 0x00000001 }, { 248, 0x00000000 }, + { 252, 0xd07e4130 }, { 256, 0x935285cc }, { 260, 0xb0dd49e0 }, + { 264, 0x0000020b }, { 300, 0xd8000000 }, { 304, 0x0001ff1a }, + { 308, 0xf0000000 }, { 312, 0xffffffff }, { 316, 0x3fc3c21c }, + { 320, 0x0000000a }, { 324, 0x00f80000 }, +}; + +static int cs7542_phy_power_off(struct phy *phy) +{ + struct cs7542_lane *lane =3D phy_get_drvdata(phy); + unsigned int p =3D lane->id; + u32 mask =3D PHY_PD(p) | PHY_CMU_RESETN(p) | PHY_LN0_RESETN(p) | PHY_POR_= N(p); + int ret; + + ret =3D regmap_update_bits(lane->serdes->global, GLOBAL_PHY_CONTROL, mask= , PHY_PD(p)); + clk_disable_unprepare(lane->serdes->ref); + return ret; +} + +static int cs7542_phy_power_on(struct phy *phy) +{ + struct cs7542_lane *lane =3D phy_get_drvdata(phy); + struct cs7542_serdes *sd =3D lane->serdes; + unsigned int p =3D lane->id; + u32 mask, value; + int ret, i; + + ret =3D clk_prepare_enable(sd->ref); + if (ret) + return ret; + mask =3D PHY_PD(p) | PHY_CMU_RESETN(p) | PHY_LN0_RESETN(p) | PHY_POR_N(p)= | + PHY_REFCLK_MASK(p); + ret =3D regmap_update_bits(sd->global, GLOBAL_PHY_CONTROL, mask, + PHY_PD(p) | PHY_REFCLK_24MHZ(p)); + if (ret) + goto power_off; + msleep(100); + ret =3D regmap_update_bits(sd->global, GLOBAL_PHY_CONTROL, PHY_PD(p) | PH= Y_POR_N(p), + PHY_POR_N(p)); + if (ret) + goto power_off; + usleep_range(10, 20); + for (i =3D 0; i < ARRAY_SIZE(snow_phy_24mhz); i++) { + if (snow_phy_24mhz[i].off =3D=3D SNOW_REV_REG + 4) + writel(sd->revision_value, lane->base + SNOW_REV_REG); + writel(snow_phy_24mhz[i].val, lane->base + snow_phy_24mhz[i].off); + } + writel(SNOW_REG0_CFG | SNOW_REG0_AHB_RESETN, lane->base + SNOW_COM_REG0); + ret =3D regmap_update_bits(sd->global, GLOBAL_PHY_CONTROL, PHY_CMU_RESETN= (p), + PHY_CMU_RESETN(p)); + if (ret) + goto power_off; + ret =3D readl_poll_timeout(sd->status + p * PHY_STATUS_STRIDE, value, + value & PHY_CMU_OK, 100, 100000); + if (ret) { + dev_err(sd->dev, "lane %u CMU did not lock\n", p); + goto power_off; + } + writel(SNOW_LANE_REG0_CFG | SNOW_LANE_REG0_MASTER_RESETN, + lane->base + SNOW_COM_LANE_REG0); + ret =3D regmap_update_bits(sd->global, GLOBAL_PHY_CONTROL, PHY_LN0_RESETN= (p), + PHY_LN0_RESETN(p)); + if (ret) + goto power_off; + msleep(100); + return 0; + +power_off: + cs7542_phy_power_off(phy); + return ret; +} + +static int cs7542_phy_set_mode(struct phy *phy, enum phy_mode mode, int su= bmode) +{ + return mode =3D=3D PHY_MODE_PCIE && !submode ? 0 : -EINVAL; +} + +static const struct phy_ops cs7542_phy_ops =3D { + .power_on =3D cs7542_phy_power_on, + .power_off =3D cs7542_phy_power_off, + .set_mode =3D cs7542_phy_set_mode, + .owner =3D THIS_MODULE, +}; + +static struct phy *cs7542_phy_xlate(struct device *dev, const struct of_ph= andle_args *args) +{ + struct cs7542_serdes *sd =3D dev_get_drvdata(dev); + + if (args->args_count !=3D 1 || args->args[0] >=3D CS7542_PORTS) + return ERR_PTR(-EINVAL); + return sd->lanes[args->args[0]].phy; +} + +static int cs7542_phy_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct phy_provider *provider; + struct cs7542_serdes *sd; + unsigned int id; + int ret, i; + + sd =3D devm_kzalloc(dev, sizeof(*sd), GFP_KERNEL); + if (!sd) + return -ENOMEM; + sd->dev =3D dev; + sd->global =3D syscon_regmap_lookup_by_phandle(dev->of_node, "cortina,glo= bal-syscon"); + if (IS_ERR(sd->global)) + return dev_err_probe(dev, PTR_ERR(sd->global), "global register map\n"); + sd->ref =3D devm_clk_get(dev, NULL); + if (IS_ERR(sd->ref)) + return dev_err_probe(dev, PTR_ERR(sd->ref), "reference clock\n"); + if (clk_get_rate(sd->ref) !=3D 24000000) + return dev_err_probe(dev, -EINVAL, "only 24 MHz reference supported\n"); + ret =3D regmap_read(sd->global, GLOBAL_JTAG_ID, &id); + if (ret) + return ret; + switch (FIELD_GET(GENMASK(15, 12), id)) { + case 0: + case 1: + sd->revision_value =3D SNOW_REV_REG_A0; + break; + case 8: + case 9: + sd->revision_value =3D SNOW_REV_REG_A1; + break; + default: + return dev_err_probe(dev, -ENODEV, "unsupported silicon revision %#x\n",= id); + } + sd->status =3D devm_platform_ioremap_resource(pdev, CS7542_PORTS); + if (IS_ERR(sd->status)) + return PTR_ERR(sd->status); + for (i =3D 0; i < CS7542_PORTS; i++) { + struct cs7542_lane *lane =3D &sd->lanes[i]; + + lane->id =3D i; + lane->serdes =3D sd; + lane->base =3D devm_platform_ioremap_resource(pdev, i); + if (IS_ERR(lane->base)) + return PTR_ERR(lane->base); + lane->phy =3D devm_phy_create(dev, NULL, &cs7542_phy_ops); + if (IS_ERR(lane->phy)) + return PTR_ERR(lane->phy); + phy_set_drvdata(lane->phy, lane); + } + platform_set_drvdata(pdev, sd); + provider =3D devm_of_phy_provider_register(dev, cs7542_phy_xlate); + return PTR_ERR_OR_ZERO(provider); +} + +static const struct of_device_id cs7542_phy_match[] =3D { + { .compatible =3D "cortina,cs7542-pcie-phy" }, + { } +}; +MODULE_DEVICE_TABLE(of, cs7542_phy_match); + +static struct platform_driver cs7542_phy_driver =3D { + .probe =3D cs7542_phy_probe, + .driver =3D { + .name =3D "cs7542-pcie-phy", + .of_match_table =3D cs7542_phy_match, + }, +}; +module_platform_driver(cs7542_phy_driver); + +MODULE_DESCRIPTION("Cortina Systems CS7542 PCIe SerDes"); +MODULE_LICENSE("GPL"); --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459453; b=f67r4+pk7JiqKJuKXRPprawJFZO9y82JzScUsbnFYORzmSJP4ib1Nxra7pnAdSTPUt+l x3IBhosenhTORgQSCdU459hRCpJpZKOQS5hNse+kiT8QK0XZb50vT42QuWfLbZp5AJZkk iGJUpzRRK0UCSrUhqYF/7QrxR1O9bOZ3aY5TVVYNZ+x52yY5N67701JYgpbntWcKS4SEa tld7wftzDdmCCSTDhodhkNnD4+S5dCTfEWCT2vuq/4DBKAdGRQ+bDkAM4WauTOtvoWnwQ zPKdGwPRfkWB7jkiETdASXq3lAipTKwSY+OsYSG0nlrEJtu15UB5r78Fyii0okgilIQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459453; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=QnkvwRjxalFfpIWRivbWeaDT7ktUTxee4WzIGdLxdG4=; b=UsQpy1c5+ZBUukzpgRl5LXto+uOaeeO+DmgLSz9jUnaQ6ypgjlbnA+LFQETFJ/Iit/a1 N2tGZNO3Bcgsa8orjr/BKWDP0NnTuYupTrBsX79oCtrLIykUXIWrnkh9OBzzb7n6+qhYG A+xSdNSzdLQDfFDWWs8HfeQcZ74HQmy5/hhq1MHslUqXMrWtwHy6ZK5ZI+bTe80S4OF6f G+m52p/TeA0rzlZfOAQUYX8wRrUvADgqgfapw84DKbRT8qI4IfqkoSROFiNvWmmNZI0GB 8rqeF/ykAjXczgCgfszqcl4kldTilUuzhE6tX+TjarITBz1f28T127SrEP4k36aW0bA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ajmtnBUJ; arc=pass header.oldest-pass=0 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 31A12606A680; Mon, 23 Nov 2026 18:44:13 +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=ajmtnBUJ Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459452; b=iwM1qdrPfmVbcUTXLfzvhiziiK0DWKtP31u1Rb9bkFka84OmxWSe3pXAdGTP1wtUVo+d uwLq2ZBY1Vee8aEP0J3TkRIkZNZu57V++HyTxX7AmeAKdgow7Zhg5dJznbNMObuGhFGUf ngdmACrxllxU/rqA4zFQSGELRBTqqi9dcIXUJ3yFGmDhlyZiBypItpVaU72X8I90T9fLM zJ4aQDUXAh/4wc9/oGhFXxqQy8I1BwCdzFoKUpCKHduZ6yAWiSKAIzbuxf8UTHLOs6vkD oOkPwDnOsPI/Oim7F18NHjyZJC3DP8UGhCV9Oa7e/nYHOgI6kjuI3G9YXnoCVHmzd0A== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459452; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=QnkvwRjxalFfpIWRivbWeaDT7ktUTxee4WzIGdLxdG4=; b=O9FZxIK7V74wo0ipTWQzJKHEIu2YRkZV+vOEg7v/soVOQTfW6qm3KMnpZF+NHHEOedRJ JHes5/5MDYY3lfHDwU38KomEdm1DB4A4NZwiu9FDmZBbPpr9A/PhJYhmuZb9YqhTU0f1H MsVa4/3M2kRvMAxlrDm3jjIn022xJq64uxqq+hNt76g6N7agvo2LB8SCdg1aLHlHsel8v +Tjb8kiYSC/apwFu7zP3jfzsps2043METs22FSvEOcRwKKZTrJZakaTyK4BzaKwWWQe5T 0sqZTsbcYOA4SdIocdmU3iqV6k1M2mKmzWOIuV3puPUaMspPcrsgso5u22EEbDb2SDg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 5C6EB1F000E6; Mon, 23 Nov 2026 18:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459452; bh=QnkvwRjxalFfpIWRivbWeaDT7ktUTxee4WzIGdLxdG4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=ajmtnBUJsEarNGNTrFpLcdUmna3AXEwf3NGNRe69mR9XYhxh4x8sZ7nFxNY27qCAz 0KHyaLRnVZ48Nm+YMKg06IaXDRPENBxux58XEKccw429GoWHL91ySXes0Bd9zvl8dY SPSyux8wo5TPaS05RWAs+89tU/jWcOQD3QLBmYv7dBi6kZl2o2vXgD2EKkv+NQhs9l eWg0P42IXU1Mjqi9lQXtzyH5KPxXiJR6XlrLUZdWT8YqVLtESzi+03++rtb7O6nNDP PXHTsqoh3Tm7X20/7j6uqMAwy+imKr8wXL2J52cnBfbewVQYadwFz3SCwFCO3qkjdh SHbBUtCSOM6fw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 7F34D4C60E; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:34 +0300 Subject: [PATCH 6/8] dt-bindings: PCI: Describe the CS7542 host controller X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-6-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=3852; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=VvGufEimroLNQa6ffIpguLzS7u9g0TkrXCLDyMng0v4=; b=JieypMZCDH6u0OxjVZGYNq5tN+RDJuSJisbUr1Op0hPgZa3zMYJsYqEAUt37atyhVE4j2mlKr OOdPQkLlypZBhyDxaq9DYII4vS/uhs4vFH9UOn3f+Zi1eNBjOlZ0okt X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Describe the DesignWare host wrapper, clock/reset/PHY consumers, combined interrupt and INTx domain. Document the root configuration access limit. Signed-off-by: Fil Dunsky --- .../bindings/pci/cortina,cs7542-pcie.yaml | 127 +++++++++++++++++= ++++ 1 file changed, 127 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/cortina,cs7542-pcie.yaml= b/Documentation/devicetree/bindings/pci/cortina,cs7542-pcie.yaml new file mode 100644 index 000000000..8883b8d09 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/cortina,cs7542-pcie.yaml @@ -0,0 +1,127 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/cortina,cs7542-pcie.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cortina Systems CS7542 PCIe host controller + +maintainers: + - Fil Dunsky + +description: | + DesignWare host with a Cortina application wrapper. A single interrupt + multiplexes four INTx lines, the internal MSI receiver and link errors. + Root-port configuration is accessible only below offset 0x200; the + DesignWare private register bank starts at offset 0x700. + +allOf: + - $ref: /schemas/pci/snps,dw-pcie.yaml# + +properties: + compatible: + const: cortina,cs7542-pcie + + reg: + items: + - description: DBI registers including the viewport iATU + - description: Downstream configuration window + - description: Application wrapper registers + + reg-names: + items: + - const: dbi + - const: config + - const: app + + interrupts: + maxItems: 1 + + interrupt-names: + const: msi + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + phys: + maxItems: 1 + + phy-names: + const: pcie + + num-lanes: + const: 1 + + reset-gpios: + maxItems: 1 + description: Optional active-low endpoint PERST# + + interrupt-controller: + type: object + additionalProperties: false + properties: + "#address-cells": + const: 0 + "#interrupt-cells": + const: 1 + interrupt-controller: true + required: + - "#address-cells" + - "#interrupt-cells" + - interrupt-controller + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - clocks + - resets + - phys + - phy-names + - num-lanes + - interrupt-controller + - interrupt-map + - interrupt-map-mask + +unevaluatedProperties: false + +examples: + - | + #include + + pcie@80000000 { + compatible =3D "cortina,cs7542-pcie"; + reg =3D <0x80000000 0x1000>, <0x80001000 0x1000>, + <0xf00a0000 0x100>; + reg-names =3D "dbi", "config", "app"; + #address-cells =3D <3>; + #size-cells =3D <2>; + device_type =3D "pci"; + bus-range =3D <0 0xff>; + num-lanes =3D <1>; + ranges =3D <0x82000000 0 0x80200000 0x80200000 0 0x1fe00000>; + interrupt-parent =3D <&gic>; + interrupts =3D ; + interrupt-names =3D "msi"; + clocks =3D <&pcie_control 0>; + resets =3D <&pcie_control 0>; + phys =3D <&serdes 0>; + phy-names =3D "pcie"; + #interrupt-cells =3D <1>; + interrupt-map-mask =3D <0 0 0 7>; + interrupt-map =3D <0 0 0 1 &pcie_intc 1>, + <0 0 0 2 &pcie_intc 2>, + <0 0 0 3 &pcie_intc 3>, + <0 0 0 4 &pcie_intc 4>; + + pcie_intc: interrupt-controller { + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + interrupt-controller; + }; + }; --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459452; b=eBFp3FctXxZmolQb5q4JTJSRgejA9JV3xvbBfp2ecDJqBVOmPR4/utBp1kqPeAmbjae8 gbNaVFQpDddlou9TMf0CgpRpohouCNiZ18CtmSGwXi7anY77Yr9rGKb8N99bP6EQUvwws 7PqrH9DpGIn/YhAL8lop2kA9bE6Y3DfcWDQ4GWDSukrpQlmKYCuPcxC2XU7YTTmnE1rnj u/4FSgs/WyWSu+lzxeRxKRhn8arxZ9uELOpFlFxuT95sxJqMsidPKIvuR+6rFSoINppJH 3mcF3uQv5dZPchkLVOZPgh3z7gw1sqehTrfGyj1RaKCGCvv/joZfaQJXUz4WFd6akTw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459452; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=7sE8W3VI1V3vjXuz/LM8ZZERrDVCUZFcI4EPJGcPIlM=; b=ZvMRMFGIVsu7aQphCMgKIw8UNPOs1AGkfY3cbSWi2uVQ2G/06ht45jePPpqCfj8I7v2L wIrF5cWquOvQGpiFrFt5yWcyk0EEzWxv3mTCLiKojf6uzCaxIZTxHDFzAUEMQBCaJqDVH t4bntiXT/WIxtXAQL0seODwTUM+hwfrZNsQVfYHvfPwxXI4IKFN4xZsVDo8zWQEn1QZy+ g9nDGLjz/zXC4xYaZxRaRTQgDB1V5JQuMCLXUWK+mYhQvd98CTc7JEemRfvj3/ziNMoTB inRTDY1e5MxNhcEkNlGcu7gDvVvTBzr+hG7SK6OIFWL+nFCbGQeKNMmR26wUHuHccTQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OmB2PEuX; arc=pass header.oldest-pass=0 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 5FC33606A333; Mon, 23 Nov 2026 18:44: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=OmB2PEuX Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459452; b=fv+TC95YBdEOP2XdI5gD+L1XDGwgYRSXV0ffLe0tUzJfS28qBdmPp784SJhocY0NGQjo /WXj+RGBPgxyCmAz3MFmUMOr1W3lg0m04z+aAi7OVEHubw5vAxrCbwl6t4TNYUTWv9BDX bsFIEuqr9dRH95I+njAvcZDu12JzM/wg6AB/Q12kUh+w+4+pgqyv5HkfKhebuoqY6dJMO QCiBf9N8BlQpL4BvRC81C6q+db95MpIXAevei8Ma3/OCKAZ6yeBsWiZA5vC5UHSqpEAQo ZW7O6xWQHak98bu8mYKrnwjc1IQHgLwUH59iLszQL5OsCByXNazjm/1ggDXVLTDYB9g== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459452; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=7sE8W3VI1V3vjXuz/LM8ZZERrDVCUZFcI4EPJGcPIlM=; b=nG5h1Qk+UDhiyuqJj50NFqFJdFuexGqGB7qZWXgjgC5qP4ELigTDyfZqnbXwzCiBWbJt 5dG7KLP8PZURU8W8wlCDD5JqPlLK/dFzxjHFLONLfhDkbEp0ErvvALRGZ9M1hs0pPOsub IA36pli/YsDPL83Hh0lkMfaLCbeDoeA2y6JlDvxiJ9Gn5++Wx1ZOB7RDH981RvBcw1K+T AGkyVJr39Jkj0wndS/m1MAePE8TA3RQS8cUK6D/v9cf38Tu2bcx2ktoMBCrALh+xoK2v2 KyNpEPyd3XgB0FQaijR65ZcnJBZbKUvq8ZNk74SjfzAbjFI7mzC08Db4Mzo9oUUh8Xw== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id A1C8A1F00AD4; Mon, 23 Nov 2026 18:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459451; bh=7sE8W3VI1V3vjXuz/LM8ZZERrDVCUZFcI4EPJGcPIlM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=OmB2PEuXYebtlju+AEj0ixzwnxDOVprQRfhXvfyhAV3yicClKTgNnH818lmBIHWSI whkH7DRfCar6OF/eM7zEmSGxi6Xt5Slsl74QZuvETHOySBmmPDuHzVV7c+hBSFJziJ oOkmyPHbhmT7hZ0Io1ZXl+UygUeCTVbkcd8aKp2jUYUSnzVGwALm5TQbEIFUS643ho XsXt79SNhjffy551jdz+PP8NZ7QClRR4nWPpkOZPoZ9tBaJMyudVMPhu0yeBUPYwsf GNJchrtGEnGeaRGVtTYBJwb9mSrbVf+f5oQ4pZGvJmiRcDMedOr0vUusBxZX5syHeO yF2EzNbzhycEQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 9DE094C612; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:35 +0300 Subject: [PATCH 7/8] PCI: cs7542: Add CS7542 PCIe host support X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-7-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=18438; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=l8tQYV/KBNlLdAYng+NOlpoKWrRevN+OGd/q1aMRC9s=; b=QG0A115bMh4UUyxHwft4vCO7fwLXZKs1/HRIBZ8KUC6Dzrl+mNXpaXUXsluMD1rw3MXxnRwUK KOTdWUXknGKCmBxHpfodJQo1CBYGuzD5r0kXMyrXA7aG0mJtnCHpAjp X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Add DesignWare host glue consuming separate clock, reset and PHY providers. Use live link status and stop previous training before enumeration. Finish endpoint teardown before draining the shared IRQ and freeing MSI domains. Dispatch enabled INTx/MSI sources through one application interrupt and use its MSI target window. Prevent root configuration accesses at and above 0x200, including direct DesignWare DBI reads, while preserving the private CSR bank and separate iATU callback base. Unwind power and IRQ domains on failure and removal. Read live link/LTSSM state through the application wrapper. After link loss, block configuration and DBI accesses until controller reset and reprobe. Signed-off-by: Fil Dunsky --- drivers/pci/controller/dwc/Kconfig | 12 + drivers/pci/controller/dwc/Makefile | 2 + drivers/pci/controller/dwc/pcie-cs7542.c | 508 +++++++++++++++++++++++++++= ++++ 3 files changed, 522 insertions(+) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dw= c/Kconfig index 0a0d56fcf..88415954e 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -577,4 +577,16 @@ config PCIE_ULTRARISC By default, this symbol is enabled when ARCH_ULTRARISC is active, requiring no further configuration on that platform. =20 +config PCIE_CS7542 + tristate "Cortina Systems CS7542 PCIe controller" + depends on OF && HAS_IOMEM && PCI_MSI && COMMON_CLK + select PCIE_DW_HOST + select GENERIC_PHY + select RESET_CONTROLLER + help + Enable the DesignWare PCIe host controllers on Cortina CS7542. + Separate clock, reset and generic PHY providers are required. + The application interrupt handles both legacy INTx and MSI. + The module is called pcie-cs7542. + endmenu diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/d= wc/Makefile index d4f88cfc6..4a6ae9037 100644 --- a/drivers/pci/controller/dwc/Makefile +++ b/drivers/pci/controller/dwc/Makefile @@ -61,3 +61,5 @@ obj-$(CONFIG_ARM64) +=3D pcie-hisi.o obj-$(CONFIG_ARM64) +=3D pcie-tegra194-acpi.o endif endif + +obj-$(CONFIG_PCIE_CS7542) +=3D pcie-cs7542.o diff --git a/drivers/pci/controller/dwc/pcie-cs7542.c b/drivers/pci/control= ler/dwc/pcie-cs7542.c new file mode 100644 index 000000000..19225e9a2 --- /dev/null +++ b/drivers/pci/controller/dwc/pcie-cs7542.c @@ -0,0 +1,508 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pcie-designware.h" + +#define APP_INT_STATUS 0x00 +#define APP_INT_ENABLE 0x04 +#define APP_CORE_CONFIG 0x1c +#define APP_PM_STATUS 0x20 +#define APP_LINK_ACTIVE BIT(18) +#define APP_LTSSM_STATE GENMASK(9, 4) +#define APP_CFG_START 0x80 +#define APP_CFG_END 0x84 + +#define INT_INTX_ASSERT(x) BIT((x) * 2) +#define INT_INTX_ASSERT_MASK (BIT(0) | BIT(2) | BIT(4) | BIT(6)) +#define INT_MSI BIT(8) +#define INT_LINK_UP BIT(9) +#define INT_RADM_NONFATAL_ERR BIT(12) +#define INT_RADM_FATAL_ERR BIT(13) +#define INT_GM_COMPOSER_ERR BIT(16) +#define INT_RADMX_COMPOSER_ERR BIT(17) +#define INT_ELASTIC_OVF BIT(18) +#define INT_ELASTIC_UNF BIT(19) +#define INT_LINK_DOWN BIT(22) +#define INT_ERR_MASK (INT_RADM_NONFATAL_ERR | INT_RADM_FATAL_ERR | \ + INT_GM_COMPOSER_ERR | INT_RADMX_COMPOSER_ERR | \ + INT_ELASTIC_OVF | INT_ELASTIC_UNF | INT_LINK_DOWN) + +#define CORE_CFG_LTSSM_EN BIT(0) +#define CORE_CFG_AXI_UR_MASK BIT(5) + +#define APP_PORT_STRIDE 0x400 +#define APP_PHYS_BASE 0xF00A0000 +#define APP_CFG_WINDOW_LEN 0x1000 +#define APP_MSI_TARGET 0xC0 +#define RC_CFG_LIMIT 0x200 + +struct cortina_pcie { + struct dw_pcie pci; + void __iomem *app; + struct clk *clk; + struct phy *phy; + struct reset_control *reset; + struct gpio_desc *perst; + int irq; + bool msi_ready; + bool link_lost; + struct irq_domain *intx_domain; + raw_spinlock_t lock; + resource_size_t dbi_phys; + resource_size_t app_phys; + int port; +}; + +#define to_cortina_pcie(x) container_of((x), struct cortina_pcie, pci) + +static int cortina_pcie_port_init(struct cortina_pcie *cp) +{ + u32 value; + int ret; + + writel(cp->dbi_phys, cp->app + APP_CFG_START); + writel(cp->dbi_phys + APP_CFG_WINDOW_LEN - 1, cp->app + APP_CFG_END); + ret =3D readl_poll_timeout(cp->app + APP_CFG_END, value, + value =3D=3D cp->dbi_phys + APP_CFG_WINDOW_LEN - 1, 10, 10000); + if (ret) + return ret; + writel(0, cp->app + APP_INT_ENABLE); + writel(readl(cp->app + APP_INT_STATUS), cp->app + APP_INT_STATUS); + return 0; +} + +/* APP remains accessible after link loss, unlike the DBI port debug bank.= */ +static bool cortina_pcie_link_up(struct dw_pcie *pci) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + + return !READ_ONCE(cp->link_lost) && + !!(readl(cp->app + APP_PM_STATUS) & APP_LINK_ACTIVE); +} + +static enum dw_pcie_ltssm cortina_pcie_get_ltssm(struct dw_pcie *pci) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + + return FIELD_GET(APP_LTSSM_STATE, readl(cp->app + APP_PM_STATUS)); +} + +static int cortina_pcie_start_link(struct dw_pcie *pci) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + u32 v; + + v =3D readl(cp->app + APP_CORE_CONFIG); + v |=3D CORE_CFG_LTSSM_EN | CORE_CFG_AXI_UR_MASK; + writel(v, cp->app + APP_CORE_CONFIG); + return 0; +} + +static void cortina_pcie_stop_link(struct dw_pcie *pci) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + u32 value =3D readl(cp->app + APP_CORE_CONFIG); + + writel(value & ~CORE_CFG_LTSSM_EN, cp->app + APP_CORE_CONFIG); +} + +static void cortina_pcie_irq_handler(struct irq_desc *desc) +{ + struct cortina_pcie *cp =3D irq_desc_get_handler_data(desc); + struct irq_chip *chip =3D irq_desc_get_chip(desc); + u32 status, clear; + int i; + + chained_irq_enter(chip, desc); + + status =3D readl(cp->app + APP_INT_STATUS); + status &=3D readl(cp->app + APP_INT_ENABLE); + clear =3D status & ~INT_LINK_UP; + if (status & INT_LINK_DOWN) + clear |=3D INT_LINK_UP; + writel(clear, cp->app + APP_INT_STATUS); + + if (status & INT_LINK_DOWN) { + /* The DBI interface needs a controller reset after link loss. */ + raw_spin_lock(&cp->lock); + WRITE_ONCE(cp->link_lost, true); + writel(0, cp->app + APP_INT_ENABLE); + raw_spin_unlock(&cp->lock); + dev_warn_ratelimited(cp->pci.dev, "link lost; controller reprobe require= d\n"); + goto out; + } + + if (status & INT_ERR_MASK) + dev_err_ratelimited(cp->pci.dev, "port %d: PCIe error, status %#x\n", + cp->port, status); + + for (i =3D 0; i < PCI_NUM_INTX; i++) + if (status & INT_INTX_ASSERT(i)) + generic_handle_domain_irq(cp->intx_domain, i); + if ((status & INT_MSI) && cp->msi_ready) + dw_handle_msi_irq(&cp->pci.pp); + +out: + chained_irq_exit(chip, desc); +} + +static void cortina_intx_mask(struct irq_data *d) +{ + struct cortina_pcie *cp =3D irq_data_get_irq_chip_data(d); + u32 bit =3D INT_INTX_ASSERT(d->hwirq); + unsigned long flags; + + raw_spin_lock_irqsave(&cp->lock, flags); + writel(readl(cp->app + APP_INT_ENABLE) & ~bit, cp->app + APP_INT_ENABLE); + raw_spin_unlock_irqrestore(&cp->lock, flags); +} + +static void cortina_intx_unmask(struct irq_data *d) +{ + struct cortina_pcie *cp =3D irq_data_get_irq_chip_data(d); + u32 bit =3D INT_INTX_ASSERT(d->hwirq); + unsigned long flags; + + raw_spin_lock_irqsave(&cp->lock, flags); + if (!READ_ONCE(cp->link_lost)) + writel(readl(cp->app + APP_INT_ENABLE) | bit, cp->app + APP_INT_ENABLE); + raw_spin_unlock_irqrestore(&cp->lock, flags); +} + +static struct irq_chip cortina_intx_chip =3D { + .name =3D "cortina-INTx", + .irq_mask =3D cortina_intx_mask, + .irq_unmask =3D cortina_intx_unmask, +}; + +static int cortina_pcie_intx_map(struct irq_domain *domain, unsigned int i= rq, + irq_hw_number_t hwirq) +{ + irq_set_chip_and_handler(irq, &cortina_intx_chip, handle_simple_irq); + irq_set_chip_data(irq, domain->host_data); + return 0; +} + +static const struct irq_domain_ops cortina_intx_domain_ops =3D { + .map =3D cortina_pcie_intx_map, + .xlate =3D pci_irqd_intx_xlate, +}; + +static int cortina_pcie_init_irq_domain(struct cortina_pcie *cp) +{ + struct device *dev =3D cp->pci.dev; + struct device_node *intc; + + intc =3D of_get_child_by_name(dev->of_node, "interrupt-controller"); + if (!intc) + return dev_err_probe(dev, -ENODEV, "no interrupt-controller child\n"); + + cp->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(intc), PCI_= NUM_INTX, + &cortina_intx_domain_ops, cp); + of_node_put(intc); + if (!cp->intx_domain) + return dev_err_probe(dev, -ENOMEM, "cannot create INTx domain\n"); + return 0; +} + +static int cortina_pcie_rd_own_conf(struct pci_bus *bus, unsigned int devf= n, + int where, int size, u32 *val) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(to_dw_pcie_from_pp(bus->sysda= ta)); + + *val =3D ~0U; + if (where < 0 || (size !=3D 1 && size !=3D 2 && size !=3D 4) || + (where & (size - 1))) + return PCIBIOS_BAD_REGISTER_NUMBER; + if (READ_ONCE(cp->link_lost)) + return PCIBIOS_DEVICE_NOT_FOUND; + if (where >=3D RC_CFG_LIMIT || size > RC_CFG_LIMIT - where) { + *val =3D 0; + return PCIBIOS_SUCCESSFUL; + } + return pci_generic_config_read(bus, devfn, where, size, val); +} + +static int cortina_pcie_wr_own_conf(struct pci_bus *bus, unsigned int devf= n, + int where, int size, u32 val) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(to_dw_pcie_from_pp(bus->sysda= ta)); + + if (where < 0 || (size !=3D 1 && size !=3D 2 && size !=3D 4) || + (where & (size - 1))) + return PCIBIOS_BAD_REGISTER_NUMBER; + if (READ_ONCE(cp->link_lost)) + return PCIBIOS_DEVICE_NOT_FOUND; + if (where >=3D RC_CFG_LIMIT || size > RC_CFG_LIMIT - where) { + dev_dbg(bus->dev.parent, "ignoring RC config write at %#x\n", where); + return PCIBIOS_SUCCESSFUL; + } + return pci_generic_config_write(bus, devfn, where, size, val); +} + +static struct pci_ops cortina_own_pci_ops =3D { + .map_bus =3D dw_pcie_own_conf_map_bus, + .read =3D cortina_pcie_rd_own_conf, + .write =3D cortina_pcie_wr_own_conf, +}; + +static int cortina_pcie_host_init(struct dw_pcie_rp *pp) +{ + struct dw_pcie *pci =3D to_dw_pcie_from_pp(pp); + u8 cap =3D dw_pcie_find_capability(pci, PCI_CAP_ID_MSI); + u16 flags; + + pp->bridge->ops =3D &cortina_own_pci_ops; + pp->keep_rp_msi_en =3D true; + if (cap) { + flags =3D dw_pcie_readw_dbi(pci, cap + PCI_MSI_FLAGS); + dw_pcie_writew_dbi(pci, cap + PCI_MSI_FLAGS, flags | PCI_MSI_FLAGS_ENABL= E); + } + return 0; +} + +static int cortina_pcie_msi_init(struct dw_pcie_rp *pp) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(to_dw_pcie_from_pp(pp)); + u32 ctrl; + int ret; + + /* The application IRQ multiplexes MSI and INTx, so do not chain it twice= . */ + pp->msi_irq[0] =3D -ENODEV; + ret =3D dw_pcie_msi_host_init(pp); + if (ret) + return ret; + /* CS7542 routes endpoint MSI writes through its application target. */ + pp->msi_data =3D cp->app_phys + APP_MSI_TARGET; + /* A custom MSI hook owns setup and teardown of the multiplexed receiver.= */ + for (ctrl =3D 0; ctrl < pp->num_vectors / MAX_MSI_IRQS_PER_CTRL; ctrl++) { + dw_pcie_writel_dbi(&cp->pci, PCIE_MSI_INTR0_MASK + ctrl * MSI_REG_CTRL_B= LOCK_SIZE, + pp->irq_mask[ctrl]); + dw_pcie_writel_dbi(&cp->pci, PCIE_MSI_INTR0_ENABLE + ctrl * MSI_REG_CTRL= _BLOCK_SIZE, + ~0); + } + dw_pcie_writel_dbi(&cp->pci, PCIE_MSI_ADDR_LO, lower_32_bits(pp->msi_data= )); + dw_pcie_writel_dbi(&cp->pci, PCIE_MSI_ADDR_HI, upper_32_bits(pp->msi_data= )); + cp->msi_ready =3D true; + return 0; +} + +static void cortina_pcie_host_deinit(struct dw_pcie_rp *pp) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(to_dw_pcie_from_pp(pp)); + + /* Endpoints have stopped; now drain the shared IRQ before freeing domain= s. */ + writel(0, cp->app + APP_INT_ENABLE); + readl(cp->app + APP_INT_ENABLE); + synchronize_irq(cp->irq); + if (cp->msi_ready) { + cp->msi_ready =3D false; + dw_pcie_free_msi(pp); + pp->msi_irq_domain =3D NULL; + } +} + +static const struct dw_pcie_host_ops cortina_pcie_host_ops =3D { + .init =3D cortina_pcie_host_init, + .deinit =3D cortina_pcie_host_deinit, + .msi_init =3D cortina_pcie_msi_init, +}; + +/* Standard RC configuration above 512 bytes wedges the CS7542 bus. + * The DesignWare private register bank at 0x700 and above remains accessi= ble. + */ +static u32 cortina_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, + u32 reg, size_t size) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + u32 value =3D 0; + + if (READ_ONCE(cp->link_lost)) + return ~0U; + if (base =3D=3D pci->dbi_base && reg < 0x700 && reg + size > RC_CFG_LIMIT) + return 0; + dw_pcie_read(base + reg, size, &value); + return value; +} + +static void cortina_pcie_write_dbi(struct dw_pcie *pci, void __iomem *base, + u32 reg, size_t size, u32 value) +{ + struct cortina_pcie *cp =3D to_cortina_pcie(pci); + + if (READ_ONCE(cp->link_lost)) + return; + if (base =3D=3D pci->dbi_base && reg < 0x700 && reg + size > RC_CFG_LIMIT) + return; + dw_pcie_write(base + reg, size, value); +} + +static const struct dw_pcie_ops cortina_dw_pcie_ops =3D { + .read_dbi =3D cortina_pcie_read_dbi, + .write_dbi =3D cortina_pcie_write_dbi, + .link_up =3D cortina_pcie_link_up, + .get_ltssm =3D cortina_pcie_get_ltssm, + .start_link =3D cortina_pcie_start_link, + .stop_link =3D cortina_pcie_stop_link, +}; + +static void cortina_pcie_power_off(struct cortina_pcie *cp) +{ + gpiod_set_value_cansleep(cp->perst, 1); + reset_control_assert(cp->reset); + phy_power_off(cp->phy); + phy_exit(cp->phy); + clk_disable_unprepare(cp->clk); +} + +static int cortina_pcie_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct cortina_pcie *cp; + struct dw_pcie *pci; + struct resource *res; + int ret; + + cp =3D devm_kzalloc(dev, sizeof(*cp), GFP_KERNEL); + if (!cp) + return -ENOMEM; + pci =3D &cp->pci; + pci->dev =3D dev; + pci->ops =3D &cortina_dw_pcie_ops; + res =3D platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi"); + if (!res) + return -EINVAL; + cp->dbi_phys =3D res->start; + cp->app =3D devm_platform_ioremap_resource_byname(pdev, "app"); + if (IS_ERR(cp->app)) + return PTR_ERR(cp->app); + res =3D platform_get_resource_byname(pdev, IORESOURCE_MEM, "app"); + cp->app_phys =3D res->start; + if (res->start < APP_PHYS_BASE || + (res->start - APP_PHYS_BASE) % APP_PORT_STRIDE || + (res->start - APP_PHYS_BASE) / APP_PORT_STRIDE >=3D 3) + return -EINVAL; + cp->port =3D (res->start - APP_PHYS_BASE) / APP_PORT_STRIDE; + raw_spin_lock_init(&cp->lock); + cp->clk =3D devm_clk_get(dev, NULL); + if (IS_ERR(cp->clk)) + return dev_err_probe(dev, PTR_ERR(cp->clk), "controller clock\n"); + cp->reset =3D devm_reset_control_get_exclusive(dev, NULL); + if (IS_ERR(cp->reset)) + return dev_err_probe(dev, PTR_ERR(cp->reset), "controller reset\n"); + cp->phy =3D devm_phy_get(dev, "pcie"); + if (IS_ERR(cp->phy)) + return dev_err_probe(dev, PTR_ERR(cp->phy), "SerDes\n"); + cp->perst =3D devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(cp->perst)) + return dev_err_probe(dev, PTR_ERR(cp->perst), "PERST# GPIO\n"); + cp->irq =3D platform_get_irq(pdev, 0); + if (cp->irq < 0) + return cp->irq; + + ret =3D clk_prepare_enable(cp->clk); + if (ret) + return ret; + ret =3D phy_init(cp->phy); + if (ret) + goto disable_clk; + ret =3D phy_set_mode(cp->phy, PHY_MODE_PCIE); + if (ret) + goto exit_phy; + ret =3D phy_power_on(cp->phy); + if (ret) + goto exit_phy; + ret =3D reset_control_reset(cp->reset); + if (ret) + goto power_off; + writel(0, cp->app + APP_INT_ENABLE); + cortina_pcie_stop_link(pci); + writel(readl(cp->app + APP_INT_STATUS), cp->app + APP_INT_STATUS); + gpiod_set_value_cansleep(cp->perst, 0); + msleep(100); + ret =3D cortina_pcie_port_init(cp); + if (ret) + goto power_off; + ret =3D cortina_pcie_init_irq_domain(cp); + if (ret) + goto power_off; + irq_set_chained_handler_and_data(cp->irq, cortina_pcie_irq_handler, cp); + writel(INT_MSI | INT_ERR_MASK, cp->app + APP_INT_ENABLE); + pci->pp.ops =3D &cortina_pcie_host_ops; + ret =3D dw_pcie_host_init(&pci->pp); + if (ret) { + writel(0, cp->app + APP_INT_ENABLE); + irq_set_chained_handler_and_data(cp->irq, NULL, NULL); + irq_domain_remove(cp->intx_domain); + goto power_off; + } + platform_set_drvdata(pdev, cp); + return 0; + +power_off: + gpiod_set_value_cansleep(cp->perst, 1); + reset_control_assert(cp->reset); + phy_power_off(cp->phy); +exit_phy: + phy_exit(cp->phy); +disable_clk: + reset_control_assert(cp->reset); + clk_disable_unprepare(cp->clk); + return dev_err_probe(dev, ret, "host initialization\n"); +} + +static void cortina_pcie_remove(struct platform_device *pdev) +{ + struct cortina_pcie *cp =3D platform_get_drvdata(pdev); + + dw_pcie_host_deinit(&cp->pci.pp); + irq_set_chained_handler_and_data(cp->irq, NULL, NULL); + irq_domain_remove(cp->intx_domain); + cortina_pcie_power_off(cp); +} + +static void cortina_pcie_shutdown(struct platform_device *pdev) +{ + struct cortina_pcie *cp =3D platform_get_drvdata(pdev); + + writel(0, cp->app + APP_INT_ENABLE); + cortina_pcie_stop_link(&cp->pci); + gpiod_set_value_cansleep(cp->perst, 1); + reset_control_assert(cp->reset); +} + +static const struct of_device_id cortina_pcie_of_match[] =3D { + { .compatible =3D "cortina,cs7542-pcie" }, + { } +}; +MODULE_DEVICE_TABLE(of, cortina_pcie_of_match); + +static struct platform_driver cortina_pcie_driver =3D { + .probe =3D cortina_pcie_probe, + .remove =3D cortina_pcie_remove, + .shutdown =3D cortina_pcie_shutdown, + .driver =3D { + .name =3D "cs7542-pcie", + .of_match_table =3D cortina_pcie_of_match, + }, +}; +module_platform_driver(cortina_pcie_driver); + +MODULE_DESCRIPTION("Cortina Systems CS7542 PCIe host controller"); +MODULE_LICENSE("GPL"); --=20 2.53.0 From nobody Tue Nov 24 11:35:56 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795459451; b=ZD2QuaVAbkl2xRkITYzRxgo4I9XpCV/PZ0jNK18VTsJPKOabpEeOu99SRYNF5C9qaD3l tLEkqpRk8drjs6aDvQE/B1/4Ihqm8axt0ul4ydg3pw+hMiIk9Gy0CLMqOEN1g6az6UMbe 1+cUyMX+5X4eLxz/BrCSjD+H/jmAgMWBIs1vhSvI9rKwsQtSaJqJANvp1YViQDhYRLHb9 hw82nALpHBYFPETcHdZlVyMM3tXH/IYLzIZUS6y+bG82Ww2/ZQE7KNYieHsAUVXWKrUfG bHuzxL0sS0AYxXen9jFd/s2o5K+5Ml+LQG79WC8F4Q0MC9pi00gQrySbl5G5Ud4g5hg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795459451; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+o+JlwNGILg9TS+MqHvdFg2BeF8SIkQObMLxudXZheY=; b=Z0ONHCnsVtwepfCHZIuRTzZcKq+vD53SU7LUeUP60rnVWCBr6msjJ/2VXuHv7hYm1gsX XNzNkpQBEoIW/3YCgjDCdgM96NfeGtSrUMqAPQXvsqVBvlHEW4L+Qc8jDFRVII4Fohg4T qEnqAsepl/8INDSOBL1krtDcwYZUo6u1mKn4op678eWMUiDGnYQmdp7puBLg6xRcpzSHT mea7gp2L9RbTBy8wnfBPuxueVPdYA2AXdzXMJ2lbLMLIpf8WopioMZFfIFCZc49J41G4W HbWw2z4hPFY0fO8ihCmbNsA7QtkHFIbn+Se4ZMhzUgcBJQUleefy3IhWdfatizft+aw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aDPs4Ra4; arc=pass header.oldest-pass=0 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 084AF606A31A; Mon, 23 Nov 2026 18:44:10 +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=aDPs4Ra4 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795459450; b=qW9DfzQJVE38QvPlqPmBh1Jan1VcHEOitT99doJfNgP/VXSwyrpwWXnM0uA9jHNBdxwE 4zwYChTDr1p99ppZUfEDwnnzzVKFVejLfBMJfEGZdeYyZKQWUeq6KzCkgh+CVC1MJVMm8 NDB4MME/uy2Wbs8zt2sND36J2fsXAOpsSz/WVz3tOVYBJsjiX/IwmOkyh7E9ZJFnFuFlf IW3fx/P62bjE3/4Gb6H72Xfk5wD0wwOxYsxJgt+rDMRLJH96vmJEKi9XETABLHXaw/Qtk f8exa6Zxuwm6so6CcVgFvk9XQTSllhe0kWNVAfnLQhUaumh59NG/4dG6ZZBqidzF6xg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795459450; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+o+JlwNGILg9TS+MqHvdFg2BeF8SIkQObMLxudXZheY=; b=mq4TxaXVmVEuNLi76kBR6jRpsM0Luw+1y891XzuBGMDfl865X0CnPFl5mg+vMoGGzprO woYfHSFS9aUJnvgwv/pixZkGTrd/p2QTKS1rRKNB/F3pXasHX+xcnxADdsvSCY34hifGW ouc2RqM58wCmdMUZ0E/x/PG3ZV07nSOTAFHOeGmlv65iXd8J2DCSsSiq00KFg0Xu7JzqX o9hjzhTMIQnCdbSjXGy/igy7MVCSVJyndCIuCrvesPeMNBK9N8NdJ84eIfgoM7S0HTlBK wlHgDb5RlJdbRkayfUxu1D29hm+lKayA4OlnRV3vmpRVkCaJpj2G8ivBUbYGnX7TQjg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id A1CE71F00ADE; Mon, 23 Nov 2026 18:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795459450; bh=+o+JlwNGILg9TS+MqHvdFg2BeF8SIkQObMLxudXZheY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=aDPs4Ra4jTLj535EXb2q0WBdhPvEZBUS2UsIK41YMxbSE1I738ghK9D/hsZ2aG7eB kDPJBqO7mdnSw0AIQHZNocISENrfYOT/DEm0mwK+ZEXsguI7swrg0hPRiyGCmIs6lL Mk7x1TPK9zFvUFeVatuZTjC4liXQekSzXUcEnjCUxmSIDBB002AiPSEoJ6cvnS31yO Pf3V0Hu0IEsZha6krG05xqEIO8KlT20Rq/SccbpIvUc4SBLosq2X/oBJ6xH3FSC+1F icmiprHuVTmwggnYOHwvwPl8UGIziFNXTJftsv6B02sultKqTrBwHIEN95hdt4kwFm raXNPFZeHs1oQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id BA1284C616; Mon, 23 Nov 2026 18:43:34 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Mon, 23 Nov 2026 21:43:36 +0300 Subject: [PATCH 8/8] MAINTAINERS: Add CS7542 PCIe support X-Mailing-List: linux-kernel@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="utf-8" Message-Id: <20261123-b4-cs7542-pcie-v1-8-4cde5201d404@gmail.com> References: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> In-Reply-To: <20261123-b4-cs7542-pcie-v1-0-4cde5201d404@gmail.com> To: Manivannan Sadhasivam , Stephen Boyd , Vinod Koul Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof Wilczynski , Rob Herring , Bjorn Helgaas , Brian Masney , Jerome Brunet , Neil Armstrong , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795459409; l=1321; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=QHj1rsaxQpilF2S2K/I8XJEDNkzvjAgVnMPKiPzY1VY=; b=tPTmBU/Q6JWbN1fb1Rw5jN7N8a2+v3+qHKavCh3GAprkTVytOkoit+bNqhXYVQ7xo4ZZbLL72 M+Kh19wnycdA7AYEOizhL08pou1T1L4EJ4YbplBb6U1Sd4FFRe2YTrb X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: quoted-printable From: Fil Dunsky Cover the new PCIe control, SerDes and host drivers and their bindings under the existing CS7542 entry. Signed-off-by: Fil Dunsky --- MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index d8835aeca..d4cada9f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2949,13 +2949,19 @@ F: tools/perf/tests/shell/coresight/* F: tools/perf/util/cs-etm-decoder/* F: tools/perf/util/cs-etm.* =20 -ARM/CORTINA SYSTEMS CS7542 GLOBAL CONTROL +ARM/CORTINA SYSTEMS CS7542 GLOBAL CONTROL AND PCIE M: Fil Dunsky L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained +F: Documentation/devicetree/bindings/clock/cortina,cs7542-pcie-control.yaml +F: Documentation/devicetree/bindings/pci/cortina,cs7542-pcie.yaml +F: Documentation/devicetree/bindings/phy/cortina,cs7542-pcie-phy.yaml F: Documentation/devicetree/bindings/pinctrl/cortina,cs7542-pinctrl.yaml F: Documentation/devicetree/bindings/soc/cortina/ +F: drivers/clk/clk-cs7542-pcie.c F: drivers/clk/clk-cs7542.c +F: drivers/pci/controller/dwc/pcie-cs7542.c +F: drivers/phy/phy-cs7542-pcie.c F: drivers/pinctrl/pinctrl-cs7542.c F: include/dt-bindings/clock/cortina,cs7542-clock.h =20 --=20 2.53.0