linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: john@phrozen.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: [PATCH v6 11/14] ARM: dts: Add PCIe support for Airoha EN7523
Date: Fri,  3 Dec 2021 12:33:28 +0100	[thread overview]
Message-ID: <20211203113331.20510-12-nbd@nbd.name> (raw)
In-Reply-To: <20211203113331.20510-1-nbd@nbd.name>

This uses the MediaTek MT7622 PCIe driver, since the PCIe IP block is nearly
identical to the one in MT7622

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 arch/arm/boot/dts/en7523-evb.dts |  8 +++++
 arch/arm/boot/dts/en7523.dtsi    | 60 ++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts
index 69754ef9a628..0a79f5f6c311 100644
--- a/arch/arm/boot/dts/en7523-evb.dts
+++ b/arch/arm/boot/dts/en7523-evb.dts
@@ -25,3 +25,11 @@ memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
 };
+
+&pcie0 {
+	status = "okay";
+};
+
+&pcie1 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi
index 0148958c607b..862da104d6f2 100644
--- a/arch/arm/boot/dts/en7523.dtsi
+++ b/arch/arm/boot/dts/en7523.dtsi
@@ -119,4 +119,64 @@ uart1: serial@1fbf0000 {
 		clock-frequency = <1843200>;
 		status = "okay";
 	};
+
+
+	pcie0: pcie@1fa91000 {
+		compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie";
+		device_type = "pci";
+		reg = <0x1fa91000 0x1000>;
+		reg-names = "port0";
+		linux,pci-domain = <0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&scu EN7523_CLK_PCIE>;
+		clock-names = "sys_ck0";
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x20000000  0x20000000  0 0x8000000>;
+		status = "disabled";
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 7>;
+		interrupt-map = <0 0 0 1 &pcie_intc0 0>,
+				<0 0 0 2 &pcie_intc0 1>,
+				<0 0 0 3 &pcie_intc0 2>,
+				<0 0 0 4 &pcie_intc0 3>;
+		pcie_intc0: interrupt-controller {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+		};
+	};
+
+	pcie1: pcie@1fa92000 {
+		compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie";
+		device_type = "pci";
+		reg = <0x1fa92000 0x1000>;
+		reg-names = "port1";
+		linux,pci-domain = <1>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&scu EN7523_CLK_PCIE>;
+		clock-names = "sys_ck1";
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x28000000  0x28000000  0 0x8000000>;
+		status = "disabled";
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 7>;
+		interrupt-map = <0 0 0 1 &pcie_intc1 0>,
+				<0 0 0 2 &pcie_intc1 1>,
+				<0 0 0 3 &pcie_intc1 2>,
+				<0 0 0 4 &pcie_intc1 3>;
+		pcie_intc1: interrupt-controller {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+		};
+	};
+
 };
-- 
2.30.1


  parent reply	other threads:[~2021-12-03 11:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211203113331.20510-1-nbd@nbd.name>
2021-12-03 11:33 ` [PATCH v6 01/14] dt-bindings: Add vendor prefix for Airoha Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 02/14] dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB Felix Fietkau
2021-12-10 20:48   ` Rob Herring
2021-12-03 11:33 ` [PATCH v6 03/14] ARM: dts: Add basic support for Airoha EN7523 Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 04/14] ARM: Add basic support for Airoha EN7523 SoC Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 05/14] ARM: multi_v7_defconfig: Add " Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 06/14] dt-bindings: Add en7523-scu device tree binding documentation Felix Fietkau
2021-12-10 20:49   ` Rob Herring
2021-12-03 11:33 ` [PATCH v6 07/14] clk: en7523: Add clock driver for Airoha EN7523 SoC Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 08/14] ARM: dts: add clock support for Airoha EN7523 Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 09/14] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 10/14] PCI: mediatek: allow selecting controller driver for airoha arch Felix Fietkau
2021-12-06 20:11   ` Bjorn Helgaas
2021-12-03 11:33 ` Felix Fietkau [this message]
2021-12-03 11:33 ` [PATCH v6 12/14] dt-bindings: arm: airoha: Add binding for Airoha GPIO controller Felix Fietkau
2021-12-10 20:52   ` Rob Herring
2021-12-03 11:33 ` [PATCH v6 13/14] gpio: Add support for Airoha EN7523 " Felix Fietkau
2021-12-03 11:33 ` [PATCH v6 14/14] ARM: dts: add GPIO support for Airoha EN7523 Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211203113331.20510-12-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).