All of lore.kernel.org
 help / color / mirror / Atom feed
From: andre.przywara@arm.com (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 15/19] arm64: dts: allwinner: a64: Olinuxino: enable USB
Date: Mon, 30 Jul 2018 13:31:33 +0100	[thread overview]
Message-ID: <20180730123137.923-16-andre.przywara@arm.com> (raw)
In-Reply-To: <20180730123137.923-1-andre.przywara@arm.com>

The Olinuxino has two USB sockets:
USB0 is connected to a micro B socket. As it has the ID pin wired and
the VBUS line connected to the PMIC, we describe it as a proper OTG socket,
which switches between host and device automatically.
USB1 is connected to a normal USB A socket. PG9 enables the power line,
so add the required regulator as well.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 26075b9a76e3..a1c2f06ed474 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -59,12 +59,31 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	reg_usb1_vbus: usb1-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb1-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		enable-active-high;
+		gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
+		status = "okay";
+	};
+
 	wifi_pwrseq: wifi_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
@@ -109,6 +128,14 @@
 	};
 };
 
+&ohci0 {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
 &r_rsb {
 	status = "okay";
 
@@ -117,6 +144,7 @@
 		reg = <0x3a3>;
 		interrupt-parent = <&r_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		x-powers,drive-vbus-en;	/* set N_VBUSEN as output pin */
 	};
 };
 
@@ -201,6 +229,11 @@
 	regulator-name = "vcc-wifi-io";
 };
 
+&reg_drivevbus {
+	regulator-name = "usb0-vbus";
+	status = "okay";
+};
+
 &reg_eldo1 {
 	regulator-min-microvolt = <1800000>;
 	regulator-max-microvolt = <1800000>;
@@ -244,3 +277,15 @@
 	pinctrl-0 = <&uart0_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+	usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+	usb0_vbus-supply = <&reg_drivevbus>;
+	usb1_vbus-supply = <&reg_usb1_vbus>;
+};
-- 
2.14.4

  parent reply	other threads:[~2018-07-30 12:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 12:31 [PATCH v3 00/19] arm64: dts: allwinner: A64 boards DT updates Andre Przywara
2018-07-30 12:31 ` [PATCH v3 01/19] arm64: dts: allwinner: a64: Add L2 cache nodes Andre Przywara
2018-07-30 12:31 ` [PATCH v3 02/19] arm64: dts: allwinner: a64: Add Pine64-LTS device tree file Andre Przywara
2018-07-30 12:31 ` [PATCH v3 03/19] arm64: dts: allwinner: a64: Orange Pi Win: Fix SD card node Andre Przywara
2018-07-30 12:31 ` [PATCH v3 04/19] arm64: dts: allwinner: a64: Orange Pi Win: Enable USB hub regulator Andre Przywara
2018-07-30 12:31 ` [PATCH v3 05/19] arm64: dts: allwinner: a64: Orange Pi Win: Enable USB OTG socket Andre Przywara
2018-08-07  5:04   ` Chen-Yu Tsai
2018-08-07  5:45     ` Chen-Yu Tsai
2018-07-30 12:31 ` [PATCH v3 06/19] arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node Andre Przywara
2018-07-30 12:31 ` [PATCH v3 07/19] arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs Andre Przywara
2018-08-07  5:08   ` Chen-Yu Tsai
2018-08-07  5:09     ` Chen-Yu Tsai
2018-07-30 12:31 ` [PATCH v3 08/19] arm64: dts: allwinner: a64: Orange Pi Win: Add serdev BT node Andre Przywara
2018-07-31 12:22   ` Maxime Ripard
2018-07-30 12:31 ` [PATCH v3 09/19] arm64: dts: allwinner: a64: Orange Pi Win: Add LED node Andre Przywara
2018-07-30 12:31 ` [PATCH v3 10/19] arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node Andre Przywara
2018-07-30 12:31 ` [PATCH v3 11/19] arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node Andre Przywara
2018-07-30 12:31 ` [PATCH v3 12/19] arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails Andre Przywara
2018-07-30 12:31 ` [PATCH v3 13/19] arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage Andre Przywara
2018-07-30 12:31 ` [PATCH v3 14/19] arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes Andre Przywara
2018-07-30 12:31 ` Andre Przywara [this message]
2018-07-30 12:31 ` [PATCH v3 16/19] arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage Andre Przywara
2018-07-30 12:31 ` [PATCH v3 17/19] arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet Andre Przywara
2018-07-30 12:31 ` [PATCH v3 18/19] arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip Andre Przywara
2018-08-07  5:53   ` Chen-Yu Tsai
2018-07-30 12:31 ` [PATCH v3 19/19] arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED Andre Przywara
2018-07-31 12:30 ` [PATCH v3 00/19] arm64: dts: allwinner: A64 boards DT updates Maxime Ripard
2018-08-07  5:55   ` Chen-Yu Tsai

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=20180730123137.923-16-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.