arm64: dts: ls1028a: default to OTG mode for USB
authorMichael Walle <michael@walle.cc>
Wed, 30 Mar 2022 11:34:42 +0000 (13:34 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 11 Apr 2022 01:39:13 +0000 (09:39 +0800)
At the moment, the dtsi will force the dr_mode to host. This is
problematic because it will always turn on the Vbus voltage regardless
if the port is host or device. This might lead to a "shortcut" between
the two USB endpoints because both might have their Vbus supplies
enabled. Therefore, the default should be "otg" for any ports which
aren't host only (from a SoC point of view) and have a user of the dtsi
file overwrite that explicitly.

Move the 'dr_mode = "host";' into the board dts. Now that the dtsi
doesn't set the dr_mode anymore, we can also drop the 'dr_mode = "otg";'
in the board dts because that is the default value if dr_mode is not
set.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi

index 19d3952..5baf060 100644 (file)
 };
 
 &usb0 {
+       dr_mode = "host";
        status = "okay";
 };
 
 &usb1 {
+       dr_mode = "host";
        status = "okay";
 };
index 68c31cb..e0cd151 100644 (file)
 };
 
 &usb0 {
+       dr_mode = "host";
        status = "okay";
 };
 
 &usb1 {
-       dr_mode = "otg";
        status = "okay";
 };
index 088271d..92465f7 100644 (file)
                        compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
                        reg = <0x0 0x3100000 0x0 0x10000>;
                        interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
-                       dr_mode = "host";
                        snps,dis_rxdet_inp3_quirk;
                        snps,quirk-frame-length-adjustment = <0x20>;
                        snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
                        compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
                        reg = <0x0 0x3110000 0x0 0x10000>;
                        interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
-                       dr_mode = "host";
                        snps,dis_rxdet_inp3_quirk;
                        snps,quirk-frame-length-adjustment = <0x20>;
                        snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;