[openwrt/openwrt] apm821xx: WNDAP6x0: enumerate PCIe in device-tree

LEDE Commits lede-commits at lists.infradead.org
Sat Aug 29 11:15:58 EDT 2020


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0facedb515a3be864366463de1c7d28212a4ac1f

commit 0facedb515a3be864366463de1c7d28212a4ac1f
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Wed Aug 12 18:05:06 2020 +0200

    apm821xx: WNDAP6x0: enumerate PCIe in device-tree
    
    This patch adds the pcie-switch and bridge configuration of the
    WNDAP620 and WNDAP660.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/dts/netgear-wndap620.dts | 21 ++++++++++
 target/linux/apm821xx/dts/netgear-wndap660.dts | 54 ++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/target/linux/apm821xx/dts/netgear-wndap620.dts b/target/linux/apm821xx/dts/netgear-wndap620.dts
index 87b4e51a81..b01c2a5d62 100644
--- a/target/linux/apm821xx/dts/netgear-wndap620.dts
+++ b/target/linux/apm821xx/dts/netgear-wndap620.dts
@@ -26,3 +26,24 @@
 		gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
 	};
 };
+
+&PCIE0 {
+	/*
+	 * relevant lspci topology:
+	 *
+	 *	-+-[0000:40]---00.0-[41-7f]----00.0
+	 */
+
+	bridge at 64,0 {
+		reg = <0x00400000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		wifi0: wifi at 65,0 {
+			/* Atheros AR9380 5GHz */
+			compatible = "pci168c,0030";
+			reg = <0x00410000 0 0 0 0>;
+		};
+	};
+};
diff --git a/target/linux/apm821xx/dts/netgear-wndap660.dts b/target/linux/apm821xx/dts/netgear-wndap660.dts
index 3e5daac835..5d8fd50b6a 100644
--- a/target/linux/apm821xx/dts/netgear-wndap660.dts
+++ b/target/linux/apm821xx/dts/netgear-wndap660.dts
@@ -36,3 +36,57 @@
 		gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
 	};
 };
+
+&PCIE0 {
+	/*
+	 * relevant lspci topology:
+	 *
+	 *	-+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
+	 *	                                             +-03.0-[44]----00.0
+	 *
+	 */
+
+	bridge at 64,0 {
+		reg = <0x00400000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		bridge at 65,0 {
+			/* IDT PES3T3 PCI Express Switch */
+			compatible = "pci111d,8039";
+			reg = <0x00410000 0 0 0 0>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			ranges;
+
+			bridge at 66,2 {
+				compatible = "pci111d,8039";
+				reg = <0x00421000 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				ranges;
+
+				wifi0: wifi at 67,0 {
+					/* Atheros AR9380 2.4/5GHz */
+					compatible = "pci168c,0030";
+					reg = <0x00430000 0 0 0 0>;
+				};
+			};
+
+			bridge at 66,3 {
+				compatible = "pci111d,8039";
+				reg = <0x00421800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				ranges;
+
+		                wifi1: wifi at 68,0 {
+					/* Atheros AR9380 2.4/5GHz */
+					compatible = "pci168c,0030";
+					reg = <0x00440000 0 0 0 0>;
+				};
+			};
+		};
+	};
+};



More information about the lede-commits mailing list