From patchwork Sun Aug 16 17:16:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cameron Nemo X-Patchwork-Id: 11716141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FE65913 for ; Sun, 16 Aug 2020 17:16:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 455F820738 for ; Sun, 16 Aug 2020 17:16:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=tutanota.com header.i=@tutanota.com header.b="dJK0hecX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729311AbgHPRQz (ORCPT ); Sun, 16 Aug 2020 13:16:55 -0400 Received: from w1.tutanota.de ([81.3.6.162]:39246 "EHLO w1.tutanota.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbgHPRQx (ORCPT ); Sun, 16 Aug 2020 13:16:53 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id ADF43FA03C7; Sun, 16 Aug 2020 17:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597598210; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=fFg+yOI86gXXhmSNLal3y6xWuCA7tvRJk3uvQWOzwvc=; b=dJK0hecXw7dRZq4TTfMeFTX4bwq7NRvLeLxmF7gwf09Aj/u1cRxnh72rJMt+M3Gj mgFaBZvdiYDhkUUnwovAWRupa1TqReN/9n1kXekRiYaTxtM8IAqED7btDhq9jdpZRu9 6mImnu0Oo1+8AXu1e0ciKCNwRm7VoOtyxBbtnDjnR0rA1MCysXSlch8jUKocap4Qk+U y5fcwU0Z2wKBXmGt8BIZzTtZEON+t2BYkrjy/wdJZMoGOtzVS3wPDjkicDG5xgBofDh vYgKopqg5gOBK+c7RjgFXLWxZUnpxhyiFdAxaHyaNJJ0Mm1+aCZtLaZEbPgZrt9i312 g6wYPDrVeA== Date: Sun, 16 Aug 2020 19:16:50 +0200 (CEST) From: Cameron Nemo To: Devicetree , Linux Arm Kernel , Linux Rockchip , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: robh+dt@kernel.org, Heiko , balbi@kernel.org, gregkh@linuxfoundation.org Message-ID: Subject: [PATCH 1/3] usb: dwc3: of-simple: Add compatible for rk3328 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add a compatible to be hooked into by the Rockchip rk3328 device tree. The rk3399 compatible cannot be reused because the rk3328 SoCs may require a specialized driver in the future, and old device trees must remain commpatible with newer kernels. Signed-off-by: Cameron Nemo --- drivers/usb/dwc3/dwc3-of-simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index 7df115012935..54f38e434028 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -49,7 +49,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) * Some controllers need to toggle the usb3-otg reset before trying to * initialize the PHY, otherwise the PHY times out. */ - if (of_device_is_compatible(np, "rockchip,rk3399-dwc3")) + if (of_device_is_compatible(np, "rockchip,rk3399-dwc3") || +     of_device_is_compatible(np, "rockchip,rk3328-dwc3")) simple->need_reset = true; simple->resets = of_reset_control_array_get(np, false, true, @@ -171,6 +172,7 @@ static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = { }; static const struct of_device_id of_dwc3_simple_match[] = { + { .compatible = "rockchip,rk3328-dwc3" }, { .compatible = "rockchip,rk3399-dwc3" }, { .compatible = "xlnx,zynqmp-dwc3" }, { .compatible = "cavium,octeon-7130-usb-uctl" }, From patchwork Sun Aug 16 17:18:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cameron Nemo X-Patchwork-Id: 11716147 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E898F618 for ; Sun, 16 Aug 2020 17:18:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CFF0720738 for ; Sun, 16 Aug 2020 17:18:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=tutanota.com header.i=@tutanota.com header.b="lKxB7YFk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728555AbgHPRSS (ORCPT ); Sun, 16 Aug 2020 13:18:18 -0400 Received: from w1.tutanota.de ([81.3.6.162]:39564 "EHLO w1.tutanota.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbgHPRSQ (ORCPT ); Sun, 16 Aug 2020 13:18:16 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id F3C85FA03D5; Sun, 16 Aug 2020 17:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597598293; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=Ts7Ttd5K3DBpu12TNijg7qgS/999Myo7TYEvq9J4U2E=; b=lKxB7YFk88HcohnIG8pB+IC2u5Jbf1goGY0Q1k72Ux5fNXDB5pC10A3VDiN6ZsUS ajTFIlGBpo4Tm0O8EZHj6Js4e7mtkuzoVPgNW0k35olHyCBAD9hXqVKRAHQqe5BasdV vIg72LeKQfWAwhy+BlQY/S4Wzn9iEek2UWDPyKMmPyWVmmCS8ZxzGesmY523eyCcPaD c+i41ZHKiHeg6imBu9dPl87Y+/wgjvQoREvuaSs2yXmkrjALvyE77HnKZ2soMTIh6Hv 5Y05A8Z06G1sYb0y7zM5dZtjsAwbk5WXdmUmsXDFP/fMdypcKJLPkXHtEddm2gjyV8A GQBHrjrl9Q== Date: Sun, 16 Aug 2020 19:18:13 +0200 (CEST) From: Cameron Nemo To: Devicetree , Linux Arm Kernel , Linux Rockchip , Linux Kernel , Linux Usb Cc: Robh+dt , Heiko , Balbi , Gregkh Message-ID: In-Reply-To: References: Subject: [PATCH 2/3] arm64: dts: rockchip: rk3328 usb3 controller node MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org RK3328 SoCs have one USB 3.0 OTG controller which uses DWC_USB3 core's general architecture. It can act as static xHCI host controller, static device controller, USB 3.0/2.0 OTG basing on ID of USB3.0 PHY. Signed-off-by: William Wu Signed-off-by: Heiko Stuebner Signed-off-by: Cameron Nemo --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.28.0 diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index bbdb19a3e85d..27e86bf06d3e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -983,6 +983,33 @@ usb_host0_ohci: usb@ff5d0000 { status = "disabled"; }; + usbdrd3: usb@ff600000 { + compatible = "rockchip,rk3328-dwc3"; + clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>, + <&cru ACLK_USB3OTG>; + clock-names = "ref_clk", "suspend_clk", +       "bus_clk"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usbdrd_dwc3: dwc3@ff600000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff600000 0x0 0x100000>; + interrupts = ; + dr_mode = "otg"; + phy_type = "utmi_wide"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + status = "disabled"; + }; + }; + gic: interrupt-controller@ff811000 { compatible = "arm,gic-400"; #interrupt-cells = <3>; From patchwork Sun Aug 16 17:19:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cameron Nemo X-Patchwork-Id: 11716153 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2494B618 for ; Sun, 16 Aug 2020 17:19:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B62920882 for ; Sun, 16 Aug 2020 17:19:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=tutanota.com header.i=@tutanota.com header.b="D1CvKof1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729347AbgHPRTY (ORCPT ); Sun, 16 Aug 2020 13:19:24 -0400 Received: from w1.tutanota.de ([81.3.6.162]:39822 "EHLO w1.tutanota.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbgHPRTX (ORCPT ); Sun, 16 Aug 2020 13:19:23 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 23B56FA01AB; Sun, 16 Aug 2020 17:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597598360; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=Gi3w6dYvszIhNmdn8K3f13r474z+EsQSWYigqXPBxAM=; b=D1CvKof1nVQZk9R18QpAcSfj9W15lwqCL+crEro978qAfik7BtCaqVlRPTXQOfJx PN+32KRnLgIXA6WPesPeq1QzHKSFh1dBbyhi4T932k+kC0oRC0pANMG/dVI7IQimUV0 k7OJS0xIAF34pOWegRRmCNnuN6Sd3upNUAjlBxe4fSAIiv1FdE6dzFdUVQI1pyFklpB FMdHNPCd7libkR74Q+b1qMB2RoPnTszLFMUkr2CgJDJO9P0zoEodml5dccTj/3hbWDY OgNPPx/eUMuQb2TzGWfnTJeXRXkPg9T8hPK7kszZ1YGjViCBf0Q1QA+FiglX94dHzig ZbZ3SB29Gg== Date: Sun, 16 Aug 2020 19:19:20 +0200 (CEST) From: Cameron Nemo To: Devicetree , Linux Arm Kernel , Linux Rockchip , Linux Kernel , Linux Usb Cc: Robh+dt , Heiko , Balbi , Gregkh Message-ID: In-Reply-To: References: Subject: [PATCH 3/3] arm64: dts: rockchip: enable rk3328-rock64 usb3 nodes MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Signed-off-by: Heiko Stuebner Signed-off-by: Cameron Nemo --- arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.28.0 diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts index 86cfb5c50a94..ae27f449f4a3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts @@ -392,6 +392,15 @@ &usb_host0_ohci { status = "okay"; }; +&usbdrd3 { + status = "okay"; +}; + +&usbdrd_dwc3 { + dr_mode = "host"; + status = "okay"; +}; + &vop { status = "okay"; };