From patchwork Thu Dec 7 11:05:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10098469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB50660329 for ; Thu, 7 Dec 2017 11:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4D1E29EA1 for ; Thu, 7 Dec 2017 11:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7ED42A3F6; Thu, 7 Dec 2017 11:11:28 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 4EDF329EA1 for ; Thu, 7 Dec 2017 11:11:28 +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: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:In-Reply-To: References:List-Owner; bh=pKj316colqLVHwt+uNBSM2wJ9ddONdlbIVVfH79tIbI=; b=RG7 me4X88uBY1oZf8aXk3cuPn8WYQSohxc3R4rCX5yv7rCdfV9zJthnxXJc8nM+/CkN/cPNaPBFcNq3p i9esslhHu0nwN/c+sBeX4p7qsT/HrUwLWIwOvyM8pX/Tn6f3/Zdjkl1q4etfj/Y5O7RutJWb9fFjK +/N6aaP5vKfu4aSWxdmzoLp6U9//bM4JKIvq6clOWeoaA0NLmCNFc8mhd80oz8XFhvE4UNYJtTlZK T+Y6KNtl5FBiHqL27bPVAlDsv9F6l3uJ7MbaJ9Eu3aKuqla7FzdV6a/XlJmaS1zpqtVnOVGPgSbLp /f/gJIHKJqXR0BqkdUM2JQcAmOG5LDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMu5P-0004bc-Lq; Thu, 07 Dec 2017 11:11:27 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMu5L-0004aZ-BL for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2017 11:11:25 +0000 Received: by mail-pf0-x244.google.com with SMTP id e3so4420556pfi.10 for ; Thu, 07 Dec 2017 03:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BEyeGfCO1A1fr8mI9vMNKUBv+8g15w2oM9hcX8z73UQ=; b=fxBAo+2lOWa63ZMgPvnsTHRT9evVCW4Z6HhM0RpvkQUxLBvl3HjU9a47CKAwOR3JDy jtlpYXEt1AdQIjBTuExPqWkFw59NSU0vJ/DoCD+qRIfaj7GCyb+7ZKyWtj0xVKtcsmkW qQZlXmgXbQsmiCVFbqrcq5HopHXPAni061aOb4VwBNf4Ie8OXoX6dji/QCLin6l55FIa D0mUCUF00Jazb9c/hDpR5GCm58Vqkegj2Do6ZonaRcIYuBwaqsgMxp8+h85EAUstKBFx LWXMgGIyNrxmDMmG31QAafMMDEf5SZvI0FT0rcS+Hw4ZQpnFxcHhh1PQVggjBU3ap4/F 37lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BEyeGfCO1A1fr8mI9vMNKUBv+8g15w2oM9hcX8z73UQ=; b=hk8iYIBkcpF8danTFwUephXVxRm3u6e2QU8pc42C2TPaMCQxZgVTGAxSlxgRioUAwG JvNVSqZ8WoS2i9S5not+EhokCQz1uav86VVNeypApFXUA6W75uqTV/mJa8j0PUesMAWq fzAgF1MSiiGx8Xb4BlguMHEpt8rU1c98SN05J8/CGqOipnKGebzTmaWLVvXbMMPK5SSC 5bYqWpIdZW8lrrzMJk65UZvjJR0998DHl+XzJitCWMA37AMElqBNhl3WAFxp1o8MVCqe hwOFxeXM5HqcouOZdmVceQZDPR5ru7o13MIFacnFHl8k62i4GPX6cQ2ww8Q3w7Fabe/X S6Eg== X-Gm-Message-State: AJaThX7Na2NWuXX+1o4Fi3eXvZ5E+bKQNDFTazYkw15cDqbuDpBuJxSO sAIa1ldmSll6eH1psxbjbY8= X-Google-Smtp-Source: AGs4zMYO23iyQ4eiGW5VeIQoYPF52iT3AmeGPvEEP9KsJq9B5zeK6KrPPuc94wnWkSwt6i4MfygtKw== X-Received: by 10.101.97.75 with SMTP id o11mr24265428pgv.363.1512645062378; Thu, 07 Dec 2017 03:11:02 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id v88sm10641083pfk.31.2017.12.07.03.10.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 03:11:01 -0800 (PST) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Maxime Ripard Subject: [PATCH] arm64: allwinner: a64: orangepi-zero-plus2: add usb otg Date: Thu, 7 Dec 2017 16:35:48 +0530 Message-Id: <1512644748-14491-1-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171207_031123_543051_C060338F X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. 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: Mark Rutland , devicetree@vger.kernel.org, Catalin Marinas , linux-sunxi@googlegroups.com, Will Deacon , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Jagan Teki , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 Add usb otg support for orangepi-zero-plus2 board: - Add usb_otg node with dr_mode as 'otg' - USB0-IDDET connected to PA21 - VBUS connected through DCIN which always on Tested mass storage function. Signed-off-by: Jagan Teki --- Note: Anyone please check vbus connection [1] Since it is connected through DCIN of vcc-5v, I've added vcc-5v0 regulator for the same and attached to usb0_vbus-supply but it is disabling during kernel boot. [ 1.887854] vcc5v0: disabling [1] http://linux-sunxi.org/File:ORANGE_PI-ZERO-PLUS2_V1_0.pdf .../dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index d349399..7f298ee 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -73,6 +73,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>; @@ -111,6 +115,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; @@ -122,3 +130,13 @@ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; }; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */ + status = "okay"; +};