From nobody Mon Feb 9 21:23:03 2026 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 3A41433A9D4; Fri, 9 Jan 2026 14:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767967642; cv=none; b=TLiAwutjoO7vsa6RXWs61Gr7mDMpOflZ9GOlW1s/HaLLHaBSL2YOtcR4PcZ9/mMRRU1nNPMQUwpi7bT/U7kiBL+Ps4UYXP/6OCVm6pgRzAuxQN+gJCDuefxvuYPG0Ey4p2tuf9tb9Hd2X/oCpAFBILo1TecPVkwd5mjdDFUn3to= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767967642; c=relaxed/simple; bh=8d465/+q+z5EchP2JvDpBdreXBOIINKCPLZ+m2kvg0M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fzHKMPrXqZmn+ZXp23sFpoNde92oinlwPVk8gXfA8baTk3y+UglP80V7dZYSbs1l+QdTAcfyUJvjxWM5THwf43dY5jp4GAPH6hj/S+Oa7yc3uTds13dC5T3yrKExfXQkBa2Kqlfku8pzxRY2C3QRPW329qhfEQpVYkOV64E8WVU= 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=HH86rFiS; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=evq5Rojp; arc=none smtp.client-ip=103.168.172.158 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="HH86rFiS"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="evq5Rojp" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7B0781400126; Fri, 9 Jan 2026 09:07:19 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 09 Jan 2026 09:07:19 -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=1767967639; x=1768054039; bh=osVo4rrNRkYVCXoozGTcNKAbrHVQPBhjbYl02EAsadU=; b= HH86rFiSLF3cKWUaJ5Gl2x+jhZhSQ3kopTfeN5/koqrdPjqyVUosHeWtUZUNS5nS Gex3vgafZXL5Chdwc+Sw/Knm4iQWzjAAj/zch7lELSoeSYvt2RJTDm0CJvn1hvHI lBEGaspgWIT69e71ttR0uZFUC93fVrUILXiRqzvwWGJyOaBYbWNukRLjbq3H8ZIh 1YopI1TzMEbz/XLt874R9OF1F93Hkple+PYvEyU47xECAxJGiL3c2o1HodkClxTb gBpTEt0ZPK7mVkRyUcOAUiH6xfCkx5hZrIf1sPLXmgVXmCTeUDIax61iOgZKj4Vd P8kpW0pKtcXXUKPb1XlDVA== 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=1767967639; x= 1768054039; bh=osVo4rrNRkYVCXoozGTcNKAbrHVQPBhjbYl02EAsadU=; b=e vq5RojpeNAsD6pGWUYeruCK94Rd1/DLhrsl0Qk/olRnqs0Pkm2UpdI5TxlklB8ov 0VxrgTDlIqiwZhwmgYZlWuc7GyIKCAAnc8AiBEUfIVsemdBOjUt/w/RxEQdyV0s6 VqLaqshVrHSF1ZptvhXR1VBmJJF2t9Mwk8wSgGbb/wDoT/Wx9ajyGXgHtUtoa6es hsGCKzoe4A47ZDqafG075JqRajoVQWLodCPlRHvJ3ed3R9ttA3hcMG2qJOsX4mEI iiO8A9fvukraGJH79E0Xl+ZIO4IEj22nS7gn2MpNqNEreMXcObb/TFRG18bZ4y1J d8sngVFsanD5I6zqq7j1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdeltdduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflrghnnhgv ucfirhhunhgruhcuoehjsehjrghnnhgruhdrnhgvtheqnecuggftrfgrthhtvghrnhepfe ehheeileduffehteeihfdvtdelffdutdeludduiedutedvfeffheekhefgtedtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhesjhgrnhhnrg hurdhnvghtpdhnsggprhgtphhtthhopeduuddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrg gurdhorhhgpdhrtghpthhtohepshhvvghnsehkvghrnhgvlhdrohhrghdprhgtphhtthho pehmrghrtggrnhesmhgrrhgtrghnrdhsthdprhgtphhtthhopehkrhiikhdoughtsehkvg hrnhgvlhdrohhrghdprhgtphhtthhopeguvghvihgtvghtrhgvvgesvhhgvghrrdhkvghr nhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvg hrnhgvlhdrohhrghdprhgtphhtthhopehnvggrlhesghhomhhprgdruggvvhdprhgtphht thhopehjsehjrghnnhgruhdrnhgvthdprhgtphhtthhopegrshgrhhhisehlihhsthhsrd hlihhnuhigrdguvghv X-ME-Proxy: Feedback-ID: i47b949f6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Jan 2026 09:07:18 -0500 (EST) From: Janne Grunau Date: Fri, 09 Jan 2026 15:07:04 +0100 Subject: [PATCH 1/3] arm64: dts: apple: t8103: 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-1-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 , Hector Martin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=11353; i=j@jannau.net; s=yk2025; h=from:subject:message-id; bh=Nq2mv8z2xinvTQJisOByyoINMdZyYEBNgxGHRRq2uTI=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhsxE7knJwXskl6Vv27j82+fPX9w4n7e06y7+8zipQ2ra/ gTei1KcHaUsDGJcDLJiiixJ2i87GFbXKMbUPgiDmcPKBDKEgYtTACbiX8rwP/Sj0S1ZpRVL9hs5 1E2aJqSuYPLm7MxbYvZbOE2alueVzGBkuPCmRuyDbfH79vPOrhaRE09fOHdRm8fssOiUVzMK9mw 7zwkA X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 From: Hector Martin Add device nodes and connections to support USB 3.x on the SoC's integrated USB-C ports of M1-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. The iMac variant with four USB-C ports has two SoC integrated USB-C ports and two additional USB-C ports driven by an AsMedia PCIe USB controller. The latter ports are not covered by this change. The port labels use Apple's established naming scheme for the ports. Signed-off-by: Hector Martin Co-developed-by: Sven Peter Signed-off-by: Sven Peter Signed-off-by: Janne Grunau Reviewed-by: Neal Gompa Reviewed-by: Sven Peter Tested-by: Sven Peter # M1 mac mini and macbook air --- 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 | 134 ++++++++++++++++++++++++++= ++++ arch/arm64/boot/dts/apple/t8103.dtsi | 105 +++++++++++++++++++++++ 7 files changed, 299 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts= /apple/t8103-j274.dts index 1c3e37f86d46d7b5d733717b47c4b57dc55e1201..968fe22163d4431fe5e70498546= 87e61e0ec50f1 100644 --- a/arch/arm64/boot/dts/apple/t8103-j274.dts +++ b/arch/arm64/boot/dts/apple/t8103-j274.dts @@ -29,6 +29,18 @@ &wifi0 { brcm,board-type =3D "apple,atlantisb"; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Back-left"; +}; + +&typec1 { + label =3D "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 5b3c42e9f0e6776241bf746d3458766e44e3639a..678f89c3d47fbf2d0705b46bb8f= eba3fa018ca7a 100644 --- a/arch/arm64/boot/dts/apple/t8103-j293.dts +++ b/arch/arm64/boot/dts/apple/t8103-j293.dts @@ -46,6 +46,18 @@ &wifi0 { brcm,board-type =3D "apple,honshu"; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Left-back"; +}; + +&typec1 { + label =3D "USB-C Left-front"; +}; + &i2c2 { status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts= /apple/t8103-j313.dts index 97a4344d8dca685708aff136af92a1b316f3c3dd..bce9b911009e2b0caa9d8b2222c= d1e8c3215f3b9 100644 --- a/arch/arm64/boot/dts/apple/t8103-j313.dts +++ b/arch/arm64/boot/dts/apple/t8103-j313.dts @@ -41,3 +41,15 @@ &wifi0 { &fpwm1 { status =3D "okay"; }; + +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Left-back"; +}; + +&typec1 { + label =3D "USB-C Left-front"; +}; diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts= /apple/t8103-j456.dts index 58c8e43789b4861544e20c717124ede3327be010..9983e11cacdf19d0a92ede108ce= ac21b7a02d5da 100644 --- a/arch/arm64/boot/dts/apple/t8103-j456.dts +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts @@ -47,6 +47,18 @@ hpm3: usb-pd@3c { }; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Back-right"; +}; + +&typec1 { + label =3D "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 7089ccf3ce55661f3f83810496daed40c8199189..6703f4a3d3db4c51a4897b77948= eba13489b1e43 100644 --- a/arch/arm64/boot/dts/apple/t8103-j457.dts +++ b/arch/arm64/boot/dts/apple/t8103-j457.dts @@ -37,6 +37,18 @@ &wifi0 { brcm,board-type =3D "apple,santorini"; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Back-right"; +}; + +&typec1 { + label =3D "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/dt= s/apple/t8103-jxxx.dtsi index 0c8206156bfefda8a32c869787b2e0c8e67a9d17..686fb1dd215d2d11e736826a254= e17b6eab27c3e 100644 --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi @@ -15,6 +15,8 @@ aliases { serial0 =3D &serial0; serial2 =3D &serial2; wifi0 =3D &wifi0; + atcphy0 =3D &atcphy0; + atcphy1 =3D &atcphy1; }; =20 chosen { @@ -53,6 +55,29 @@ hpm0: usb-pd@38 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <106 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec0: 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>; + 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 { @@ -61,6 +86,115 @@ hpm1: usb-pd@3f { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <106 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec1: 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>; + 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>; + }; + }; + }; +}; + +/* 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>; + }; + }; }; }; =20 diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/app= le/t8103.dtsi index 8b7b27887968741b745651e5133dffa7d8d20f6d..c48b10ac65efcc9c5211c3cdb0a= 5be63bf60a859 100644 --- a/arch/arm64/boot/dts/apple/t8103.dtsi +++ b/arch/arm64/boot/dts/apple/t8103.dtsi @@ -12,6 +12,7 @@ #include #include #include +#include =20 / { compatible =3D "apple,t8103", "apple,arm-platform"; @@ -1007,6 +1008,110 @@ nvme@27bcc0000 { resets =3D <&ps_ans2>; }; =20 + dwc3_0: usb@382280000 { + compatible =3D "apple,t8103-dwc3"; + reg =3D <0x3 0x82280000 0x0 0xcd00>, <0x3 0x8228cd00 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 <&dwc3_0_dart_0 0>, <&dwc3_0_dart_1 1>; + power-domains =3D <&ps_atc0_usb>; + resets =3D <&atcphy0>; + phys =3D <&atcphy0 PHY_TYPE_USB2>, <&atcphy0 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + dwc3_0_dart_0: iommu@382f00000 { + compatible =3D "apple,t8103-dart"; + reg =3D <0x3 0x82f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc0_usb>; + }; + + dwc3_0_dart_1: iommu@382f80000 { + compatible =3D "apple,t8103-dart"; + reg =3D <0x3 0x82f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc0_usb>; + }; + + atcphy0: phy@383000000 { + compatible =3D "apple,t8103-atcphy"; + reg =3D <0x3 0x83000000 0x0 0x4c000>, + <0x3 0x83050000 0x0 0x8000>, + <0x3 0x80000000 0x0 0x4000>, + <0x3 0x82a90000 0x0 0x4000>, + <0x3 0x82a84000 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 <&ps_atc0_usb>; + }; + + dwc3_1: usb@502280000 { + compatible =3D "apple,t8103-dwc3"; + reg =3D <0x5 0x02280000 0x0 0xcd00>, <0x5 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 <&dwc3_1_dart_0 0>, <&dwc3_1_dart_1 1>; + power-domains =3D <&ps_atc1_usb>; + resets =3D <&atcphy1>; + phys =3D <&atcphy1 PHY_TYPE_USB2>, <&atcphy1 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + dwc3_1_dart_0: iommu@502f00000 { + compatible =3D "apple,t8103-dart"; + reg =3D <0x5 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc1_usb>; + }; + + dwc3_1_dart_1: iommu@502f80000 { + compatible =3D "apple,t8103-dart"; + reg =3D <0x5 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc1_usb>; + }; + + atcphy1: phy@503000000 { + compatible =3D "apple,t8103-atcphy"; + reg =3D <0x5 0x03000000 0x0 0x4c000>, + <0x5 0x03050000 0x0 0x8000>, + <0x5 0x0 0x0 0x4000>, + <0x5 0x02a90000 0x0 0x4000>, + <0x5 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 <&ps_atc1_usb>; + }; + pcie0_dart_0: iommu@681008000 { compatible =3D "apple,t8103-dart"; reg =3D <0x6 0x81008000 0x0 0x4000>; --=20 2.52.0 From nobody Mon Feb 9 21:23:03 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 DBB3C35CBD2; Fri, 9 Jan 2026 14:07:21 +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=1767967646; cv=none; b=aPjUqVd/9xfNq0tdFpcOcp3VspjXgmNKAjOPWphif/6OHpbgcBre6XiJSfUt/89fh7JEnvlPQQCaBJnhKiGr6OGvIlJ1BIdkBvZ3vtBBTFmeSIOxk52wGnC/cylEbGxii9Q6xfImLYYecY9KmZ28Hxurpc7neJcwHHXgt8fDG8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767967646; c=relaxed/simple; bh=5sAP2O0nEantlo5N0X+zOXwqVqOKaAbA1qOTtCpnRCU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NGkwxR7SwckHVSv6ZxFRjzgkHJ6dv2CqEE4l0Yccjl3StFiw5+WHzBtRvJoC3iRgRew//3S4jcNsyyxXY7LOcVJc4ZmlG0Pn8hn553wweEl9WOlz5yHne6U5usxU72neMc5pjOy70MydrFEvFNsbuEcsglGxX8uTz2LbOpwifu0= 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=Qoa+6I+k; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ui8fE6HG; 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="Qoa+6I+k"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ui8fE6HG" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 3E785EC0122; Fri, 9 Jan 2026 09:07:21 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 09 Jan 2026 09:07:21 -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=1767967641; x=1768054041; bh=KNmaCI/nIJNZDotst6zL5fOOKuKgVRDXuDHciQkTYHE=; b= Qoa+6I+kIZNup22Ldm9LXuxROCC2j2ZHHxGehuO5sYR1rYfZix75gtiIfUwDXjBk A5RR+z1qqQsPGvpjM4CKzkcQAY1qwz/pAxlH00WgSZ8OkTXCAb4CSLSC18ZFvKca t+xLQZ30uNckxOpogc0h++dBm89A86gWBdftKrlondBU+hblmqVyIhaKGaI2X5cN cSnLiPOXlD7h+UPQxmPU7ftcu9c1B+L2c3tRx66nNn+MONFJnjOtXxM6d38rmxdv pJc20ukfTeWe8hfaPVpyaxMeJUwFwQ7EtGyKNVb0tXmCGU26NjfJ8vMs2WEEOz/l g+xEjw9UBCEj0D4XRya0vw== 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=1767967641; x= 1768054041; bh=KNmaCI/nIJNZDotst6zL5fOOKuKgVRDXuDHciQkTYHE=; b=u i8fE6HGjdDOoYtNZE/Rr1LGKiHsL9poar95ffCjFdoOv9Z8D2UIU2JP4nWJd0rJL hGheYzSEorUgzZJKYM4FNUpvCpUBUXepAsuvNVtfGcLf8d1DU+FFlFpd7bYL2Tyy 5u/R8OhyFaesQ9UJT20/mGqTJKyIOQuSSUcUWaYoiGhVNH6wRd5fjRt8ytqDg2dW xOZxvkeA4eIG2LXhk+KipbSn6NJlnK6AZrH1z/I1jMFxk1EhBdoyOl0CRHRloVJV MaS3vYpig1FZeX66UcUF2+t7YEcOVk177aw2t42XXN8VhSrjFD3p/xd62VwThKZE THapvunM0ukjH0XR0O1VA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdeltdduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflrghnnhgv ucfirhhunhgruhcuoehjsehjrghnnhgruhdrnhgvtheqnecuggftrfgrthhtvghrnhepfe ehheeileduffehteeihfdvtdelffdutdeludduiedutedvfeffheekhefgtedtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhesjhgrnhhnrg hurdhnvghtpdhnsggprhgtphhtthhopeduuddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrg gurdhorhhgpdhrtghpthhtohepshhvvghnsehkvghrnhgvlhdrohhrghdprhgtphhtthho pehmrghrtggrnhesmhgrrhgtrghnrdhsthdprhgtphhtthhopehkrhiikhdoughtsehkvg hrnhgvlhdrohhrghdprhgtphhtthhopeguvghvihgtvghtrhgvvgesvhhgvghrrdhkvghr nhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvg hrnhgvlhdrohhrghdprhgtphhtthhopehnvggrlhesghhomhhprgdruggvvhdprhgtphht thhopehjsehjrghnnhgruhdrnhgvthdprhgtphhtthhopegrshgrhhhisehlihhsthhsrd hlihhnuhigrdguvghv X-ME-Proxy: Feedback-ID: i47b949f6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Jan 2026 09:07:20 -0500 (EST) From: Janne Grunau Date: Fri, 09 Jan 2026 15:07:05 +0100 Subject: [PATCH 2/3] arm64: dts: apple: t8112: 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-2-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 , Hector Martin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=10233; i=j@jannau.net; s=yk2025; h=from:subject:message-id; bh=HVy2+R6HXjapYu4fYsJD5sDEtHI1CFXmrBKtTY5Nwvc=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhsxE7kn9AbVSD2LnS2y5+NJL5NO8W+3KXbaxuSkt/Mf3L 945S9Cwo5SFQYyLQVZMkSVJ+2UHw+oaxZjaB2Ewc1iZQIYwcHEKwESczzP8TzslL9f63v3/282S NqudYy593mlXvibw+fP0vjVLbPblz2f4n+Y+t/T6hG2SeR+j7DcWfbvb2tgd5ep2QoXjl2GwnZI sNwA= X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 From: Hector Martin Add device nodes and connections to support USB 3.x on the SoC's integrated USBi Type-C ports of M2-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. The port labels use Apple's established naming scheme for the ports. Signed-off-by: Hector Martin Co-developed-by: Janne Grunau Signed-off-by: Janne Grunau Reviewed-by: Neal Gompa Reviewed-by: Sven Peter Tested-by: Sven Peter # M1 mac mini and macbook air --- arch/arm64/boot/dts/apple/t8112-j413.dts | 12 +++ arch/arm64/boot/dts/apple/t8112-j415.dts | 12 +++ arch/arm64/boot/dts/apple/t8112-j473.dts | 12 +++ arch/arm64/boot/dts/apple/t8112-j493.dts | 12 +++ arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 134 ++++++++++++++++++++++++++= ++++ arch/arm64/boot/dts/apple/t8112.dtsi | 105 +++++++++++++++++++++++ 6 files changed, 287 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts= /apple/t8112-j413.dts index 6f69658623bf89ce73e3486bce504f1f5f8003f3..21e81a8899d8d7ff5461db085b5= 3feccc7c53f64 100644 --- a/arch/arm64/boot/dts/apple/t8112-j413.dts +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts @@ -60,6 +60,18 @@ bluetooth0: bluetooth@0,1 { }; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Left-back"; +}; + +&typec1 { + label =3D "USB-C Left-front"; +}; + &i2c0 { /* MagSafe port */ hpm5: usb-pd@3a { diff --git a/arch/arm64/boot/dts/apple/t8112-j415.dts b/arch/arm64/boot/dts= /apple/t8112-j415.dts index b54e218e5384ca89155e4350d6680a28a531f408..b4f72fbafaf104573c86ceff928= 3c05d43aee080 100644 --- a/arch/arm64/boot/dts/apple/t8112-j415.dts +++ b/arch/arm64/boot/dts/apple/t8112-j415.dts @@ -60,6 +60,18 @@ bluetooth0: bluetooth@0,1 { }; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Left-back"; +}; + +&typec1 { + label =3D "USB-C Left-front"; +}; + &i2c0 { /* MagSafe port */ hpm5: usb-pd@3a { diff --git a/arch/arm64/boot/dts/apple/t8112-j473.dts b/arch/arm64/boot/dts= /apple/t8112-j473.dts index 06fe257f08be498ace6906b936012e01084da702..81994f0a7df962d982b675deb4c= 35b25fa3c29f6 100644 --- a/arch/arm64/boot/dts/apple/t8112-j473.dts +++ b/arch/arm64/boot/dts/apple/t8112-j473.dts @@ -52,3 +52,15 @@ &pcie1_dart { &pcie2_dart { status =3D "okay"; }; + +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Back-left"; +}; + +&typec1 { + label =3D "USB-C Back-right"; +}; diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts= /apple/t8112-j493.dts index fb8ad7d4c65a8fe7966f5541f24f03a379143cfb..f8e442152ff23f21a46916ac111= e5f6bbc87cf83 100644 --- a/arch/arm64/boot/dts/apple/t8112-j493.dts +++ b/arch/arm64/boot/dts/apple/t8112-j493.dts @@ -108,6 +108,18 @@ bluetooth0: bluetooth@0,1 { }; }; =20 +/* + * Provide labels for the USB type C ports. + */ + +&typec0 { + label =3D "USB-C Left-back"; +}; + +&typec1 { + label =3D "USB-C Left-front"; +}; + &i2c4 { status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi b/arch/arm64/boot/dt= s/apple/t8112-jxxx.dtsi index 6da35496a4c88dbaba125ebbe8c5a4a428c647c3..562e7a25a1e8843f516c3d73272= 54049332cd08d 100644 --- a/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi @@ -11,6 +11,8 @@ =20 / { aliases { + atcphy0 =3D &atcphy0; + atcphy1 =3D &atcphy1; serial0 =3D &serial0; serial2 =3D &serial2; }; @@ -53,6 +55,29 @@ hpm0: usb-pd@38 { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <8 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec0: 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>; + 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 { @@ -61,6 +86,115 @@ hpm1: usb-pd@3f { interrupt-parent =3D <&pinctrl_ap>; interrupts =3D <8 IRQ_TYPE_LEVEL_LOW>; interrupt-names =3D "irq"; + + typec1: 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>; + 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>; + }; + }; + }; +}; + +/* 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>; + }; + }; }; }; =20 diff --git a/arch/arm64/boot/dts/apple/t8112.dtsi b/arch/arm64/boot/dts/app= le/t8112.dtsi index 3f79878b25af1f7760088aa552589494d67347fb..2d645cdec4a75fcfe1897d42f9a= f460e2752f2eb 100644 --- a/arch/arm64/boot/dts/apple/t8112.dtsi +++ b/arch/arm64/boot/dts/apple/t8112.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include =20 / { @@ -1010,6 +1011,110 @@ nvme@27bcc0000 { resets =3D <&ps_ans>; }; =20 + dwc3_0: usb@382280000 { + compatible =3D "apple,t8112-dwc3", "apple,t8103-dwc3"; + reg =3D <0x3 0x82280000 0x0 0xcd00>, <0x3 0x8228cd00 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 <&dwc3_0_dart_0 0>, <&dwc3_0_dart_1 1>; + power-domains =3D <&ps_atc0_usb>; + resets =3D <&atcphy0>; + phys =3D <&atcphy0 PHY_TYPE_USB2>, <&atcphy0 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + dwc3_0_dart_0: iommu@382f00000 { + compatible =3D "apple,t8110-dart"; + reg =3D <0x3 0x82f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc0_usb>; + }; + + dwc3_0_dart_1: iommu@382f80000 { + compatible =3D "apple,t8110-dart"; + reg =3D <0x3 0x82f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc0_usb>; + }; + + atcphy0: phy@383000000 { + compatible =3D "apple,t8112-atcphy", "apple,t8103-atcphy"; + reg =3D <0x3 0x83000000 0x0 0x4c000>, + <0x3 0x83050000 0x0 0x8000>, + <0x3 0x80000000 0x0 0x4000>, + <0x3 0x82a90000 0x0 0x4000>, + <0x3 0x82a84000 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 <&ps_atc0_usb>; + }; + + dwc3_1: usb@502280000 { + compatible =3D "apple,t8112-dwc3", "apple,t8103-dwc3"; + reg =3D <0x5 0x02280000 0x0 0xcd00>, <0x5 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 <&dwc3_1_dart_0 0>, <&dwc3_1_dart_1 1>; + power-domains =3D <&ps_atc1_usb>; + resets =3D <&atcphy1>; + phys =3D <&atcphy1 PHY_TYPE_USB2>, <&atcphy1 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + }; + + dwc3_1_dart_0: iommu@502f00000 { + compatible =3D "apple,t8110-dart"; + reg =3D <0x5 0x02f00000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc1_usb>; + }; + + dwc3_1_dart_1: iommu@502f80000 { + compatible =3D "apple,t8110-dart"; + reg =3D <0x5 0x02f80000 0x0 0x4000>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + #iommu-cells =3D <1>; + power-domains =3D <&ps_atc1_usb>; + }; + + atcphy1: phy@503000000 { + compatible =3D "apple,t8112-atcphy", "apple,t8103-atcphy"; + reg =3D <0x5 0x03000000 0x0 0x4c000>, + <0x5 0x03050000 0x0 0x8000>, + <0x5 0x0 0x0 0x4000>, + <0x5 0x02a90000 0x0 0x4000>, + <0x5 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 <&ps_atc1_usb>; + }; + pcie0_dart: iommu@681008000 { compatible =3D "apple,t8110-dart"; reg =3D <0x6 0x81008000 0x0 0x4000>; --=20 2.52.0 From nobody Mon Feb 9 21:23:03 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 Reviewed-by: Neal Gompa Reviewed-by: Sven Peter Tested-by: Sven Peter # M1 mac mini and macbook air --- 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