diff options
author | Sriram Dash <sriram.dash@nxp.com> | 2016-10-03 16:24:46 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2016-10-06 09:59:02 -0700 |
commit | c93db4f763bc3ba7885c7431a4f3f946a5f5eecd (patch) | |
tree | b513e35e5a43cc70cb204ca952a5899d7a86ec14 | |
parent | e1e3fc143dfedfd72a6bc1f5f34150d60530521c (diff) | |
download | u-boot-imx-c93db4f763bc3ba7885c7431a4f3f946a5f5eecd.zip u-boot-imx-c93db4f763bc3ba7885c7431a4f3f946a5f5eecd.tar.gz u-boot-imx-c93db4f763bc3ba7885c7431a4f3f946a5f5eecd.tar.bz2 |
armv8: fsl: Enable USB only when SYSCLK is 100 MHz
SYSCLK is used as a reference clock for USB. When the USB controller
is used, SYSCLK must meet the additional requirement of 100 MHz.
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index 40d6a76..1a8321b 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -108,6 +108,24 @@ remove_psci_node: } #endif +void fsl_fdt_disable_usb(void *blob) +{ + int off; + /* + * SYSCLK is used as a reference clock for USB. When the USB + * controller is used, SYSCLK must meet the additional requirement + * of 100 MHz. + */ + if (CONFIG_SYS_CLK_FREQ != 100000000) { + off = fdt_node_offset_by_compatible(blob, -1, "snps,dwc3"); + while (off != -FDT_ERR_NOTFOUND) { + fdt_status_disabled(blob, off); + off = fdt_node_offset_by_compatible(blob, off, + "snps,dwc3"); + } + } +} + void ft_cpu_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FSL_LSCH2 @@ -150,4 +168,6 @@ void ft_cpu_setup(void *blob, bd_t *bd) #ifdef CONFIG_SYS_DPAA_FMAN fdt_fixup_fman_firmware(blob); #endif + fsl_fdt_disable_usb(blob); + } |