From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56EA9606A6B6 for ; Sun, 29 Nov 2026 09:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ebQCuh/z DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=Rmu9SK5sn0fTeJlIVn/2CzA3gDiixbnxYQK515GNIhg=; b=ebQCuh/zDRiTnmPEYWFLP00zpZ rLpn7u5zeeeTROfkiS3G2cmIzXrt/AMMKFJpNUY48kPdiFkUGHVBPJYDH4PH/0fjQAUtEUo9jLBDg kN2zsusN6FBlpTEpvspkRacxdKfiCmu4LO1Y2pawUG0EKrN/6W9cy7EaUDQJlkJgc3acNfECjf3zZ VcA+HtZGKeAC3fU1tIY23g9Q8fMTcPFI/Zos1UlWBKTI3Lfs8nvVwIS3IIUzGFO2MXG1yQXHXWESA 8F6KrrHRKMIZGpLRhPvMtPPpmVSq4216gnJVbpTNpSYYkXrvbpVpt0sII1toTKfiTCXo+Y96feH/a D8rmgMWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbCj-00000001jfj-034V; Sun, 29 Nov 2026 09:28:17 +0000 Received: from mail-wr1-f50.google.com ([209.85.221.50]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbCf-00000001jb2-3OKb for linux-phy@lists.infradead.org; Sun, 29 Nov 2026 09:28:15 +0000 Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-497614c95f0so5291497f8f.1 for ; Sun, 29 Nov 2026 01:28:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795944492; x=1796549292; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=o7A7X3OTs4jQXGSbB0zMa8yXuETXPlaJVK/U0i0clS8=; b=XE5XRMWd71LNRg30AciPYkEh4kM991GYH72j9VRFZU52EMVDDD2MjwlWFfYd2/YhM2 zXvv0Rb6UHr0LTenmRDoqEDRXaiMSUPr09T3TwOXyyFkD03QNL89FcoYjOzdsN2PCdg7 9oysGIdlnGSjYflumHMlouCTqaNUqj4Iv7xxGEXKdr8xl70E/uQGeobYGb18UL8sD1d9 9qCe5W5bGOiwtP1YwnAHEimfVwyghFwuxFwe2ysTwVxpp5YPsQEEZYLH3+FqR201+Y6z gezrpkU0X3eGrRHsX4b260ezwVne38x8JNcF2mOJXl3loLtDkFtZCNbTd7VffDWFxv/M NJLA== X-Forwarded-Encrypted: i=1; AL+hErHQ1c8xcg8f7Laml/ftBYtHQa/UrZNXAyV1/gJPb9EAp/Ct8sr16qsj0olSLkQDsHYJJZr7Z7hoV9c=@lists.infradead.org X-Gm-Message-State: APuU4Z+lZIzUIGioXMDgJy3Y7iXwfAbN5QZ4rSfJJkx7K7IcTOf4q3CS K+ilNog6vynaWSxweq+TrJYtRLTw7SrR5IhuG4LhxanC+WbNAJRB8cab X-Gm-Gg: AZFdTZd0cc6pQAF0oHBgTcYokGxIpRZO9c1M7cBfoL871lgw62Cs8Bvt1iNh4aEaHP4 nkrSmIX0uw1lAAWFR0wCfDD+aK8isCUp1u/VSyvxtFEXxrE48++Ya9PaqdgPCM4atweorLehCRW FWT+utpfG+VbH+7eFgWgezAGTUvVh7mx9POVg8veJq4A9n+NLnLgLKBNVidx5ESUDqzSu6CuWM0 NplntF64UOcE420XmpwvoDK9AvzodIfUaxdD58irSpbsa8SmEDLlzhkgbUUD550792Taqdyz/Pk /CMaQyy782m33+zcZtbPfcl98xlNuDl3p4k2FznclGuKH3WBGVGOFHMZ9xZKjdg6BpLdvLpVY5l Yhwg6KjR4xTGl0WBNEnhIxC87GADK+vT7kPE+O2axDR+ZBH+dTx2N5NQhSx+8CBZ+Z/s8M4BDAz piogBh0tFr4bFtt8Ovx1e1PeWfsvcdbx9ivK/1rcnlHAjppKO+PMQAL1MbtlxJ5sGby3cDZogi6 ViVKVHCqboOqSVlfROZBY2BnpEjmfzpujMCZix3MXJg+dzmtIrrDOAoiIH122h+iYska4XSW29L fC+5Hq7872J0WRETjuJD4eQJkC53cpkN/grFO38B8SAJ6sLjNYJq7zVLIUW9zN+zQRQACwyJvM4 8F0CVokpyLC8w5hqLEjNDBQ2X X-Received: by 2002:a05:6000:2990:20b0:4aa:2afc:e63b with SMTP id ffacd0b85a97d-4abb400bb25mr44168695f8f.36.1795944491591; Sun, 29 Nov 2026 01:28:11 -0800 (PST) Received: from threads.localdomain ([84.68.176.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab69bf61e8sm60210765f8f.11.2026.11.29.01.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 01:28:11 -0800 (PST) From: Lucas Tanure To: Neil Armstrong , Kevin Hilman , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Mathias Nyman Cc: Jerome Brunet , Martin Blumenstingl , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] Add USB support for the Amlogic T7 Date: Sun, 29 Nov 2026 09:28:01 +0000 Message-ID: <20261129092810.146043-1-tanure@linux.com> X-Mailer: git-send-email 2.56.1 X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_012813_867935_F17C5B0B X-CRM114-Status: GOOD ( 18.75 ) X-Spam-Score: -0.8 (/) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The Amlogic T7 (A311D2) has the G12A USB 2 PHY, the G12A USB3 + PCIe combo PHY, and two Corigine dual-role USB controllers. In the host role each controller is a plain xHCI. This series adds the host role for both controllers, both USB 2 PHYs and the USB 3 lane of the combo PHY, and enables the three USB ports of the Khadas VIM4. Patches by tree: - phy: 1, 2 (USB 2 PHY), 7, 8 (USB3 + PCIe combo PHY) - usb: 3, 4 (controller binding, xhci-plat) - amlogic: 5, 6, 9 (device tree) The series is based on next-20261127. Patches 1 and 2 build on the S4 support in the phy tree ("phy: amlogic: meson-g12a-usb2: add S4 support"); the T7 PHY is close to the S4 one. Patch 6 only has context from the VIM4 thermal changes in the amlogic tree. Notes for review: - Each USB 2 port has a small block of control registers (power-on reset, host mode, PHY ready) at 0xfe03a000 + 0x20 * port. The vendor driver handles them in its PHY driver, and so does this series: they are the second register range of each USB 2 PHY node. The USB 3 registers of the same block (0xfe03a080) are the second range of the combo PHY node. No range is shared between nodes. - The controllers can also be USB devices. Mainline has no driver for the Corigine device controller, so only the host role is supported. The binding already includes usb-drd.yaml and the board sets dr_mode = "host", so device mode can be added later without changing existing device trees. - The controllers report 64-bit addressing but use only the lower 32 bits (patch 4, XHCI_NO_64BIT_SUPPORT, as on R-Car). - A warm reboot left the USB 2 PHY stuck; a reset pulse does not clear it, holding the reset does (patch 2). The combo PHY gets the same treatment (patch 8). - Patch 8 sets bits 18:17 of combo PHY register 0x18 to 2, as the vendor driver does. Neither the vendor code nor the datasheet names this field. Tested on the Khadas VIM4, on next-20261127 after warm reboots, and with the same patches on v7.4-rc4 also after a cold boot: - USB 3.0 socket: SuperSpeed, 101-110 MB/s read from a USB 3 flash drive - USB 2.0 socket (on-board hub): 44 MB/s read with the same drive - USB-C port, host role through a powered hub: flash drive (41 MB/s), network adapter (287/343 Mbit/s with iperf3), card reader - hot plug; no errors in the log next-20261127 does not boot on the T7 as is: since 8954a462e433 ("firmware: arm: scmi: Add centralized detection of truncated replies") every SCMI clock fails, because the T7 firmware answers CLOCK_ATTRIBUTES with 20 bytes instead of 24, and the SD and eMMC hosts then fail to probe. The tests above ran with that check reduced to a warning. This is unrelated to the series; reported here: https://lore.kernel.org/arm-scmi/CAJX_Q+21a1UVE1CCXEGQc4-pdgu_fu32ohxspg5h=Sw7zPdKdQ@mail.gmail.com/ Lucas Tanure (9): dt-bindings: phy: amlogic,g12a-usb2-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb2: add T7 support dt-bindings: usb: add the Amlogic T7 USB controller usb: host: xhci-plat: add Amlogic T7 support arm64: dts: amlogic: t7: add the USB controllers arm64: dts: amlogic: khadas-vim4: enable the USB ports dt-bindings: phy: amlogic,g12a-usb3-pcie-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb3-pcie: add T7 support arm64: dts: amlogic: t7: add the USB3 PHY .../bindings/phy/amlogic,g12a-usb2-phy.yaml | 53 ++++++--- .../phy/amlogic,g12a-usb3-pcie-phy.yaml | 46 +++++++- .../bindings/usb/amlogic,t7-usb.yaml | 78 +++++++++++++ .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 14 +++ arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 63 ++++++++++ drivers/phy/amlogic/phy-meson-g12a-usb2.c | 95 +++++++++++++-- .../phy/amlogic/phy-meson-g12a-usb3-pcie.c | 108 +++++++++++++++++- drivers/usb/host/xhci-plat.c | 7 ++ 8 files changed, 432 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/amlogic,t7-usb.yaml base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d -- 2.56.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795944493; b=XElXCHDY9XK/cb6cR0+x1hmeoD9mzHHS01h7eD3TGxq+SiCLlUntOAe8uj7q3OwCO7t8 8Y+GOPUITaGD8OTgj5e8B3CYsSjZ+cMcqzCG6SqCqdnQO1FFApV7DJAYfJ9bk68/8wyij 0CQqA5PawD1XS0KCZUhYwTNdjCzNgmHcGIFp66JwDhKBifk3QT+y2pzlAJeHw90Fe2I4A 2514nYe7E53EIdt4A1AKQO3587Ui+cLTsHTlgCIF0k1UNTOJC9jBCZdkHeCNk8kUMfr03 fE4pPR4m79boV5+5FG6sSdzmcbmZwF8lUDaFZkWwAS+YINlLI7hU2Ukru+X6PeKfOnQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795944493; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=o7A7X3OTs4jQXGSbB0zMa8yXuETXPlaJVK/U0i0clS8=; b=bYO0/r58a8qJGTPar5ITYAeH7mFHwCK+b4R5Uhs6hPbkC8zBvs0SQjexciPQkt58WdO4 y+1g2fGUdqSwjllXGxJtt8GNwZtfD+bxCBn1QKq7m4VNRnCF/FeKk2cWq6b/kMzlfAlof aLgip7sXQCv2qIaAquBr0eCjQkOkhO74fD8i5D20ixYG4z5OR5AI9F4VwE4KnMDb2DJXc qb3R/vUiX6pG8q8gIcEPVUEnkDy/U1BMeJUDmdnSsa3BAHBqJavUwTCpiG9AW74QlUwjt p+L6tHGgbQOwI2dIStIIIwBqBPyvnR9xDpTQAocE4KtRTOfk5VKIQP1Q9gWf4FfGigw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.remote-ip=209.85.221.44 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45754606A31C for ; Sun, 29 Nov 2026 09:28:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 45754606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-4a34ffd3e39so5142619f8f.0 for ; Sun, 29 Nov 2026 01:28:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795944492; x=1796549292; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=o7A7X3OTs4jQXGSbB0zMa8yXuETXPlaJVK/U0i0clS8=; b=17A3/87CrhTpfUYAO3uiRAH9zFNGhWzdJ3PU9s8ir7kb2zlA0AvW60WY9alzMk6EEv cSjeRdYL/Ngj15MA67OpmQ8HNktASJKMMumCUMyyx0afPURWnKQ4tXVgHs848i9+nCD9 VDg9zI63ROzdigYVR5fzw44UrypE4ovbSB/xzaqNiWIzbtxM2M0kU28AVnGhEe5I1OEy MFHTN0qWY3LcsD2r5a+9Fhd4w2+Dybnmyhl6s7qA0n/+yOk5JYUj07cGDUV9YtvO4tXF vGLOUttXmeFrwDNQckYvzc81JEhEC9VipPzZs+l8dSAIx+XyA/E15PsUaktcwyAC0ie1 LoWg== X-Forwarded-Encrypted: i=1; AL+hErFe+SRW5/zvG0nGuw2AyMXUFdNMeSYOnJ28l0qdaY9BxVce3GE8Cb1CRXbMck9MBkBZghjTlbu+ZJtN@vger.kernel.org X-Gm-Message-State: APuU4Z+yVlGz3Ug+RytPW2rWCKR0hVHvEhCqzPV2uGoCC9QFxhA0ERj4 BqfSwcak1mGeg/GzkAWAo+FNlnU2WkZkS8rByIy+T8UrXf8EnRycxjWsOKsf7MG7 X-Gm-Gg: AZFdTZdSX+qfn6WKFElJfYuLr5ktZbpIMj/hDPba4sIygX1B2KgcrsrAPu4DgztlM91 eGJvqfKVJP3IXJsfxCs+Kij+o3zORDht9XPGxfSDCKFMbiCQ5RIvIGdFA2rmKr32ACXMljyJjGg 5Tp87BbtmKQFpVTUGSyQ+DniTOUUt22c/ZxKj7pBKcrDRKXidRZfkYGsEDgyuHVbAoJ5WOhCr8D Hg/GyN1WO4tl/XwCvmKHlmq5pYE4q1UtkjjYSMNHcoNjdTN3rUobGvLYVj50LZiqtmo4adI4MFj MVSyHDnTZJmbmzhzna5c/t6TsXofDlj+opCpNpx84aMuEeV8v2ZopY+11lhMYlh+18/IRTR4Ter 29kLsdFnyg9IQR7nNfszmNXrqlYe3mTBfUYziIHPBPl6X71lPx4LknZ84KLLe7EFye6XVVZDfS+ ve+9yRQKBB9OUHbBaSwpWEcrIvuU0YzyIy/ZGMJNTQH0uDTrAWn0Z/hanK+hDSegKxI9XH8WMwx ERU6tSvwXR/lq8Md4Wpdv0XEXPR0xrmd0jI/wwidXsgcMg3WLsES4VREggnJ3842KgIsJ3A0Qnn Q9fPeNgzCiNnudt3grdHsWBMBjLk11tBWvmdrgbE6kkrmbWv2FdYqgGz/SWbAVfpm7r4uwbd+CU oONm4j+LcI/N1iqFABiH7UZxq X-Received: by 2002:a05:6000:2990:20b0:4aa:2afc:e63b with SMTP id ffacd0b85a97d-4abb400bb25mr44168695f8f.36.1795944491591; Sun, 29 Nov 2026 01:28:11 -0800 (PST) Received: from threads.localdomain ([84.68.176.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab69bf61e8sm60210765f8f.11.2026.11.29.01.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 01:28:11 -0800 (PST) From: Lucas Tanure To: Neil Armstrong , Kevin Hilman , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Mathias Nyman Cc: Jerome Brunet , Martin Blumenstingl , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] Add USB support for the Amlogic T7 Date: Sun, 29 Nov 2026 09:28:01 +0000 Message-ID: <20261129092810.146043-1-tanure@linux.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Amlogic T7 (A311D2) has the G12A USB 2 PHY, the G12A USB3 + PCIe combo PHY, and two Corigine dual-role USB controllers. In the host role each controller is a plain xHCI. This series adds the host role for both controllers, both USB 2 PHYs and the USB 3 lane of the combo PHY, and enables the three USB ports of the Khadas VIM4. Patches by tree: - phy: 1, 2 (USB 2 PHY), 7, 8 (USB3 + PCIe combo PHY) - usb: 3, 4 (controller binding, xhci-plat) - amlogic: 5, 6, 9 (device tree) The series is based on next-20261127. Patches 1 and 2 build on the S4 support in the phy tree ("phy: amlogic: meson-g12a-usb2: add S4 support"); the T7 PHY is close to the S4 one. Patch 6 only has context from the VIM4 thermal changes in the amlogic tree. Notes for review: - Each USB 2 port has a small block of control registers (power-on reset, host mode, PHY ready) at 0xfe03a000 + 0x20 * port. The vendor driver handles them in its PHY driver, and so does this series: they are the second register range of each USB 2 PHY node. The USB 3 registers of the same block (0xfe03a080) are the second range of the combo PHY node. No range is shared between nodes. - The controllers can also be USB devices. Mainline has no driver for the Corigine device controller, so only the host role is supported. The binding already includes usb-drd.yaml and the board sets dr_mode = "host", so device mode can be added later without changing existing device trees. - The controllers report 64-bit addressing but use only the lower 32 bits (patch 4, XHCI_NO_64BIT_SUPPORT, as on R-Car). - A warm reboot left the USB 2 PHY stuck; a reset pulse does not clear it, holding the reset does (patch 2). The combo PHY gets the same treatment (patch 8). - Patch 8 sets bits 18:17 of combo PHY register 0x18 to 2, as the vendor driver does. Neither the vendor code nor the datasheet names this field. Tested on the Khadas VIM4, on next-20261127 after warm reboots, and with the same patches on v7.4-rc4 also after a cold boot: - USB 3.0 socket: SuperSpeed, 101-110 MB/s read from a USB 3 flash drive - USB 2.0 socket (on-board hub): 44 MB/s read with the same drive - USB-C port, host role through a powered hub: flash drive (41 MB/s), network adapter (287/343 Mbit/s with iperf3), card reader - hot plug; no errors in the log next-20261127 does not boot on the T7 as is: since 8954a462e433 ("firmware: arm: scmi: Add centralized detection of truncated replies") every SCMI clock fails, because the T7 firmware answers CLOCK_ATTRIBUTES with 20 bytes instead of 24, and the SD and eMMC hosts then fail to probe. The tests above ran with that check reduced to a warning. This is unrelated to the series; reported here: https://lore.kernel.org/arm-scmi/CAJX_Q+21a1UVE1CCXEGQc4-pdgu_fu32ohxspg5h=Sw7zPdKdQ@mail.gmail.com/ Lucas Tanure (9): dt-bindings: phy: amlogic,g12a-usb2-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb2: add T7 support dt-bindings: usb: add the Amlogic T7 USB controller usb: host: xhci-plat: add Amlogic T7 support arm64: dts: amlogic: t7: add the USB controllers arm64: dts: amlogic: khadas-vim4: enable the USB ports dt-bindings: phy: amlogic,g12a-usb3-pcie-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb3-pcie: add T7 support arm64: dts: amlogic: t7: add the USB3 PHY .../bindings/phy/amlogic,g12a-usb2-phy.yaml | 53 ++++++--- .../phy/amlogic,g12a-usb3-pcie-phy.yaml | 46 +++++++- .../bindings/usb/amlogic,t7-usb.yaml | 78 +++++++++++++ .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 14 +++ arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 63 ++++++++++ drivers/phy/amlogic/phy-meson-g12a-usb2.c | 95 +++++++++++++-- .../phy/amlogic/phy-meson-g12a-usb3-pcie.c | 108 +++++++++++++++++- drivers/usb/host/xhci-plat.c | 7 ++ 8 files changed, 432 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/amlogic,t7-usb.yaml base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d -- 2.56.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6761A60A2636 for ; Sun, 29 Nov 2026 09:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uiGmVuMu DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=306BIemHHzk0trXaZOBtAYOZb8qi33XM0XIrch+FPiA=; b=uiGmVuMuvS3wcDy2yL83kDZgsm 9AQeWUdpTaJt6e028pjYb9dBU56JvGU4cITsCR47wZW+a2jVD+KlAzuuNW9KTDwVFftJSDZZa7IU+ xsV33p0UzpgY8fXOUfDkVpHjxBixin6ovrfowjYIPfrfkwhdbYWNUx6Ri3kvHQZMv5aFiTAP2jg0O W1+4iMcxJh8QcmM6NhRNiGVIasPT1P/3xXiMLSBTACd4HhiUWQdE2Y18w4fcs99CrOm9ov8y/tCaA Tardc1F1arkpcZXXERwgc4X7LkzplPah0EwN6WY1QRIm5SC3lgC0TIa2IXR/pAXDsNUYBGDz125DK rcTGHVAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbCi-00000001jex-32HZ; Sun, 29 Nov 2026 09:28:16 +0000 Received: from mail-wr1-f49.google.com ([209.85.221.49]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbCf-00000001jb1-3O6Q for linux-amlogic@lists.infradead.org; Sun, 29 Nov 2026 09:28:15 +0000 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-492fcbfaa88so6358560f8f.3 for ; Sun, 29 Nov 2026 01:28:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795944492; x=1796549292; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=o7A7X3OTs4jQXGSbB0zMa8yXuETXPlaJVK/U0i0clS8=; b=VZrtuhZWPcQjRLYbGiUZSVN2ObTf+hwlR60CdxgJmoeRVx5Iswlb4KWR4WUkiQWblz xLmkej13aBWiAqfUXKcrUQp51SQplRYnb4Z1QyaL2QVN4zjjy6mDFAzf+sG4yUoBxSkw EeVZNGtlkUzmgRcfEN3osZzu2YWNc6wJytVdlEZKHEEs4uqE7E0KvbeRkhyAkfINyDwj 1SvqBrbVRHYEL+X0zuJhCKS1Eg44jndKFKiiBfC3lyjV4d/1YfowkleDqUSRVGtAx87l K7Oq5wF6Xesq8k+i26XNHCh0ncntYKxCHwbHt6Eeqshyz3WPUStXH8Bv9hyZ5NxVM8w5 sIhg== X-Forwarded-Encrypted: i=1; AL+hErGV3Lg+BlrA5KJXFPTiMD1iIljhWTrRChnKPEFBz9dQwf6EvJEdjicLcMZICJKb7c+68xZ+hOYtdjAaFPi7@lists.infradead.org X-Gm-Message-State: APuU4Z9F/Nmur8BQedgDnZU4QwvTaybn0mVJlJ1vw8cMQfB1GSPXWWQc IwYATPgcuN2xIylnl2Q2iA8YafgiV5bcrIJ1GBSrQSpzjH5FSxi235Tp X-Gm-Gg: AZFdTZeUXODpHBsFETSsh8KgX9VG/2lRYpY5j4YJUyrTN43v2uVDmrTgjVaagMxdJpc LHe9xFUaRIw0vJcj+rI2wbSjQnnAnrQxV0cUYXTlODqwMZp7rfO7+bmlEZ3+Nz/YGBN+9chf77A Qk1TeuuVzY/DI9ACXaohrhIJsZVRP7KbD1E59coRJPT38pDNsltipegc+nEuFmU2EZ3o8CxiULm vBmLDvXhuytu2zVxG5IjiW6BvuNYbw8ptT1tZ2/LT0VJyaB2AwkCyGOstEYgpIYN14+kUFdo9B5 pQASVLJIVJfeU7CtSXTus8UJRpOcELCKE5yf1G+cUV04SuiTVek+kdn8Ml6NrOOB+CTGPyOnHIc XDHCBZcrCX0LC1HnoFanBt8HsSrMphl7PpGnSs7qvGXcvY/bIsrxurkf6JEagL4wvlfRarC+LP9 oKVKL6As8zEAXt/v9zim5CFORx/Le8dCD/8ueQt350/U/VTB9zeZiuZzUuYrhTqK7pKlkibzfOw 5xUFxATGRm0u2mBeTMw2jJ15eUS4sjhTonc6XSF1Qld6EFIzDfBVskEtU4B/S5QtA1HG1IJv5V3 EmfuMsUZFP2Az0GF0gXfVR70Ya2to+OGC3Nk8zJDiOoAvzKXyu+tK+4F+z+fLcLjP/8IZX2l8xG dNcRSab4qFo1JempUj3MEkjJI X-Received: by 2002:a05:6000:2990:20b0:4aa:2afc:e63b with SMTP id ffacd0b85a97d-4abb400bb25mr44168695f8f.36.1795944491591; Sun, 29 Nov 2026 01:28:11 -0800 (PST) Received: from threads.localdomain ([84.68.176.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab69bf61e8sm60210765f8f.11.2026.11.29.01.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 01:28:11 -0800 (PST) From: Lucas Tanure To: Neil Armstrong , Kevin Hilman , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Mathias Nyman Cc: Jerome Brunet , Martin Blumenstingl , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] Add USB support for the Amlogic T7 Date: Sun, 29 Nov 2026 09:28:01 +0000 Message-ID: <20261129092810.146043-1-tanure@linux.com> X-Mailer: git-send-email 2.56.1 X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_012813_868250_C3BA9CC2 X-CRM114-Status: GOOD ( 18.75 ) X-Spam-Score: -0.8 (/) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The Amlogic T7 (A311D2) has the G12A USB 2 PHY, the G12A USB3 + PCIe combo PHY, and two Corigine dual-role USB controllers. In the host role each controller is a plain xHCI. This series adds the host role for both controllers, both USB 2 PHYs and the USB 3 lane of the combo PHY, and enables the three USB ports of the Khadas VIM4. Patches by tree: - phy: 1, 2 (USB 2 PHY), 7, 8 (USB3 + PCIe combo PHY) - usb: 3, 4 (controller binding, xhci-plat) - amlogic: 5, 6, 9 (device tree) The series is based on next-20261127. Patches 1 and 2 build on the S4 support in the phy tree ("phy: amlogic: meson-g12a-usb2: add S4 support"); the T7 PHY is close to the S4 one. Patch 6 only has context from the VIM4 thermal changes in the amlogic tree. Notes for review: - Each USB 2 port has a small block of control registers (power-on reset, host mode, PHY ready) at 0xfe03a000 + 0x20 * port. The vendor driver handles them in its PHY driver, and so does this series: they are the second register range of each USB 2 PHY node. The USB 3 registers of the same block (0xfe03a080) are the second range of the combo PHY node. No range is shared between nodes. - The controllers can also be USB devices. Mainline has no driver for the Corigine device controller, so only the host role is supported. The binding already includes usb-drd.yaml and the board sets dr_mode = "host", so device mode can be added later without changing existing device trees. - The controllers report 64-bit addressing but use only the lower 32 bits (patch 4, XHCI_NO_64BIT_SUPPORT, as on R-Car). - A warm reboot left the USB 2 PHY stuck; a reset pulse does not clear it, holding the reset does (patch 2). The combo PHY gets the same treatment (patch 8). - Patch 8 sets bits 18:17 of combo PHY register 0x18 to 2, as the vendor driver does. Neither the vendor code nor the datasheet names this field. Tested on the Khadas VIM4, on next-20261127 after warm reboots, and with the same patches on v7.4-rc4 also after a cold boot: - USB 3.0 socket: SuperSpeed, 101-110 MB/s read from a USB 3 flash drive - USB 2.0 socket (on-board hub): 44 MB/s read with the same drive - USB-C port, host role through a powered hub: flash drive (41 MB/s), network adapter (287/343 Mbit/s with iperf3), card reader - hot plug; no errors in the log next-20261127 does not boot on the T7 as is: since 8954a462e433 ("firmware: arm: scmi: Add centralized detection of truncated replies") every SCMI clock fails, because the T7 firmware answers CLOCK_ATTRIBUTES with 20 bytes instead of 24, and the SD and eMMC hosts then fail to probe. The tests above ran with that check reduced to a warning. This is unrelated to the series; reported here: https://lore.kernel.org/arm-scmi/CAJX_Q+21a1UVE1CCXEGQc4-pdgu_fu32ohxspg5h=Sw7zPdKdQ@mail.gmail.com/ Lucas Tanure (9): dt-bindings: phy: amlogic,g12a-usb2-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb2: add T7 support dt-bindings: usb: add the Amlogic T7 USB controller usb: host: xhci-plat: add Amlogic T7 support arm64: dts: amlogic: t7: add the USB controllers arm64: dts: amlogic: khadas-vim4: enable the USB ports dt-bindings: phy: amlogic,g12a-usb3-pcie-phy: add the T7 compatible phy: amlogic: phy-meson-g12a-usb3-pcie: add T7 support arm64: dts: amlogic: t7: add the USB3 PHY .../bindings/phy/amlogic,g12a-usb2-phy.yaml | 53 ++++++--- .../phy/amlogic,g12a-usb3-pcie-phy.yaml | 46 +++++++- .../bindings/usb/amlogic,t7-usb.yaml | 78 +++++++++++++ .../amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 14 +++ arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 63 ++++++++++ drivers/phy/amlogic/phy-meson-g12a-usb2.c | 95 +++++++++++++-- .../phy/amlogic/phy-meson-g12a-usb3-pcie.c | 108 +++++++++++++++++- drivers/usb/host/xhci-plat.c | 7 ++ 8 files changed, 432 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/amlogic,t7-usb.yaml base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d -- 2.56.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic