]> git.sur5r.net Git - u-boot/commitdiff
ARM: tegra: fix ULPI PHY on Ventana and Seaboard
authorStephen Warren <swarren@nvidia.com>
Thu, 15 Sep 2016 18:19:39 +0000 (12:19 -0600)
committerTom Warren <twarren@nvidia.com>
Tue, 27 Sep 2016 16:11:03 +0000 (09:11 -0700)
Commit ce02a71c2374 "tegra: dts: Sync tegra20 device tree files with
Linux" enabled the ULPI USB port on Ventana, but made no attempt to ensure
that U-Boot code could handle this. In practice, various code is missing,
and various configuration options are not enabled, which causes U-Boot to
hang when attempting to initialize this USB port. This patch enables ULPI
PHY support on Ventana, and adds the required pinmux setup for the port to
operate. Note that Ventana is so similar to Seaboard that this change is
made in the Seaboard board file, which is shared with Ventana.

Seaboard also has the ULPI USB port wired up in hardware, although to an
internal port that often doesn't have anything attached to it. However,
the DT nodes for the USB controller and PHY had different status property
values, so the port was not initialized by U-Boot. Fix this inconsistency,
and enable the ULPI port, just like in the Linux kernel DT. This likewise
requires enabling ULPI support in the Seaboard defconfig.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/dts/tegra20-seaboard.dts
board/nvidia/seaboard/seaboard.c
configs/seaboard_defconfig
configs/ventana_defconfig

index 77f5bb51b02765b0710622312727830b94e94eb6..341c7f35836a88e07ebe7ebe1ce65647403c41e7 100644 (file)
        };
 
        usb@c5004000 {
-               status = "disabled";
+               status = "okay";
                nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
                        GPIO_ACTIVE_LOW>;
        };
index fc9c1c9b34dc7bbfebd817a65679b1a44918ff18..4e01deb02fb0670fd99aa8fc7ffefc665173aec1 100644 (file)
@@ -44,6 +44,12 @@ void pin_mux_mmc(void)
 
 void pin_mux_usb(void)
 {
-       /* For USB's GPIO PD0. For now, since we have no pinmux in fdt */
+       /* For USB0's GPIO PD0. For now, since we have no pinmux in fdt */
        pinmux_tristate_disable(PMUX_PINGRP_SLXK);
+       /* For USB1's ULPI signals */
+       funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
+       pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
+       pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
+       /* USB1 PHY reset GPIO */
+       pinmux_tristate_disable(PMUX_PINGRP_UAC);
 }
index 12cc9b62e7fe9290ab14c561ea9a126d381e06ab..806caca1226a2d2ddb28111c5684181f061df17c 100644 (file)
@@ -35,6 +35,8 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
index 8288c860067becd3253ed51b73b29118261bcd0f..56e7ba367d60fddd97d73ea079bc22b21be92ee9 100644 (file)
@@ -34,6 +34,8 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y