From nobody Tue Sep 9 11:43:23 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D2352F7441; Sat, 6 Sep 2025 15:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757173421; cv=none; b=PSCK2uppyO7YhHLdJIFc5HMj9RxSefUVLQ4rwt72UeCiCi0W1jExXdFG/l287cMvLq8ZZs8/P5ku+Hoy1bgOhwNdiD3dcjTzaENKOgXwkqSr9qOZ7z5or+EgDIRUMBGfgmtZaF6wo0H8BslhbZ/u2UJ/c6XTijFGW1oS0O8ZSvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757173421; c=relaxed/simple; bh=KTAyeqUKBXSRXTrOzHfCOiEQdd5Glj7VWy4aaK3uSPI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=K1T9vXuYd36MwGHZtf7kBRDyV1VsB5cO5Iirfp7X+3LcC39W11u63F6Da2+8W5Umy3hI7J3BzlDf+wRGVXW8m3OPbtoI+k84Yhit7rdPH8vPnSf3x5Ul2pzwzJL76UtsrYx2diU6YO0O5L8EEDU/m0mislUM+d+MhhNDFFe9QgU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OGf0OvnR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OGf0OvnR" Received: by smtp.kernel.org (Postfix) with ESMTPS id B9C68C4CEFB; Sat, 6 Sep 2025 15:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757173420; bh=KTAyeqUKBXSRXTrOzHfCOiEQdd5Glj7VWy4aaK3uSPI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OGf0OvnRpnZKswhahXWJhN0m/rfuq9MM1u+MJt6rRonM2fEsuNvdj5na2wOHufv+H ReswnIBbmDc6S/yQz4YFNWQ0ykA/xDnzgGBa6N5hywwVGVm0dIvoGKPkD4TjfZAfQN mvTucRbpWmlr7tzhDlvsFHo/DDrMyeBtAPHbj8QslWlkNvNonfOzQ7onPUztmIaS0R A1NWsSFfm44G15oP11rlP6PDDR4ZGsc1ttTEffhYYwljYp22QxvNa3yEaUysrrSsc7 PMEKmCeZtlyfn59k3Ewnk5RsotFRpCIFBVDpF061xReeOcPFc3AtXjVvIym866z7LM l7Mb7AAHx5ZPA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0B61CAC583; Sat, 6 Sep 2025 15:43:40 +0000 (UTC) From: Sven Peter Date: Sat, 06 Sep 2025 15:43:35 +0000 Subject: [PATCH v2 22/22] arm64: dts: apple: t600x: Add Apple Type-C PHY and dwc3 nodes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250906-atcphy-6-17-v2-22-52c348623ef6@kernel.org> References: <20250906-atcphy-6-17-v2-0-52c348623ef6@kernel.org> In-Reply-To: <20250906-atcphy-6-17-v2-0-52c348623ef6@kernel.org> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Vinod Koul , Kishon Vijay Abraham I , Thinh Nguyen , Heikki Krogerus , Philipp Zabel , Frank Li , Ran Wang , Peter Chen Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, Sven Peter , R X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=25022; i=sven@kernel.org; h=from:subject:message-id; bh=Gz8VC2GdnmHU+sqgZZgFGx+yLwOX3aB1YhMwtYgCrWg=; b=owGbwMvMwCHmIlirolUq95LxtFoSQ8aesOV8orkmE2t2HE7M8xBvEu478k182/Knem5MGhkvr 7rdbNnRUcrCIMbBICumyLJ9v73pk4dvBJduuvQeZg4rE8gQBi5OAZiIUhDDX/Fkh1sfTK6sumib eSKbJfRWxEPx2kNsjZwPZ0T5n95wxIGRYXNSbkvk+n39PX9z7v3c73swROyvxsN8xpd75Ew7xTf /YwMA X-Developer-Key: i=sven@kernel.org; a=openpgp; fpr=A1E3E34A2B3C820DBC4955E5993B08092F131F93 X-Endpoint-Received: by B4 Relay for sven@kernel.org/default with auth_id=407 From: Janne Grunau Add all nodes and connections required to make USB3 work on M1 Pro, Max and Ultra based Apple machines. Co-developed-by: R Signed-off-by: R Signed-off-by: Janne Grunau Signed-off-by: Sven Peter --- arch/arm64/boot/dts/apple/t6001.dtsi | 1 + arch/arm64/boot/dts/apple/t6002-j375d.dts | 197 +++++++++++++++++- arch/arm64/boot/dts/apple/t6002.dtsi | 1 + arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 212 +++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 236 +++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-j375.dtsi | 275 +++++++++++++++++++++= ++++ 6 files changed, 916 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6001.dtsi b/arch/arm64/boot/dts/app= le/t6001.dtsi index ffbe823b71bc8d9c0975524aa04efa9bf520a89e..6dcb71a1d65a8da82a512653a34= ce6af3df8aee0 100644 --- a/arch/arm64/boot/dts/apple/t6001.dtsi +++ b/arch/arm64/boot/dts/apple/t6001.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include =20 #include "multi-die-cpp.h" diff --git a/arch/arm64/boot/dts/apple/t6002-j375d.dts b/arch/arm64/boot/dt= s/apple/t6002-j375d.dts index 3365429bdc8be90b63c8051822243d897854ab27..3b4715d5754c12848d418a71124= b443c034af3e7 100644 --- a/arch/arm64/boot/dts/apple/t6002-j375d.dts +++ b/arch/arm64/boot/dts/apple/t6002-j375d.dts @@ -15,6 +15,11 @@ / { compatible =3D "apple,j375d", "apple,t6002", "apple,arm-platform"; model =3D "Apple Mac Studio (M1 Ultra, 2022)"; + + aliases { + atcphy4 =3D &atcphy0_die1; + atcphy5 =3D &atcphy1_die1; + }; }; =20 /* USB Type C */ @@ -26,6 +31,30 @@ hpm4: usb-pd@39 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec4: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Front Right"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + typec4_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_0_die1_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec4_connector_ss: endpoint { + remote-endpoint =3D <&atcphy0_die1_typec_lanes>; + }; + }; + }; + }; }; =20 /* front-left */ @@ -35,16 +64,172 @@ hpm5: usb-pd@3a { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec5: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Front Left"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + typec5_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_1_die1_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec5_connector_ss: endpoint { + remote-endpoint =3D <&atcphy1_die1_typec_lanes>; + }; + }; + }; + }; }; }; =20 +/* USB controllers on die 1 */ +&dwc3_0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_0_die1_hs: endpoint { + remote-endpoint =3D <&typec4_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_0_die1_ss: endpoint { + remote-endpoint =3D <&atcphy0_die1_usb3>; + }; + }; + }; +}; + +&dwc3_1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_1_die1_hs: endpoint { + remote-endpoint =3D <&typec5_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_1_die1_ss: endpoint { + remote-endpoint =3D <&atcphy1_die1_usb3>; + }; + }; + }; +}; + +/* Type-C PHYs */ +&atcphy0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy0_die1_typec_lanes: endpoint { + remote-endpoint =3D <&typec4_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy0_die1_usb3: endpoint { + remote-endpoint =3D <&dwc3_0_die1_ss>; + }; + }; + }; +}; + +&atcphy1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy1_die1_typec_lanes: endpoint { + remote-endpoint =3D <&typec5_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy1_die1_usb3: endpoint { + remote-endpoint =3D <&dwc3_1_die1_ss>; + }; + }; + }; +}; + + +/* Disable unused dwc3 instandes on the second die. */ +&dwc3_2_dart_0_die1 { + status =3D "disabled"; +}; + +&dwc3_2_dart_1_die1 { + status =3D "disabled"; +}; + +&dwc3_2_die1 { + status =3D "disabled"; +}; + +&dwc3_3_dart_0_die1 { + status =3D "disabled"; +}; + +&dwc3_3_dart_1_die1 { + status =3D "disabled"; +}; + +&dwc3_3_die1 { + status =3D "disabled"; +}; + +/* Disable unused ATC phy instandes on the second die. */ +&atcphy2_die1 { + status =3D "disabled"; +}; + +&atcphy3_die1 { + status =3D "disabled"; +}; + +/* Disable unused USB power-domains on the second die. */ +&ps_atc2_usb_aon_die1 { + status =3D "disabled"; +}; + +&ps_atc2_usb_die1 { + status =3D "disabled"; +}; + +&ps_atc3_usb_aon_die1 { + status =3D "disabled"; +}; + +&ps_atc3_usb_die1 { + status =3D "disabled"; +}; + /* delete unused always-on power-domains on die 1 */ =20 -/delete-node/ &ps_atc2_usb_aon_die1; -/delete-node/ &ps_atc2_usb_die1; - -/delete-node/ &ps_atc3_usb_aon_die1; -/delete-node/ &ps_atc3_usb_die1; - /delete-node/ &ps_disp0_cpu0_die1; /delete-node/ &ps_disp0_fe_die1; diff --git a/arch/arm64/boot/dts/apple/t6002.dtsi b/arch/arm64/boot/dts/app= le/t6002.dtsi index 8fb648836b538bbd9efdccd6cec5d08d868a0d39..a532e5401c4ec430d8ff649a924= 59c80e9b6bb2b 100644 --- a/arch/arm64/boot/dts/apple/t6002.dtsi +++ b/arch/arm64/boot/dts/apple/t6002.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include =20 #include "multi-die-cpp.h" diff --git a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi b/arch/arm64/boot/dt= s/apple/t600x-dieX.dtsi index a32ff0c9d7b0c2ec720e9d4cf8e769da6431fbba..a282029475af874db7bf760017e= 1345ca982d94e 100644 --- a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-dieX.dtsi @@ -119,3 +119,215 @@ DIE_NODE(pinctrl_ap): pinctrl@39b028000 { interrupt-controller; #interrupt-cells =3D <2>; }; + + DIE_NODE(dwc3_0_dart_0): iommu@702f00000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0x7 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc0_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_0_dart_1): iommu@702f80000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0x7 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc0_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_0): usb@702280000 { + compatible =3D "apple,t6000-dwc3", "apple,t8103-dwc3"; + reg =3D <0x7 0x02280000 0x0 0xcd00>, <0x7 0x0228cd00 0x0 0x3200>; + reg-names =3D "dwc3-core", "dwc3-apple"; + interrupt-parent =3D <&aic>; + interrupts =3D ; + dr_mode =3D "otg"; + usb-role-switch; + role-switch-default-mode =3D "host"; + iommus =3D <&DIE_NODE(dwc3_0_dart_0) 0>, + <&DIE_NODE(dwc3_0_dart_1) 1>; + power-domains =3D <&DIE_NODE(ps_atc0_usb)>; + resets =3D <&DIE_NODE(atcphy0)>; + phys =3D <&DIE_NODE(atcphy0) PHY_TYPE_USB2>, <&DIE_NODE(atcphy0) PHY_TYP= E_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + DIE_NODE(atcphy0): phy@703000000 { + compatible =3D "apple,t6000-atcphy", "apple,t8103-atcphy"; + reg =3D <0x7 0x03000000 0x0 0x4c000>, + <0x7 0x03050000 0x0 0x8000>, + <0x7 0x00000000 0x0 0x4000>, + <0x7 0x02a90000 0x0 0x4000>, + <0x7 0x02a84000 0x0 0x4000>; + reg-names =3D "core", "lpdptx", "axi2af", "usb2phy", + "pipehandler"; + + #phy-cells =3D <1>; + #reset-cells =3D <0>; + + orientation-switch; + mode-switch; + power-domains =3D <&DIE_NODE(ps_atc0_usb)>; + }; + + DIE_NODE(dwc3_1_dart_0): iommu@b02f00000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0xb 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc1_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_1_dart_1): iommu@b02f80000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0xb 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc1_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_1): usb@b02280000 { + compatible =3D "apple,t6000-dwc3", "apple,t8103-dwc3"; + reg =3D <0xb 0x02280000 0x0 0xcd00>, <0xb 0x0228cd00 0x0 0x3200>; + reg-names =3D "dwc3-core", "dwc3-apple"; + interrupt-parent =3D <&aic>; + interrupts =3D ; + dr_mode =3D "otg"; + usb-role-switch; + role-switch-default-mode =3D "host"; + iommus =3D <&DIE_NODE(dwc3_1_dart_0) 0>, + <&DIE_NODE(dwc3_1_dart_1) 1>; + power-domains =3D <&DIE_NODE(ps_atc1_usb)>; + resets =3D <&DIE_NODE(atcphy1)>; + phys =3D <&DIE_NODE(atcphy1) PHY_TYPE_USB2>, <&DIE_NODE(atcphy1) PHY_TYP= E_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + DIE_NODE(atcphy1): phy@b03000000 { + compatible =3D "apple,t6000-atcphy", "apple,t8103-atcphy"; + reg =3D <0xb 0x03000000 0x0 0x4c000>, + <0xb 0x03050000 0x0 0x8000>, + <0xb 0x00000000 0x0 0x4000>, + <0xb 0x02a90000 0x0 0x4000>, + <0xb 0x02a84000 0x0 0x4000>; + reg-names =3D "core", "lpdptx", "axi2af", "usb2phy", + "pipehandler"; + + #phy-cells =3D <1>; + #reset-cells =3D <0>; + + orientation-switch; + mode-switch; + power-domains =3D <&DIE_NODE(ps_atc1_usb)>; + }; + + DIE_NODE(dwc3_2_dart_0): iommu@f02f00000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0xf 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc2_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_2_dart_1): iommu@f02f80000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0xf 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc2_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_2): usb@f02280000 { + compatible =3D "apple,t6000-dwc3", "apple,t8103-dwc3"; + reg =3D <0xf 0x02280000 0x0 0xcd00>, <0xf 0x0228cd00 0x0 0x3c00>; + reg-names =3D "dwc3-core", "dwc3-apple"; + interrupt-parent =3D <&aic>; + interrupts =3D ; + dr_mode =3D "otg"; + usb-role-switch; + role-switch-default-mode =3D "host"; + iommus =3D <&DIE_NODE(dwc3_2_dart_0) 0>, + <&DIE_NODE(dwc3_2_dart_1) 1>; + power-domains =3D <&DIE_NODE(ps_atc2_usb)>; + resets =3D <&DIE_NODE(atcphy2)>; + phys =3D <&DIE_NODE(atcphy2) PHY_TYPE_USB2>, <&DIE_NODE(atcphy2) PHY_TYP= E_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + DIE_NODE(atcphy2): phy@f03000000 { + compatible =3D "apple,t6000-atcphy", "apple,t8103-atcphy"; + reg =3D <0xf 0x03000000 0x0 0x4c000>, + <0xf 0x03050000 0x0 0x8000>, + <0xf 0x00000000 0x0 0x4000>, + <0xf 0x02a90000 0x0 0x4000>, + <0xf 0x02a84000 0x0 0x4000>; + reg-names =3D "core", "lpdptx", "axi2af", "usb2phy", + "pipehandler"; + + #phy-cells =3D <1>; + #reset-cells =3D <0>; + + orientation-switch; + mode-switch; + power-domains =3D <&DIE_NODE(ps_atc2_usb)>; + }; + + DIE_NODE(dwc3_3_dart_0): iommu@1302f00000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0x13 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc3_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_3_dart_1): iommu@1302f80000 { + compatible =3D "apple,t6000-dart"; + reg =3D <0x13 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + power-domains =3D <&DIE_NODE(ps_atc3_usb)>; + #iommu-cells =3D <1>; + }; + + DIE_NODE(dwc3_3): usb@1302280000 { + compatible =3D "apple,t6000-dwc3", "apple,t8103-dwc3"; + reg =3D <0x13 0x02280000 0x0 0xcd00>, <0x13 0x0228cd00 0x0 0x3200>; + reg-names =3D "dwc3-core", "dwc3-apple"; + interrupt-parent =3D <&aic>; + interrupts =3D ; + dr_mode =3D "otg"; + usb-role-switch; + role-switch-default-mode =3D "host"; + iommus =3D <&DIE_NODE(dwc3_3_dart_0) 0>, + <&DIE_NODE(dwc3_3_dart_1) 1>; + power-domains =3D <&DIE_NODE(ps_atc3_usb)>; + resets =3D <&DIE_NODE(atcphy3)>; + phys =3D <&DIE_NODE(atcphy3) PHY_TYPE_USB2>, <&DIE_NODE(atcphy3) PHY_TYP= E_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + DIE_NODE(atcphy3): phy@1303000000 { + compatible =3D "apple,t6000-atcphy", "apple,t8103-atcphy"; + reg =3D <0x13 0x03000000 0x0 0x4c000>, + <0x13 0x03050000 0x0 0x8000>, + <0x13 0x00000000 0x0 0x4000>, + <0x13 0x02a90000 0x0 0x4000>, + <0x13 0x02a84000 0x0 0x4000>; + reg-names =3D "core", "lpdptx", "axi2af", "usb2phy", + "pipehandler"; + + #phy-cells =3D <1>; + #reset-cells =3D <0>; + + orientation-switch; + mode-switch; + power-domains =3D <&DIE_NODE(ps_atc3_usb)>; + }; diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/bo= ot/dts/apple/t600x-j314-j316.dtsi index 22ebc78e120bf8f0f71fd532e9dce4dcd117bbc6..13e654849eb3d637ac21479a3de= f8f8ddd731dd6 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -13,6 +13,10 @@ =20 / { aliases { + atcphy0 =3D &atcphy0; + atcphy1 =3D &atcphy1; + atcphy2 =3D &atcphy2; + atcphy3 =3D &atcphy3; serial0 =3D &serial0; wifi0 =3D &wifi0; }; @@ -62,6 +66,31 @@ hpm0: usb-pd@38 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec0: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Left Rear"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec0_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_0_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec0_connector_ss: endpoint { + remote-endpoint =3D <&atcphy0_typec_lanes>; + }; + }; + }; + }; }; =20 hpm1: usb-pd@3f { @@ -70,6 +99,31 @@ hpm1: usb-pd@3f { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec1: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Left Front"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec1_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_1_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec1_connector_ss: endpoint { + remote-endpoint =3D <&atcphy1_typec_lanes>; + }; + }; + }; + }; }; =20 hpm2: usb-pd@3b { @@ -78,6 +132,31 @@ hpm2: usb-pd@3b { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec2: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Right"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec2_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_2_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec2_connector_ss: endpoint { + remote-endpoint =3D <&atcphy2_typec_lanes>; + }; + }; + }; + }; }; =20 /* MagSafe port */ @@ -90,6 +169,163 @@ hpm5: usb-pd@3a { }; }; =20 +/* USB controllers */ +&dwc3_0 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_0_hs: endpoint { + remote-endpoint =3D <&typec0_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_0_ss: endpoint { + remote-endpoint =3D <&atcphy0_usb3>; + }; + }; + }; +}; + +&dwc3_1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_1_hs: endpoint { + remote-endpoint =3D <&typec1_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_1_ss: endpoint { + remote-endpoint =3D <&atcphy1_usb3>; + }; + }; + }; +}; + +/* USB controllers */ +&dwc3_2 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_2_hs: endpoint { + remote-endpoint =3D <&typec2_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_2_ss: endpoint { + remote-endpoint =3D <&atcphy2_usb3>; + }; + }; + }; +}; + +/* The 4th ATC Phy is connected to an internal DP to HDMI converter. */ +&dwc3_3_dart_0 { + status =3D "disabled"; +}; + +&dwc3_3_dart_1 { + status =3D "disabled"; +}; + +&dwc3_3 { + status =3D "disabled"; +}; + +/* Type-C PHYs */ +&atcphy0 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy0_typec_lanes: endpoint { + remote-endpoint =3D <&typec0_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy0_usb3: endpoint { + remote-endpoint =3D <&dwc3_0_ss>; + }; + }; + }; +}; + +&atcphy1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy1_typec_lanes: endpoint { + remote-endpoint =3D <&typec1_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy1_usb3: endpoint { + remote-endpoint =3D <&dwc3_1_ss>; + }; + }; + }; +}; + +&atcphy2 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy2_typec_lanes: endpoint { + remote-endpoint =3D <&typec2_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy2_usb3: endpoint { + remote-endpoint =3D <&dwc3_2_ss>; + }; + }; + }; +}; + +&atcphy3 { + /* Disable atcphy3 as long as DisplayPort is not supported. */ + status =3D "disabled"; +}; + +/* + * The ps_atcN_usb_aon power-domains are always-on to avoid resetting dwc3 + * which reverts initialisation done by firmware. + * atc3 is used exclusively for the DP-to-HDMI converter so this is not + * necessary. + */ +&ps_atc3_usb_aon { + /delete-property/ apple,always-on; +}; + &nco_clkref { clock-frequency =3D <1068000000>; }; diff --git a/arch/arm64/boot/dts/apple/t600x-j375.dtsi b/arch/arm64/boot/dt= s/apple/t600x-j375.dtsi index d5b985ad567936111ee5cccc9ca9fc23d01d9edf..ab49ad9e32f2798bd126d079491= 7c8f434f222de 100644 --- a/arch/arm64/boot/dts/apple/t600x-j375.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j375.dtsi @@ -11,6 +11,10 @@ =20 / { aliases { + atcphy0 =3D &atcphy0; + atcphy1 =3D &atcphy1; + atcphy2 =3D &atcphy2; + atcphy3 =3D &atcphy3; serial0 =3D &serial0; wifi0 =3D &wifi0; }; @@ -48,6 +52,31 @@ hpm0: usb-pd@38 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec0: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back Left"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec0_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_0_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec0_connector_ss: endpoint { + remote-endpoint =3D <&atcphy0_typec_lanes>; + }; + }; + }; + }; }; =20 hpm1: usb-pd@3f { @@ -56,6 +85,31 @@ hpm1: usb-pd@3f { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec1: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back Left Middle"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec1_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_1_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec1_connector_ss: endpoint { + remote-endpoint =3D <&atcphy1_typec_lanes>; + }; + }; + }; + }; }; =20 hpm2: usb-pd@3b { @@ -64,6 +118,31 @@ hpm2: usb-pd@3b { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec2: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back Right Middle"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec2_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_2_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec2_connector_ss: endpoint { + remote-endpoint =3D <&atcphy2_typec_lanes>; + }; + }; + }; + }; }; =20 hpm3: usb-pd@3c { @@ -72,6 +151,202 @@ hpm3: usb-pd@3c { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <174 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec3: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back Right"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec3_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_3_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec3_connector_ss: endpoint { + remote-endpoint =3D <&atcphy3_typec_lanes>; + }; + }; + }; + }; + }; +}; + +/* USB controllers */ +&dwc3_0 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_0_hs: endpoint { + remote-endpoint =3D <&typec0_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_0_ss: endpoint { + remote-endpoint =3D <&atcphy0_usb3>; + }; + }; + }; +}; + +&dwc3_1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_1_hs: endpoint { + remote-endpoint =3D <&typec1_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_1_ss: endpoint { + remote-endpoint =3D <&atcphy1_usb3>; + }; + }; + }; +}; + +/* USB controllers */ +&dwc3_2 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_2_hs: endpoint { + remote-endpoint =3D <&typec2_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_2_ss: endpoint { + remote-endpoint =3D <&atcphy2_usb3>; + }; + }; + }; +}; + +&dwc3_3 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_3_hs: endpoint { + remote-endpoint =3D <&typec3_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_3_ss: endpoint { + remote-endpoint =3D <&atcphy3_usb3>; + }; + }; + }; +}; + +/* Type-C PHYs */ +&atcphy0 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy0_typec_lanes: endpoint { + remote-endpoint =3D <&typec0_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy0_usb3: endpoint { + remote-endpoint =3D <&dwc3_0_ss>; + }; + }; + }; +}; + +&atcphy1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy1_typec_lanes: endpoint { + remote-endpoint =3D <&typec1_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy1_usb3: endpoint { + remote-endpoint =3D <&dwc3_1_ss>; + }; + }; + }; +}; + +&atcphy2 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy2_typec_lanes: endpoint { + remote-endpoint =3D <&typec2_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy2_usb3: endpoint { + remote-endpoint =3D <&dwc3_2_ss>; + }; + }; + }; +}; + +&atcphy3 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy3_typec_lanes: endpoint { + remote-endpoint =3D <&typec3_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy3_usb3: endpoint { + remote-endpoint =3D <&dwc3_3_ss>; + }; + }; }; }; =20 --=20 2.34.1