From patchwork Fri Jan 12 06:57:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10159693 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 87E84602A7 for ; Fri, 12 Jan 2018 07:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 750A628943 for ; Fri, 12 Jan 2018 07:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68F5228956; Fri, 12 Jan 2018 07:03:03 +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 E599328943 for ; Fri, 12 Jan 2018 07:03:02 +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=wT0lnaOMy9MSrCmvzEiEnMjMkg2f4CFDUIdv0KTWBDw=; b=K8u YAdRQMHk3668+NB5v+tZq3KA9Ov8zKRAUPOMEInIp4R+HMYokPoA8FtY6XMLrfiilUzk/o4euaCJN PmDq2aXLmQskhPNK5A7AjkRJ5BEbNfYEaZ50RD/J6g/cpn8pyCW62TIE7YOq9tYmqse6SdCUr7BmP KbxWZb/1LtYufG5v/QMFaNbODhJTOYw2JmQQbXOEW7aByTjLDc+1bACqPqvEIWpclVZ+VRNR5zj4v QE3OVR5x5iB3JGnQ76KrMIkCMd0sS565s3VCiRtvZOXRQN0sVP7I6uWeKoh02/dR83dT+Fcage+H+ PAiLelt5jd5yXOapzNgtB+3I7Mb1A9A==; 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 1eZtMi-0005EV-MU; Fri, 12 Jan 2018 07:03:00 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZtMf-0005Cq-3O for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 07:02:58 +0000 Received: by mail-pg0-x243.google.com with SMTP id j2so4040577pgv.3 for ; Thu, 11 Jan 2018 23:02:46 -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; bh=URNONYWNcQi0a9/PrONlKtA3ftlx0UuE69YEkDTeIzM=; b=UWPEhJ+ZUMediYgqpXcp7K5y+OLGNcdbNFfRsqn+jNaBhCdU6jsZAzwnnZSssnTSrQ QyP8yMNgXwEphQ2KRJeAk+aXIHzA7xz69GdpNHWUY54n6jlLSr2dNTfFLJxw/+OZ0znU r/87DPp/4pGho2G95woBYZd/nhkBYNr9IcYwo7Y5bmglR6jC2b1Ctvxk1Lmyg2GEIdjF HDOH3k2ipNNxj5EEKd5xy2PiCYIUWVwaDe6oAxpueaeHjmDMvqaySItIVosZQz8MB+nS 1ef287z2b6ctaE1kwcKUKq8/SU2FxIt2arKwLHXOuEewXvQ81ll59idkabSMb6d8k7tM yUNw== 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=URNONYWNcQi0a9/PrONlKtA3ftlx0UuE69YEkDTeIzM=; b=Fi0uvnfbof/xzDxurYdBX6XH8QXKt1ROPQfStVt6gmMVdq5SVz4bm/dYkswLGhZEfr cbyAtkaGeTODRfDeoXtcsBQYFoe8qpZPBYZbdGuyWPq6t56By9BWzHnK02eHdv5S0nfe 0Uj9VNyqKOVUhTWb7/cCC00DGVd1vs8WkDMds3vzEMcrFFIpDcokX1R96KxWI6MNYG8T nnQnq6if9/4uk/DVDfBCoetU8jSi9SC4cwGQ9d0SQGaDK5/wgRmui715BbPaGbCp1Qao i9mxjjNrQi/vTJKuJ6XOl6ROy6WZ2bulvPZacxA6iB5EyXPgLc8yHvUIuIhIFhgJprnm bk7w== X-Gm-Message-State: AKGB3mK0al7AyWEUoIXtiAvCUaOTXpu/LVLVkKJnxNgtng1uoFk5a3Cw FuRd3/oe9lJpbYPng9nJU0u7zg== X-Google-Smtp-Source: ACJfBov2VD7tMvNgwXogUi5Mm9NsRjSgg7LrKjnnfRBl7dsyugY3ayqwAtl3e81AAKNEw5knW/hO3g== X-Received: by 10.84.129.72 with SMTP id 66mr25773089plb.128.1515740565370; Thu, 11 Jan 2018 23:02:45 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id a15sm11892386pfl.98.2018.01.11.23.02.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 23:02:44 -0800 (PST) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v2] arm64: allwinner: a64: a64-olinuxino: add usb otg Date: Fri, 12 Jan 2018 12:27:10 +0530 Message-Id: <1515740230-8006-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-20180111_230257_154345_91D18A0D X-CRM114-Status: GOOD ( 10.13 ) 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 a64-olinuxino board, - USB0-ID connected with PH9 - USB0-VBUSDET connected with PH6 - USB-DRVVBUS controlled by N_VBUSEN pin from PMIC Signed-off-by: Jagan Teki --- Changes for v2: - rebase on master - tested otg host mode. .../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts index 8807664..078ee94 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts @@ -64,6 +64,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; @@ -93,6 +97,10 @@ }; }; +&ohci0 { + status = "okay"; +}; + &r_rsb { status = "okay"; @@ -101,6 +109,7 @@ reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ }; }; @@ -215,8 +224,25 @@ regulator-name = "vcc-rtc"; }; +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb0_vbus_det-gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ + usb0_vbus-supply = <®_drivevbus>; + status = "okay"; +};