Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp572157rwr; Wed, 26 Apr 2023 03:31:54 -0700 (PDT) X-Google-Smtp-Source: AKy350anuW6k9yOXIaRk36kGf3xl/r37yJpfO8xDMVJrrRx2YKp7vMX6iO/w7NITB3eHR40VbCAA X-Received: by 2002:a05:6a20:9144:b0:f5:d6cc:e3f1 with SMTP id x4-20020a056a20914400b000f5d6cce3f1mr9924391pzc.20.1682505114359; Wed, 26 Apr 2023 03:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682505114; cv=none; d=google.com; s=arc-20160816; b=Ew4MYQyNaDsrSQvWscDRq5g101rplscfRM9gaQv/d5HL06EFJjkwF9QdpdYu0MPqiY IzZSiUXZ4f+y5PAniJImrRWVYmtEIQdv2YDd8TTXl8DoaP375dCyUmlxpoqZxq1gulLI Y7OWNbx3PpttZYXFGKuje/eqVvUSWH3WPNgCFUWdKxpPK+3Ick9wW1spsiZIBuSvHUGV fseAv6U0rxItg/hzgxQI2k9Qpc6bThloFPHbM5bPNw2tNQLvuV6zikNFi231Wy8VvNIW Rd6I4KgUVK1CHrRyPBi8nrJACIBY/tr+DeA20DHDcG8GDlSvBPN63bXq9du2Ggmzj3I5 m5Jw== 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=4lHHCxkIlnUR0GNXGWVdUkMmB9fJMh5SedGakqeeYVI=; b=P9xcug2YPDkmVT5yd/pDEeB9oMuTQeJBZSoqI2nyTrcdhi58whu8me0hvw5mfDJ748 9KlJ3dTsh54bPzigEB+omZkQalkPBYxCoQVxucJy109csyoLzrNweh7oj5M6ttgl45fW TvXpJa8Nz6dGvt8q6rNqS5NH+rWPRD+ddvLRwsob1JvtQ/oCvKNfDWDvz6QdAPQZ5w2U xZSzoiVwyaIXoYEa7zplT8SIEO4NHbzVY+j/coiIlaoHfRVRyOnwCu/sx0xY1QV2E6uK WgUjxtIIxCKhjBC9jtO3jaO2FT4ovZ1jXxSJZ3Hg9C+utBZV6CoP4Si5sVijZFN+egQE dwUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=BE6Xe3NN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v62-20020a632f41000000b0051b37c000dcsi16017470pgv.81.2023.04.26.03.31.43; Wed, 26 Apr 2023 03:31:54 -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=BE6Xe3NN; 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 S240507AbjDZKaW (ORCPT + 99 others); Wed, 26 Apr 2023 06:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240280AbjDZK3o (ORCPT ); Wed, 26 Apr 2023 06:29:44 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDA449DD; Wed, 26 Apr 2023 03:29:42 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id E9FD05FD7F; Wed, 26 Apr 2023 13:29:40 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682504981; bh=4lHHCxkIlnUR0GNXGWVdUkMmB9fJMh5SedGakqeeYVI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BE6Xe3NNGVrY40Kh9GMYS8/HS2NaAoNO2icJfHY+d5SLEeMRRBO6emtzmswN3h0yn GquNCBfF3VQmW2M5Ir6XPyAWjMpAgOYOfLEWS1LHUaQV/tsx+EJm23ch9kLx23u2aq kM9ePmuqyW/r2EvWNmjdxae0O9l4dY02rcR+yS13bkCbkHUYdefcDnZgePw5k9jVVR nfMH58iDE3RzXgmSi94vxab352SaLUqVHX8wyEeEVnpGPjK0QPZfOzu/26HXCdfpIO UofV61pCLVElSrFviaKgHxBbyJR5/FUv1AY9oGZwUvA4xMbvsg5Zuws6gDzJsTiqNp tNcNORqrFoeDQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 26 Apr 2023 13:29:40 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , , , , CC: , , , , , , , , , , Dmitry Rokosov Subject: [PATCH v3 5/5] arm64: dts: meson: a1: support USB controller in OTG mode Date: Wed, 26 Apr 2023 13:29:22 +0300 Message-ID: <20230426102922.19705-6-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230426102922.19705-1-ddrokosov@sberdevices.ru> References: <20230426102922.19705-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) 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/26 04:45:00 #21166225 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_NONE, 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: X-Mailing-List: linux-kernel@vger.kernel.org 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..5588ee602161 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 { -- 2.36.0