Message ID | 20230418111612.19479-1-ddrokosov@sberdevices.ru |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2772337vqo; Tue, 18 Apr 2023 04:33:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZkG6zW0cnC4uFfl9JxNOhpOSh/6PBmwn52H6n3CGSS9rck68sxgLRHh+Lx/i9RipUHsdt/ X-Received: by 2002:a17:902:ec88:b0:1a6:ef75:3c53 with SMTP id x8-20020a170902ec8800b001a6ef753c53mr2135800plg.11.1681817611784; Tue, 18 Apr 2023 04:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681817611; cv=none; d=google.com; s=arc-20160816; b=IbHmerxTbtXsQsBdGLR4g22DWBlj7bcNfIELEG2UtR2/LWs8fYPMjh9SE/Wy2Pv5EA LDR1xZu/H9C2/WE7qsjXtSXpJmNej6coXr3l6K07b3DyYql/N7NatVHdACzFTbAvhr7g N3BeW1xxaBj78su8zi/7l/6dq3c6yvGViuJ5iT9frvCM/pXVHBadddlqV9aHNep9FjQP x79okk9IUhF3StTTDrJk25VHyet9WLhJfmDyi3NuEi5Prbglbw8z+ggFQWW/HkGP85Kp 2Q4uhPbplVfZJeQKPqwD6HArv8z0GzyklYqvBD/A/53CTsjEj3VUqZKaxYsE6fefr/I1 p15g== 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=rV+/2Zo+MYA4X9kDnUDGtNKqBpG9r9Rn4Sf3ySX9kzE=; b=Z8wCxGTTqOsTkFU3pcXyr7nYROwtlp/z/C7g3diH3BWb+WdEvmJfde7g8XPW6O/GqI NlgZd0YL/eSWnDDKWOHv2m/Tp8+ablhoa5V6XHkMNgUXYsbtVyQAfnezHYR0Oqo5cIvJ Xbbwn5hNNMdD5mwGEg0Y6tUEV0xxXHCuyPEPdsvDo9DwS8z1fKPexTvy31Vk/tQWBDai 3pfgtY72I2amh9u8tnsnscWPn1Gc+b1VoYE+SvwDvzcqUFk3xWJ4JyH6UxORHwbC1OXn S7/2CHwtAS8nDUkXgpA6q87ZOWAunhmnPBPFjO6IHQu3wJw4ASg8ZrxHFXXb7gNz6kXo 0wuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=F0653ogb; 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 bb2-20020a170902bc8200b001a63c61f06fsi13243134plb.48.2023.04.18.04.33.17; Tue, 18 Apr 2023 04:33:31 -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=F0653ogb; 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 S231455AbjDRLS2 (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Tue, 18 Apr 2023 07:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231310AbjDRLSX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Apr 2023 07:18:23 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A07969020; Tue, 18 Apr 2023 04:17:36 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id C9C5E5FD76; Tue, 18 Apr 2023 14:16:20 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681816580; bh=rV+/2Zo+MYA4X9kDnUDGtNKqBpG9r9Rn4Sf3ySX9kzE=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=F0653ogbGcbwdRloENjlGCckoaKBL+kNs03aZ1bCYLxyxxRYxSx6sLtZ3MJnjlAyo OXg9yMVSSyzK5NbKaTiYACuCBX2U04u7iukNEHSvKw+LhT635rkAvyg6tBEhXHKmmA PHaCnPB/NnvBpafk2Yo5Xj2lclnbLp+/RKtJIc6kCmQtOjISGp9A0MTngxEyCx0RY/ qmXSdNJTWhoGP046V1q6ahddQ8ux1e2XOjxBdSCc3K6JdPhrf++FGXz0+1IZj8mpTl 4m9dJPgYLNLpDrt2oQjcjEXm//X8hds6NCi0bZF11OwMeVqS8+wpIeDfCgLkk+PN4p 8UniCupfsTXHg== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 18 Apr 2023 14:16:19 +0300 (MSK) From: Dmitry Rokosov <ddrokosov@sberdevices.ru> To: <gregkh@linuxfoundation.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <neil.armstrong@linaro.org>, <khilman@baylibre.com>, <jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>, <mturquette@baylibre.com>, <vkoul@kernel.org>, <kishon@kernel.org>, <hminas@synopsys.com>, <Thinh.Nguyen@synopsys.com> CC: <yue.wang@amlogic.com>, <hanjie.lin@amlogic.com>, <kernel@sberdevices.ru>, <rockosov@gmail.com>, <linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-phy@lists.infradead.org>, Dmitry Rokosov <ddrokosov@sberdevices.ru> Subject: [PATCH v2 0/5] arm64: meson: support Amlogic A1 USB OTG controller Date: Tue, 18 Apr 2023 14:16:07 +0300 Message-ID: <20230418111612.19479-1-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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/18 05:44:00 #21123121 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,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763513583875444339?= X-GMAIL-MSGID: =?utf-8?q?1763513583875444339?= |
Series |
arm64: meson: support Amlogic A1 USB OTG controller
|
|
Message
Dmitry Rokosov
April 18, 2023, 11:16 a.m. UTC
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) Changes v2 since v1 at [3]: - as Martin suggested in v1, this commit completely removes the 'otg_switch_supported' parameter from dwc3_meson_g12a_drvdata; this parameter is no longer necessary as all IP versions now support OTG switching - this commit moves the USB PHY clkin enable/disable calls to the PHY init/exit routines 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/ [3] https://lore.kernel.org/all/20230414152423.19842-1-ddrokosov@sberdevices.ru/ Dmitry Rokosov (5): phy: amlogic: enable/disable clkin during Amlogic USB PHY init/exit 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 for all IP versions 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 | 13 +++- drivers/usb/dwc2/params.c | 21 +++++++ drivers/usb/dwc3/dwc3-meson-g12a.c | 16 +---- 5 files changed, 95 insertions(+), 15 deletions(-)