mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
275 lines
7.0 KiB
Diff
275 lines
7.0 KiB
Diff
From ba2a0e6cfe463e97ee1056dd45d7fd4eee24bf09 Mon Sep 17 00:00:00 2001
|
|
From: Hector Martin <marcan@marcan.st>
|
|
Date: Fri, 26 Nov 2021 15:37:23 +0900
|
|
Subject: [PATCH 003/171] arm64: dts: apple: t8103: Add dwc3 nodes
|
|
|
|
Signed-off-by: Hector Martin <marcan@marcan.st>
|
|
---
|
|
arch/arm64/boot/dts/apple/t8103-j274.dts | 12 +++++
|
|
arch/arm64/boot/dts/apple/t8103-j293.dts | 12 +++++
|
|
arch/arm64/boot/dts/apple/t8103-j313.dts | 12 +++++
|
|
arch/arm64/boot/dts/apple/t8103-j456.dts | 12 +++++
|
|
arch/arm64/boot/dts/apple/t8103-j457.dts | 12 +++++
|
|
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 51 +++++++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103.dtsi | 60 +++++++++++++++++++++++
|
|
7 files changed, 171 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
index 2cd429efba5b..214476814797 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
@@ -21,6 +21,18 @@ aliases {
|
|
};
|
|
};
|
|
|
|
+/*
|
|
+ * Provide labels for the USB type C ports.
|
|
+ */
|
|
+
|
|
+&typec0 {
|
|
+ label = "USB-C Back-left";
|
|
+};
|
|
+
|
|
+&typec1 {
|
|
+ label = "USB-C Back-right";
|
|
+};
|
|
+
|
|
/*
|
|
* Force the bus number assignments so that we can declare some of the
|
|
* on-board devices and properties that are populated by the bootloader
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
index 49cdf4b560a3..6f08fd64f482 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
@@ -17,6 +17,18 @@ / {
|
|
model = "Apple MacBook Pro (13-inch, M1, 2020)";
|
|
};
|
|
|
|
+/*
|
|
+ * Provide labels for the USB type C ports.
|
|
+ */
|
|
+
|
|
+&typec0 {
|
|
+ label = "USB-C Left-back";
|
|
+};
|
|
+
|
|
+&typec1 {
|
|
+ label = "USB-C Left-front";
|
|
+};
|
|
+
|
|
/*
|
|
* Remove unused PCIe ports and disable the associated DARTs.
|
|
*/
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
index b0ebb45bdb6f..114aa87c8cb4 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
@@ -17,6 +17,18 @@ / {
|
|
model = "Apple MacBook Air (M1, 2020)";
|
|
};
|
|
|
|
+/*
|
|
+ * Provide labels for the USB type C ports.
|
|
+ */
|
|
+
|
|
+&typec0 {
|
|
+ label = "USB-C Left-back";
|
|
+};
|
|
+
|
|
+&typec1 {
|
|
+ label = "USB-C Left-front";
|
|
+};
|
|
+
|
|
/*
|
|
* Remove unused PCIe ports and disable the associated DARTs.
|
|
*/
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
index 884fddf7d363..9814c97cd9ba 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
@@ -39,6 +39,18 @@ hpm3: usb-pd@3c {
|
|
};
|
|
};
|
|
|
|
+/*
|
|
+ * Provide labels for the USB type C ports.
|
|
+ */
|
|
+
|
|
+&typec0 {
|
|
+ label = "USB-C Back-right";
|
|
+};
|
|
+
|
|
+&typec1 {
|
|
+ label = "USB-C Back-right-middle";
|
|
+};
|
|
+
|
|
/*
|
|
* Force the bus number assignments so that we can declare some of the
|
|
* on-board devices and properties that are populated by the bootloader
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j457.dts b/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
index d7c622931627..0f4cc643741c 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
@@ -21,6 +21,18 @@ aliases {
|
|
};
|
|
};
|
|
|
|
+/*
|
|
+ * Provide labels for the USB type C ports.
|
|
+ */
|
|
+
|
|
+&typec0 {
|
|
+ label = "USB-C Back-right";
|
|
+};
|
|
+
|
|
+&typec1 {
|
|
+ label = "USB-C Back-left";
|
|
+};
|
|
+
|
|
/*
|
|
* Force the bus number assignments so that we can declare some of the
|
|
* on-board devices and properties that are populated by the bootloader
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
|
|
index fe2ae40fa9dd..020a9d8b31e9 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
|
|
@@ -52,6 +52,23 @@ hpm0: usb-pd@38 {
|
|
interrupt-parent = <&pinctrl_ap>;
|
|
interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
|
|
interrupt-names = "irq";
|
|
+
|
|
+ typec0: connector {
|
|
+ compatible = "usb-c-connector";
|
|
+ power-role = "dual";
|
|
+ data-role = "dual";
|
|
+
|
|
+ ports {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ port@0 {
|
|
+ reg = <0>;
|
|
+ typec0_con_hs: endpoint {
|
|
+ remote-endpoint = <&typec0_usb_hs>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
hpm1: usb-pd@3f {
|
|
@@ -60,6 +77,40 @@ hpm1: usb-pd@3f {
|
|
interrupt-parent = <&pinctrl_ap>;
|
|
interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
|
|
interrupt-names = "irq";
|
|
+
|
|
+ typec1: connector {
|
|
+ compatible = "usb-c-connector";
|
|
+ power-role = "dual";
|
|
+ data-role = "dual";
|
|
+
|
|
+ ports {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ port@0 {
|
|
+ reg = <0>;
|
|
+ typec1_con_hs: endpoint {
|
|
+ remote-endpoint = <&typec1_usb_hs>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+/* USB controllers */
|
|
+&dwc3_0 {
|
|
+ port {
|
|
+ typec0_usb_hs: endpoint {
|
|
+ remote-endpoint = <&typec0_con_hs>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&dwc3_1 {
|
|
+ port {
|
|
+ typec1_usb_hs: endpoint {
|
|
+ remote-endpoint = <&typec1_con_hs>;
|
|
+ };
|
|
};
|
|
};
|
|
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
index 66544e39a20a..ec7234cdc861 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
@@ -594,6 +594,66 @@ nvme@27bcc0000 {
|
|
resets = <&ps_ans2>;
|
|
};
|
|
|
|
+ dwc3_0: usb@382280000 {
|
|
+ compatible = "apple,t8103-dwc3", "apple,dwc3", "snps,dwc3";
|
|
+ reg = <0x3 0x82280000 0x0 0x100000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 777 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ dr_mode = "otg";
|
|
+ usb-role-switch;
|
|
+ role-switch-default-mode = "host";
|
|
+ iommus = <&dwc3_0_dart_0 0>, <&dwc3_0_dart_1 1>;
|
|
+ power-domains = <&ps_atc0_usb>;
|
|
+ };
|
|
+
|
|
+ dwc3_0_dart_0: iommu@382f00000 {
|
|
+ compatible = "apple,t8103-dart";
|
|
+ reg = <0x3 0x82f00000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 781 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #iommu-cells = <1>;
|
|
+ power-domains = <&ps_atc0_usb>;
|
|
+ };
|
|
+
|
|
+ dwc3_0_dart_1: iommu@382f80000 {
|
|
+ compatible = "apple,t8103-dart";
|
|
+ reg = <0x3 0x82f80000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 781 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #iommu-cells = <1>;
|
|
+ power-domains = <&ps_atc0_usb>;
|
|
+ };
|
|
+
|
|
+ dwc3_1: usb@502280000 {
|
|
+ compatible = "apple,t8103-dwc3", "apple,dwc3", "snps,dwc3";
|
|
+ reg = <0x5 0x02280000 0x0 0x100000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 857 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ dr_mode = "otg";
|
|
+ usb-role-switch;
|
|
+ role-switch-default-mode = "host";
|
|
+ iommus = <&dwc3_1_dart_0 0>, <&dwc3_1_dart_1 1>;
|
|
+ power-domains = <&ps_atc1_usb>;
|
|
+ };
|
|
+
|
|
+ dwc3_1_dart_0: iommu@502f00000 {
|
|
+ compatible = "apple,t8103-dart";
|
|
+ reg = <0x5 0x02f00000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 861 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #iommu-cells = <1>;
|
|
+ power-domains = <&ps_atc1_usb>;
|
|
+ };
|
|
+
|
|
+ dwc3_1_dart_1: iommu@502f80000 {
|
|
+ compatible = "apple,t8103-dart";
|
|
+ reg = <0x5 0x02f80000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 861 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #iommu-cells = <1>;
|
|
+ power-domains = <&ps_atc1_usb>;
|
|
+ };
|
|
+
|
|
pcie0_dart_0: dart@681008000 {
|
|
compatible = "apple,t8103-dart";
|
|
reg = <0x6 0x81008000 0x0 0x4000>;
|
|
--
|
|
2.34.1
|
|
|