From patchwork Fri Apr 14 15:24:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 8206 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp477359vqo; Fri, 14 Apr 2023 08:45:52 -0700 (PDT) X-Google-Smtp-Source: AKy350bampDHlkZKsAk2X7/IgnUcVzjwb4YqezzL1+z2eTcteDUXXyp3Qs/lACyjylvpjFN25J5A X-Received: by 2002:a17:903:124b:b0:1a5:1a3a:692d with SMTP id u11-20020a170903124b00b001a51a3a692dmr3915239plh.22.1681487152144; Fri, 14 Apr 2023 08:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681487152; cv=none; d=google.com; s=arc-20160816; b=sX9YJMHMfXtYpsndADFbPqMmKecceXFqlLI7r99DWCCLlIyO+oPpdNN+kVveXb6pLf iUN7YLMbj+MBv8T/fr1tBamwCGj7qB/hx+NSWTU9WwJlzo5km0/BP3bILuZ4IT7IeKXI 6grgawL89ZA32wqBCclpmf1xX2hTcGwWE8MyOuscsiUwrWQXeP+JHezeeSGfiOKahZvM jEKad1rmYIstM1jstA0a6Z93VTo6xCFgEJzB509tU9XvbnNsy4xNdIdyf4buGt7L379g wT7wQ/JadL/9Z1grAuLtayqab6VuOUIAUsCd9p5paH5Ag2cfUggI6QU4KDe2gsQRq2ET SG/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=27rKXTxLIgcS+trNatx2a2CTSjoT7Q+aM89mbryOnzI=; b=EXb1KTrwYTAhXfoKAWWj3KAi4CyTn3pkPquDja4g/iM8B0uENTwMe//79+BEXLL43Z xOndmjgNRRrpmiyaKVk4KgednwncuY/eipstujV7KJx9RfxJoJrLXm7a0q1Zs3G+3Hxv 46lPyvd9IdYV4V8bPJILfgHS0RnwtkeaSMuc4fvHTHl+kJk5XgVghIKJknT8ZM6eUI7r /IO/SAGWnR+Xz8pvzF91PGTOCDOUXZKdwc55MQqcSseN6wDE6MjJsG5+/Y0EhkGf3LWD 0NZZ/bHQBjtWuL7sjCDvGbnPFSxspNxXLCweMk1bA/u9bJROU2GZZoeIUempSA0Z5SqI ZfUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Uz8wBngD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a170902e89000b001a51bb4ad79si5355645plg.42.2023.04.14.08.45.36; Fri, 14 Apr 2023 08:45:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Uz8wBngD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231199AbjDNPYn (ORCPT + 99 others); Fri, 14 Apr 2023 11:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjDNPYh (ORCPT ); Fri, 14 Apr 2023 11:24:37 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DBC7AD36; Fri, 14 Apr 2023 08:24:35 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id E52E95FD0A; Fri, 14 Apr 2023 18:24:32 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485872; bh=27rKXTxLIgcS+trNatx2a2CTSjoT7Q+aM89mbryOnzI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Uz8wBngDVIw48wLM/QWlmCJUlOirzMBsQEOG0xrZzrwXJanZJVT/GiLt80WLq3Q/2 EyqqOMbA3EFLL/k68vaZ9evR2Ck+1wGmj1NBcB0vzgULQt83DBTlLNDMhppj16lRiS AgUSq4kYkuG+j9Mye2yaPZSQZuHJmcxqefSQ29d8bKGAANPo4TYT9pnOJNlkGUKfVI NR6uRr1ozPk+9UQQu2Z73RuN0HOpVZJ2HdaEK+Jnx9Mz8p4nSlnjT8eB98IST+K0HE n7qZ5kW2ExUxiV/saf4CctTFseoY2Remenf3CY5tFQqmoH2/upQbsr35n/AP8kx2gC JoNVuwI3dz2QA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Fri, 14 Apr 2023 18:24:30 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 0/5] arm64: meson: support Amlogic A1 USB OTG controller Date: Fri, 14 Apr 2023 18:24:18 +0300 Message-ID: <20230414152423.19842-1-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/14 08:08:00 #21104846 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763167071505986674?= X-GMAIL-MSGID: =?utf-8?q?1763167071505986674?= This patch series introduces full support for the Amlogic A1 USB controller in OTG mode (peripheral and host modes switching). Previously, Amlogic's patch series [1] was applied to the upstream tree, but it only had USB host mode support. Furthermore, the device tree patchset [2] wasn't merged due to a missing clk driver. Patchset [2] has been completely reworked: - changed register base offsets to proper values - introduced dwc2 in peripheral mode - OTG mode support - the SoB of Amlogic authors still remain Testing: - USB OTG role switching between gadget and host - OK - Peripheral mode - OK (tested with adb shell/push/pop) - Host mode - OK (tested only USB enumeration and detection) Links: [1] https://lore.kernel.org/all/1581990859-135234-1-git-send-email-hanjie.lin@amlogic.com/ [2] https://lore.kernel.org/all/1581990859-135234-4-git-send-email-hanjie.lin@amlogic.com/ Dmitry Rokosov (5): phy: amlogic: during USB PHY clkin obtaining, enable it usb: dwc2: support dwc2 IP for Amlogic A1 SoC family dt-bindings: usb: dwc2: add support for Amlogic A1 SoC USB peripheral usb: dwc3-meson-g12a: support OTG switch arm64: dts: meson: a1: support USB controller in OTG mode .../devicetree/bindings/usb/dwc2.yaml | 1 + arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 59 +++++++++++++++++++ drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +- drivers/usb/dwc2/params.c | 21 +++++++ drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 5 files changed, 83 insertions(+), 2 deletions(-)