From nobody Thu Oct 2 19:40:15 2025 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C593305973 for ; Fri, 12 Sep 2025 12:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757679895; cv=none; b=OPeZ+c40gO4lWlk27AiBAg7AkRUNRmDIS9Xml0Ec/2FkmLNM+xIpMEtbbJeq4Kh92xiPmuW8/p0e+8TKIOIkqkc7QdzpcPnBJh453uKfQ4VezmciLMt52DQIcCFJIE2HkDkuktkfEyek4O9ZNBMDk0QcuPfiutAptJYhZwXzrmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757679895; c=relaxed/simple; bh=DTZ92oDJggS1WXGTvAShniZWsehPtBq35lBKawHrEds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u3I3YTHqzZaHQeiazvzraZxSvyUL8z7VUe1hHYL72u0wPKtnHX6C+cW/nDDr6aT+gKAqPbG9Z5CE5Dd3a2HOE/5XRN1LQvPPlrzvAdmICjZ2Mu1ti/KeaFeBLr+BirBW3I80+B5DbJX0oxAfd8J6XVR0oWU/PsauK0Bm1hdV4bI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=k0BWut14; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="k0BWut14" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-45df7dc1b98so11084075e9.1 for ; Fri, 12 Sep 2025 05:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1757679891; x=1758284691; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uhBb5TBULQ73ztKy/LFHi1E4SeT/YUCkAzOQ9bzmyQY=; b=k0BWut14cEdlOE5f/P1fsmzU7qAy957AK+nRtHTsGXtqRqYw7RmQ6xKJKlx5Ubea0U 7OAgkWKQU/dBkk5iVxvr6kG74qAIeOJ6OYO8B7PzliD4cNClMKLIqSzGscijEDs5Nn6H IFkhTwF9z81Nf1q0FlwJC6vS64lEcPs4zr5B45mVVkG526A1C/pDZVCnC2Yof00cTEN2 q62E8ljxKczSxIYrbvUCrDnZ9C/pkQaCIyEnCOq064VV8RaG1Zd3v2YJkady+zbOn0qB Y9jVe1N1CMBA9DBUWZRshSEOxuePfCZHS19d0thGSgS64+5E5L58VXKVeaG7Xw00R+P6 hHYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757679891; x=1758284691; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uhBb5TBULQ73ztKy/LFHi1E4SeT/YUCkAzOQ9bzmyQY=; b=Ra6knryGrl5WguP4s9yLQQyKs0VA80JxNrKz7Sl28d3JehViqQnMSAtmaP7EgCYuDi iKHO69gThbnQnxHhe82R8xXqjK5SUzV6AQYIcglYNZNqrEHaiCuAUpKlPadReeHhOksC pgdw0eYUfPeBZRuF4FabQ7k8ymdujceuIyixpyGlijS6dRRfPsZ1U/nEwOTnU/vHuXqU /L3bEaexrJDJTiVRWjM+DlNEJ8PoR7Qe+ZGGj3BcDTUPxmhngGT/XxtXycTr2qvrNpxC ZVL0i/C33ZtH0fYDg0DxatUrennqJCFYMPPSLdpsyabGVOHZvF6e/mCwJFQH5Rf4XWcv z+5A== X-Forwarded-Encrypted: i=1; AJvYcCXBYr0cMrawcK8GdQCFMv8rCTfbbSRYfodmp+YG7kCEY0QkhxCfvDO1C/m3F/BsvZUfLEel9Fq7dR9vaUg=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8i/Gk8dVKebd+szSxJsRgmjVi0DiJecq4cPIAJPatHoWnc2dO WWaH+RABI1/5Gim1G7Lar8nUldWgZgroJrzy9VnwZUljvkxy/UihkxmjhuF24OF+W2A= X-Gm-Gg: ASbGnctw3YUAiEUJbIwn01fIcvbW7f6t2O/eJjDAUEoUy5VMUt0GML5q5Rzja3FdNcu nOIMgTmZKEfBO5wsaMHki30uXguVaQBgIWp4sN2zG8aLSwd51ZOnTk3Sz7U/cZv5Zjjmq9gcYwK Ja545+fEWtFYsY9kuUYv5TeJeRp/i73grVZ+puG0/eqtxizaI+Q7gGkl4z9tbrgpJPT1NvuLalE fvtIAzTOwnXoE4xSsz5tc8xq4B+vnnOG5C1vGe4v20MdMSVRXLqgkrAeiQAhMH05Gv1tODDcmvH fl/KEUzsoxSeFbJnd9hrQfrSzmxloVDhm+ZYBiHQUD5ZTWbUSulW8cXkdvXBKvnp4a9GYcJIG8n 2EjYIoenkT+CmRNzOKAuGUlHMCB++V+/mLzQ3k7H4KiH7Ti4MNLqN X-Google-Smtp-Source: AGHT+IEdsCGPIKWhjDrb8nTKsoB+RPP266NNJEYuJiwA3/+jfsp8I63q6qdDG0T+ECj+N93PbcNdJA== X-Received: by 2002:a05:600c:2282:b0:45e:286:51cf with SMTP id 5b1f17b1804b1-45f211d2470mr30944315e9.16.1757679891116; Fri, 12 Sep 2025 05:24:51 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.153]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e7607770c2sm6320091f8f.8.2025.09.12.05.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Sep 2025 05:24:50 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: bhelgaas@google.com, lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea , Wolfram Sang Subject: [PATCH v4 1/6] dt-bindings: PCI: renesas,r9a08g045s33-pcie: Add documentation for the PCIe IP on Renesas RZ/G3S Date: Fri, 12 Sep 2025 15:24:39 +0300 Message-ID: <20250912122444.3870284-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250912122444.3870284-1-claudiu.beznea.uj@bp.renesas.com> References: <20250912122444.3870284-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The PCIe IP available on the Renesas RZ/G3S complies with the PCI Express Base Specification 4.0. It is designed for root complex applications and features a single-lane (x1) implementation. Add documentation for it. Tested-by: Wolfram Sang Signed-off-by: Claudiu Beznea --- Changes in v4: - dropped "s33" string from compatible name - added port node documentation; due to this dropped Rob's Rb tag - reorderded properties - dropped spaces b/w "INT" and "A", "B", "C", "D" in comments Changes in v3: - collected tags - updated the flags of ranges property from example Changes in v2: - update the interrupt names by dropping "int" and "rc" string; due to this the patch description was adjusted - added "interrupt-controller" and made it mandatory - s/clkl1pm/pm/g - dropped the legacy-interrupt-controller node; with this the gic interrupt controller node was dropped as well as it is not needed anymore - updated interrupt-map in example and added interrupt-controller - added clock-names as required property as the pm clock is not handled though PM domains; this will allow the driver to have the option to request the pm clock by its name when implementation will be adjusted to used the pm clock - adjusted the size of dma-ranges to reflect the usage on SMARC module board - moved "renesas,sysc" at the end of the node in example to align with dts coding style .../bindings/pci/renesas,r9a08g045-pcie.yaml | 240 ++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/renesas,r9a08g045= -pcie.yaml diff --git a/Documentation/devicetree/bindings/pci/renesas,r9a08g045-pcie.y= aml b/Documentation/devicetree/bindings/pci/renesas,r9a08g045-pcie.yaml new file mode 100644 index 000000000000..e2f4ce8df13c --- /dev/null +++ b/Documentation/devicetree/bindings/pci/renesas,r9a08g045-pcie.yaml @@ -0,0 +1,240 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/renesas,r9a08g045-pcie.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/G3S PCIe host controller + +maintainers: + - Claudiu Beznea + +description: + Renesas RZ/G3S PCIe host controller complies with PCIe Base Specification + 4.0 and supports up to 5 GT/s (Gen2). + +properties: + compatible: + const: renesas,r9a08g045-pcie # RZ/G3S + + reg: + maxItems: 1 + + interrupts: + items: + - description: System error interrupt + - description: System error on correctable error interrupt + - description: System error on non-fatal error interrupt + - description: System error on fatal error interrupt + - description: AXI error interrupt + - description: INTA interrupt + - description: INTB interrupt + - description: INTC interrupt + - description: INTD interrupt + - description: MSI interrupt + - description: Link bandwidth interrupt + - description: PME interrupt + - description: DMA interrupt + - description: PCIe event interrupt + - description: Message interrupt + - description: All interrupts + + interrupt-names: + items: + - description: serr + - description: ser_cor + - description: serr_nonfatal + - description: serr_fatal + - description: axi_err + - description: inta + - description: intb + - description: intc + - description: intd + - description: msi + - description: link_bandwidth + - description: pm_pme + - description: dma + - description: pcie_evt + - description: msg + - description: all + + interrupt-controller: true + + clocks: + items: + - description: System clock + - description: PM control clock + + clock-names: + items: + - description: aclk + - description: pm + + resets: + items: + - description: AXI2PCIe Bridge reset + - description: Data link layer/transaction layer reset + - description: Transaction layer (ACLK domain) reset + - description: Transaction layer (PCLK domain) reset + - description: Physical layer reset + - description: Configuration register reset + - description: Configuration register reset + + reset-names: + items: + - description: aresetn + - description: rst_b + - description: rst_gp_b + - description: rst_ps_b + - description: rst_rsm_b + - description: rst_cfg_b + - description: rst_load_b + + power-domains: + maxItems: 1 + + dma-ranges: + description: + A single range for the inbound memory region. + maxItems: 1 + + renesas,sysc: + description: System controller phandle + $ref: /schemas/types.yaml#/definitions/phandle + +patternProperties: + "^pcie@0,[0-0]$": + type: object + allOf: + - $ref: /schemas/pci/pci-device.yaml# + - $ref: /schemas/pci/pci-pci-bridge.yaml# + + properties: + reg: + maxItems: 1 + + vendor-id: + const: 0x1912 + + device-id: + const: 0x0033 + + clocks: + items: + - description: Reference clock + + clock-names: + items: + - const: ref + + required: + - device_type + - vendor-id + - device-id + - clocks + - clock-names + + unevaluatedProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + - interrupts + - interrupt-names + - interrupt-map + - interrupt-map-mask + - interrupt-controller + - power-domains + - "#address-cells" + - "#size-cells" + - "#interrupt-cells" + - renesas,sysc + +allOf: + - $ref: /schemas/pci/pci-host-bridge.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + bus { + #address-cells =3D <2>; + #size-cells =3D <2>; + + pcie@11e40000 { + compatible =3D "renesas,r9a08g045-pcie"; + reg =3D <0 0x11e40000 0 0x10000>; + ranges =3D <0x02000000 0 0x30000000 0 0x30000000 0 0x8000000>; + /* Map all possible DRAM ranges (4 GB). */ + dma-ranges =3D <0x42000000 0 0x40000000 0 0x40000000 0x1 0x0>; + bus-range =3D <0x0 0xff>; + interrupts =3D , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-names =3D "serr", "serr_cor", "serr_nonfatal", + "serr_fatal", "axi_err", "inta", + "intb", "intc", "intd", "msi", + "link_bandwidth", "pm_pme", "dma", + "pcie_evt", "msg", "all"; + #interrupt-cells =3D <1>; + interrupt-controller; + interrupt-map-mask =3D <0 0 0 7>; + interrupt-map =3D <0 0 0 1 &pcie 0 0 0 0>, /* INTA */ + <0 0 0 2 &pcie 0 0 0 1>, /* INTB */ + <0 0 0 3 &pcie 0 0 0 2>, /* INTC */ + <0 0 0 4 &pcie 0 0 0 3>; /* INTD */ + clocks =3D <&cpg CPG_MOD R9A08G045_PCI_ACLK>, + <&cpg CPG_MOD R9A08G045_PCI_CLKL1PM>; + clock-names =3D "aclk", "pm"; + resets =3D <&cpg R9A08G045_PCI_ARESETN>, + <&cpg R9A08G045_PCI_RST_B>, + <&cpg R9A08G045_PCI_RST_GP_B>, + <&cpg R9A08G045_PCI_RST_PS_B>, + <&cpg R9A08G045_PCI_RST_RSM_B>, + <&cpg R9A08G045_PCI_RST_CFG_B>, + <&cpg R9A08G045_PCI_RST_LOAD_B>; + reset-names =3D "aresetn", "rst_b", "rst_gp_b", "rst_ps_b", + "rst_rsm_b", "rst_cfg_b", "rst_load_b"; + power-domains =3D <&cpg>; + device_type =3D "pci"; + #address-cells =3D <3>; + #size-cells =3D <2>; + max-link-speed =3D <2>; + renesas,sysc =3D <&sysc>; + status =3D "disabled"; + + pcie_port0: pcie@0,0 { + reg =3D <0x0 0x0 0x0 0x0 0x0>; + ranges; + clocks =3D <&versa3 5>; + clock-names =3D "ref"; + device_type =3D "pci"; + vendor-id =3D <0x1912>; + device-id =3D <0x0033>; + #address-cells =3D <3>; + #size-cells =3D <2>; + }; + }; + }; + +... --=20 2.43.0