Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp870776rwb; Wed, 26 Jul 2023 04:23:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvW+6gmiXzzAxju6G+j3ZSiNnknCIlwjzn/vlVR8Oj0Ne3+0TnQ5YVHOUGfcv0rD8ole2F X-Received: by 2002:a17:906:1baa:b0:991:cd1f:e67a with SMTP id r10-20020a1709061baa00b00991cd1fe67amr1406979ejg.29.1690370638918; Wed, 26 Jul 2023 04:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690370638; cv=none; d=google.com; s=arc-20160816; b=b+j9+alPExuqupV/stpf6rfAeyVRtEs2isPMhp2W2uvRVlGBE+b4y6tLYDuxPgnT69 15BuOkJh6YygHkTcpyFs/ImW8mVDUDhugKvFWuERQGSDE/gpcv6D84SL5JV3Ywe7YuKL AEba6rXBf4gUy06l5EZpfz4/XyXNrn5Uh+OSeYV3M5mVIHgJKPZV+L5Z40vzjt9D4XFk DgBRrFQhEygMgeAQDwu9tTwW+dFJKT1h7kyzayZ7n27ufBqtDk4TLIbXT9BshW28D0Yr Z5xoc1BdPRuAVOTpgB8GazVHaZNIhHLyE6zHiu+XA9CYE3D6mntk2JwcG4d1EUMJt2sX 41Hw== 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; bh=bDglZy053ld+Rd9oqMKIiDqIVY8YOhaLH/bJZh2HZMM=; fh=YQzcH3QsXSBBOxE/1muI2cit5UALnpkivqpuYzoQFz8=; b=cddzn3TZXijpBztAlF3Spok9f5g+mSoUBSzZiXk0jnnuIFuc1qTL8ve3czxeti/5ak 9Rf73+gYODi3kKCYryKmfFG27WZ5DY6XrXBAVKLyWhpVxQEUiSN3/D3KQRIrRliOvHsE aG/TxHp0Bocxbz5kMoVAxkGgZcIaiFwjobKopc2u/L2DmQjH4UE/qz62AO6I2g2/9FvR a6HFVnW/mmoPGgG2OPDAXjWm5uigzur6D8ZR+KT0d9vuw4xGMwtbhkXoeBb1ovisnGgE FrrEAvLP7y4+3R4o6pi5C6iGlJUEbzzM48l8juOxf24B4xGx8NCZkceNO3zZhXbtD4/y Abew== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa15-20020a170907b9cf00b009930e13beb8si9832099ejc.952.2023.07.26.04.23.33; Wed, 26 Jul 2023 04:23:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232910AbjGZKGV convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Jul 2023 06:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231880AbjGZKGQ (ORCPT ); Wed, 26 Jul 2023 06:06:16 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE730BF; Wed, 26 Jul 2023 03:06:15 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 6215A810C; Wed, 26 Jul 2023 18:06:14 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 26 Jul 2023 18:06:14 +0800 Received: from ubuntu.localdomain (183.27.99.135) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 26 Jul 2023 18:06:13 +0800 From: Minda Chen To: Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski CC: , , , Paul Walmsley , Palmer Dabbelt , Albert Ou Subject: [dt-for-next v1 2/2] riscv: dts: starfive: Add USB dts node for JH7110 Date: Wed, 26 Jul 2023 03:06:09 -0700 Message-ID: <20230726100609.72550-3-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230726100609.72550-1-minda.chen@starfivetech.com> References: <20230726100609.72550-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.99.135] X-ClientProxiedBy: EXCAS061.cuchost.com (172.16.6.21) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 Add USB wrapper layer and Cadence USB3 controller dts configuration for StarFive JH7110 SoC and VisionFive2 Board. Signed-off-by: Minda Chen --- .../jh7110-starfive-visionfive-2.dtsi | 5 +++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 32 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 5feff4673503..36c402b4a726 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -273,6 +273,11 @@ &uart0 { status = "okay"; }; +&usb0 { + dr_mode = "peripheral"; + status = "okay"; +}; + &U74_1 { cpu-supply = <&vdd_cpu>; }; diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index dbc1243a0e75..c58489468cad 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -446,6 +446,38 @@ i2c2: i2c@10050000 { status = "disabled"; }; + usb0: usb@10100000 { + compatible = "starfive,jh7110-usb"; + ranges = <0x0 0x0 0x10100000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + starfive,stg-syscon = <&stg_syscon 0x4>; + clocks = <&stgcrg JH7110_STGCLK_USB0_LPM>, + <&stgcrg JH7110_STGCLK_USB0_STB>, + <&stgcrg JH7110_STGCLK_USB0_APB>, + <&stgcrg JH7110_STGCLK_USB0_AXI>, + <&stgcrg JH7110_STGCLK_USB0_UTMI_APB>; + clock-names = "lpm", "stb", "apb", "axi", "utmi_apb"; + resets = <&stgcrg JH7110_STGRST_USB0_PWRUP>, + <&stgcrg JH7110_STGRST_USB0_APB>, + <&stgcrg JH7110_STGRST_USB0_AXI>, + <&stgcrg JH7110_STGRST_USB0_UTMI_APB>; + reset-names = "pwrup", "apb", "axi", "utmi_apb"; + status = "disabled"; + + usb_cdns3: usb@0 { + compatible = "cdns,usb3"; + reg = <0x0 0x10000>, + <0x10000 0x10000>, + <0x20000 0x10000>; + reg-names = "otg", "xhci", "dev"; + interrupts = <100>, <108>, <110>; + interrupt-names = "host", "peripheral", "otg"; + phys = <&usbphy0>; + phy-names = "cdns3,usb2-phy"; + }; + }; + usbphy0: phy@10200000 { compatible = "starfive,jh7110-usb-phy"; reg = <0x0 0x10200000 0x0 0x10000>; -- 2.25.1