From patchwork Fri Apr 14 15:24:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 83486 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp466832vqo; Fri, 14 Apr 2023 08:29:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Zv80CRFm579RnxoVaqKsfy/TbYo7CFQQOMcEy4KV/zNClC/09Mph1Anhpbrm8SOEwSQYtx X-Received: by 2002:a05:6a20:4982:b0:e8:fe82:5843 with SMTP id fs2-20020a056a20498200b000e8fe825843mr5897057pzb.45.1681486150591; Fri, 14 Apr 2023 08:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681486150; cv=none; d=google.com; s=arc-20160816; b=RTNkdFr/JrGLVSebyClSaPV/7S2QBJsSKxpfKGXwTRa2l7byttWtHCmWu0pMbPButh Rc6r52tGauEd47KeYF8qkpibPLJ8w0bZ7j3LWOiO4ESesSA4JnTPx5KpZvve1ye4c/wD aJutXBlywQ+xaRbx9O1xoKEPvsV06rA3/TR6IQwKHZZDu+g45E77CrFIYLXWC2A2zRJY LwMsprTxn0UQeGELSFqqT84JBYDjtQXyP4lP2VVzO6c1bGEY1qVbgJopsCmEbFZlBlVr XbnFav2wte9QAi22hNCO9jUNeiTQ8q3b52tmvx48A7G6lcwmwQCxc+lZyVUqzf0knSEp F9IQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tOUyWscI9lZ1BfORK8wKAfGeDsR5jeAkMWXUSzV4nOo=; b=Xz5G3kTjFCvwUUCe/flZAg4KSbiyomvrZfkqDOjp8eq9TD1NT1oMygnA0N1HUzwhNb J3HgZdQp1akOm/AHakcdvjtxNTNSmwAh5l2lHvkzMHXfixOoAZ1DJQ6Oa4fNZCMjC6i7 0YE706UT7IoBGUI6hdy/XAdB5VlZbGC1LEehoLMRt30r8fJUQ8Q57EC7f9elXUemPyiO biSYVbM4GN4AD++sLB1PchHITGWwabEHIeBsakJFwS0kI2ubb5PHa4OvOykNIc65Knry /XtwQNwEY+n0uVzGR7M18EYwsiYJRG34JI720OdzYd4lzeXiG+RlrD+B0u1PsMxddwcN OVyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=CFdpljeg; 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 2-20020a630d42000000b004fb7e7ef77dsi4889346pgn.693.2023.04.14.08.28.57; Fri, 14 Apr 2023 08:29:10 -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=CFdpljeg; 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 S230368AbjDNPYi (ORCPT + 99 others); Fri, 14 Apr 2023 11:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjDNPYh (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 43D90AD29; 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 1D0375FD24; Fri, 14 Apr 2023 18:24:33 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485873; bh=tOUyWscI9lZ1BfORK8wKAfGeDsR5jeAkMWXUSzV4nOo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=CFdpljegFDGexcztw33NhE658VcGlcFo5wn3igYeJFqCtORsOzU1iJZtNx5OimR/Y yrWTJo1YWhhrl+k6uGaY0UtI+OpMNNpWiDZoxhjzFUJ/Q5PK+Ra57awx4f5TUZNIzv 1ouylhk4YsGKFNyAtBKR2dLW1xkSnUEP9FnyRkFofutwcV4uyDLEZIAAY1l3cWXehw hd6oIkmEoGKt4L2uEmlsUdSK5/mVTzLdzekjD/fDlr7Dit+h1uDMHIYZEoZfb6LqtS ZLcSfn2SSLUPzZ5jCA/DCJi9HoDnbTYfRaukxs5vN3AGDjRiYc7J0mF1jkLj8R2oFx p2KNLorzVL5zQ== 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:33 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 1/5] phy: amlogic: during USB PHY clkin obtaining, enable it Date: Fri, 14 Apr 2023 18:24:19 +0300 Message-ID: <20230414152423.19842-2-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230414152423.19842-1-ddrokosov@sberdevices.ru> References: <20230414152423.19842-1-ddrokosov@sberdevices.ru> 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?1763166021589383406?= X-GMAIL-MSGID: =?utf-8?q?1763166021589383406?= Previously, all Amlogic boards used the XTAL clock as the USB PHY input clock, and it did not need to be enabled as it was the default board clock. However, in new Amlogic SoCs such as the A1 family, USB PHY uses a gated clock, so it is necessary to enable this gated clock during probing. Signed-off-by: Dmitry Rokosov --- drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c index 9d1efa0d9394..26b99fbe1026 100644 --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c @@ -315,7 +315,7 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev) if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); - priv->clk = devm_clk_get(dev, "xtal"); + priv->clk = devm_clk_get_enabled(dev, "xtal"); if (IS_ERR(priv->clk)) return PTR_ERR(priv->clk); From patchwork Fri Apr 14 15:24:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 83488 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp467115vqo; Fri, 14 Apr 2023 08:29:38 -0700 (PDT) X-Google-Smtp-Source: AKy350YN/dkFuJnxtohJEiN6rUYjYPaZPJdJ3YYFmjnaf6utuXbz4KTJOru7sPHfGwHjAsU07scO X-Received: by 2002:a05:6a20:b38a:b0:e3:7651:44d with SMTP id eg10-20020a056a20b38a00b000e37651044dmr5511964pzb.20.1681486178060; Fri, 14 Apr 2023 08:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681486178; cv=none; d=google.com; s=arc-20160816; b=jDr4OQPmvSYzBzSFuNooky+THeKArtpOlR/Bs/mBuio7z+PtSQ2P0Q/JrIl8r9VKkC EUgozweTZTwQffeLsadS1kLxceFvKXtES8CqXy594NHx+d6MHqh+G5Rbj8MCVSycfSSb Ko1G5ZobRK09G4L0OIhU7s54lUCsZ9+OM7zo7UlK6WZSLwpxClAmU2RMjDNO1Fe6Pdsx fLJ+f0RtU7ykcCCST9e5GiGF9swApkHPpmU4+58gazvYUDuJ9wEV30xS9o0t0FxvPZ77 eMpY/9n5dnVLRqRuVdVnX6ryuhGxJyq+K0en/Oe09ry3ZrtM2Ydt7S9CvJ4I97loJYfN 8Z6Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=09WqdKYRyw2DjfHpWjzV6C/vopcEZSQEhMfI25aDH40=; b=fN/XzYRY3JUSFCOFz5QpMGyj25juUYSpRG42Cmv01Z2nIeNzHSzZEatqvVupb1KG8Q TbZKRFkDlELvTXJ2r/BNGCB0lMIATfrNrn1DIbzgSBwY065anPMUmtyE6F8duP/uriNW 6U36dVZNE8eBWvsAw7lV06flhJb7X/46MWqa8bBs/pZNAUeZvP7gEFaPboCpSSvNlXbV lIXjB8CbSa1DbJqAJ/2CBI6Bec9B6cKDjzlusVBbd9o1cizHLeUmWutgoe9g17yoKi3K TQrB13AFbmOrVuIBp6BfI5tciwCAEZI7+/KojrtDKWwhvTTNQJykGGf/T3zxajMYKXuX 2e4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=SHKv3Sz6; 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 124-20020a620682000000b0063b1421d10fsi4517831pfg.222.2023.04.14.08.29.19; Fri, 14 Apr 2023 08:29:38 -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=SHKv3Sz6; 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 S231251AbjDNPYr (ORCPT + 99 others); Fri, 14 Apr 2023 11:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjDNPYh (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 3F2E88A5A; 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 4C8645FD25; Fri, 14 Apr 2023 18:24:33 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485873; bh=09WqdKYRyw2DjfHpWjzV6C/vopcEZSQEhMfI25aDH40=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SHKv3Sz6dKqRl3xEMp3YCFcI87PO0RRN6UG+Ap/geWAsxptpePbI9uV9og2cLbym+ 31Ya1Biqp7lNlZi2VZha/RlhuZfIewNctx6BDQTUFFRKr6TWRrCB2iDh9Tzs8tUnG5 pj5/YVqlXFgmVoCjVGfv/vRA6Xd2YDGT5iq41z5bB3oZ690XEtg4Hq5Go0zho0Hwgc rh5PfU7wTjZqpK13jAktPzoI2aFqQS1Ug0g+ewLCOUe+Eif6K4fAIkJi3jKjI0wzaH 1DOmj68rBYrvtnnfLy+ZklpiD58kNAgvtnsnkQzUw5Lv5zFlAisl4l4aHJijJOpgNy xQqXeJ1niLmRg== 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:33 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 2/5] usb: dwc2: support dwc2 IP for Amlogic A1 SoC family Date: Fri, 14 Apr 2023 18:24:20 +0300 Message-ID: <20230414152423.19842-3-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230414152423.19842-1-ddrokosov@sberdevices.ru> References: <20230414152423.19842-1-ddrokosov@sberdevices.ru> 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?1763166050667278580?= X-GMAIL-MSGID: =?utf-8?q?1763166050667278580?= The Amlogic A1 uses dwc2 Synopsys IP as its USB peripheral (gadget) endpoint, with different DWC2 parameters when compared to previous Amlogic SoCs. Signed-off-by: Dmitry Rokosov --- drivers/usb/dwc2/params.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 9ed9fd956940..098fbfc774ab 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -161,6 +161,25 @@ static void dwc2_set_amlogic_g12a_params(struct dwc2_hsotg *hsotg) p->hird_threshold_en = false; } +static void dwc2_set_amlogic_a1_params(struct dwc2_hsotg *hsotg) +{ + struct dwc2_core_params *p = &hsotg->params; + + p->otg_caps.hnp_support = false; + p->otg_caps.srp_support = false; + p->speed = DWC2_SPEED_PARAM_HIGH; + p->host_rx_fifo_size = 192; + p->host_nperio_tx_fifo_size = 128; + p->host_perio_tx_fifo_size = 128; + p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI; + p->phy_utmi_width = 8; + p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 << GAHBCFG_HBSTLEN_SHIFT; + p->lpm = false; + p->lpm_clock_gating = false; + p->besl = false; + p->hird_threshold_en = false; +} + static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; @@ -258,6 +277,8 @@ const struct of_device_id dwc2_of_match_table[] = { .data = dwc2_set_amlogic_params }, { .compatible = "amlogic,meson-g12a-usb", .data = dwc2_set_amlogic_g12a_params }, + { .compatible = "amlogic,meson-a1-usb", + .data = dwc2_set_amlogic_a1_params }, { .compatible = "amcc,dwc-otg", .data = dwc2_set_amcc_params }, { .compatible = "apm,apm82181-dwc-otg", .data = dwc2_set_amcc_params }, { .compatible = "st,stm32f4x9-fsotg", From patchwork Fri Apr 14 15:24:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 83496 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp477392vqo; Fri, 14 Apr 2023 08:45:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bdn1xyXt8JxuINbE5WPnAT8SaV6GZ0X6GJzl7/ZqShgphJgrmtZtXf5M7C6lOvU5uYNI6C X-Received: by 2002:a17:902:f152:b0:1a6:3b9a:afda with SMTP id d18-20020a170902f15200b001a63b9aafdamr2576655plb.24.1681487156427; Fri, 14 Apr 2023 08:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681487156; cv=none; d=google.com; s=arc-20160816; b=1AjNM/GvDjf0FNP1UyxXTNgHRZfsVS6COzncvIzwqf8r8+uiDysofN9Zu/dQsxoKz5 XaPiOxQApbs/qYdJohQArc9UU49xqHHjyAujcKKSUX3LcB+k+e0eabHo0wXlnMx6fEcY K9lxPVTX5Jj5JLp2vhuxlpVAnIvpgY2CkUStgJ0dgive9XBorsKuQmwzEZoPeSpcT3Tj IuxxauPJZN3XT4xtv8Nf+GUS4P3QJm4oRSduVaqyUvxjOosDCBNxJyf/ck8AcoxajS6e BBgZbkyfiTEDEHkeqWGrzsrPqlX5SjsUKkUSdEmGafuQhcH0Gew5mODPMTriDIAhIFUo IECw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C6RAhM5A4BPHpRvqPC3ioWTgfct9Luzmkm/GQUTL3y8=; b=LNYHfj3w07/jRypeoN4p2cqUpTXlpWhDUpNSMAh+sHqUz/+vhpQ1U45tpMMg4wS+Dc Vk2yhuSKiF4KCgbMC2t9eItkS9q9UPLfXi/p/ZuaIhhxDnftYD1OjliAMhZ/R7n7PNSA BGQI7ngF7+tVRaGWVevCU714CgUnng9t8MsQt/OYKrbvGuayiLFkhfEmq6Ulsf19rhkd FkuX94PGFotNaEpv1yIy2rSLx+NnoCRc36VLJ9FRi6jjnZwe4+NhZmmE6sDPKbC03k8r x4VCMCymlq9Q0O+pKc5MCfgM/W6sLsQRs0tZAdhKxD3c0zkle1PV3AogtE8zaijkilNc iBgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=CkyiC5Um; 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 t4-20020a1709028c8400b001a63e4508dcsi4754211plo.411.2023.04.14.08.45.40; Fri, 14 Apr 2023 08:45:56 -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=CkyiC5Um; 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 S230496AbjDNPYk (ORCPT + 99 others); Fri, 14 Apr 2023 11:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbjDNPYh (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 C4B15AD37; 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 211AC5FD26; Fri, 14 Apr 2023 18:24:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485874; bh=C6RAhM5A4BPHpRvqPC3ioWTgfct9Luzmkm/GQUTL3y8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=CkyiC5UmgoUazTCGzdnnbsZ1pUZ0e/fl8OQhoq4l4f4JFm6e1MN3YKe81/0NaZycv 2yUexAzAxh4o0hqFRzrMT2NFjbqywU3XnzTfdqI5tqKfPVfwKp9dFuCJ8/jsRUE+eM qnBVd+4Ddbkwp8StXJqDlSvl1LZHA7bpgU3cAmZ9Q3EJrbOwKknyKA7gHxSkiHHh/N eNmROGlk0ILOQNtPQjvGBTq4OvL0C7+R7Rf8DVBBMR/QX1BuKdCIE+CaX06aZZEww6 xoIy35K14SXnltaFUikrxeX/WTpDaCGhfmTiMfo89BtMWR8+FFqkkdfgoIYYg2t62M tDm104Yj+iB4w== 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:34 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 3/5] dt-bindings: usb: dwc2: add support for Amlogic A1 SoC USB peripheral Date: Fri, 14 Apr 2023 18:24:21 +0300 Message-ID: <20230414152423.19842-4-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230414152423.19842-1-ddrokosov@sberdevices.ru> References: <20230414152423.19842-1-ddrokosov@sberdevices.ru> 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?1763167076813137078?= X-GMAIL-MSGID: =?utf-8?q?1763167076813137078?= Provide the appropriate compatible string for the DWC2 IP that is found inside the Amlogic A1 SoC and used in peripheral mode. Signed-off-by: Dmitry Rokosov --- Documentation/devicetree/bindings/usb/dwc2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml index 371ba93f3ce5..f70be397dac0 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.yaml +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml @@ -53,6 +53,7 @@ properties: - amlogic,meson8b-usb - amlogic,meson-gxbb-usb - amlogic,meson-g12a-usb + - amlogic,meson-a1-usb - intel,socfpga-agilex-hsotg - const: snps,dwc2 - const: amcc,dwc-otg From patchwork Fri Apr 14 15:24:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 83495 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp476553vqo; Fri, 14 Apr 2023 08:44:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCEyWCFnKKImS6Fh3n81cKPl6aaPFAMzAhDSEwKwT8qcYjknrp4BgMTKq7h0QYrznkvvuK X-Received: by 2002:a17:903:234e:b0:1a6:413c:4a3e with SMTP id c14-20020a170903234e00b001a6413c4a3emr3974397plh.5.1681487068568; Fri, 14 Apr 2023 08:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681487068; cv=none; d=google.com; s=arc-20160816; b=NI//CGx4t+HvHM20OGirNSlXv3GPp3AGAMsByZfOzQ4lUeaF3RbyKkIRRTbFNAHOYq fgiV2drwhGdTQwypPCzNUshAU2FnjptQcjL5rkPv25YP9jtKwxgmm6IihdkAkTT3HeSH agiVRvNb8zOhT1fpSWc6QiNGMrG5/eP+bmglawuFYIxuF9I0qcmzjc8Ph/SVwZAmto08 pLedaevPTwpgiDC/iGUokhwkMhAipdj/uvPjctzGqX+KGOtC/9dx2j+6Gnc8iv5p26pA hsBBXdfc4oKZZ4nu9sdCUDAzCIEa7Oj1UgW1x+L7p/RC4hI8C8G3cNc+//LsSzuAYBmC 4NmQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LsFSCOE/U7ctFiRSO+kttWX/RvhA2tL+4PMkcrQ5e54=; b=Iut6nEsZR6drT4NSvrVZg2ISxOx7HHItecoSnAKiZndJt0I3fQ5ItQ6KUM0kMaPQw0 wEbmImeIECIvrdu4kCoNWZC8ISn7JsanAc2m7lyhL/WBFFHs2Iy1OIXnHoFBIPZMsu8P U97P9n5qBXT65KKIi0OsYBuYv9eHbQEsCV+Tu6cVqImhExz1wv3VNDguIDGFrHkSwfi5 PUDgenJhvHbxWHxQ6Xzze/viHYjvExLoPqDjLbvrcZvCXOhFmZnjO7k5FgHIUYVPx227 ApVMzbyBKOtfxuGzuXqMZe+psJtEqrTFF4FjgReO996ElgnxrxfJvT2I74V4oz7tMCLc FWIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=DCPYUaMz; 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 t4-20020a1709028c8400b001a63e4508dcsi4754211plo.411.2023.04.14.08.44.13; Fri, 14 Apr 2023 08:44:28 -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=DCPYUaMz; 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 S231260AbjDNPYt (ORCPT + 99 others); Fri, 14 Apr 2023 11:24:49 -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 S230182AbjDNPYh (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 9AD30AF25; Fri, 14 Apr 2023 08:24:36 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id ECF2C5FD27; Fri, 14 Apr 2023 18:24:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485875; bh=LsFSCOE/U7ctFiRSO+kttWX/RvhA2tL+4PMkcrQ5e54=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=DCPYUaMz60Nl/RmT7yM88Yzy3adQ6G3ZPztlvKLMMHmWigHQ74VVmrsOIRibpLc2m cCwojrhnuzPzkEay4O5INDE2OsrP+FNrLfxgBV+GDOfP9YpUYQSuyX2p5yMux2crDp 8srpJotp+JwjAzegvx1/WjvvuR/MlcKPrgfEZZ04+XLMSuCRHiENWA9jIfWIrOAa9m eQJ/Mho4V+V6Hk4yCrseev6BCxZyc0+0vwTxFX2mJLXmGUnw9NZ8aOGK4xByKUNVnI M2uVFDtZkSCjSzLx4V2L9OoWsk7v9ogaueGA+/bEeK4rF/W7tTGLfnJBSRu0g6UX8T tfik05VQ2pe1A== 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:34 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 4/5] usb: dwc3-meson-g12a: support OTG switch Date: Fri, 14 Apr 2023 18:24:22 +0300 Message-ID: <20230414152423.19842-5-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230414152423.19842-1-ddrokosov@sberdevices.ru> References: <20230414152423.19842-1-ddrokosov@sberdevices.ru> 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?1763166984009782731?= X-GMAIL-MSGID: =?utf-8?q?1763166984009782731?= From now, the Amlogic A1 USB controller is capable of switching between host and gadget modes, based on the status of the OTG_ID signal or by manual usb role changing. Signed-off-by: Dmitry Rokosov --- drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index b282ad0e69c6..10469b95deb9 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -242,7 +242,7 @@ static const struct dwc3_meson_g12a_drvdata g12a_drvdata = { }; static const struct dwc3_meson_g12a_drvdata a1_drvdata = { - .otg_switch_supported = false, + .otg_switch_supported = true, .clks = meson_a1_clocks, .num_clks = ARRAY_SIZE(meson_a1_clocks), .phy_names = meson_a1_phy_names, From patchwork Fri Apr 14 15:24:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 83499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp478476vqo; Fri, 14 Apr 2023 08:47:46 -0700 (PDT) X-Google-Smtp-Source: AKy350aDaV5R5B9o4hHY7OsQMHWQ6Rvlsw/DLnIqliEuNVjAaFfqYcjNvSMhgf2Cq5fjLXPimEDX X-Received: by 2002:a05:6a00:228e:b0:633:6eec:fdc6 with SMTP id f14-20020a056a00228e00b006336eecfdc6mr9396632pfe.1.1681487266000; Fri, 14 Apr 2023 08:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681487265; cv=none; d=google.com; s=arc-20160816; b=fDY3jzVLmBXnogdUeCBBQXeX85qyH7m0QvmpYh3awF0Hqmnn9nL6ZlBdtR8scoTB6i Ebp0pyHAaLGBcZrDdfamv6JVfpI7A+oB1mUlrBvHINPP/3iKdqHNVOC8S2aqieyoOqjS bmtCuelWOMW6iyz2oKg4EMaQl91wTBIL5oSQEuyGzZqTFFWtnA1OYEiwWiJd3Z4W8yTz 2giuPMt0JbwbLseqWTtsIsBJrDFDcUsdYU+bPy7xvGgWt6tR609s6z5Ihtk6t8Ih5j4/ y7GkeAc4AKFYsvXFUWLuETmjrP5EXJb8VYT4JBneQSp1RvZQI1yWpSVfsaUFXklAM56w 2XAQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lYTwixrqbd9SStEuaH+MOse4j7UjK4ooo6t7FaqVmeA=; b=vjF+bSlKVueVSRDmfcY8bXCHJTaCmVzD/jlUQKRYLCfuLKLVPc23L8wZYexlodA4vi A2dNKNAQpCJp1AdnMYMmr64f/I7Vm8npnOmqCdoQo1h7zgdpgducLVP4LMF/RVTxUdWu LuRGxK1vD6q2vspQ3SfTjmpH7BND3rHaFqpYtHigOHP4N9PUcjgaR0vRUitvw4iwYN5G WmfkIfhSUsazXxJ1Jin4uwkWjV9z/COIbQuc/oqLU0CY7QRhi0dLbtw69/9uqSrmREmb HpSphp1MZZvamJeztavDft5miw17//w+ACs4R6WXwLMfxWP0WB9L31PEdSMn70QVeEaJ ichg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=bF8ixADU; 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 74-20020a62174d000000b0063b2655def0si4715179pfx.47.2023.04.14.08.47.30; Fri, 14 Apr 2023 08:47:45 -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=bF8ixADU; 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 S229584AbjDNPZD (ORCPT + 99 others); Fri, 14 Apr 2023 11:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbjDNPYj (ORCPT ); Fri, 14 Apr 2023 11:24:39 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC1C5FDE; Fri, 14 Apr 2023 08:24:38 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id C972E5FD28; Fri, 14 Apr 2023 18:24:35 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681485875; bh=lYTwixrqbd9SStEuaH+MOse4j7UjK4ooo6t7FaqVmeA=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bF8ixADUwckraKrGckmTlpKLzIPe2taZI4ZDH36oDfoCLnHmMQY+Q6IX6ktbuH9Fj b3PkRnF9hGxtw7tAn5kdAb2tx4+RGui2lvuWv6LCMzF2WzRRA0XV1acTu9Yll2uj3K iSex5JgZ05czVfj3KPq3hNQUPWMNL/knmpGQYQtp1Y5xTKCmrfszqQ9iqAhBAa7ncG WIqmXhWhjbPmxzig7uJFhw8KNl3HycaQgxyCZbrtCY4abqCmAYcaVo7IJ/rDVGC6rL ntgemjifCH6Wypv+RuFyZn2wMTbHzWOY+sxLGz4WsuDB0S8ylOEtwdZIjfa9eg+RNh Ojv7Qq5tMTO7A== 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:35 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 5/5] arm64: dts: meson: a1: support USB controller in OTG mode Date: Fri, 14 Apr 2023 18:24:23 +0300 Message-ID: <20230414152423.19842-6-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230414152423.19842-1-ddrokosov@sberdevices.ru> References: <20230414152423.19842-1-ddrokosov@sberdevices.ru> 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?1763167191349344845?= X-GMAIL-MSGID: =?utf-8?q?1763167191349344845?= Amlogic A1 SoC family has USB2.0 controller based on dwc2 and dwc3 heads. It supports otg/host/peripheral modes. Signed-off-by: Yue Wang Signed-off-by: Hanjie Lin Signed-off-by: Dmitry Rokosov --- arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 59 +++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index ae7d39cff07a..02af0aac6780 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -8,6 +8,8 @@ #include #include #include +#include +#include / { compatible = "amlogic,a1"; @@ -169,6 +171,17 @@ gpio_intc: interrupt-controller@0440 { amlogic,channel-interrupts = <49 50 51 52 53 54 55 56>; }; + + usb2_phy1: phy@4000 { + compatible = "amlogic,a1-usb2-phy"; + clocks = <&clkc CLKID_USB_PHY_IN>; + clock-names = "xtal"; + reg = <0x0 0x4000 0x0 0x60>; + resets = <&reset RESET_USBPHY>; + reset-names = "phy"; + #phy-cells = <0>; + power-domains = <&pwrc PWRC_USB_ID>; + }; }; gic: interrupt-controller@ff901000 { @@ -192,6 +205,52 @@ spifc: spi@fd000400 { #size-cells = <0>; status = "disabled"; }; + + usb: usb@fe004400 { + status = "disabled"; + compatible = "amlogic,meson-a1-usb-ctrl"; + reg = <0x0 0xfe004400 0x0 0xa0>; + interrupts = ; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&clkc CLKID_USB_CTRL>, + <&clkc CLKID_USB_BUS>, + <&clkc CLKID_USB_CTRL_IN>; + clock-names = "usb_ctrl", "usb_bus", "xtal_usb_ctrl"; + resets = <&reset RESET_USBCTRL>; + reset-name = "usb_ctrl"; + + dr_mode = "otg"; + + phys = <&usb2_phy1>; + phy-names = "usb2-phy1"; + + dwc2: usb@ff500000 { + compatible = "amlogic,meson-a1-usb", "snps,dwc2"; + reg = <0x0 0xff500000 0x0 0x40000>; + interrupts = ; + phys = <&usb2_phy1>; + phy-names = "usb2_phy"; + clocks = <&clkc CLKID_USB_PHY>; + clock-names = "otg"; + dr_mode = "peripheral"; + g-rx-fifo-size = <192>; + g-np-tx-fifo-size = <128>; + g-tx-fifo-size = <128 128 16 16 16>; + }; + + dwc3: usb@ff400000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff400000 0x0 0x100000>; + interrupts = ; + dr_mode = "host"; + snps,dis_u2_susphy_quirk; + snps,quirk-frame-length-adjustment = <0x20>; + snps,parkmode-disable-ss-quirk; + }; + }; }; timer {