From nobody Tue Feb 10 13:36:25 2026 Received: from fout-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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 BCAD332A3C3; Fri, 9 Jan 2026 14:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767967655; cv=none; b=YVSkFr+Gd/hEA6m5js65T7VzTDUipOQl8mk1KIYP29KXcFc6IxH6sHuPTpwxBQA3gTRnPl3Sofb/HmAri0zyPXetIC2jTIXnfKglVgswC5o4r1vy5JjMvfWb8MXAiORfnEK4n+xqQnZeOr2jJkvqalXwuAhGDwkWVBjBlJJ90LU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767967655; c=relaxed/simple; bh=pY00bmpKQG1UN2/H+9l1pXuuxPTjh6Xqwip9IICVXi8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Vf6CUBITw5R7pWvRXKPgxGkiyocLuflseLCJl70In2lA/HRYn3ZOT8nIUuIWLVeM1j8hYBIj/ZENGbrzmsJPrg3qoffNJsOaOoUeRcM52JVz1jK5iOJ2cgHhKlfwvWhWsA8vBSReiS/lN90PPlkClDZVM8d2sfDyws7XSij2Txg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jannau.net; spf=pass smtp.mailfrom=jannau.net; dkim=pass (2048-bit key) header.d=jannau.net header.i=@jannau.net header.b=IwksptNY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=UQT/GNIF; arc=none smtp.client-ip=103.168.172.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jannau.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jannau.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jannau.net header.i=@jannau.net header.b="IwksptNY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="UQT/GNIF" Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 0FA89EC018E; Fri, 9 Jan 2026 09:07:23 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Fri, 09 Jan 2026 09:07:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jannau.net; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1767967643; x=1768054043; bh=Wx5veIZDS8HTakZsnfN1par0BLzsxH0YHpeFGnZIlSk=; b= IwksptNYKCUXtSQPdlcaCVUzp+HlD7n6iUJ/W09gLDEhzrRQZCFL/DxtUlrDPWbb 7mJ6crQm9Rgg9+OhkRKzivupTFTgNdexHcxXmJphwb5egnmzub1eWL7VpmsaKK2J ZTdfKpUhktys06e5v9dOXyNtGNbv7oubMd96T33khEZwwhnfF+iqvNJ10FixZp5F jtl7SMvGYWrq88X984O0lrNw8XUO+iwLBIH/OAO2R7nvZ46saSK+/FfngssGCFJt u//RaSDtBAZgpj7a4NvL5FyvBVYAVS/y68wi83RkYMCwc9nMhWAdYJaIggBpzOhj urg2MEMNVZyBznnA1cc3nw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1767967643; x= 1768054043; bh=Wx5veIZDS8HTakZsnfN1par0BLzsxH0YHpeFGnZIlSk=; b=U QT/GNIFVlQcoE1KYXxfCMSjKTshjste7nNKNapwrayJCj5jHEVHu50tgu3xNqcSO iCK89GVKRYQpidwYmaJh82d4Si0i5opBu7Mn7mFKEVqB9rdq0xKQVqv/hq3CEQJS UKUVbJiXuNdMCcvDKJ8iocBf7F088A/H0Lyh3a6lvsPqB+mD4sogUg/q5a/Y2Ymi HWycHOM1dtwVoJn2Zv5POscWxIpWPM0iPGsI2INWXzeBwEPCZs4XDGdeckwYM1uK qxbNz1ArCly0cAxy5WEcxLh99bnRZ74hvMDGDsr72e5d3qpl7mdoE4T+bEHSYz0I Gw+H4ckzIZcdM3npvQAsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdeltddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflrghnnhgv ucfirhhunhgruhcuoehjsehjrghnnhgruhdrnhgvtheqnecuggftrfgrthhtvghrnhepfe ehheeileduffehteeihfdvtdelffdutdeludduiedutedvfeffheekhefgtedtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhesjhgrnhhnrg hurdhnvghtpdhnsggprhgtphhtthhopeduvddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrg gurdhorhhgpdhrtghpthhtohepshhvvghnsehkvghrnhgvlhdrohhrghdprhgtphhtthho pehmrghrtggrnhesmhgrrhgtrghnrdhsthdprhgtphhtthhopehkrhiikhdoughtsehkvg hrnhgvlhdrohhrghdprhgtphhtthhopeguvghvihgtvghtrhgvvgesvhhgvghrrdhkvghr nhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvg hrnhgvlhdrohhrghdprhgtphhtthhopehnvggrlhesghhomhhprgdruggvvhdprhgtphht thhopehrqhhouhessggvrhhkvghlvgihrdgvughupdhrtghpthhtohepjhesjhgrnhhnrg hurdhnvght X-ME-Proxy: Feedback-ID: i47b949f6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Jan 2026 09:07:22 -0500 (EST) From: Janne Grunau Date: Fri, 09 Jan 2026 15:07:06 +0100 Subject: [PATCH 3/3] arm64: dts: apple: t60xx: Add nodes for integrated USB Type-C ports 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: <20260109-apple-dt-usb-c-atc-dwc3-v1-3-ce0e92c1a016@jannau.net> References: <20260109-apple-dt-usb-c-atc-dwc3-v1-0-ce0e92c1a016@jannau.net> In-Reply-To: <20260109-apple-dt-usb-c-atc-dwc3-v1-0-ce0e92c1a016@jannau.net> To: Sven Peter , Neal Gompa , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , R , Hector Martin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=45947; i=j@jannau.net; s=yk2025; h=from:subject:message-id; bh=pY00bmpKQG1UN2/H+9l1pXuuxPTjh6Xqwip9IICVXi8=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhsxE7kkHgpl2zvd+eVK1zjT+ZMgiO+mD7o9VTBo1OuxWh z5+krGxo5SFQYyLQVZMkSVJ+2UHw+oaxZjaB2Ewc1iZQIYwcHEKwETM/zH89977pq38uM1friyR tNL813v+PubLP8creLk8JEdW1qT6I8P/sK5K/Ux9kQb3Fm4Wxf3Bi8x2xxn+uP9/3tkMlTeKc7+ yAwA= X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 Add device nodes and connections to support USB 3.x on the SoC's integrated Type-C ports of M1 and M2 Pro, Max and Ultra based devices. Each Type-C port has an Apple Type-C PHY for USB 2.0, USB 3.x, USB4/Thunderbolt, and DisplayPort, a Synopsys Designware USB 3.x controller, two DART iommu instances and a CD321x USB PD controller. M1 and M2 Max based Mac Studio device have two additional USB Type-C ports on the front which are driven by an AsMedia PCIe USB controller and integrated USB hub. These ports are not covered by this change. The port labels use Apple's established naming scheme for the ports. Co-developed-by: R Signed-off-by: R Co-developed-by: Hector Martin Signed-off-by: Hector Martin Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t6001.dtsi | 1 + arch/arm64/boot/dts/apple/t6002-j375d.dts | 150 +++++++++ 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 | 234 ++++++++++++++ arch/arm64/boot/dts/apple/t600x-j375.dtsi | 270 ++++++++++++++++ arch/arm64/boot/dts/apple/t6022-j180d.dts | 415 +++++++++++++++++++++= ++++ arch/arm64/boot/dts/apple/t6022-j475d.dts | 31 ++ arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi | 133 ++++++++ arch/arm64/boot/dts/apple/t602x-dieX.dtsi | 212 +++++++++++++ 10 files changed, 1659 insertions(+) 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 2b7f80119618ad1b497b67597c55968585bd92a9..a2a24d028cbbf5f1703565e8bcd= fd53826226a01 100644 --- a/arch/arm64/boot/dts/apple/t6002-j375d.dts +++ b/arch/arm64/boot/dts/apple/t6002-j375d.dts @@ -15,6 +15,10 @@ / { 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 +30,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_4_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec4_connector_ss: endpoint { + remote-endpoint =3D <&atcphy4_typec_lanes>; + }; + }; + }; + }; }; =20 /* front-left */ @@ -35,6 +63,30 @@ 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_5_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec5_connector_ss: endpoint { + remote-endpoint =3D <&atcphy5_typec_lanes>; + }; + }; + }; + }; }; }; =20 @@ -46,6 +98,104 @@ &bluetooth0 { brcm,board-type =3D "apple,okinawa"; }; =20 +/* USB controllers on die 1 */ +&dwc3_0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_4_hs: endpoint { + remote-endpoint =3D <&typec4_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_4_ss: endpoint { + remote-endpoint =3D <&atcphy4_usb3>; + }; + }; + }; +}; + +&dwc3_1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_5_hs: endpoint { + remote-endpoint =3D <&typec5_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_5_ss: endpoint { + remote-endpoint =3D <&atcphy5_usb3>; + }; + }; + }; +}; + +/* Type-C PHYs */ +&atcphy0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy4_typec_lanes: endpoint { + remote-endpoint =3D <&typec4_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy4_usb3: endpoint { + remote-endpoint =3D <&dwc3_4_ss>; + }; + }; + }; +}; + +&atcphy1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy5_typec_lanes: endpoint { + remote-endpoint =3D <&typec5_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy5_usb3: endpoint { + remote-endpoint =3D <&dwc3_5_ss>; + }; + }; + }; +}; + +/* 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/ &atcphy2_die1; + +/delete-node/ &dwc3_3_dart_0_die1; +/delete-node/ &dwc3_3_dart_1_die1; +/delete-node/ &dwc3_3_die1; +/delete-node/ &atcphy3_die1; + /* delete unused always-on power-domains on die 1 */ =20 /delete-node/ &ps_atc2_usb_aon_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..9676d5127039b76bdd53d5f8fa6= 34118929af9db 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): 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(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(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): 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(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(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): usb@f02280000 { + compatible =3D "apple,t6000-dwc3", "apple,t8103-dwc3"; + reg =3D <0xf 0x02280000 0x0 0xcd00>, <0xf 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_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(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(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): 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(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(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 c0aac59a6fae4f6f4b387483665349a8e2521c1e..6b3b327230818445b8f64ecfa5b= 16145c6cb08d4 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; bluetooth0 =3D &bluetooth0; serial0 =3D &serial0; wifi0 =3D &wifi0; @@ -63,6 +67,30 @@ 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 { @@ -71,6 +99,30 @@ 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 { @@ -79,6 +131,30 @@ 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 */ @@ -130,4 +206,162 @@ &fpwm0 { status =3D "okay"; }; =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>; + }; + }; + }; +}; + +&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>; + }; + }; + }; +}; + +/* + * ps_atc3_usb_aon power-domain is always-on to keep dwc3 working over sus= pend. + * atc3 is used exclusively for the DP-to-HDMI so do not keep this always = on. + */ +&ps_atc3_usb_aon { + /delete-property/ apple,always-on; +}; + +/* ATC3 is used for DisplayPort -> HDMI only */ +&dwc3_3_dart_0 { + status =3D "disabled"; +}; + +&dwc3_3_dart_1 { + status =3D "disabled"; +}; + +&dwc3_3 { + status =3D "disabled"; +}; + +/* Delete unused dwc3_3 to prevent dt_disable_missing_devs() from disabling + * atcphy3 via phandle references from a disablecd device. + */ +/delete-node/ &dwc3_3; + +/* 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 { + status =3D "disabled"; +}; + #include "spi1-nvram.dtsi" diff --git a/arch/arm64/boot/dts/apple/t600x-j375.dtsi b/arch/arm64/boot/dt= s/apple/t600x-j375.dtsi index c0fb93ae72f4d4fcb254a36dc408d55ab1bca0e9..a4bb5cbb67a0678a80105928116= 0f6d6d0f1abe8 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; bluetooth0 =3D &bluetooth0; ethernet0 =3D ðernet0; serial0 =3D &serial0; @@ -50,6 +54,30 @@ 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 { @@ -58,6 +86,30 @@ 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 { @@ -66,6 +118,30 @@ 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 { @@ -74,6 +150,200 @@ 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>; + }; + }; + }; +}; + +&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 diff --git a/arch/arm64/boot/dts/apple/t6022-j180d.dts b/arch/arm64/boot/dt= s/apple/t6022-j180d.dts index dca6bd167c225aa23e78e1c644bf6c97f42d46b5..741199d456fba48d373dd6ee142= 1caaded35fe5c 100644 --- a/arch/arm64/boot/dts/apple/t6022-j180d.dts +++ b/arch/arm64/boot/dts/apple/t6022-j180d.dts @@ -16,6 +16,14 @@ / { compatible =3D "apple,j180d", "apple,t6022", "apple,arm-platform"; model =3D "Apple Mac Pro (M2 Ultra, 2023)"; aliases { + atcphy0 =3D &atcphy0; + atcphy1 =3D &atcphy1; + atcphy2 =3D &atcphy2; + atcphy3 =3D &atcphy3; + atcphy4 =3D &atcphy0_die1; + atcphy5 =3D &atcphy1_die1; + atcphy6 =3D &atcphy2_die1; + atcphy7 =3D &atcphy3_die1; nvram =3D &nvram; serial0 =3D &serial0; }; @@ -54,6 +62,30 @@ hpm2: usb-pd@3b { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec2: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back 1"; + 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 { @@ -62,6 +94,30 @@ hpm3: usb-pd@3c { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec3: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back 2"; + 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>; + }; + }; + }; + }; }; =20 /* hpm4 and hpm5 included from t6022-jxxxd.dtsi */ @@ -72,6 +128,30 @@ hpm6: usb-pd@3d { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec6: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back 5"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + typec6_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_6_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec6_connector_ss: endpoint { + remote-endpoint =3D <&atcphy6_typec_lanes>; + }; + }; + }; + }; }; =20 hpm7: usb-pd@3e { @@ -80,9 +160,41 @@ hpm7: usb-pd@3e { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec7: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Back 6"; + power-role =3D "dual"; + data-role =3D "dual"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + typec7_connector_hs: endpoint { + remote-endpoint =3D <&dwc3_7_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec7_connector_ss: endpoint { + remote-endpoint =3D <&atcphy7_typec_lanes>; + }; + }; + }; + }; }; }; =20 +&typec4 { + label =3D "USB-C Back 3"; +}; + +&typec5 { + label =3D "USB-C Back 4"; +}; + /* USB Type C Front */ &i2c3 { status =3D "okay"; @@ -93,6 +205,30 @@ hpm0: usb-pd@38 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <60 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec0: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Top Right"; + 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 { @@ -101,6 +237,285 @@ hpm1: usb-pd@3f { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <60 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec1: connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C Top Left"; + 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>; + }; + }; + }; + }; + }; +}; + +/* 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>; + }; + }; + }; +}; + +&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>; + }; + }; + }; +}; + +/* USB controllers on die 1 */ +&dwc3_2_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_6_hs: endpoint { + remote-endpoint =3D <&typec6_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_6_ss: endpoint { + remote-endpoint =3D <&atcphy6_usb3>; + }; + }; + }; +}; + +&dwc3_3_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_7_hs: endpoint { + remote-endpoint =3D <&typec7_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_7_ss: endpoint { + remote-endpoint =3D <&atcphy7_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>; + }; + }; + }; +}; + +&atcphy2_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy6_typec_lanes: endpoint { + remote-endpoint =3D <&typec6_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy6_usb3: endpoint { + remote-endpoint =3D <&dwc3_6_ss>; + }; + }; + }; +}; + +&atcphy3_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy7_typec_lanes: endpoint { + remote-endpoint =3D <&typec7_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy7_usb3: endpoint { + remote-endpoint =3D <&dwc3_7_ss>; + }; + }; }; }; =20 diff --git a/arch/arm64/boot/dts/apple/t6022-j475d.dts b/arch/arm64/boot/dt= s/apple/t6022-j475d.dts index 736594544f79b5e45f6ea0c98e6c71d948ef7a43..31f24bbda9689b51c54a8f6cd42= b2ad396082be5 100644 --- a/arch/arm64/boot/dts/apple/t6022-j475d.dts +++ b/arch/arm64/boot/dts/apple/t6022-j475d.dts @@ -16,6 +16,11 @@ / { compatible =3D "apple,j475d", "apple,t6022", "apple,arm-platform"; model =3D "Apple Mac Studio (M2 Ultra, 2023)"; + + aliases { + atcphy4 =3D &atcphy0_die1; + atcphy5 =3D &atcphy1_die1; + }; }; =20 &framebuffer0 { @@ -31,6 +36,32 @@ &pcie0_dart_1 { status =3D "okay"; }; =20 +&typec4 { + label =3D "USB-C Front Right"; +}; + +&typec5 { + label =3D "USB-C Front Left"; +}; + +/* 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/ &atcphy2_die1; + +/delete-node/ &dwc3_3_dart_0_die1; +/delete-node/ &dwc3_3_dart_1_die1; +/delete-node/ &dwc3_3_die1; +/delete-node/ &atcphy3_die1; + +/* delete unused always-on power-domains on die 1 */ +/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; + &wifi0 { compatible =3D "pci14e4,4434"; brcm,board-type =3D "apple,canary"; diff --git a/arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi b/arch/arm64/boot/d= ts/apple/t6022-jxxxd.dtsi index 4f7bf2ebfe397dbde6451672d74ef76fe782bcd0..dc877bd604f827fdb944e211130= 9045e33b8370f 100644 --- a/arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi +++ b/arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi @@ -25,6 +25,29 @@ hpm4: usb-pd@39 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec4: connector { + compatible =3D "usb-c-connector"; + 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_4_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec4_connector_ss: endpoint { + remote-endpoint =3D <&atcphy4_typec_lanes>; + }; + }; + }; + }; }; =20 /* front-left */ @@ -34,5 +57,115 @@ hpm5: usb-pd@3a { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <44 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec5: connector { + compatible =3D "usb-c-connector"; + 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_5_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec5_connector_ss: endpoint { + remote-endpoint =3D <&atcphy5_typec_lanes>; + }; + }; + }; + }; + }; +}; + + +/* USB controllers on die 1 */ +&dwc3_0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_4_hs: endpoint { + remote-endpoint =3D <&typec4_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_4_ss: endpoint { + remote-endpoint =3D <&atcphy4_usb3>; + }; + }; + }; +}; + +&dwc3_1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dwc3_5_hs: endpoint { + remote-endpoint =3D <&typec5_connector_hs>; + }; + }; + + port@1 { + reg =3D <1>; + dwc3_5_ss: endpoint { + remote-endpoint =3D <&atcphy5_usb3>; + }; + }; + }; +}; + +/* Type-C PHYs */ +&atcphy0_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy4_typec_lanes: endpoint { + remote-endpoint =3D <&typec4_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy4_usb3: endpoint { + remote-endpoint =3D <&dwc3_4_ss>; + }; + }; + }; +}; + +&atcphy1_die1 { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + atcphy5_typec_lanes: endpoint { + remote-endpoint =3D <&typec5_connector_ss>; + }; + }; + + port@1 { + reg =3D <1>; + atcphy5_usb3: endpoint { + remote-endpoint =3D <&dwc3_5_ss>; + }; + }; }; }; diff --git a/arch/arm64/boot/dts/apple/t602x-dieX.dtsi b/arch/arm64/boot/dt= s/apple/t602x-dieX.dtsi index cb07fd82b32e67a41d8290bf8347d4eca474af23..ae3d535c5acb372cc94b4891e10= 4d2248394484d 100644 --- a/arch/arm64/boot/dts/apple/t602x-dieX.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-dieX.dtsi @@ -126,3 +126,215 @@ DIE_NODE(pmgr_gfx): power-management@404e80000 { =20 reg =3D <0x4 0x4e80000 0 0x4000>; }; + + DIE_NODE(dwc3_0): usb@702280000 { + compatible =3D "apple,t6020-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(dwc3_0_dart_0): iommu@702f00000 { + compatible =3D "apple,t6020-dart", "apple,t8110-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,t6020-dart", "apple,t8110-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(atcphy0): phy@703000000 { + compatible =3D "apple,t6020-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): usb@b02280000 { + compatible =3D "apple,t6020-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(dwc3_1_dart_0): iommu@b02f00000 { + compatible =3D "apple,t6020-dart", "apple,t8110-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,t6020-dart", "apple,t8110-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(atcphy1): phy@b03000000 { + compatible =3D "apple,t6020-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): usb@f02280000 { + compatible =3D "apple,t6020-dwc3", "apple,t8103-dwc3"; + reg =3D <0xf 0x02280000 0x0 0xcd00>, <0xf 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_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(dwc3_2_dart_0): iommu@f02f00000 { + compatible =3D "apple,t6020-dart", "apple,t8110-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,t6020-dart", "apple,t8110-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(atcphy2): phy@f03000000 { + compatible =3D "apple,t6020-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): usb@1302280000 { + compatible =3D "apple,t6020-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(dwc3_3_dart_0): iommu@1302f00000 { + compatible =3D "apple,t6020-dart", "apple,t8110-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,t6020-dart", "apple,t8110-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(atcphy3): phy@1303000000 { + compatible =3D "apple,t6020-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)>; + }; --=20 2.52.0