From patchwork Mon Apr 23 06:32:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10356219 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 70CA46019D for ; Mon, 23 Apr 2018 06:34:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F9EB281F9 for ; Mon, 23 Apr 2018 06:34:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 515B1289B5; Mon, 23 Apr 2018 06:34:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI 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 95263281F9 for ; Mon, 23 Apr 2018 06:34:47 +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=qEpsvJJjHBL4uNYY5v1D9hrKEahFgUKACJKQjbkWXKY=; b=j/nkg3wyOawQAU9nVvOQIEY9rz 0UQMiaBpVHsvFz/MFLLpu95CauZo8PZH0W9cNPssR60H9fsi+uiF0+BVs0SX42YTK7/eOBRlwXsMo N2j18wfyamHC5rNe0rmRa824JlkVoPm5/fA9Kf1QvQdbdIIhRY3+ARJqBm1djOdQ2WjTz74xU782v LyQAiNshjtsipBP5CAuPmR/FvSrBiYzAnfupRJIKRRX6BQc489U/CBpgzNRDVtwJQ3sgwQ0u+x18m chDGuyFznU+iN2ToE77wj5QkGslTg0j0F/1ZpPMQFCNq2vOa+CmMV3Sfy8UIvXCK8ifuEUXolwGSh nChjkbeg==; 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 1fAV3e-0001ON-IJ; Mon, 23 Apr 2018 06:34:38 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAV2O-0000XN-28 for linux-arm-kernel@lists.infradead.org; Mon, 23 Apr 2018 06:33:21 +0000 Received: by mail-pf0-x244.google.com with SMTP id a2so8413651pff.8 for ; Sun, 22 Apr 2018 23:33:09 -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=nqBUW6XDp6JVjXWRgV2LRiqWsUVR2Nom9HPgKqou96o=; b=e5nSte+J0/ks6IBkqUmBoTyzOo8TkFx0MrdikzTfrn70M9G81LwJApteWttldTYO/K lcOt7sBkG/wx1uzHgMAsAcEeaGLr5PEUdEtD3S1W86fiU0kLraasZ/DOd4qDCfBYZV7/ yrBkEggovLTyogRGprFXXF1YaWzUpxLSRNXwM= 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=nqBUW6XDp6JVjXWRgV2LRiqWsUVR2Nom9HPgKqou96o=; b=AyOwOIU3zjHz+iMdq7REm/fv19AtcnfshXWQm7/z2NUtxxnYNSSnGNuYTMABva/jEr txne1bTfbEy99qjxuJlo4NR19XSjTow0ddBLKgoP1ycntIKXpPAZAAb19iamNJUqnGkB RQ1GRP3r67v+yfTTIzcy5+n93afjjbG+22cvw4VxY3k5qeMqASVX6HOW4Zr+DsooIpxu P1X5xFOS1r8M8RuuFZlZPcNJNA3ykCBXPKnxipMcoKu+FP2jjF+IQro+4IoALxMafUrs otlpfzNYqUYZfrcaS4JRBZuzQ+MFMXkA/WK6fvDY7D/2XZeAJFKKDBId9R+bbgB/uPaJ 9x8w== X-Gm-Message-State: ALQs6tDgdNgH4LfCnYfTTfKuMXhr3wCvvnrPX40gCg+Seh5cJEfP5MRR 2BBaFvVp1ehkrNVSNkhvP8Sw/Q== X-Google-Smtp-Source: AIpwx4+Ba8zEO2T9Ts6jM4qka/vdQnFUZ/+oeQG/hy5plqD2u3VIo+m+aAZi1SsaIAyRuHg56mRSWA== X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr20109571pll.319.1524465189223; Sun, 22 Apr 2018 23:33:09 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id t9sm23988196pgr.37.2018.04.22.23.33.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Apr 2018 23:33:08 -0700 (PDT) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v6 3/3] arm64: allwinner: a64: bananapi-m64: add usb otg Date: Mon, 23 Apr 2018 12:02:39 +0530 Message-Id: <20180423063239.3988-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180423063239.3988-1-jagan@amarulasolutions.com> References: <20180423063239.3988-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180422_233320_161912_FD218CD1 X-CRM114-Status: GOOD ( 12.63 ) 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 , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , Chen-Yu Tsai , Mark Brown , 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 v6: - Rebase on master 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"; };