From patchwork Fri Jan 12 06:30:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10159675 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 B81996029B for ; Fri, 12 Jan 2018 06:36:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5A6E287B1 for ; Fri, 12 Jan 2018 06:36:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A03428943; Fri, 12 Jan 2018 06:36:46 +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_SIGNED, DKIM_VALID,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 1A67C287B1 for ; Fri, 12 Jan 2018 06:36:45 +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=6aLXuzCGTqmhABkpdUNqBAt5shjXGuUwPXw/EQijOZ0=; b=sz+Tob22sJTXnwrwhxP9XE3k2j 9peUtJtcZWaxREJjPAX9KF+/xvrS/jXCvl+/h5cs9HAdvbFVhBFLMsWDh3nHYrFNbcjGuyZKxm74C DZOiLEzJyI4BnyjzMh71DWPfc4C54yQLnfNjc0OiN6SKuLXRAT/pPBGVjgTYG2k51xGP5yuaFUa6B lhMPM3CgVmspqnYrtpdinrtg+mwBQjSUh+MjzC+SBfHG8rZMDolKFCE+PBbJWCPqRYzgW7gRj8aot JvtffpfXBLSi+a1dVxhu7X6nxO6d2rYNXsTQhcIT9sBxT5bP7M+Euw7YlRLHZoF9lbNFxlmhrJH6/ pkPclFDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZsxH-0006Ji-CL; Fri, 12 Jan 2018 06:36:43 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZswu-0005YJ-H4 for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 06:36:24 +0000 Received: by mail-pf0-x243.google.com with SMTP id e11so3744454pff.6 for ; Thu, 11 Jan 2018 22:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JTz0/4buh8GX2owQh8vBxjNfBI+rFMkctvRgsdK63H4=; b=FtFPeDZcPSxv7Gjf8hnhWSfr7CJ7sp1VYqArLu3/CUMHLdBFncUm4IIlI027X/bSfn 5RYgGkBMajVDsrC3NldPBhvfJka5RaxiKbMlt27etF2RAjmxXWIj8f8Zd5FnbcHzToVW mGh0n8UqxbDfSAfp3E7F45fwCCpplAi17qKnCOj9cMTE/CBrL/PRr7pEpb12TH4djRt4 nXGd9i4/CqSKKsl69uxkJxiFeDewUQIl+oUKgQUQqR5kSl3AkCfWDNr/lc9Nv3pnN2Fl cT/X106Z39nCBHwnTE//k0R6hc87vYcPvUWhT37J6ZGQf4vgEUHbTmmGVQXQuUQ+uCn9 rRKg== 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=JTz0/4buh8GX2owQh8vBxjNfBI+rFMkctvRgsdK63H4=; b=nDmbBiRyZ5eViUi76+QL5LCtq98BgNvUOQVL8k++vX61nfOPNySagwdweTDz3U1zGH 9qZS+ihNZru+5e5n+YKHci6jwK4aHhuAT4AKThSTRekvYGOLIPyGsjc+/MEUu9cShpPP KEMim72E6K+8KlZuZPyhMpKAv0zJ1KnXluJWLjVNPFPbEHh1i/SwfOouyrsEXyD5JfBS WiDWXBe+N8SUi9so20LThNKjOh+sY5qH0lXum2qUzp4/lQKKRb1bY9SIx5mgbgIOil5E oEhpYcDr7XP3hSHDu96j9Oi09E1jq5DEJe9IFVkoH762zzadL4d5EnFnFqJ2jrJQ+Y5c KkXw== X-Gm-Message-State: AKGB3mLp0X5sMnAYiyDi/mTC9puBaqx4tGJKGQnwn/V49uvL8ekkITsr mCFodT1q/CcFs+W1Ck1W+RwCnQ== X-Google-Smtp-Source: ACJfBotVfSwsLb+NdDcxJex609nT4BLZbcr04u69d56wmoCky0LxUFvc5MWkAFnD14cWoXRTPJ/0eQ== X-Received: by 10.159.250.143 with SMTP id k15mr24662374pls.368.1515738969836; Thu, 11 Jan 2018 22:36:09 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id k10sm28139910pgq.89.2018.01.11.22.36.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 22:36:09 -0800 (PST) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v4 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Date: Fri, 12 Jan 2018 12:00:18 +0530 Message-Id: <1515738618-3617-3-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515738618-3617-1-git-send-email-jagan@amarulasolutions.com> References: <1515738618-3617-1-git-send-email-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180111_223620_919337_649CAF74 X-CRM114-Status: GOOD ( 10.06 ) 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 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 a697567..26e8534 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"; }; @@ -156,6 +160,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -168,6 +176,7 @@ reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ }; }; @@ -283,6 +292,11 @@ regulator-name = "vcc-rtc"; }; +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; @@ -295,6 +309,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"; };