d2e0e6
From patchwork Thu Jun 13 16:27:45 2019
d2e0e6
Content-Type: text/plain; charset="utf-8"
d2e0e6
MIME-Version: 1.0
d2e0e6
Content-Transfer-Encoding: 7bit
d2e0e6
X-Patchwork-Submitter: Enric Balletbo i Serra <enric.balletbo@collabora.com>
d2e0e6
X-Patchwork-Id: 10992783
d2e0e6
Return-Path: 
d2e0e6
 <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
d2e0e6
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
d2e0e6
 [172.30.200.125])
d2e0e6
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C69976
d2e0e6
	for <patchwork-linux-arm@patchwork.kernel.org>;
d2e0e6
 Thu, 13 Jun 2019 16:31:35 +0000 (UTC)
d2e0e6
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
d2e0e6
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A407202A5
d2e0e6
	for <patchwork-linux-arm@patchwork.kernel.org>;
d2e0e6
 Thu, 13 Jun 2019 16:31:35 +0000 (UTC)
d2e0e6
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
d2e0e6
	id 1E11D205F8; Thu, 13 Jun 2019 16:31:35 +0000 (UTC)
d2e0e6
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
d2e0e6
	pdx-wl-mail.web.codeaurora.org
d2e0e6
X-Spam-Level: 
d2e0e6
X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED,
d2e0e6
	DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY
d2e0e6
	autolearn=ham version=3.3.1
d2e0e6
Received: from bombadil.infradead.org (bombadil.infradead.org
d2e0e6
 [198.137.202.133])
d2e0e6
	(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
d2e0e6
	(No client certificate requested)
d2e0e6
	by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8E5E26253
d2e0e6
	for <patchwork-linux-arm@patchwork.kernel.org>;
d2e0e6
 Thu, 13 Jun 2019 16:31:32 +0000 (UTC)
d2e0e6
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d2e0e6
	d=lists.infradead.org; s=bombadil.20170209; h=Sender:
d2e0e6
	Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:
d2e0e6
	List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To
d2e0e6
	:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
d2e0e6
	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:
d2e0e6
	List-Owner; bh=DvpejaNT4eBhDns4FxJHLSG+zmWCjPWj3DUJGU1HA+0=; b=U5HR+BVOuAC/E8
d2e0e6
	nFHo3NNnf/apQ+ctinRwRfb2KfTsAUb7ZUpIl54fuCw/9GaxhMVGPvViCELEYZSqU3In+Fo3+hP3s
d2e0e6
	kMyQxkFXCOuAawwfHbC5O/B5rW4mu3/wtmY6WU8/7j0+z295Xf6bcbL61ViJl004E6RRiw+o3AvsX
d2e0e6
	k5tb581Re61dLl+MWGJETzSUGZZl9OzPmwJiQ2MrQltCsHWXJM4Q+PjSa/figIf9yD8w3MUbDmtfX
d2e0e6
	Cj28FmfT2DfWi2kNlitMG7EqEvpPnc51G2u3JVUOnj1/C2UkRjWqMkbyLlzDAnqntyXFKePRDd2Uq
d2e0e6
	I2tA62mw1OY4IxFiP+Qw==;
d2e0e6
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
d2e0e6
	by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux))
d2e0e6
	id 1hbSdK-00080h-F1; Thu, 13 Jun 2019 16:31:26 +0000
d2e0e6
Received: from bhuna.collabora.co.uk ([46.235.227.227])
d2e0e6
 by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux))
d2e0e6
 id 1hbSZw-00036Y-Gr; Thu, 13 Jun 2019 16:27:58 +0000
d2e0e6
Received: from [127.0.0.1] (localhost [127.0.0.1])
d2e0e6
 (Authenticated sender: eballetbo) with ESMTPSA id 2E34F27D7A1
d2e0e6
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
d2e0e6
To: devicetree@vger.kernel.org
d2e0e6
Subject: [PATCH] arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs
d2e0e6
Date: Thu, 13 Jun 2019 18:27:45 +0200
d2e0e6
Message-Id: <20190613162745.12195-1-enric.balletbo@collabora.com>
d2e0e6
X-Mailer: git-send-email 2.20.1
d2e0e6
MIME-Version: 1.0
d2e0e6
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
d2e0e6
X-CRM114-CacheID: sfid-20190613_092756_843034_D5C41B2D 
d2e0e6
X-CRM114-Status: GOOD (  10.09  )
d2e0e6
X-BeenThere: linux-arm-kernel@lists.infradead.org
d2e0e6
X-Mailman-Version: 2.1.29
d2e0e6
Precedence: list
d2e0e6
List-Id: <linux-arm-kernel.lists.infradead.org>
d2e0e6
List-Unsubscribe: 
d2e0e6
 <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
