From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 987DEC83F17 for ; Mon, 28 Jul 2025 17:24:30 +0000 (UTC) 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:Cc:To:MIME-Version:Message-Id:Date: Subject: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-Owner; bh=BdMaFcIV0ZSb0dpqOvB9qX98J2ffAVnBT8fzzLbEe3Y=; b=O2bRyPgLUat0WT uglbFz8n8Eor+PgV0yFGBlvDyt96NH4GOvrT+rFh21Dkj5kWcLG2wg8SyqeVzst7Gvs6t7AAW2JmQ tOaoq/3ZF+TYAj+smA1EYWd2khmgnVFhqdpYeoW3IadwiIuER2D4PUG6NS6JbV81TdWd4edrNFSJn t4giHRiJvwRRa7qENnSM1tVXUBjoMT3dseMhDrnG3tOF7EExl4PuvfT4h6JKngFSwhIAEzyuS9MZR xvHy3Nih+M1TPubXbrhAhiQ3rn29/LTZeJu5cs0fWuyrJTJ4jhCyeQxr/hnPMnftC09d1WlAURLs2 vf9qU/Tq5IMeDT6A9jiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugRaK-0000000F5u4-3zVe; Mon, 28 Jul 2025 17:24:24 +0000 Received: from out-182.mta0.migadu.com ([2001:41d0:1004:224b::b6]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugQnw-0000000EzTG-3YFK for linux-riscv@lists.infradead.org; Mon, 28 Jul 2025 16:34:26 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1753720450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9DZ40mw5f4r8qDEbAiC1FxPXibecmQivptnjSUPtpzU=; b=Cm49YhQNTV7t24fD6GzOYYX+7LnjWluptGbxRCgZm+zs9k4oY/VKp5YMynnm+DzsoJtDqv +lXll7c8zzPw2z5MJ5dbXbcmibZcdrAsMh0tjAnSvQCsoxkjDydWzK4t6haVs/82FIAqIf 9aUxqx3nyadNxaeFv8HATVFJRMJgNwQ= From: Ze Huang Subject: [PATCH v7 0/2] Add SpacemiT K1 USB3.0 host controller support Date: Tue, 29 Jul 2025 00:33:54 +0800 Message-Id: <20250729-dwc3_generic-v7-0-5c791bba826f@linux.dev> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHKmh2gC/22OQQ6CMBBFr0K6tqS0aQuuvIcxBqYjNBHQFiqGc HcrbIhx+X/+ezMz8egsenJMZuIwWG/7LgZ9SAg0ZVcjtSZmwhmXTDNJzQvEtcYuYkBzw3guC80 5CBKRh8ObnVbd+bJlh88xWoetJFXpkULftnY4JkGlmaIOMvIdN9YPvXuvrwS5rv9fDZIyWpgKp MBSCsNPd9uNU2owrKKgdnDGf2AVYYBca6EBCqH28LIsH5IGkwwSAQAA X-Change-ID: 20250705-dwc3_generic-8d02859722c3 To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Thinh Nguyen , Philipp Zabel Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, Ze Huang , Krzysztof Kozlowski X-Developer-Signature: v=1; a=ed25519-sha256; t=1753720444; l=3766; i=huang.ze@linux.dev; s=20250705; h=from:subject:message-id; bh=U5M21v1xG5FatHMRggmCXqdyme5ZWIYSo7u2Mcsyysg=; b=yNi8pS+gywCkt85wg+CIQaRCAGH3hRRiVoWx6CF5ivOiZJB9F+ZG/8R3OSi9iKwCNw/8ymgeg F26UoMwZAhgD4CV5BzOS8kj38Oe/vHaWUKj+vaxesTv33wUx8KqsNZI X-Developer-Key: i=huang.ze@linux.dev; a=ed25519; pk=Kzc4PMu5PTo8eZZQ5xmTNL9jeXcQ9Wml0cs+vlQpBkg= X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250728_093425_181907_DFC3293D X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The USB 3.0 controller found in the SpacemiT K1 SoC[1] supports both USB3.0 Host and USB2.0 Dual-Role Device (DRD). This controller is compatible with DesignWare Core USB 3 (DWC3) driver. However, constraints in the `snps,dwc3` bindings limit the ability to describe hardware-specific features in a clean and maintainable way. While `dwc3-of-simple` still serves as a glue layer for many platforms, it requires a split device tree node structure, which is less desirable in newer platforms. To promote a transition toward a flattened `dwc` node structure, this series introduces `dwc3-generic-plat`, building upon prior efforts that exposed the DWC3 core driver [2]. The device tree support for SpacemiT K1 will be submitted separately when the associated PHY driver is ready. This series is based on 6.16-rc1 and has been tested on BananaPi development boards. Link: https://developer.spacemit.com/documentation?token=AjHDwrW78igAAEkiHracBI9HnTb [1] Link: https://lore.kernel.org/all/20250414-dwc3-refactor-v7-3-f015b358722d@oss.qualcomm.com [2] Signed-off-by: Ze Huang --- Changes in v7: - dt-bindings: - add reset-names and reset-delay properties - add pcie0 entry in resets for combphy init - dwc3 generic plat driver: - drop clock cleanup and handle with devm_clk_bulk_get_all_enabled() - move devm reset action after successful de-assert - Link to v6: https://lore.kernel.org/r/20250712-dwc3_generic-v6-0-cc87737cc936@linux.dev Changes in v6: - replace SET_RUNTIME_PM_OPS/SET_SYSTEM_SLEEP_PM_OPS with RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS - Link to v5: https://lore.kernel.org/r/20250705-dwc3_generic-v5-0-9dbc53ea53d2@linux.dev Changes in v5: - drop DTS patch (will submit when PHY driver is ready) - drop interconnects and update resets property in dt-bindings - remove unnecessary __maybe_unused attribute and PM guards - switch to devres APIs for reset and clock management - Link to v4: https://lore.kernel.org/all/20250526-b4-k1-dwc3-v3-v4-0-63e4e525e5cb@whut.edu.cn/ Changes in v4: - dt-bindings spacemit,k1-dwc: - reorder properties - add properties of phys & phy-names - add usb hub nodes in example dt - add support for spacemit,k1-mbus - dwc3 generic plat driver: - rename dwc3-common.c to dwc3-generic-plat.c - use SYSTEM_SLEEP_PM_OPS macros and drop PM guards - dts: - reorder dts properties of usb dwc3 node - move "dr_mode" of dwc3 from dtsi to dts - Link to v3: https://lore.kernel.org/r/20250518-b4-k1-dwc3-v3-v3-0-7609c8baa2a6@whut.edu.cn Changes in v3: - introduce dwc3-common for generic dwc3 hardware - fix warnings in usb host dt-bindings - fix errors in dts - Link to v2: https://lore.kernel.org/r/20250428-b4-k1-dwc3-v2-v1-0-7cb061abd619@whut.edu.cn Changes in v2: - dt-bindings: - add missing 'maxItems' - remove 'status' property in exmaple - fold dwc3 node into parent - drop dwc3 glue driver and use snps,dwc3 driver directly - rename dts nodes and reorder properties to fit coding style - Link to v1: https://lore.kernel.org/all/20250407-b4-k1-usb3-v3-2-v1-0-bf0bcc41c9ba@whut.edu.cn --- Ze Huang (2): dt-bindings: usb: dwc3: add support for SpacemiT K1 usb: dwc3: add generic driver to support flattened .../devicetree/bindings/usb/spacemit,k1-dwc3.yaml | 124 +++++++++++++++ drivers/usb/dwc3/Kconfig | 11 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-generic-plat.c | 167 +++++++++++++++++++++ 4 files changed, 303 insertions(+) --- base-commit: d9946fe286439c2aeaa7953b8c316efe5b83d515 change-id: 20250705-dwc3_generic-8d02859722c3 Best regards, -- Ze Huang _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv