armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Subsystems (3)
PATCH RESEND 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.
---
Change in v2:
None
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 RESEND 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", ^~~~~
---
Change in v2:
Add compile warning informaion in commit message.
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 RESEND 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.
---
Change in v2:
None
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
PATCH RESEND v2 1/3 armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
In reply to Ran WangQuoted 2 lines · Ran Wang
Without this propertiy, U-Boot will pop warning of 'USB phy type not defined' when select
CONFIG_HAS_FSL_DR_USB.
I take it the "propertiy" is the phy_type one , right ?
Anyway, applied all 3 .
Quoted 22 lines
Signed-off-by Ran Wang <[email protected]>---
Change in v2:
Nonearch/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 · 2 lines
Best regards, Marek Vasut
PATCH RESEND v2 1/3 armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Hi Marek,
Quoted 17 lines
-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Wednesday, December 20, 2017 5:02 PM
To: Ran Wang <[email protected]>; Albert Aribaud <[email protected]>; Prabhakar Kushwaha <[email protected]>; Alison Wang <[email protected]>; Sumit Garg <[email protected]>; York Sun <[email protected]>; Bin Meng <[email protected]>
Cc: Stefan Roese <[email protected]>; Nobuhiro Iwamatsu <[email protected]>; Philipp Tomsich <philipp.tomsich@theobroma- systems.com>; Konstantin Porotchkin <[email protected]>; Uri Mashiach <[email protected]>; Simon Glass <[email protected]>; Xiaobo Xie <[email protected]>; Jiafei Pan <[email protected]>; u- boot at lists.denx.de
Subject: Re: [PATCH RESEND v2 1/3] armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Quoted 6 lines
Quoted 2 lines · Ran Wang
Without this propertiy, U-Boot will pop warning of 'USB phy type not defined' when select
CONFIG_HAS_FSL_DR_USB.I take it the "propertiy" is the
phy_typeone , right ?
Yes, it's phy_type.
Quoted 2 lines
Anyway, applied all 3 .
Thank you.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Ran Wang <[email protected]>---
Change in v2:
Nonearch/arm/dts/fsl-ls1012a-qds.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 17 lines
Quoted 7 lines
arch/arm/dts/fsl-ls1012a-qds.dtsi +0
-0arch/arm/dts/fsl-ls1012a-qds.dtsi line 128
Quoted 8 lines
arch/arm/dts/fsl-ls1012a-qds.dtsi +5
-0@@ -121,3 +121,8 @@ &duart0 { status = "okay"; }; + +&usb0 { + status = "okay"; + phy_type = "ulpi"; +};
Best Regards,
Ran
PATCH RESEND v2 1/3 armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Quoted 18 lines · Ran Wang
Hi Marek,
Quoted 16 lines
-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Wednesday, December 20, 2017 5:02 PM
To: Ran Wang <[email protected]>; Albert Aribaud <[email protected]>; Prabhakar Kushwaha <[email protected]>; Alison Wang <[email protected]>; Sumit Garg <[email protected]>; York Sun <[email protected]>; Bin Meng <[email protected]>
Cc: Stefan Roese <[email protected]>; Nobuhiro Iwamatsu <[email protected]>; Philipp Tomsich <philipp.tomsich@theobroma- systems.com>; Konstantin Porotchkin <[email protected]>; Uri Mashiach <[email protected]>; Simon Glass <[email protected]>; Xiaobo Xie <[email protected]>; Jiafei Pan <[email protected]>; u- boot at lists.denx.de
Subject: Re: [PATCH RESEND v2 1/3] armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
^ drop this nonsense please
Quoted 8 lines
Quoted 6 lines · Ran Wang
Quoted 2 lines
Without this propertiy, U-Boot will pop warning of 'USB phy type not defined' when select
CONFIG_HAS_FSL_DR_USB.I take it the "propertiy" is the
phy_typeone , right ?Yes, it's
phy_type.
You should be more precise in the commit message. Also, cull the CC list next time.
Signature · 2 lines
Best regards, Marek Vasut
PATCH RESEND v2 1/3 armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
From: Marek Vasut [mailto:marex at denx.de]
Sent: Wednesday, December 20, 2017 6:05 PM
Quoted 26 lines · Ran Wang
Quoted 18 lines
Hi Marek,
Quoted 16 lines
-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Wednesday, December 20, 2017 5:02 PM
To: Ran Wang <[email protected]>; Albert Aribaud <[email protected]>; Prabhakar Kushwaha <[email protected]>; Alison Wang <[email protected]>; Sumit Garg <[email protected]>; York Sun <[email protected]>; Bin Meng <[email protected]>
Cc: Stefan Roese <[email protected]>; Nobuhiro Iwamatsu <[email protected]>; Philipp Tomsich <philipp.tomsich@theobroma- systems.com>; Konstantin Porotchkin <[email protected]>; Uri Mashiach <[email protected]>; Simon Glass <[email protected]>; Xiaobo Xie <[email protected]>; Jiafei Pan <[email protected]>; u- boot at lists.denx.de
Subject: Re: [PATCH RESEND v2 1/3] armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board^ drop this nonsense please
Quoted 4 lines
Quoted 4 lines · Ran Wang
Quoted 2 lines
Without this propertiy, U-Boot will pop warning of 'USB phy type not defined' when select
CONFIG_HAS_FSL_DR_USB.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I take it the "propertiy" is the
phy_typeone , right ?Yes, it's
phy_type.You should be more precise in the commit message. Also, cull the CC list next time.
Got it. Thanks for advice.
--
Best regards,
Ran