LKML Archive on lore.kernel.org
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 v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523
Date: Thu, 25 Nov 2021 12:07:36 +0100	[thread overview]
Message-ID: <20211125110738.41028-11-nbd@nbd.name> (raw)
In-Reply-To: <20211125110738.41028-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 | 12 +++++++
 arch/arm/boot/dts/en7523.dtsi    | 60 ++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts
index e8e5c034cee7..af1a8dd40a41 100644
--- a/arch/arm/boot/dts/en7523-evb.dts
+++ b/arch/arm/boot/dts/en7523-evb.dts
@@ -25,3 +25,15 @@ memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
 };
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&pcie1 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi
index eabf3fdb3d52..d9bdb51614b5 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";
 	};
+
+	pcie: pcie@1a140000 {
+		compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie";
+		device_type = "pci";
+		reg = <0x1fa91000 0x1000>,
+		      <0x1fa92000 0x1000>;
+		reg-names = "port0", "port1";
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&scu EN7523_CLK_PCIE>,
+			 <&scu EN7523_CLK_PCIE>;
+		clock-names = "sys_ck0", "sys_ck1";
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x20000000  0x20000000  0 0x10000000>;
+		status = "disabled";
+
+		pcie0: pcie@0,0 {
+			device_type = "pci";
+			reg = <0x0000 0 0 0 0>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			#interrupt-cells = <1>;
+			ranges;
+			status = "disabled";
+
+			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@1,0 {
+			device_type = "pci";
+			reg = <0x0800 0 0 0 0>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			#interrupt-cells = <1>;
+			ranges;
+			status = "disabled";
+
+			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-11-25 11:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211125110738.41028-1-nbd@nbd.name>
2021-11-25 11:07 ` [PATCH v4 01/12] dt-bindings: Add vendor prefix for Airoha Felix Fietkau
2021-11-28 23:28   ` Rob Herring
2021-11-25 11:07 ` [PATCH v4 02/12] dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB Felix Fietkau
2021-11-28 23:29   ` Rob Herring
2021-11-25 11:07 ` [PATCH v4 03/12] ARM: dts: Add basic support for Airoha EN7523 Felix Fietkau
2021-11-25 11:07 ` [PATCH v4 04/12] ARM: Add basic support for Airoha EN7523 SoC Felix Fietkau
2021-11-25 13:21   ` Robin Murphy
2021-11-25 11:07 ` [PATCH v4 05/12] ARM: multi_v7_defconfig: Add " Felix Fietkau
2021-11-25 11:07 ` [PATCH v4 06/12] dt-bindings: Add en7523-scu device tree binding documentation Felix Fietkau
2021-11-28 23:31   ` Rob Herring
2021-11-25 11:07 ` [PATCH v4 07/12] clk: en7523: Add clock driver for Airoha EN7523 SoC Felix Fietkau
2021-11-27 11:23   ` kernel test robot
2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau
2021-11-28 23:32   ` Rob Herring
2021-11-25 11:07 ` [PATCH v4 09/12] PCI: mediatek: allow selecting controller driver for airoha arch Felix Fietkau
2021-11-25 11:07 ` Felix Fietkau [this message]
2021-11-25 12:15   ` [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 Jianjun Wang
2021-11-25 11:07 ` [PATCH v4 11/12] dt-bindings: arm: airoha: Add binding for Airoha GPIO controller Felix Fietkau
2021-11-26  1:19   ` Linus Walleij
2021-11-25 11:07 ` [PATCH v4 12/12] gpio: Add support for Airoha EN7523 " Felix Fietkau
2021-11-25 12:59   ` Bartosz Golaszewski
2021-11-26 16:57     ` Andy Shevchenko
2021-11-26 17:19   ` John Crispin

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=20211125110738.41028-11-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 \
    --subject='Re: [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523' \
    /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

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).