d2e0e6
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
d2e0e6
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
d2e0e6
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
d2e0e6
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
d2e0e6
List-Subscribe: 
d2e0e6
 <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
d2e0e6
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
d2e0e6
Cc: Mark Rutland <mark.rutland@arm.com>, Heiko Stuebner <heiko@sntech.de>,
d2e0e6
 Felipe Balbi <felipe.balbi@linux.intel.com>,
d2e0e6
 linux-rockchip@lists.infradead.org, Tony Xie <tony.xie@rock-chips.com>,
d2e0e6
 Viresh Kumar <viresh.kumar@linaro.org>, Randy Li <ayaka@soulik.info>,
d2e0e6
 linux-kernel@vger.kernel.org, Vicente Bergas <vicencb@gmail.com>,
d2e0e6
 Masahiro Yamada <yamada.masahiro@socionext.com>,
d2e0e6
 Rob Herring <robh+dt@kernel.org>,
d2e0e6
 Klaus Goger <klaus.goger@theobroma-systems.com>,
d2e0e6
 Matthias Brugger <matthias.bgg@gmail.com>,
d2e0e6
 Collabora Kernel ML <kernel@collabora.com>,
d2e0e6
 linux-arm-kernel@lists.infradead.org,
d2e0e6
 Christoph Muellner <christoph.muellner@theobroma-systems.com>
d2e0e6
Content-Type: text/plain; charset="us-ascii"
d2e0e6
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
d2e0e6
Errors-To: 
d2e0e6
 linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
d2e0e6
X-Virus-Scanned: ClamAV using ClamSMTP
d2e0e6
d2e0e6
As per binding documentation [1], the DWC3 core should have the "ref",
d2e0e6
"bus_early" and "suspend" clocks. As explained in the binding, those
d2e0e6
clocks are required for new platforms but not for existing platforms
d2e0e6
before commit fe8abf332b8f ("usb: dwc3: support clocks and resets for
d2e0e6
DWC3 core").
d2e0e6
d2e0e6
However, as those clocks are really treated as required, this ends with
d2e0e6
having some annoying messages when the "rockchip,rk3399-dwc3" is used:
d2e0e6
d2e0e6
[    1.724107] dwc3 fe800000.dwc3: Failed to get clk 'ref': -2
d2e0e6
[    1.731893] dwc3 fe900000.dwc3: Failed to get clk 'ref': -2
d2e0e6
[    2.495937] dwc3 fe800000.dwc3: Failed to get clk 'ref': -2
d2e0e6
[    2.647239] dwc3 fe900000.dwc3: Failed to get clk 'ref': -2
d2e0e6
d2e0e6
In order to remove those annoying messages, update the DWC3 hardware
d2e0e6
module node and add all the required clocks. With this change, both, the
d2e0e6
glue node and the DWC3 core node, have the clocks defined, but that's
d2e0e6
not really a problem and there isn't a side effect on do this. So, we
d2e0e6
can get rid of the annoying get clk error messages.
d2e0e6
d2e0e6
[1] Documentation/devicetree/bindings/usb/dwc3.txt
d2e0e6
d2e0e6
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
d2e0e6
---
d2e0e6
d2e0e6
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++
d2e0e6
 1 file changed, 6 insertions(+)
d2e0e6
d2e0e6
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
d2e0e6
index 196ac9b78076..a15348d185ce 100644
d2e0e6
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
d2e0e6
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
d2e0e6
@@ -414,6 +414,9 @@
d2e0e6
 			compatible = "snps,dwc3";
d2e0e6
 			reg = <0x0 0xfe800000 0x0 0x100000>;
d2e0e6
 			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
d2e0e6
+			clocks = <&cru SCLK_USB3OTG0_REF>, <&cru ACLK_USB3OTG0>,
d2e0e6
+				 <&cru SCLK_USB3OTG0_SUSPEND>;
d2e0e6
+			clock-names = "ref", "bus_early", "suspend";
d2e0e6
 			dr_mode = "otg";
d2e0e6
 			phys = <&u2phy0_otg>, <&tcphy0_usb3>;
d2e0e6
 			phy-names = "usb2-phy", "usb3-phy";
d2e0e6
@@ -447,6 +450,9 @@
d2e0e6
 			compatible = "snps,dwc3";
d2e0e6
 			reg = <0x0 0xfe900000 0x0 0x100000>;
d2e0e6
 			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
d2e0e6
+			clocks = <&cru SCLK_USB3OTG1_REF>, <&cru ACLK_USB3OTG1>,
d2e0e6
+				 <&cru SCLK_USB3OTG1_SUSPEND>;
d2e0e6
+			clock-names = "ref", "bus_early", "suspend";
d2e0e6
 			dr_mode = "otg";
d2e0e6
 			phys = <&u2phy1_otg>, <&tcphy1_usb3>;
d2e0e6
 			phy-names = "usb2-phy", "usb3-phy";