summaryrefslogtreecommitdiff
path: root/board/dfi
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2017-07-18 14:10:49 +0200
committerBin Meng <bmeng.cn@gmail.com>2017-07-30 10:30:25 +0800
commit1f4e25780a827de9526b5f60b8a574b1e4f45b9c (patch)
treed9e2b20d602126a310c4a74f7bbe211e906fb0e1 /board/dfi
parentdb1d20a904f583b39e75ee47828aa9e644245460 (diff)
downloadu-boot-1f4e25780a827de9526b5f60b8a574b1e4f45b9c.tar.gz
u-boot-1f4e25780a827de9526b5f60b8a574b1e4f45b9c.tar.bz2
u-boot-1f4e25780a827de9526b5f60b8a574b1e4f45b9c.zip
x86: dfi-bt700: Add xHCI USB support
Change from EHCI to xHCI on the DFI BayTrail SoM. The xHCI USB hub is connected to an GPIO on the DFI BayTrail SoM. For correct operation, it needs to get reset upon power-up. Otherwise it may happen that the hub is not detected after a software reboot. This patch also configures this GPIO in the dts for correct operation. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'board/dfi')
-rw-r--r--board/dfi/dfi-bt700/Kconfig1
-rw-r--r--board/dfi/dfi-bt700/dfi-bt700.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/board/dfi/dfi-bt700/Kconfig b/board/dfi/dfi-bt700/Kconfig
index 3f0acb39f7..fca8b53d02 100644
--- a/board/dfi/dfi-bt700/Kconfig
+++ b/board/dfi/dfi-bt700/Kconfig
@@ -21,6 +21,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select X86_RESET_VECTOR if !EFI_STUB
select INTEL_BAYTRAIL
select BOARD_ROMSIZE_KB_8192
+ select BOARD_LATE_INIT
config PCIE_ECAM_BASE
default 0xe0000000
diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c
index 8645bdc795..3dd2036d11 100644
--- a/board/dfi/dfi-bt700/dfi-bt700.c
+++ b/board/dfi/dfi-bt700/dfi-bt700.c
@@ -28,3 +28,30 @@ int board_early_init_f(void)
return 0;
}
+
+int board_late_init(void)
+{
+ struct gpio_desc desc;
+ int ret;
+
+ ret = dm_gpio_lookup_name("F10", &desc);
+ if (ret)
+ debug("gpio ret=%d\n", ret);
+ ret = dm_gpio_request(&desc, "xhci_hub_reset");
+ if (ret)
+ debug("gpio_request ret=%d\n", ret);
+ ret = dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT);
+ if (ret)
+ debug("gpio dir ret=%d\n", ret);
+
+ /* Pull xHCI hub reset to low (active low) */
+ dm_gpio_set_value(&desc, 0);
+
+ /* Wait at least 5 ms, so lets choose 10 to be safe */
+ mdelay(10);
+
+ /* Pull xHCI hub reset to high (active low) */
+ dm_gpio_set_value(&desc, 1);
+
+ return 0;
+}