ARM: dts: Add PCIe support for Airoha EN7523
authorFelix Fietkau <nbd@nbd.name>
Wed, 15 Jun 2022 12:53:35 +0000 (14:53 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Wed, 15 Jun 2022 16:54:20 +0000 (18:54 +0200)
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>
Link: https://lore.kernel.org/r/20220615125335.96089-3-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm/boot/dts/en7523-evb.dts
arch/arm/boot/dts/en7523.dtsi

index a8d8bb0..f23a25c 100644 (file)
 &gpio1 {
        status = "okay";
 };
+
+&pcie0 {
+       status = "okay";
+};
+
+&pcie1 {
+       status = "okay";
+};
index 2e705b8..7f83933 100644 (file)
                gpio-controller;
                #gpio-cells = <2>;
        };
+
+       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>;
+               };
+       };
 };