lede/target/linux/silicon/patches-5.19/0027-arm64-dts-apple-t600x-Add-dwc3-nodes.patch

632 lines
14 KiB
Diff

From e000de0d79a99fe707b8c86b8ae4f19b6e6cc78e Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Tue, 17 May 2022 23:54:26 +0200
Subject: [PATCH 027/171] arm64: dts: apple: t600x: Add dwc3 nodes
Signed-off-by: Janne Grunau <j@jannau.net>
---
arch/arm64/boot/dts/apple/t6001-j375c.dts | 105 +++++++++++
arch/arm64/boot/dts/apple/t6002-j375d.dts | 168 ++++++++++++++++++
arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 124 +++++++++++++
.../arm64/boot/dts/apple/t600x-j314-j316.dtsi | 92 ++++++++++
4 files changed, 489 insertions(+)
diff --git a/arch/arm64/boot/dts/apple/t6001-j375c.dts b/arch/arm64/boot/dts/apple/t6001-j375c.dts
index 961104d6bd9a..7ab07808a5e9 100644
--- a/arch/arm64/boot/dts/apple/t6001-j375c.dts
+++ b/arch/arm64/boot/dts/apple/t6001-j375c.dts
@@ -53,6 +53,24 @@ hpm0: usb-pd@38 {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec0: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Left";
+ 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 {
@@ -61,6 +79,24 @@ hpm1: usb-pd@3f {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec1: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Left Middle";
+ 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>;
+ };
+ };
+ };
+ };
};
hpm2: usb-pd@3b {
@@ -69,6 +105,24 @@ hpm2: usb-pd@3b {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec2: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Right Middle";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec2_con_hs: endpoint {
+ remote-endpoint = <&typec2_usb_hs>;
+ };
+ };
+ };
+ };
};
hpm3: usb-pd@3c {
@@ -77,6 +131,24 @@ hpm3: usb-pd@3c {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec3: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Right";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec3_con_hs: endpoint {
+ remote-endpoint = <&typec3_usb_hs>;
+ };
+ };
+ };
+ };
};
};
@@ -116,3 +188,36 @@ &port03 {
/* USB xHCI */
bus-range = <4 4>;
};
+
+/* 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>;
+ };
+ };
+};
+
+&dwc3_2 {
+ port {
+ typec2_usb_hs: endpoint {
+ remote-endpoint = <&typec2_con_hs>;
+ };
+ };
+};
+
+&dwc3_3 {
+ port {
+ typec3_usb_hs: endpoint {
+ remote-endpoint = <&typec3_con_hs>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/apple/t6002-j375d.dts b/arch/arm64/boot/dts/apple/t6002-j375d.dts
index 95e0c3243818..ed88e1eaf7bb 100644
--- a/arch/arm64/boot/dts/apple/t6002-j375d.dts
+++ b/arch/arm64/boot/dts/apple/t6002-j375d.dts
@@ -53,6 +53,24 @@ hpm0: usb-pd@38 {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec0: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Left";
+ 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 {
@@ -61,6 +79,24 @@ hpm1: usb-pd@3f {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec1: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Left Middle";
+ 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>;
+ };
+ };
+ };
+ };
};
hpm2: usb-pd@3b {
@@ -69,6 +105,24 @@ hpm2: usb-pd@3b {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec2: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Right Middle";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec2_con_hs: endpoint {
+ remote-endpoint = <&typec2_usb_hs>;
+ };
+ };
+ };
+ };
};
hpm3: usb-pd@3c {
@@ -77,6 +131,24 @@ hpm3: usb-pd@3c {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec3: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Back Right";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec3_con_hs: endpoint {
+ remote-endpoint = <&typec3_usb_hs>;
+ };
+ };
+ };
+ };
};
/* front-right */
@@ -86,6 +158,24 @@ hpm4: usb-pd@39 {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec4: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Front Right";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec4_con_hs: endpoint {
+ remote-endpoint = <&typec4_usb_hs>;
+ };
+ };
+ };
+ };
};
/* front-left */
@@ -95,6 +185,24 @@ hpm5: usb-pd@3a {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec5: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Front Left";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec5_con_hs: endpoint {
+ remote-endpoint = <&typec5_usb_hs>;
+ };
+ };
+ };
+ };
};
};
@@ -135,6 +243,66 @@ &port03 {
bus-range = <4 4>;
};
+/* 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>;
+ };
+ };
+};
+
+&dwc3_2 {
+ port {
+ typec2_usb_hs: endpoint {
+ remote-endpoint = <&typec2_con_hs>;
+ };
+ };
+};
+
+&dwc3_3 {
+ port {
+ typec3_usb_hs: endpoint {
+ remote-endpoint = <&typec3_con_hs>;
+ };
+ };
+};
+
+&dwc3_0_die1 {
+ port {
+ typec4_usb_hs: endpoint {
+ remote-endpoint = <&typec4_con_hs>;
+ };
+ };
+};
+
+&dwc3_1_die1 {
+ port {
+ typec5_usb_hs: endpoint {
+ remote-endpoint = <&typec5_con_hs>;
+ };
+ };
+};
+
+/* delete unused USB nodes on die 1 */
+
+/delete-node/ &dwc3_2_dart_0_die1;
+/delete-node/ &dwc3_2_dart_1_die1;
+/delete-node/ &dwc3_2_die1;
+
+/delete-node/ &dwc3_3_dart_0_die1;
+/delete-node/ &dwc3_3_dart_1_die1;
+/delete-node/ &dwc3_3_die1;
+
+
/* delete unused always-on power-domains on die 1 */
/delete-node/ &ps_atc2_usb_aon_die1;
diff --git a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi b/arch/arm64/boot/dts/apple/t600x-dieX.dtsi
index 0a437b68e86c..6ada6c7f50fa 100644
--- a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-dieX.dtsi
@@ -101,3 +101,127 @@ DIE_NODE(pinctrl_ap): pinctrl@39b028000 {
interrupt-controller;
#interrupt-cells = <2>;
};
+
+ DIE_NODE(dwc3_0_dart_0): iommu@702f00000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x7 0x02f00000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1194 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc0_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_0_dart_1): iommu@702f80000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x7 0x02f80000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1194 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc0_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_0): usb@702280000 {
+ compatible = "apple,t6000-dwc3", "apple,dwc3", "snps,dwc3";
+ reg = <0x7 0x02280000 0x0 0x100000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1190 IRQ_TYPE_LEVEL_HIGH>;
+ /* dr_mode = "otg"; */
+ usb-role-switch;
+ role-switch-default-mode = "host";
+ iommus = <&DIE_NODE(dwc3_0_dart_0) 0>,
+ <&DIE_NODE(dwc3_0_dart_1) 1>;
+ power-domains = <&DIE_NODE(ps_atc0_usb)>;
+ };
+
+ DIE_NODE(dwc3_1_dart_0): iommu@b02f00000 {
+ compatible = "apple,t6000-dart";
+ reg = <0xb 0x02f00000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1211 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc1_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_1_dart_1): iommu@b02f80000 {
+ compatible = "apple,t6000-dart";
+ reg = <0xb 0x02f80000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1211 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc1_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_1): usb@b02280000 {
+ compatible = "apple,t6000-dwc3", "apple,dwc3", "snps,dwc3";
+ reg = <0xb 0x02280000 0x0 0x100000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1207 IRQ_TYPE_LEVEL_HIGH>;
+ /* dr_mode = "otg"; */
+ usb-role-switch;
+ role-switch-default-mode = "host";
+ iommus = <&DIE_NODE(dwc3_1_dart_0) 0>,
+ <&DIE_NODE(dwc3_1_dart_1) 1>;
+ power-domains = <&DIE_NODE(ps_atc1_usb)>;
+ };
+
+ DIE_NODE(dwc3_2_dart_0): iommu@f02f00000 {
+ compatible = "apple,t6000-dart";
+ reg = <0xf 0x02f00000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1228 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc2_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_2_dart_1): iommu@f02f80000 {
+ compatible = "apple,t6000-dart";
+ reg = <0xf 0x02f80000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1228 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc2_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_2): usb@f02280000 {
+ compatible = "apple,t6000-dwc3", "apple,dwc3", "snps,dwc3";
+ reg = <0xf 0x02280000 0x0 0x100000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1224 IRQ_TYPE_LEVEL_HIGH>;
+ /* dr_mode = "otg"; */
+ usb-role-switch;
+ role-switch-default-mode = "host";
+ iommus = <&DIE_NODE(dwc3_2_dart_0) 0>,
+ <&DIE_NODE(dwc3_2_dart_1) 1>;
+ power-domains = <&DIE_NODE(ps_atc2_usb)>;
+ };
+
+ DIE_NODE(dwc3_3_dart_0): iommu@1302f00000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x13 0x02f00000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1245 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc3_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_3_dart_1): iommu@1302f80000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x13 0x02f80000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1245 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&DIE_NODE(ps_atc3_usb)>;
+ #iommu-cells = <1>;
+ };
+
+ DIE_NODE(dwc3_3): usb@1302280000 {
+ compatible = "apple,t6000-dwc3", "apple,dwc3", "snps,dwc3";
+ reg = <0x13 0x02280000 0x0 0x100000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ DIE_NO 1241 IRQ_TYPE_LEVEL_HIGH>;
+ /* dr_mode = "otg"; */
+ usb-role-switch;
+ role-switch-default-mode = "host";
+ iommus = <&DIE_NODE(dwc3_3_dart_0) 0>,
+ <&DIE_NODE(dwc3_3_dart_1) 1>;
+ power-domains = <&DIE_NODE(ps_atc3_usb)>;
+ };
diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
index 64280ed76feb..1582a4caccdb 100644
--- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
@@ -48,6 +48,24 @@ hpm0: usb-pd@38 {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec0: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Left Rear";
+ 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 {
@@ -56,6 +74,24 @@ hpm1: usb-pd@3f {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec1: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Left Front";
+ 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>;
+ };
+ };
+ };
+ };
};
hpm2: usb-pd@3b {
@@ -64,6 +100,24 @@ hpm2: usb-pd@3b {
interrupt-parent = <&pinctrl_ap>;
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+
+ typec2: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C Right";
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ typec2_con_hs: endpoint {
+ remote-endpoint = <&typec2_usb_hs>;
+ };
+ };
+ };
+ };
};
/* MagSafe port */
@@ -140,3 +194,41 @@ &pcie0_dart_3 {
/delete-node/ &port02;
/delete-node/ &port03;
+
+/* 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>;
+ };
+ };
+};
+
+&dwc3_2 {
+ port {
+ typec2_usb_hs: endpoint {
+ remote-endpoint = <&typec2_con_hs>;
+ };
+ };
+};
+
+/* ATC3 is used for DisplayPort -> HDMI only */
+&dwc3_3_dart_0 {
+ status = "disabled";
+};
+
+&dwc3_3_dart_1 {
+ status = "disabled";
+};
+
+&dwc3_3 {
+ status = "disabled";
+};
--
2.34.1