armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Subsystems (3)
PATCH v2 1/3 armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Without this propertiy, U-Boot will pop warning of 'USB phy type not defined' when select CONFIG_HAS_FSL_DR_USB.
--- arch/arm/dts/fsl-ls1012a-qds.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/dts/fsl-ls1012a-qds.dtsi +5 -0
@@ -121,3 +121,8 @@ &duart0 { status = "okay"; }; + +&usb0 { + status = "okay"; + phy_type = "ulpi"; +};
Signature · 1 line
2.7.4
PATCH v2 2/3 usb: ehci: fsl: Fix some compile warnings.
When enable CONFIG_HAS_FSL_DR_USB, we might encounter below compile warning, apply this patch can fix it:
drivers/usb/host/ehci-fsl.c:109:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
((u32)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
^
drivers/usb/host/ehci-fsl.c:108:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hcor = (struct ehci_hcor *)
^
drivers/usb/host/ehci-fsl.c:115:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u32)hccr, (u32)hcor,
^
include/log.h:131:26: note: in definition of macro 'debug_cond'
printf(pr_fmt(fmt), ##args); \
^~~~drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug'
debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n",
^~~~~drivers/usb/host/ehci-fsl.c:115:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u32)hccr, (u32)hcor,
^
include/log.h:131:26: note: in definition of macro 'debug_cond'
printf(pr_fmt(fmt), ##args); \
^~~~drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug'
debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n", ^~~~~
--- drivers/usb/host/ehci-fsl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/ehci-fsl.c +4 -4
@@ -106,14 +106,14 @@ static int ehci_fsl_probe(struct udevice *dev) ehci = (struct usb_ehci *)priv->hcd_base; hccr = (struct ehci_hccr *)(&ehci->caplength); hcor = (struct ehci_hcor *) - ((u32 )hccr +HC_LENGTH (ehci_readl (&hccr->cr_capbase))); + ((void *)hccr +HC_LENGTH (ehci_readl (&hccr->cr_capbase)));if (ehci_fsl_init (priv, ehci, hccr, hcor) <0 )return -ENXIO ; -debug ("ehci-fsl: init hccr %x and hcor %x hc_length %d\n" , - (u32 )hccr, (u32 )hcor, - (u32 )HC_LENGTH (ehci_readl (&hccr->cr_capbase))); +debug ("ehci-fsl: init hccr %p and hcor %p hc_length %d\n" , + (void *)hccr, (void *)hcor, +HC_LENGTH (ehci_readl (&hccr->cr_capbase)));return ehci_register (dev, hccr, hcor, &fsl_ehci_ops,0 ,USB_INIT_HOST ); }
Signature · 1 line
2.7.4
PATCH v2 3/3 arm64: layerscape: Move CONFIG_HAS_FSL_DR_USB to Kconfig
In reply to Ran WangRename to USB_EHCI_FSL, use Kconfig to select ehci accordingly.
--- drivers/usb/host/Kconfig | 6 ++++++ include/configs/ls1012aqds.h | 11 ----------- include/configs/ls1021aqds.h | 11 ----------- include/configs/ls1021atwr.h | 20 -------------------- 4 files changed, 6 insertions(+), 42 deletions(-)
drivers/usb/host/Kconfig +6 -0
@@ -186,6 +186,12 @@ config USB_EHCI_GENERIC ---help--- Enables support for generic EHCI controller. +config USB_EHCI_FSL + bool "Support for FSL on-chip EHCI USB controller" + default n + select CONFIG_EHCI_HCD_INIT_AFTER_RESET + ---help--- + Enables support for the on-chip EHCI controller on FSL chips. endif # USB_EHCI_HCD config USB_OHCI_HCD
include/configs/ls1012aqds.h +0 -11
@@ -107,17 +107,6 @@#define CONFIG_SF_DEFAULT_BUS 1#define CONFIG_SF_DEFAULT_CS 0 -/* -* USB -*/ -/* EHCI Support - disbaled by default */ -/*#define CONFIG_HAS_FSL_DR_USB*/ - -#ifdef CONFIG_HAS_FSL_DR_USB -#define CONFIG_USB_EHCI_FSL -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif -/* MMC */ #ifdef CONFIG_MMC #define CONFIG_FSL_ESDHC
include/configs/ls1021aqds.h +0 -11
@@ -394,17 +394,6 @@ unsigned long get_board_ddr_clk(void);#endif /* -* USB -*/ -/* EHCI Support - disbaled by default */ -/*#define CONFIG_HAS_FSL_DR_USB*/ - -#ifdef CONFIG_HAS_FSL_DR_USB -#define CONFIG_USB_EHCI_FSL -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif - -/* * Video */ #ifdef CONFIG_VIDEO_FSL_DCU_FB
include/configs/ls1021atwr.h +0 -20
@@ -24,26 +24,6 @@#define CONFIG_SYS_INIT_RAM_ADDR OCRAM_BASE_ADDR#define CONFIG_SYS_INIT_RAM_SIZE OCRAM_SIZE -/* -* USB -*/ - -/* -* EHCI Support - disbaled by default as -* there is no signal coming out of soc on -* this board for this controller. However, -* the silicon still has this controller, -* and anyone can use this controller by -* taking signals out on their board. -*/ - -/*#define CONFIG_HAS_FSL_DR_USB*/ - -#ifdef CONFIG_HAS_FSL_DR_USB -#define CONFIG_USB_EHCI_FSL -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif -#define CONFIG_SYS_CLK_FREQ 100000000#define CONFIG_DDR_CLK_FREQ 100000000
Signature · 1 line
2.7.4