linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh@kernel.org>,
	linux-sunxi@googlegroups.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0
Date: Thu, 20 Jun 2019 02:01:27 +0100	[thread overview]
Message-ID: <20190620010127.12071-1-andre.przywara@arm.com> (raw)

In recent Allwinner SoCs the first USB host controller (HCI0) shares
the first PHY with the MUSB controller. Probably to make this sharing
work, we were avoiding to declare this in the DT. This has two
shortcomings:
- U-Boot (which uses the same .dts) cannot use this port without a PHY
  linked, so we were loosing one USB port there.
- It requires the MUSB driver to be enabled and loaded, although we
  don't actually use it.

For those (64-bit) boards which use an USB-A socket for HCI0/MUSB, add
a "phys" property pointing to the USB PHY 0.

This makes it work in U-Boot, also improves compatiblity when no MUSB
driver is loaded (for instance in distribution installers).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Hi,

I have the feeling this belongs into the .dtsi, but cant't tell for sure
how this interacts with the MUSB driver. If need be, we can always pull
this up later, I guess.

Thanks,
Andre

 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts           | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts  | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts       | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts          | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 409523cb0950..b23e827a6065 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -93,6 +93,7 @@
 };
 
 &ehci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
@@ -147,6 +148,7 @@
 };
 
 &ohci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index e6fb9683f213..b422bef19fff 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -105,6 +105,7 @@
 };
 
 &ehci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
@@ -151,6 +152,7 @@
 };
 
 &ohci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
index 9887948d5c86..5da9cdfb4f48 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
@@ -124,6 +124,7 @@
 };
 
 &ehci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
@@ -179,6 +180,7 @@
 };
 
 &ohci0 {
+	phys = <&usbphy 0>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 0dc33c90dd60..293f66c44032 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -58,6 +58,7 @@
 };
 
 &ehci0 {
+	phys = <&usb2phy 0>;
 	status = "okay";
 };
 
@@ -104,6 +105,7 @@
 };
 
 &ohci0 {
+	phys = <&usb2phy 0>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 9e464d40cbff..577f8133181e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -96,6 +96,7 @@
 };
 
 &ehci0 {
+	phys = <&usb2phy 0>;
 	status = "okay";
 };
 
@@ -120,6 +121,7 @@
 };
 
 &ohci0 {
+	phys = <&usb2phy 0>;
 	status = "okay";
 };
 
-- 
2.14.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-06-20  1:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  1:01 Andre Przywara [this message]
2019-06-24  8:25 ` [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0 Chen-Yu Tsai
2019-06-24 12:58   ` Andre Przywara
2019-06-24 13:03     ` Chen-Yu Tsai
2019-06-27  3:34       ` 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=20190620010127.12071-1-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh@kernel.org \
    --cc=wens@csie.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).