From patchwork Wed Jul 26 10:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 126256 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp311936vqo; Wed, 26 Jul 2023 03:47:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkh/0ZdDEFkvr3pfKLnK4gDUJPzESjIuJvVrrTvTMVUfXyAQdvbGxLmX+TUAd5XN06CUqY X-Received: by 2002:a05:6a20:2446:b0:139:fe4b:e2d2 with SMTP id t6-20020a056a20244600b00139fe4be2d2mr1925096pzc.56.1690368467881; Wed, 26 Jul 2023 03:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690368467; cv=none; d=google.com; s=arc-20160816; b=0eeSOLYnqUuy5+HIJMyV543/QVIO4CDc4Fun/b5sSUPSr/yB+TebPzNwS/6/oVTQPe KOaG8lgjRgMRHHi5Ngt+yfRP2R7ZzowT8OoGq5FUI4G6dREKRIhdmgcwFGNze7GMKYF2 zjaysIeDLddIEDnRoTgH+Siy9OS8QpzPGTUtbYy7AchL/CheyBZvBlPQCCKEm5sD0adQ lHcDCs2q+rbtGohoTZYS8ZnRofyF8STUIu35ANdNc0HUAaqT12YBKwNDRUDKb0q1P/Ba LUvQF2z6zTUvmAzKvBUha8B+QrpnfWe/zibsgw2XuX4zu2Ys0QfQlQf6Af98PrprXy08 e3qw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a63dc01000000b0056355bcebc3si12898516pgg.5.2023.07.26.03.47.33; Wed, 26 Jul 2023 03:47:47 -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 S233038AbjGZKGW convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Jul 2023 06:06:22 -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 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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772479806187885703 X-GMAIL-MSGID: 1772479806187885703 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>;