]> git.sur5r.net Git - u-boot/commitdiff
ARM: rmobile: salvator-x: Add USB support
authorMarek Vasut <marek.vasut@gmail.com>
Sat, 13 May 2017 13:57:49 +0000 (15:57 +0200)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Sun, 21 May 2017 19:38:27 +0000 (04:38 +0900)
Add support for the EHCI USB.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
board/renesas/salvator-x/salvator-x.c
configs/salvator-x_defconfig
include/configs/salvator-x.h

index acc541df0cfc6703cba10052e69361459ac62870..44e4006f5c08656c3ba2ec0b64ec77f3d19f65c8 100644 (file)
@@ -107,6 +107,9 @@ int board_init(void)
 
        mstp_clrbits_le32(MSTPSR1, SMSTPCR1, GSX_MSTP112);
 
+       /* USB1 pull-up */
+       setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
+
 #ifdef CONFIG_RAVB
        /* EtherAVB Enable */
        /* GPSR2 */
@@ -131,6 +134,15 @@ int board_init(void)
        /* IPSR3 */
        gpio_request(GPIO_FN_AVB_AVTP_CAPTURE_B, NULL);
 
+       /* USB2_OVC */
+       gpio_request(GPIO_GP_6_15, NULL);
+       gpio_direction_input(GPIO_GP_6_15);
+
+       /* USB2_PWEN */
+       gpio_request(GPIO_GP_6_14, NULL);
+       gpio_direction_output(GPIO_GP_6_14, 1);
+       gpio_set_value(GPIO_GP_6_14, 1);
+
        /* AVB_PHY_RST */
        gpio_request(GPIO_GP_2_10, NULL);
        gpio_direction_output(GPIO_GP_2_10, 0);
index 3738fe453657791afa48d17459317eb0b65f63d6..60e0b720bba6d0020a165a0ff82e7ae7cae0f284 100644 (file)
@@ -17,6 +17,12 @@ CONFIG_CMD_NFS=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_USB=y
+CONFIG_USB=y
+CONFIG_USB_HOST=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_EHCI_RCAR_GEN3=y
 CONFIG_DOS_PARTITION=y
 CONFIG_MMC=y
 CONFIG_GENERIC_MMC=y
index 0e5c130b13a47f6bbb4829d596d4276ccb856935..4ac9328e1b91d749d2dcf8f295759fe3c904d681 100644 (file)
 
 #define CONFIG_SYS_I2C_POWERIC_ADDR    0x30
 
+/* USB */
+#ifdef CONFIG_R8A7795
+#define CONFIG_USB_MAX_CONTROLLER_COUNT        3
+#else
+#define CONFIG_USB_MAX_CONTROLLER_COUNT        2
+#endif
+
 /* SDHI */
 #define CONFIG_SH_SDHI_FREQ            200000000