From patchwork Mon Nov 26 12:54:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 10698349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2680813AD for ; Mon, 26 Nov 2018 13:17:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 108B42977A for ; Mon, 26 Nov 2018 13:17:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00E462983F; Mon, 26 Nov 2018 13:17:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB9312977A for ; Mon, 26 Nov 2018 13:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fH2F6OPBLpOIzCWSRUqmmMANTxbkZ4wQ97d5w5K5vFI=; b=TNYM9MdI7zoHFOl+aoAI1KB6qL OeFk1FGG4dhPptQ92QYwfRB64kDrY+RW8gD8rRsN/NFlvEV8aQpcilagbxw4I+YiR1W7jZCO6FLb2 GjX5qOpzVJAQcOKUFrEQp5FYeDi89ICsNa/oGI1hmD7h2jr94V5TiTj9SFqhei2oB9NUIzLshOCG4 ONDY5fkpdW9IW45VcotG92M7iHsfbmgOFbO1bnKDY6UG5m1MuWS6eShq9Qn/UpeuLUfCbZE17BJMQ d/S/QoYjSgUkTD5VrOjJ6kKhYELRGM8YTtroz4B19tgRAhGewrW3+RDCWaL1adeRda0FCE/dbq89z m7iWVkJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRGlG-0002aw-Kf; Mon, 26 Nov 2018 13:17:14 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRGgJ-0005J5-Gq for linux-arm-kernel@bombadil.infradead.org; Mon, 26 Nov 2018 13:12:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TqMqnQc+J/3R3lmGxy7p3dAImrwBVcMPpofDB1AnfHw=; b=uMHc8xtpPEXcNOUdc94AQa+gb JTGaPIisyKklnUM/a6S3rRDnU21/V17KANZ9spWnW1wa869OhI8bnZzutc0v8HrrLfIbbx4IZXonS HO9MX5+M9j62Hdkyqvuy0Kn+AXpbPxDVEnRAzDXpJcXRrUCqfpBSLG+PKxb60jya2dbqsjs0khTp5 BR7yRhC7rbM2qgsT6N/DCpC//5EKI7+uLZTSEF0WaENOv7quM0F7rcf/rP9N+H3w+N7aROPwbi0+9 L94TAjOm6cUXCIRxZ6YCvsTbSEsBv8fCouAZn6kQzk0IoaG0BWU146e6T1+CX9xSSbkIicO2PmGDg 8FQramC9g==; Received: from kirsty.vergenet.net ([202.4.237.240]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRGaJ-0005w7-5Z for linux-arm-kernel@lists.infradead.org; Mon, 26 Nov 2018 13:05:57 +0000 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id B69AA25BF36; Mon, 26 Nov 2018 23:55:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1543236912; bh=fVQaMGuVwETKUk1DPT5nIaan83mCKZsCOqjC9kFloYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkvlsLB+xBemhDMd0fyduLpooZ+cL2ngTe5ByMylLUItM49pcdkqvK7eI88PLmCrs tLqya9UJ8LIr5BoSJRUip/NZMEVlCmxLWpEZ2WQWwpQ14tOC/zsC00uCR4Yrztg/7E lKQsuwSD0QYopmiEzmg3u5nesS0BTFjiN0eN6n2g= Received: by reginn.horms.nl (Postfix, from userid 7100) id C05CD94093E; Mon, 26 Nov 2018 13:55:08 +0100 (CET) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Subject: [PATCH 18/40] arm64: dts: renesas: r8a7799{0|5}: add/enable USB2.0 peripheral Date: Mon, 26 Nov 2018 13:54:44 +0100 Message-Id: <5c6479d9b25b40001e814003f62a93485f9ff82f.1543229515.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181126_130555_475134_FD5FE36E X-CRM114-Status: GOOD ( 13.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Horman , Yoshihiro Shimoda , Magnus Damm , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yoshihiro Shimoda This patch adds/enables USB2.0 peripheral for R-Car [DE]3 boards. R-Car E3 Ebisu board connects the ID pin to the SoC, so this adds a group "usb0_id" into usb0_pins node. Also, to use SW15 pin 3 side, this patch adds vbus0_usb2 node on r8a77990-ebisu.dts. R-Car D3 Draak board doesn't connect the ID pin, so this adds "renesas,no-otg-pins" property into usb2_phy0 node. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman --- arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 21 +++++++++++- arch/arm64/boot/dts/renesas/r8a77990.dtsi | 45 ++++++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 8 +++++ arch/arm64/boot/dts/renesas/r8a77995.dtsi | 45 ++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts index ff428a64341c..038664e0cdcb 100644 --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts @@ -128,6 +128,17 @@ regulator-always-on; }; + vbus0_usb2: regulator-vbus0-usb2 { + compatible = "regulator-fixed"; + + regulator-name = "USB20_VBUS_CN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + x13_clk: x13 { compatible = "fixed-clock"; #clock-cells = <0>; @@ -188,6 +199,7 @@ }; &ehci0 { + dr_mode = "otg"; status = "okay"; }; @@ -195,6 +207,11 @@ clock-frequency = <48000000>; }; +&hsusb { + dr_mode = "otg"; + status = "okay"; +}; + &i2c0 { status = "okay"; @@ -295,6 +312,7 @@ }; &ohci0 { + dr_mode = "otg"; status = "okay"; }; @@ -322,7 +340,7 @@ }; usb0_pins: usb { - groups = "usb0_b"; + groups = "usb0_b", "usb0_id"; function = "usb0"; }; @@ -359,6 +377,7 @@ pinctrl-0 = <&usb0_pins>; pinctrl-names = "default"; + vbus-supply = <&vbus0_usb2>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi index a945db3c4644..8c9d7faa9e65 100644 --- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi @@ -357,6 +357,51 @@ resets = <&cpg 407>; }; + hsusb: usb@e6590000 { + compatible = "renesas,usbhs-r8a77990", + "renesas,rcar-gen3-usbhs"; + reg = <0 0xe6590000 0 0x200>; + interrupts = ; + clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>; + dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, + <&usb_dmac1 0>, <&usb_dmac1 1>; + dma-names = "ch0", "ch1", "ch2", "ch3"; + renesas,buswait = <11>; + phys = <&usb2_phy0>; + phy-names = "usb"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 704>, <&cpg 703>; + status = "disabled"; + }; + + usb_dmac0: dma-controller@e65a0000 { + compatible = "renesas,r8a77990-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65a0000 0 0x100>; + interrupts = ; + interrupt-names = "ch0", "ch1"; + clocks = <&cpg CPG_MOD 330>; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 330>; + #dma-cells = <1>; + dma-channels = <2>; + }; + + usb_dmac1: dma-controller@e65b0000 { + compatible = "renesas,r8a77990-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65b0000 0 0x100>; + interrupts = ; + interrupt-names = "ch0", "ch1"; + clocks = <&cpg CPG_MOD 331>; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 331>; + #dma-cells = <1>; + dma-channels = <2>; + }; + dmac0: dma-controller@e6700000 { compatible = "renesas,dmac-r8a77990", "renesas,rcar-dmac"; diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts index 2405eaad0296..48bb1d77744f 100644 --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts @@ -179,6 +179,7 @@ }; &ehci0 { + dr_mode = "host"; status = "okay"; }; @@ -186,6 +187,11 @@ clock-frequency = <48000000>; }; +&hsusb { + dr_mode = "host"; + status = "okay"; +}; + &i2c0 { pinctrl-0 = <&i2c0_pins>; pinctrl-names = "default"; @@ -337,6 +343,7 @@ }; &ohci0 { + dr_mode = "host"; status = "okay"; }; @@ -445,6 +452,7 @@ pinctrl-0 = <&usb0_pins>; pinctrl-names = "default"; + renesas,no-otg-pins; status = "okay"; }; diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi index 214f4954b321..8530d9fc1371 100644 --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi @@ -344,6 +344,51 @@ status = "disabled"; }; + hsusb: usb@e6590000 { + compatible = "renesas,usbhs-r8a77995", + "renesas,rcar-gen3-usbhs"; + reg = <0 0xe6590000 0 0x200>; + interrupts = ; + clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>; + dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, + <&usb_dmac1 0>, <&usb_dmac1 1>; + dma-names = "ch0", "ch1", "ch2", "ch3"; + renesas,buswait = <11>; + phys = <&usb2_phy0>; + phy-names = "usb"; + power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; + resets = <&cpg 704>, <&cpg 703>; + status = "disabled"; + }; + + usb_dmac0: dma-controller@e65a0000 { + compatible = "renesas,r8a77995-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65a0000 0 0x100>; + interrupts = ; + interrupt-names = "ch0", "ch1"; + clocks = <&cpg CPG_MOD 330>; + power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; + resets = <&cpg 330>; + #dma-cells = <1>; + dma-channels = <2>; + }; + + usb_dmac1: dma-controller@e65b0000 { + compatible = "renesas,r8a77995-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65b0000 0 0x100>; + interrupts = ; + interrupt-names = "ch0", "ch1"; + clocks = <&cpg CPG_MOD 331>; + power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; + resets = <&cpg 331>; + #dma-cells = <1>; + dma-channels = <2>; + }; + canfd: can@e66c0000 { compatible = "renesas,r8a77995-canfd", "renesas,rcar-gen3-canfd";