Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1495138rwl; Wed, 5 Apr 2023 18:55:41 -0700 (PDT) X-Google-Smtp-Source: AKy350YAxjfa8KVcAi41Boa8sqMTjgI4x4oCjzP9c7Z0Kc7ZUBzM0VwQg1CHPlgoSJaUF4LHl4yf X-Received: by 2002:a17:907:78cf:b0:93e:9362:7602 with SMTP id kv15-20020a17090778cf00b0093e93627602mr4271873ejc.50.1680746141025; Wed, 05 Apr 2023 18:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680746141; cv=none; d=google.com; s=arc-20160816; b=Kf2iVzjij8Ax+DceQrvPmSLIaauRh00fN9ffTrHh+/JqIu8u7ZL6nw4lLh3Sk+hIPO CpDGw/+qZaIYp1/lGM4q1saRUqpg0ivBU2ULBLek4LO+uZOl9f+/bSqk4sGm+/6BzZw7 kqteqkjBJ+p0hhpyi+FrTNMq636eOnuoWscMkKmgwpoBVUcgWxKrLMbYdx97O6Mn9Gl8 5nRLzjz1kzeR5VttKdA1pEngLwbS/+wcOt23fXoT9NKawRQBCibxCCLidlOBOwwkWcGV RKMHSzhKTSilxY48qWAWS2IBsvN9Nba0RdEFAVMV0hvzbgPIxwCq3+qKpVb+RjeLje3Q I9+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8FrXxz/2WlkbngC0WXGgNn558eIp8rqB6CO5kIC23pU=; b=njUvcqATq4SGdbPHREnoP303abScUDf5k265D4T7rhpBHvkx4kwm76PhoEFXqLHria i3fV3/jwCN/CPRGFnnFpwr5mYDIcwQyK4C5iMMGvQPHdgYkEeEQlOublo9Ivl3QgI3Yp P0+Bdt14qB4TMRe1gG4Golo2YC5+FIP1gIrJgcbXcnphWqXb7aEAjlRv37bqslFpwEgl xdM6SQP+v1lJWMY2qqzcrgNoZBtj08V/MMxK712X57fx/xyismZGRFYcVsLgKrFQaUIz U9uHeCpRSarU82KAjM3fPfOi+SI7IVtm4uDH7Euj3HMSa/1fIDMQYCBTsYijCELq0qot fW1A== 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 d16-20020a170906305000b0092292a828afsi170642ejd.505.2023.04.05.18.55.16; Wed, 05 Apr 2023 18:55:41 -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 S234868AbjDFBwu (ORCPT + 99 others); Wed, 5 Apr 2023 21:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233903AbjDFBw3 (ORCPT ); Wed, 5 Apr 2023 21:52:29 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBE27A9E; Wed, 5 Apr 2023 18:52:27 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 3065D24E203; Thu, 6 Apr 2023 09:52:26 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 6 Apr 2023 09:52:26 +0800 Received: from ubuntu.localdomain (183.27.97.179) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 6 Apr 2023 09:52:25 +0800 From: Minda Chen To: Emil Renner Berthing , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Pawel Laszczak , Greg Kroah-Hartman , Peter Chen , Roger Quadros , Philipp Zabel CC: , , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Minda Chen" , Mason Huo Subject: [PATCH v4 7/7] riscv: dts: starfive: add USB dts configuration for JH7110 Date: Thu, 6 Apr 2023 09:52:16 +0800 Message-ID: <20230406015216.27034-8-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230406015216.27034-1-minda.chen@starfivetech.com> References: <20230406015216.27034-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.97.179] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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. USB controller connect to PHY, The PHY dts configuration are also added. Signed-off-by: Minda Chen --- .../jh7110-starfive-visionfive-2.dtsi | 7 +++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 44 +++++++++++++++++++ 2 files changed, 51 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 1155b97b593d..cf0a66faf5d3 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -221,3 +221,10 @@ pinctrl-0 = <&uart0_pins>; status = "okay"; }; + +&usb0 { + phys = <&usbphy0>; + phy-names = "usb2-phy"; + dr_mode = "peripheral"; + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 29cd798b6732..2f67196ffac0 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -366,6 +366,50 @@ status = "disabled"; }; + usb0: usb@10100000 { + compatible = "starfive,jh7110-usb"; + reg = <0x0 0x10100000 0x0 0x10000>, + <0x0 0x10110000 0x0 0x10000>, + <0x0 0x10120000 0x0 0x10000>; + reg-names = "otg", "xhci", "dev"; + interrupts = <100>, <108>, <110>; + interrupt-names = "host", "peripheral", "otg"; + 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"; + starfive,stg-syscon = <&stg_syscon 0x4>; + status = "disabled"; + }; + + usbphy0: phy@10200000 { + compatible = "starfive,jh7110-usb-phy"; + reg = <0x0 0x10200000 0x0 0x10000>; + clocks = <&syscrg JH7110_SYSCLK_USB_125M>, + <&stgcrg JH7110_STGCLK_USB0_APP_125>; + clock-names = "125m", "app_125"; + #phy-cells = <0>; + }; + + pciephy0: phy@10210000 { + compatible = "starfive,jh7110-pcie-phy"; + reg = <0x0 0x10210000 0x0 0x10000>; + #phy-cells = <0>; + }; + + pciephy1: phy@10220000 { + compatible = "starfive,jh7110-pcie-phy"; + reg = <0x0 0x10220000 0x0 0x10000>; + #phy-cells = <0>; + }; + stgcrg: clock-controller@10230000 { compatible = "starfive,jh7110-stgcrg"; reg = <0x0 0x10230000 0x0 0x10000>; -- 2.17.1