diff mbox series

[11/11] arm64: dts: meson-g12a-x96-max: Enable USB

Message ID 20190311095613.11371-12-narmstrong@baylibre.com (mailing list archive)
State Superseded
Headers show
Series arm64: dts: g12a: Add boards peripherals | expand

Commit Message

Neil Armstrong March 11, 2019, 9:56 a.m. UTC
Enable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Martin Blumenstingl March 15, 2019, 9:50 p.m. UTC | #1
Hi Neil,

On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
[...]
> +&dwc2 {
> +       status = "okay";
> +};
your patch description states that this enables the "USB host ports"
but dwc2 is only used for peripheral mode (meaning: dr_mode =
"peripheral" or dr_mode = "otg").
do we still need to enable dwc2 in a host-only configuration?


Regards
Martin
Neil Armstrong March 16, 2019, 2:46 p.m. UTC | #2
Le 15/03/2019 22:50, Martin Blumenstingl a écrit :
> Hi Neil,
> 
> On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +&dwc2 {
>> +       status = "okay";
>> +};
> your patch description states that this enables the "USB host ports"
> but dwc2 is only used for peripheral mode (meaning: dr_mode =
> "peripheral" or dr_mode = "otg").
> do we still need to enable dwc2 in a host-only configuration?

DWC2 is peripheral-only, but we can still manually switch one of the
ports and use it as peripheral with a Type-A to Type-A cable, thus
enabling dwc2.

If the OTG capable PHYs was behind an USB Hub or directly connected to
a device, we could disable dwc2, but for now this port is always tied
to a physical Type-A or micro-USB connector.

Maybe it would be sane to always enable dwc2, and disable it for specific
boards only.

Neil

> 
> 
> Regards
> Martin
>
Martin Blumenstingl March 16, 2019, 10:07 p.m. UTC | #3
Hi Neil,

On Sat, Mar 16, 2019 at 3:46 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
>
>
> Le 15/03/2019 22:50, Martin Blumenstingl a écrit :
> > Hi Neil,
> >
> > On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> > [...]
> >> +&dwc2 {
> >> +       status = "okay";
> >> +};
> > your patch description states that this enables the "USB host ports"
> > but dwc2 is only used for peripheral mode (meaning: dr_mode =
> > "peripheral" or dr_mode = "otg").
> > do we still need to enable dwc2 in a host-only configuration?
>
> DWC2 is peripheral-only, but we can still manually switch one of the
> ports and use it as peripheral with a Type-A to Type-A cable, thus
> enabling dwc2.
thank you for the explanation!

> If the OTG capable PHYs was behind an USB Hub or directly connected to
> a device, we could disable dwc2, but for now this port is always tied
> to a physical Type-A or micro-USB connector.
>
> Maybe it would be sane to always enable dwc2, and disable it for specific
> boards only.
In case the port is connected to an USB hub we can add a comment to
the .dts to explain why dwc2 is being disabled. that way we don't need
a comment in each board.dts that it's enabled to support forced mode
switching.
in other words: I like this idea!


Regards
Martin
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 61606601fb4f..625e240a9c09 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -105,3 +105,12 @@ 
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&dwc2 {
+	status = "okay";
+};