From nobody Thu Oct 2 19:39:05 2025 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 CA8FC30F921 for ; Fri, 12 Sep 2025 14:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757686482; cv=none; b=sEOgZTkO/wmSYSjJ4L1cvThOs9+XIkZGpoD0IAz/+zddkU5GEzCFvFVjNNnuu+SbnzwEzTW8FvYl5IXaB6tB2rOTiOHbI0srdg8FstT9L1ZHkct2DX0+E20NUrt3YS7a9gXT1szAlDcjmyhlCCiRktWHjyKpqDM3iWtJOvwWEoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757686482; c=relaxed/simple; bh=f24DU5lC2gBcLbPMhD+jzo5pBeClzy+bh3ExwSA72ck=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yl8PX4EKriRTMKZ/OFpPaAkwKzWZVJPUYT4SfzNXFqPuxEpmX4yG+QxIM0ZwSunbg6U6rdHTWwo8v+3y0GYr/8cRsf3rVhhO0ncHJYNU75DJvtR+A5P7ygjQP2QpFjJP9PFtBwAcxStWSQPDjEavV/bLeQG6TkGEF8qbhoJR01g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fdKk2shd; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fdKk2shd" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3df3be0e098so1228988f8f.1 for ; Fri, 12 Sep 2025 07:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1757686479; x=1758291279; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=rQyCKb+9uJp7SOdagD6pw2vnDQu7jCiCKfd/I4XXgVA=; b=fdKk2shdis2yqRltQsQ6UF1KhFCMamWgW/hW6ITrrAb6JkxnkplOKlsGuhKyUEoebn kKWKeguIz80kv2ZsdvokhLCAq180jVt9FE5OnhJ3VtxiKLnGAIfayDDW65Muq6btwy0V 4eVkvm0tmkoo6RqQBnGGrsFUXkwct/nsvN6BOmTKGvGVpFHg0ZrUXqlUP6YuSwMTS173 ADCp3uTdMl5Pi2T7GxJ6QATebMMqmQhE8D+Wb/WymM/0JG/WO/jgKALLqduyOwLTLlNS PgbPbjgZg2nZWznVt5oWghgnkXLvwp8Xe3kILG4e7wG25XjhuVoSPWOnYPuGB5JGqV8R 0TLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757686479; x=1758291279; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rQyCKb+9uJp7SOdagD6pw2vnDQu7jCiCKfd/I4XXgVA=; b=C0zqz0VKVboFs023Ew7TZie8yeNNIuCpRyk2WXoaqU+2CgcEiKmvGh9MJiNB/VvNoD a0Biva3cyRWr9GdZUd+4zTLaH/Osw5OkGJoORgBINyMWIpEOyTSEpzb/XgCgdhlybPip oh77Lo0b9O4TD3ku4W41uvyne/u9nqFNY/+1VBm0LF7D32FNhGvsyV0hiY31KzVjd7Lp QwohCYCWh1l/cBBclZAjnyhxb6q2a/U47QG6x914kW3KoOMnfR6OJaztv/Q5kaK4GYrp D/fHvgALyupCwga0V8BB9pjcfk4JAPPwsMhN8RmzTRxCVHxcKKFY3+LHxiyl27qhwMgE xqNg== X-Forwarded-Encrypted: i=1; AJvYcCXWFsu5+LHpH5sWAH7q2sIzhcHySGaqi5O5qoevT3UgH0J6aPNo4cWSRXXnJLzYMjUVZiJVgDuKNjcN5VM=@vger.kernel.org X-Gm-Message-State: AOJu0YyRcCWf4UKoKgonLhKEbyatbloL0ZUoRyBtMJ+bhsdShBKoRS09 x2+ZyGAeuArABm02hxkfN/DS0NaG/lhpqVIK+TreSnl1sWJB36SlnBIRP1t9fJQFCcU= X-Gm-Gg: ASbGncvZeImSXDsdRyGLLho0bF6V6KGeMg++/UXYcPiAcpRDXbnOAQSLH4l623oZY9R ZsuwhFt0c7sZODKWQh/lYogdjZYr6Ks1IeF4y9owAa/3hh8QJyXtckw+y/7bS2orfM02w4tneAD gmmEnArtf4hGsVpI3Q4VNvySlsuNmB12/KfmRNyZhfBN1nKcg6yVycmgHttJQUc9Ekj70oA/rCV BEEspR4CSp6PJaJCcQPSXLp7sc7BJilf92COikfBcc532LjsEnXar+5qE52oC+K4wcYEaJF9cHq TmmaZoFwaK7xcM67xZ7Bf/n3TOEjJOffQZlBBp9uOihw2/1BSIv4WTL2sfKs5lEjGeYKCego5Ak H3TYtifegkjlpq4CDtQ8XxgAS5UGxuO8SZOaOtNMH/Q== X-Google-Smtp-Source: AGHT+IHr9QNx6nq0CgD6or/rsKobvrFcl0bL9J7mn1ygpYIXLnS8oK1XThgJ5+3dtK7jLpCenoLvwQ== X-Received: by 2002:a05:6000:2584:b0:3e7:5f26:f1d7 with SMTP id ffacd0b85a97d-3e76578976cmr3370545f8f.12.1757686478881; Fri, 12 Sep 2025 07:14:38 -0700 (PDT) Received: from vingu-cube.. ([2a01:e0a:f:6020:40ce:250c:1a13:d1ba]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e7607cd415sm6680739f8f.30.2025.09.12.07.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Sep 2025 07:14:38 -0700 (PDT) From: Vincent Guittot To: chester62515@gmail.com, mbrugger@suse.com, ghennadi.procopciuc@oss.nxp.com, s32@nxp.com, lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, Ionut.Vicovan@nxp.com, larisa.grigore@nxp.com, Ghennadi.Procopciuc@nxp.com, ciprianmarian.costea@nxp.com, bogdan.hamciuc@nxp.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: pcie: Add the NXP PCIe controller Date: Fri, 12 Sep 2025 16:14:33 +0200 Message-ID: <20250912141436.2347852-2-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250912141436.2347852-1-vincent.guittot@linaro.org> References: <20250912141436.2347852-1-vincent.guittot@linaro.org> 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" Describe the PCIe controller available on the S32G platforms. Co-developed-by: Ionut Vicovan Signed-off-by: Ionut Vicovan Co-developed-by: Bogdan-Gabriel Roman Signed-off-by: Bogdan-Gabriel Roman Co-developed-by: Larisa Grigore Signed-off-by: Larisa Grigore Co-developed-by: Ghennadi Procopciuc Signed-off-by: Ghennadi Procopciuc Co-developed-by: Ciprian Marian Costea Signed-off-by: Ciprian Marian Costea Co-developed-by: Bogdan Hamciuc Signed-off-by: Bogdan Hamciuc Signed-off-by: Vincent Guittot --- .../devicetree/bindings/pci/nxp,s32-pcie.yaml | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/nxp,s32-pcie.yaml diff --git a/Documentation/devicetree/bindings/pci/nxp,s32-pcie.yaml b/Docu= mentation/devicetree/bindings/pci/nxp,s32-pcie.yaml new file mode 100644 index 000000000000..287596d7162d --- /dev/null +++ b/Documentation/devicetree/bindings/pci/nxp,s32-pcie.yaml @@ -0,0 +1,169 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/nxp,s32-pcie.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2xx/S32G3xx PCIe controller + +maintainers: + - Bogdan Hamciuc + - Ionut Vicovan + +description: + This PCIe controller is based on the Synopsys DesignWare PCIe IP. + The S32G SoC family has two PCIe controllers, which can be configured as + either Root Complex or End Point. + +properties: + compatible: + oneOf: + - enum: + - nxp,s32g2-pcie # S32G2 SoCs RC mode + - items: + - const: nxp,s32g3-pcie + - const: nxp,s32g2-pcie + + reg: + minItems: 7 + maxItems: 7 + + reg-names: + items: + - const: dbi + - const: dbi2 + - const: atu + - const: dma + - const: ctrl + - const: config + - const: addr_space + + interrupts: + minItems: 8 + maxItems: 8 + + interrupt-names: + items: + - const: link_req_stat + - const: dma + - const: msi + - const: phy_link_down + - const: phy_link_up + - const: misc + - const: pcs + - const: tlp_req_no_comp + + msi-parent: + description: + Use this option to reference the GIC controller node which will + handle the MSIs. This property can be used only in Root Complex mode. + The msi-parent node must be declared as "msi-controller" and the lis= t of + available SPIs that can be used must be declared using "mbi-ranges". + If "msi-parent" is not present in the PCIe node, MSIs will be handled + by iMSI-RX -Integrated MSI Receiver [AXI Bridge]-, an integrated + MSI reception module in the PCIe controller's AXI Bridge which + detects and terminates inbound MSI requests (received on the RX wire= ). + These MSIs no longer appear on the AXI bus, instead a hard-wired + interrupt is raised, documented as "DSP AXI MSI Interrupt" in the SoC + Reference Manual. + + nxp,phy-mode: + $ref: /schemas/types.yaml#/definitions/string + description: Select PHY mode for PCIe controller + enum: + - crns # Common Reference Clock, No Spread Spectrum + - crss # Common Reference Clock, Spread Spectrum + - srns # Separate reference Clock, No Spread Spectrum + - sris # Separate Reference Clock, Independent Spread Spectrum + + max-link-speed: + description: + The max link speed is normaly Gen3, but can be enforced to a lower v= alue + in case of special limitations. + maximum: 3 + + num-lanes: + description: + Max bus width (1 or 2); it is the number of physical lanes + minimum: 1 + maximum: 2 + +allOf: + - $ref: /schemas/pci/snps,dw-pcie-common.yaml# + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - ranges + - nxp,phy-mode + - num-lanes + - phys + +additionalProperties: true + +examples: + - | + #include + #include + + bus { + #address-cells =3D <2>; + #size-cells =3D <2>; + + pcie0: pcie@40400000 { + compatible =3D "nxp,s32g3-pcie", + "nxp,s32g2-pcie"; + dma-coherent; + reg =3D <0x00 0x40400000 0x0 0x00001000>, /* dbi registers */ + <0x00 0x40420000 0x0 0x00001000>, /* dbi2 registers */ + <0x00 0x40460000 0x0 0x00001000>, /* atu registers */ + <0x00 0x40470000 0x0 0x00001000>, /* dma registers */ + <0x00 0x40481000 0x0 0x000000f8>, /* ctrl registers */ + /* RC configuration space, 4KB each for cfg0 and cfg1 + * at the end of the outbound memory map + */ + <0x5f 0xffffe000 0x0 0x00002000>, + <0x58 0x00000000 0x0 0x40000000>; /* 1GB EP addr space */ + reg-names =3D "dbi", "dbi2", "atu", "dma", "ctrl", + "config", "addr_space"; + #address-cells =3D <3>; + #size-cells =3D <2>; + device_type =3D "pci"; + ranges =3D + /* downstream I/O, 64KB and aligned naturally just + * before the config space to minimize fragmentation + */ + <0x81000000 0x0 0x00000000 0x5f 0xfffe0000 0x0 0x0001000= 0>, + /* non-prefetchable memory, with best case size and + * alignment + */ + <0x82000000 0x0 0x00000000 0x58 0x00000000 0x7 0xfffe000= 0>; + + nxp,phy-mode =3D "crns"; + bus-range =3D <0x0 0xff>; + interrupts =3D , + , + , + , + , + , + , + ; + interrupt-names =3D "link_req_stat", "dma", "msi", + "phy_link_down", "phy_link_up", "misc", + "pcs", "tlp_req_no_comp"; + #interrupt-cells =3D <1>; + interrupt-map-mask =3D <0 0 0 0x7>; + interrupt-map =3D <0 0 0 1 &gic 0 0 0 128 4>, + <0 0 0 2 &gic 0 0 0 129 4>, + <0 0 0 3 &gic 0 0 0 130 4>, + <0 0 0 4 &gic 0 0 0 131 4>; + msi-parent =3D <&gic>; + + num-lanes =3D <2>; + phys =3D <&serdes0 PHY_TYPE_PCIE 0 0>; + }; + }; --=20 2.43.0