From: Olliver Schinagl <oliver@schinagl.nl>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Olliver Schinagl <oliver+list@schinagl.nl>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
galak@codeaurora.org, Russell King <linux@arm.linux.org.uk>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Olliver Schinagl <o.schinagl@ultimaker.com>,
Olliver Schinagl <oliver@schinagl.nl>
Subject: [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
Date: Sun, 9 Aug 2015 20:22:58 +0200 [thread overview]
Message-ID: <1439144578-7890-2-git-send-email-oliver@schinagl.nl> (raw)
In-Reply-To: <1439144578-7890-1-git-send-email-oliver@schinagl.nl>
From: Olliver Schinagl <o.schinagl@ultimaker.com>
This patch enables the musb-otg USB controller on the Lime2. The Lime2
differs from the Lime1 series in pins used for usb0 power.
Tested on a OlinuXino Lime2-4GB.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 41 +++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index 22cd052..a7239fc 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -196,6 +196,10 @@
status = "okay";
};
+&otg_sram {
+ status = "okay";
+};
+
&pio {
ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
allwinner,pins = "PC3";
@@ -210,6 +214,27 @@
allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ usb0_id_detect_pin: usb0_id_detect_pin@0 {
+ allwinner,pins = "PH4";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
+
+ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+ allwinner,pins = "PH5";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+ };
+
+ usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
+ allwinner,pins = "PC17";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
®_ahci_5v {
@@ -218,6 +243,12 @@
status = "okay";
};
+®_usb0_vbus {
+ pinctrl-0 = <&usb0_vbus_pin_lime2>;
+ gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
®_usb1_vbus {
status = "okay";
};
@@ -232,7 +263,17 @@
status = "okay";
};
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
&usbphy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+ usb0_vbus-supply = <®_usb0_vbus>;
usb1_vbus-supply = <®_usb1_vbus>;
usb2_vbus-supply = <®_usb2_vbus>;
status = "okay";
--
2.1.4
next prev parent reply other threads:[~2015-08-09 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-09 18:22 [PATCH] ARM: dts: sunxi enable otg port on the sun7i-a20-olinuxino-lime2 Olliver Schinagl
2015-08-09 18:22 ` Olliver Schinagl [this message]
[not found] ` <1439144578-7890-2-git-send-email-oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
2015-08-16 16:22 ` [PATCH] ARM: dts: sunxi: " Maxime Ripard
-- strict thread matches above, loose matches on Subject: below --
2015-08-09 19:02 [PATCH] ARM: dts: sunxi: Use the axp209 driver on the olimex lime2 Olliver Schinagl
[not found] ` <1439146968-9039-1-git-send-email-oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
2015-08-09 19:02 ` [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2 Olliver Schinagl
2015-08-09 23:05 ` [linux-sunxi] " Iain Paton
[not found] ` <55C7DCA1.2090204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-10 8:43 ` Olliver Schinagl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439144578-7890-2-git-send-email-oliver@schinagl.nl \
--to=oliver@schinagl.nl \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=o.schinagl@ultimaker.com \
--cc=oliver+list@schinagl.nl \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).