From patchwork Tue Mar 27 05:31:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10309251 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 A32616037D for ; Tue, 27 Mar 2018 05:32:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91E02205A9 for ; Tue, 27 Mar 2018 05:32:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8634727FA3; Tue, 27 Mar 2018 05:32:59 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham 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 EA066205A9 for ; Tue, 27 Mar 2018 05:32:58 +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=BpR8IzySRsEdBVjc0vxzKHqHbiHDLVlp/YFbMS20TVg=; b=Xn4aApNEEEQhDl3LD3iTQ4NFQY Cxb632B7rAMZ8o1yX0eS/SkGpjApGVqFFEuTIh3lF/H62NMzXCQ9N0EF1yh6SjOSkh1KboE/VdOPw nV3PfDbADTLcqANzL3GLP8pnwB7RGoPN1YT2GjDovTLZbNF8k6+NTC2AJR4HP0KoHoGfIDiF6yzft HOQPNYcnvW5BML4mKU/EHsvaHvgGbfSE/X79JBbwb0z/NqCWBlc+IA81leTesN4IRGfkurdGas+TZ XD6apqSeRUmUZ5oy7ZRn1J/xBfyguFodC3RJmObwVn7ycVoVmLxFU6wlolC0OpPFlfFhBfuOr85+c QrNQBx+g==; 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 1f0hE4-0008Fs-NO; Tue, 27 Mar 2018 05:32:52 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0hD0-0007Tx-3f for linux-arm-kernel@bombadil.infradead.org; Tue, 27 Mar 2018 05:31:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=UQ5Kz7RjGNvNwK+/Psx+BZ7PLQztCBTkKHHLQ4O23HQ=; b=x9nHoXhyWc+iRZoFzaQcQsiq8 LROyKXRa5dq3ff5zWh3KkrhriLp7uq3PbHzLGHSVN0TCp4E4+85KQ0fdZO8wgKG6zRV0ySbQeY7PF gQIzSZEvGxTEr9QU0PtHKmT4uFCakCjSk9MId9HJLOk3HaXWeiP6B7q5wsWMLlN2AGIwD+z9XsvF5 6DpjZlOB+TKXtusTule7wHa8uRadtJjzRJCZSkuQ3v5cvf6Eh2h+/HnuK5SrZoQsQH9v2Yyni1Uqi eXAQpL8+Pu0yECshHt3mobbvebDMG9FSShXOGS4gwm9IIJl5urO3orWo7Gu9qrRiN/7dXB6Lv5YxL MiisOR3GQ==; Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0hCw-0007FC-PZ for linux-arm-kernel@lists.infradead.org; Tue, 27 Mar 2018 05:31:43 +0000 Received: by mail-pg0-x244.google.com with SMTP id n11so8176415pgp.4 for ; Mon, 26 Mar 2018 22:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UQ5Kz7RjGNvNwK+/Psx+BZ7PLQztCBTkKHHLQ4O23HQ=; b=jTIAPsPS71QLZR3eZj57noHbnlmEQIXMPGn1dBF9Wd3rux2h1R/xMLuUplK6j4YN/d lBSTASqXuJdakodKoX1FNtUmWK0U8pLQkH2EaMMWyktAhwzGO6nHkQNgSm38yzBLpWkq jPuyPbR1d90nOannpmfdOzh1oB7bCn9CopyMw= 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:in-reply-to :references; bh=UQ5Kz7RjGNvNwK+/Psx+BZ7PLQztCBTkKHHLQ4O23HQ=; b=SyRkJR+MB7QCWOn+D/d/SukWeOTGYVV/x53kZS7yW4rwN9ZnzHGJopNgc0zxwHSUzW /Nksk/39SP0lLu9UTibQgJn5pzgb1G0pFmqFUAC8aSEr9ShRZhrMCh6eTSw0nuSNKJc7 0Kl8LMWMFY/8umxPLEsGo98h13nGiFv30kEofTh4qirVWyCJwnH9IshjTk+6dV202vgf C4tPjH6sTZlhAcZ3URvL1mOrNRn1ojTOK5LX2eTVBMmntrPE76qdHKKPefloqadiFRE1 OQbk3lrsc77wK/hkaN3j1znZ8ftHYeE9icIsivasPIMmcdZ49xrmhhoJSgKId1WCFHr/ 01uQ== X-Gm-Message-State: AElRT7HgZexibIWyIQHSyL2kkUrjIncUY2ft0GEUHFmvRQdNpuHJSOGx Ijepy8KSREmjvgZfpv1tmqr6CQ== X-Google-Smtp-Source: AIpwx4/N5WzGb0N2WGTVFezQ5hAZzhfN0atPKZoxmBZ9qtbL8nuv/AI69wwtBNLZqcaPqKPHkVrzSA== X-Received: by 10.98.150.75 with SMTP id c72mr464276pfe.62.1522128684173; Mon, 26 Mar 2018 22:31:24 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id q62sm942491pfd.61.2018.03.26.22.31.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Mar 2018 22:31:23 -0700 (PDT) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v5 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Date: Tue, 27 Mar 2018 11:01:04 +0530 Message-Id: <20180327053104.3812-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180327053104.3812-1-jagan@amarulasolutions.com> References: <20180327053104.3812-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180327_013142_946057_AE66EE37 X-CRM114-Status: GOOD ( 15.02 ) 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 bananapi-m64 board, - USB-ID connected with PH9 - USB-DRVVBUS controlled by N_VBUSEN pin from PMIC Signed-off-by: Jagan Teki Reviewed-by: Chen-Yu Tsai --- Changes for v5: - Kept reg_drivevbus node in alphabetical order. - Collect Chen-Yu reviewed-by tag Changes for v4: - rebase on master - tested otg host mode. Changes for v3: - Move the position of reg_drivevbus as per binding documentation. Changes for v2: - add drvvbus regulator - add N_VBUSEN pin .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index 2250dec9974c..0716b1441187 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -86,6 +86,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -155,6 +159,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -167,6 +175,7 @@ reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ }; }; @@ -254,6 +263,11 @@ regulator-name = "vcc-wifi-io"; }; +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + ®_eldo1 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; @@ -294,6 +308,13 @@ status = "okay"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + &usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb0_vbus-supply = <®_drivevbus>; status = "okay"; };