armv7: Add workaround for USB erratum A-009008
Subsystems (4)
PATCH 1/14 armv7: Add workaround for USB erratum A-009008
From: Suresh Gupta <[email protected]>
USB High Speed (HS) EYE Height Adjustment
This patch is adding the erratum for LS1021.
--- arch/arm/cpu/armv7/ls102xa/Kconfig | 2 ++ arch/arm/cpu/armv7/ls102xa/soc.c | 12 ++++++++++++ arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 4 ++++ 3 files changed, 18 insertions(+)
arch/arm/cpu/armv7/ls102xa/Kconfig +2 -0
@@ -14,6 +14,8 @@ config ARCH_LS1021A select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_5 select SYS_FSL_SEC_LE + select SYS_FSL_ERRATUM_A009008 + select SYS_FSL_ERRATUM_A009942 menu "LS102xA architecture" depends on ARCH_LS1021A
arch/arm/cpu/armv7/ls102xa/soc.c +12 -0
@@ -60,6 +60,16 @@ unsigned int get_soc_major_rev(void)return major; } +static void erratum_a009008 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A009008 +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =in_be32 (scfg +SCFG_USB3PRM1CR /4 ); + val &= ~(0xF <<6 ); +out_be32 (scfg +SCFG_USB3PRM1CR /4 , val|(USB_TXVREFTUNE <<6 )); +#endif /* CONFIG_SYS_FSL_ERRATUM_A009008 */ +} +void s_init (void ) { }
@@ -146,6 +156,8 @@ int arch_soc_init(void)*/ out_be32 (&scfg->eddrtqcfg,0x63b20042 ); +/* Erratum */ +erratum_a009008 ();return 0 ; }
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +4 -0
@@ -172,6 +172,10 @@ struct ccsr_gur {#define SCFG_PMCINTECR_ETSECERRG0 0x00080000#define SCFG_PMCINTECR_ETSECERRG1 0x00040000#define SCFG_CLUSTERPMCR_WFIL2EN 0x80000000 +#define SCFG_BASE 0x01570000 +#define SCFG_USB3PRM1CR 0x070 +#define USB_TXVREFTUNE 0x9 +/* Supplemental Configuration Unit */ struct ccsr_scfg {
Signature · 1 line
2.1.0.27.g96db324
PATCH 1/1 uboot: Kconfig: add ERRATUM config to Kconfig for solve compile issue.
add erratum config to Kconfig and instead of config.h's config for solve ls2080rdb compiling issue
--- arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h | 1 + 1 file changed, 1 insertion(+)
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +1 -0
@@ -130,6 +130,7 @@#define DCFG_RCWSR15_IFCGRPABASE_QSPI 0x3#define DCFG_DCSR_BASE 0X700100000ULL +#define DCSR_BASE 0x700000000ULL#define DCSR_USB_PHY1 0x4600000#define DCSR_USB_PHY2 0x4610000#define DCSR_USB_PHY_RX_OVRD_IN_HI 0x1006
Signature · 1 line
2.1.0.27.g96db324
PATCH 2/14 armv7: Add workaround for USB erratum A-009798
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB High Speed Squelch Threshold Adjustment
This patch is adding the erratum for LS1021.
--- arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv7/ls102xa/soc.c | 10 ++++++++++ arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 1 + 3 files changed, 12 insertions(+)
arch/arm/cpu/armv7/ls102xa/Kconfig +1 -0
@@ -16,6 +16,7 @@ config ARCH_LS1021A select SYS_FSL_SEC_LE select SYS_FSL_ERRATUM_A009008 select SYS_FSL_ERRATUM_A009942 + select SYS_FSL_ERRATUM_A009798 menu "LS102xA architecture" depends on ARCH_LS1021A
arch/arm/cpu/armv7/ls102xa/soc.c +10 -0
@@ -70,6 +70,15 @@ static void erratum_a009008(void)#endif /* CONFIG_SYS_FSL_ERRATUM_A009008 */ } +static void erratum_a009798 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A009798 +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =in_be32 (scfg +SCFG_USB3PRM1CR /4 ); +out_be32 (scfg +SCFG_USB3PRM1CR /4 , val &USB_SQRXTUNE ); +#endif /* CONFIG_SYS_FSL_ERRATUM_A009798 */ +} +void s_init (void ) { }
@@ -158,6 +167,7 @@ int arch_soc_init(void)/* Erratum */ erratum_a009008 (); +erratum_a009798 ();return 0 ; }
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +1 -0
@@ -175,6 +175,7 @@ struct ccsr_gur {#define SCFG_BASE 0x01570000#define SCFG_USB3PRM1CR 0x070#define USB_TXVREFTUNE 0x9 +#define USB_SQRXTUNE 0xFC7FFFFF/* Supplemental Configuration Unit */
Signature · 1 line
2.1.0.27.g96db324
PATCH 2/14 armv7: Add workaround for USB erratum A-009798
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB High Speed Squelch Threshold Adjustment
This patch is adding the erratum for LS1021.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/d47cf6f3/attachment.sig>
PATCH 3/14 armv7: Add workaround for USB erratum A-008997
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB3 LFPS Peak-Peak Differential Output Voltage Adjustment This patch is adding the erratum for LS1021.
--- arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv7/ls102xa/soc.c | 16 ++++++++++++++++ arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 9 +++++++++ 3 files changed, 26 insertions(+)
arch/arm/cpu/armv7/ls102xa/Kconfig +1 -0
@@ -17,6 +17,7 @@ config ARCH_LS1021A select SYS_FSL_ERRATUM_A009008 select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A009798 + select SYS_FSL_ERRATUM_A008997 menu "LS102xA architecture" depends on ARCH_LS1021A
arch/arm/cpu/armv7/ls102xa/soc.c +16 -0
@@ -79,6 +79,21 @@ static void erratum_a009798(void)#endif /* CONFIG_SYS_FSL_ERRATUM_A009798 */ } +static void erratum_a008997 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A008997 +u32 __iomem *usb_phy = (u32 __iomem *)USB_PHY_BASE ; +writew (USB_PHY_TX_OVRD_DRV_LO_VAL , + (u8 *)(usb_phy) +USB_PHY_TX_OVRD_DRV_LO ); +writew (USB_PHY_MPLL_OVRD_IN_HI_VAL , + (u8 *)(usb_phy) +USB_PHY_MPLL_OVRD_IN_HI ); +writew (USB_PHY_LEVEL_OVRD_IN_VAL , + (u8 *)(usb_phy) +USB_PHY_LEVEL_OVRD_IN ); +writew (USB_PHY_TX_OVRD_IN_HI_VAL , + (u8 *)(usb_phy) +USB_PHY_TX_OVRD_IN_HI ); +#endif /* CONFIG_SYS_FSL_ERRATUM_A008997 */ +} +void s_init (void ) { }
@@ -168,6 +183,7 @@ int arch_soc_init(void)/* Erratum */ erratum_a009008 ();erratum_a009798 (); +erratum_a008997 ();return 0 ; }
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +9 -0
@@ -176,6 +176,15 @@ struct ccsr_gur {#define SCFG_USB3PRM1CR 0x070#define USB_TXVREFTUNE 0x9#define USB_SQRXTUNE 0xFC7FFFFF +#define USB_PHY_BASE 0x08510000 +#define USB_PHY_TX_OVRD_DRV_LO 0x2004 +#define USB_PHY_MPLL_OVRD_IN_HI 0x0024 +#define USB_PHY_LEVEL_OVRD_IN 0x002a +#define USB_PHY_TX_OVRD_IN_HI 0x2002 +#define USB_PHY_TX_OVRD_DRV_LO_VAL 0x784C +#define USB_PHY_MPLL_OVRD_IN_HI_VAL 0x0080 +#define USB_PHY_LEVEL_OVRD_IN_VAL 0xA9A5 +#define USB_PHY_TX_OVRD_IN_HI_VAL 0x0003/* Supplemental Configuration Unit */
Signature · 1 line
2.1.0.27.g96db324
PATCH 3/14 armv7: Add workaround for USB erratum A-008997
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB3 LFPS Peak-Peak Differential Output Voltage Adjustment This patch is adding the erratum for LS1021.
Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/49a436b3/attachment.sig>
PATCH 4/14 armv7: Add workaround for USB erratum A-009007
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB3PHY Observing Intermittent Failure in Rx
This patch is adding the erratum for LS1021.
--- arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv7/ls102xa/soc.c | 12 ++++++++++++ arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 5 +++++ 3 files changed, 18 insertions(+)
arch/arm/cpu/armv7/ls102xa/Kconfig +1 -0
@@ -18,6 +18,7 @@ config ARCH_LS1021A select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A008997 + select SYS_FSL_ERRATUM_A009007 menu "LS102xA architecture" depends on ARCH_LS1021A
arch/arm/cpu/armv7/ls102xa/soc.c +12 -0
@@ -94,6 +94,17 @@ static void erratum_a008997(void)#endif /* CONFIG_SYS_FSL_ERRATUM_A008997 */ } +static void erratum_a009007 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A009007 +u32 __iomem *usb_phy = (u32 __iomem *)USB_PHY_BASE ; +writew (USB_PHY_RX_EQ_VAL_1 , (u8 *)(usb_phy) +USB_PHY_RX_OVRD_IN_HI ); +writew (USB_PHY_RX_EQ_VAL_2 , (u8 *)(usb_phy) +USB_PHY_RX_OVRD_IN_HI ); +writew (USB_PHY_RX_EQ_VAL_3 , (u8 *)(usb_phy) +USB_PHY_RX_OVRD_IN_HI ); +writew (USB_PHY_RX_EQ_VAL_4 , (u8 *)(usb_phy) +USB_PHY_RX_OVRD_IN_HI ); +#endif /* CONFIG_SYS_FSL_ERRATUM_A009007 */ +} +void s_init (void ) { }
@@ -184,6 +195,7 @@ int arch_soc_init(void)erratum_a009008 ();erratum_a009798 ();erratum_a008997 (); +erratum_a009007 ();return 0 ; }
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +5 -0
@@ -181,10 +181,15 @@ struct ccsr_gur {#define USB_PHY_MPLL_OVRD_IN_HI 0x0024#define USB_PHY_LEVEL_OVRD_IN 0x002a#define USB_PHY_TX_OVRD_IN_HI 0x2002 +#define USB_PHY_RX_OVRD_IN_HI 0x200c#define USB_PHY_TX_OVRD_DRV_LO_VAL 0x784C#define USB_PHY_MPLL_OVRD_IN_HI_VAL 0x0080#define USB_PHY_LEVEL_OVRD_IN_VAL 0xA9A5#define USB_PHY_TX_OVRD_IN_HI_VAL 0x0003 +#define USB_PHY_RX_EQ_VAL_1 0x0000 +#define USB_PHY_RX_EQ_VAL_2 0x8000 +#define USB_PHY_RX_EQ_VAL_3 0x8004 +#define USB_PHY_RX_EQ_VAL_4 0x800C/* Supplemental Configuration Unit */
Signature · 1 line
2.1.0.27.g96db324
PATCH 4/14 armv7: Add workaround for USB erratum A-009007
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB3PHY Observing Intermittent Failure in Rx
This patch is adding the erratum for LS1021.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/02e99b55/attachment.sig>
PATCH 5/14 armv8: Add workaround for USB erratum A-009798
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB High Speed Squelch Threshold Adjustment
This patch is adding the erratum for LS1043 and LS2080 SoCs.
--- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 5 +++++ arch/arm/cpu/armv8/fsl-layerscape/soc.c | 22 ++++++++++++++++++++++ .../include/asm/arch-fsl-layerscape/immap_lsch2.h | 5 +++++ .../include/asm/arch-fsl-layerscape/immap_lsch3.h | 2 ++ 4 files changed, 34 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +5 -0
@@ -5,6 +5,7 @@ config ARCH_LS1012A select SYS_FSL_DDR_BE select SYS_FSL_MMDC select SYS_FSL_ERRATUM_A010315 + select SYS_FSL_ERRATUM_A009798 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_HAS_CCI400
@@ -18,6 +19,7 @@ config ARCH_LS1043A select SYS_FSL_DDR_VER_50 select SYS_FSL_ERRATUM_A008850 select SYS_FSL_ERRATUM_A009660 + select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A009663 select SYS_FSL_ERRATUM_A009929 select SYS_FSL_ERRATUM_A009942
@@ -44,6 +46,7 @@ config ARCH_LS1046A select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A010165 select SYS_FSL_ERRATUM_A010539 + select SYS_FSL_ERRATUM_A009798 select SYS_FSL_HAS_DDR4 select SYS_FSL_SRDS_2 select ARCH_EARLY_INIT_R
@@ -71,6 +74,7 @@ config ARCH_LS1088A select SYS_FSL_ERRATUM_A010165 select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008850 + select SYS_FSL_ERRATUM_A009798 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_EC1
@@ -101,6 +105,7 @@ config ARCH_LS2080A select SYS_FSL_ERRATUM_A008514 select SYS_FSL_ERRATUM_A008585 select SYS_FSL_ERRATUM_A009635 + select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A009663 select SYS_FSL_ERRATUM_A009801 select SYS_FSL_ERRATUM_A009803
arch/arm/cpu/armv8/fsl-layerscape/soc.c +22 -0
@@ -28,6 +28,25 @@DECLARE_GLOBAL_DATA_PTR ; +static void erratum_a009798 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A009798 +#if defined(CONFIG_LS1043A ) || defined(CONFIG_LS1046A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM1CR_USB1 /4 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB1 /4 , val &USB_SQRXTUNE ); +val =gur_in32 (scfg +SCFG_USB3PRM1CR_USB2 /4 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB2 /4 , val &USB_SQRXTUNE ); +val =scfg_in32 (scfg +SCFG_USB3PRM1CR_USB3 /4 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB3 /4 , val &USB_SQRXTUNE ); +#elif defined(CONFIG_LS2080A ) || defined(CONFIG_LS2085A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM1CR /4 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR /4 , val &USB_SQRXTUNE ); +#endif +#endif /* CONFIG_SYS_FSL_ERRATUM_A009798 */ +} +bool soc_has_dp_ddr (void ) {struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR );
@@ -200,6 +219,8 @@ void fsl_lsch3_early_init_f(void)#endif erratum_a008514 ();erratum_a008336 (); +erratum_a009008 (); +erratum_a009798 ();#ifdef CONFIG_CHAIN_OF_TRUST /* In case of Secure Boot, the IBR configures the SMMU * to allow only Secure transactions.
@@ -471,6 +492,7 @@ void fsl_lsch2_early_init_f(void)erratum_a009929 ();erratum_a009660 ();erratum_a010539 (); + erratum_a009798(); }#endif
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +5 -0
@@ -198,6 +198,11 @@ struct ccsr_gur {#define FSL_CHASSIS2_DEVDISR2_10GEC1_2 0x00400000#define FSL_CHASSIS2_DEVDISR2_10GEC1_3 0x80000000#define FSL_CHASSIS2_DEVDISR2_10GEC1_4 0x40000000 +#define SCFG_USB3PRM1CR_USB2 0x07C +#define SCFG_USB3PRM1CR_USB3 0x088 +#define USB_TXVREFTUNE 0x9 +#define USB_SQRXTUNE 0xFC7FFFFF +u32 devdisr2;/* Device disable control 2 */ u32 devdisr3;/* Device disable control 3 */ u32 devdisr4;/* Device disable control 4 */
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +2 -0
@@ -140,6 +140,8 @@#define SCFG_BASE 0x01fc0000#define SCFG_USB3PRM1CR 0x000#define SCFG_USB3PRM1CR_INIT 0x27672b2a +#define USB_TXVREFTUNE 0x9 +#define USB_SQRXTUNE 0xFC7FFFFF#define SCFG_QSPICLKCTLR 0x10#define TP_ITYP_AV 0x00000001/* Initiator available */
Signature · 1 line
2.1.0.27.g96db324
PATCH 5/14 armv8: Add workaround for USB erratum A-009798
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB High Speed Squelch Threshold Adjustment
This patch is adding the erratum for LS1043 and LS2080 SoCs.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/df86cb44/attachment.sig>
PATCH 6/14 armv8: Add workaround for USB erratum A-008997
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB3 LFPS Peak-Peak Differential Output Voltage Adjustment This patch is adding the erratum for LS1043 and LS2080 SoCs.
--- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 7 ++++++ arch/arm/cpu/armv8/fsl-layerscape/soc.c | 29 ++++++++++++++++++++++ .../include/asm/arch-fsl-layerscape/immap_lsch2.h | 4 +++ .../include/asm/arch-fsl-layerscape/immap_lsch3.h | 2 ++ 4 files changed, 42 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +7 -0
@@ -6,6 +6,7 @@ config ARCH_LS1012A select SYS_FSL_MMDC select SYS_FSL_ERRATUM_A010315 select SYS_FSL_ERRATUM_A009798 + select SYS_FSL_ERRATUM_A008997 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_HAS_CCI400
@@ -18,6 +19,7 @@ config ARCH_LS1043A select SYS_FSL_DDR_BE select SYS_FSL_DDR_VER_50 select SYS_FSL_ERRATUM_A008850 + select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009660 select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A009663
@@ -41,6 +43,7 @@ config ARCH_LS1046A select SYS_FSL_ERRATUM_A008336 select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008850 + select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009801 select SYS_FSL_ERRATUM_A009803 select SYS_FSL_ERRATUM_A009942
@@ -72,6 +75,7 @@ config ARCH_LS1088A select SYS_FSL_ERRATUM_A009803 select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A010165 + select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008850 select SYS_FSL_ERRATUM_A009798
@@ -106,6 +110,7 @@ config ARCH_LS2080A select SYS_FSL_ERRATUM_A008585 select SYS_FSL_ERRATUM_A009635 select SYS_FSL_ERRATUM_A009798 + select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009663 select SYS_FSL_ERRATUM_A009801 select SYS_FSL_ERRATUM_A009803
@@ -121,6 +126,7 @@ config FSL_LSCH2 select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_5 select SYS_FSL_SEC_BE + select SYS_FSL_ERRATUM_A008997 select SYS_FSL_SRDS_1 select SYS_HAS_SERDES
@@ -128,6 +134,7 @@ config FSL_LSCH3 bool select SYS_FSL_SRDS_1 select SYS_HAS_SERDES + select SYS_FSL_ERRATUM_A008997 config FSL_MC_ENET bool "Management Complex network"
arch/arm/cpu/armv8/fsl-layerscape/soc.c +29 -0
@@ -47,6 +47,33 @@ scfg_out32(scfg + SCFG_USB3PRM1CR / 4, val & USB_SQRXTUNE);#endif /* CONFIG_SYS_FSL_ERRATUM_A009798 */ } +static void erratum_a008997 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A008997 +#if defined(CONFIG_LS1043A ) || defined(CONFIG_LS1046A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM2CR_USB1 /4 ); + val &= ~(0x7F <<9 ); +scfg_out32 (scfg +SCFG_USB3PRM2CR_USB1 /4 , + val | (USB_PCSTXSWINGFULL <<9 )); + val =scfg_in32 (scfg +SCFG_USB3PRM2CR_USB2 /4 ); + val &= ~(0x7F <<9 ); +scfg_out32 (scfg +SCFG_USB3PRM2CR_USB2 /4 , + val | (USB_PCSTXSWINGFULL <<9 )); + val =scfg_in32 (scfg +SCFG_USB3PRM2CR_USB3 /4 ); + val &= ~(0x7F <<9 ); +scfg_out32 (scfg +SCFG_USB3PRM2CR_USB3 /4 , + val | (USB_PCSTXSWINGFULL <<9 )); +#elif defined(CONFIG_LS2080A ) || defined(CONFIG_LS2085A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM2CR /4 ); + val &= ~(0x7F <<9 ); +scfg_out32 (scfg +SCFG_USB3PRM2CR /4 , + val | (USB_PCSTXSWINGFULL <<9 )); +#endif +#endif /* CONFIG_SYS_FSL_ERRATUM_A008997 */ +} +bool soc_has_dp_ddr (void ) {struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR );
@@ -221,6 +248,7 @@ void fsl_lsch3_early_init_f(void)erratum_a008336 ();erratum_a009008 ();erratum_a009798 (); +erratum_a008997 ();#ifdef CONFIG_CHAIN_OF_TRUST /* In case of Secure Boot, the IBR configures the SMMU * to allow only Secure transactions.
@@ -493,6 +521,7 @@ void fsl_lsch2_early_init_f(void)erratum_a009660 ();erratum_a010539 ();erratum_a009798 (); + erratum_a008997(); }#endif
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +4 -0
@@ -198,8 +198,12 @@ struct ccsr_gur {#define FSL_CHASSIS2_DEVDISR2_10GEC1_2 0x00400000#define FSL_CHASSIS2_DEVDISR2_10GEC1_3 0x80000000#define FSL_CHASSIS2_DEVDISR2_10GEC1_4 0x40000000 +#define SCFG_BASE 0x01570000 +#define SCFG_USB3PRM1CR_USB1 0x070 +#define SCFG_USB3PRM2CR_USB1 0x074#define SCFG_USB3PRM1CR_USB2 0x07C#define SCFG_USB3PRM1CR_USB3 0x088 +#define SCFG_USB3PRM2CR_USB3 0x08c#define USB_TXVREFTUNE 0x9#define USB_SQRXTUNE 0xFC7FFFFF
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +2 -0
@@ -139,9 +139,11 @@/* Supplemental Configuration */ #define SCFG_BASE 0x01fc0000#define SCFG_USB3PRM1CR 0x000 +#define SCFG_USB3PRM2CR 0x004#define SCFG_USB3PRM1CR_INIT 0x27672b2a#define USB_TXVREFTUNE 0x9#define USB_SQRXTUNE 0xFC7FFFFF +#define USB_PCSTXSWINGFULL 0x47#define SCFG_QSPICLKCTLR 0x10#define TP_ITYP_AV 0x00000001/* Initiator available */
Signature · 1 line
2.1.0.27.g96db324
PATCH 6/14 armv8: Add workaround for USB erratum A-008997
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB3 LFPS Peak-Peak Differential Output Voltage Adjustment This patch is adding the erratum for LS1043 and LS2080 SoCs.
Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/32b7460b/attachment.sig>
PATCH 7/14 armv8: Add workaround for USB erratum A-009007
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB3PHY Observing Intermittent Failure in Rx
This patch is adding the erratum for LS1043 and LS2080 SoCs.
--- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 7 ++++ arch/arm/cpu/armv8/fsl-layerscape/soc.c | 43 ++++++++++++++++++++++ .../include/asm/arch-fsl-layerscape/immap_lsch2.h | 12 ++++++ .../include/asm/arch-fsl-layerscape/immap_lsch3.h | 7 ++++ 4 files changed, 69 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +7 -0
@@ -7,6 +7,7 @@ config ARCH_LS1012A select SYS_FSL_ERRATUM_A010315 select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A008997 + select SYS_FSL_ERRATUM_A009007 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_HAS_CCI400
@@ -27,6 +28,7 @@ config ARCH_LS1043A select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A010315 select SYS_FSL_ERRATUM_A010539 + select SYS_FSL_ERRATUM_A009007 select SYS_FSL_HAS_DDR3 select SYS_FSL_HAS_DDR4 select ARCH_EARLY_INIT_R
@@ -50,6 +52,7 @@ config ARCH_LS1046A select SYS_FSL_ERRATUM_A010165 select SYS_FSL_ERRATUM_A010539 select SYS_FSL_ERRATUM_A009798 + select SYS_FSL_ERRATUM_A009007 select SYS_FSL_HAS_DDR4 select SYS_FSL_SRDS_2 select ARCH_EARLY_INIT_R
@@ -76,6 +79,7 @@ config ARCH_LS1088A select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A010165 select SYS_FSL_ERRATUM_A008997 + select SYS_FSL_ERRATUM_A009007 select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008850 select SYS_FSL_ERRATUM_A009798
@@ -108,6 +112,7 @@ config ARCH_LS2080A select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008514 select SYS_FSL_ERRATUM_A008585 + select SYS_FSL_ERRATUM_A009007 select SYS_FSL_ERRATUM_A009635 select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A008997
@@ -127,6 +132,7 @@ config FSL_LSCH2 select SYS_FSL_SEC_COMPAT_5 select SYS_FSL_SEC_BE select SYS_FSL_ERRATUM_A008997 + select SYS_FSL_ERRATUM_A009007 select SYS_FSL_SRDS_1 select SYS_HAS_SERDES
@@ -135,6 +141,7 @@ config FSL_LSCH3 select SYS_FSL_SRDS_1 select SYS_HAS_SERDES select SYS_FSL_ERRATUM_A008997 + select SYS_FSL_ERRATUM_A009007 config FSL_MC_ENET bool "Management Complex network"
arch/arm/cpu/armv8/fsl-layerscape/soc.c +43 -0
61 lines not on this page · raw message
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +12 -0
@@ -206,6 +206,18 @@ struct ccsr_gur {#define SCFG_USB3PRM2CR_USB3 0x08c#define USB_TXVREFTUNE 0x9#define USB_SQRXTUNE 0xFC7FFFFF +#define USB_PCSTXSWINGFULL 0x47 +#define USB_PHY1 0x084F0000 +#define USB_PHY2 0x08500000 +#define USB_PHY3 0x08510000 +#define USB_PHY_RX_OVRD_IN_HI 0x200c +/* TODO : make it generic */ +#define USB_PHY_RX_EQ_VAL_1 0x0000 +#define USB_PHY_RX_EQ_VAL_2 0x8000 +#define USB_PHY_RX_EQ_VAL_3 0x8003 + +#define USB_PHY_RX_EQ_VAL_4 0x800b +u32 devdisr2;/* Device disable control 2 */ u32 devdisr3;/* Device disable control 3 */
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +7 -0
@@ -130,6 +130,13 @@#define DCFG_RCWSR15_IFCGRPABASE_QSPI 0x3#define DCFG_DCSR_BASE 0X700100000ULL +#define DCSR_USB_PHY1 0x4600000 +#define DCSR_USB_PHY2 0x4610000 +#define DCSR_USB_PHY_RX_OVRD_IN_HI 0x1006 +#define USB_PHY_RX_EQ_VAL_1 0x0000 +#define USB_PHY_RX_EQ_VAL_2 0x0080 +#define USB_PHY_RX_EQ_VAL_3 0x0380 +#define USB_PHY_RX_EQ_VAL_4 0x0b80#define DCFG_DCSR_PORCR1 0x000/* Interrupt Sampling Control */
Signature · 1 line
2.1.0.27.g96db324
PATCH 7/14 armv8: Add workaround for USB erratum A-009007
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB3PHY Observing Intermittent Failure in Rx
This patch is adding the erratum for LS1043 and LS2080 SoCs.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/da8c5f0d/attachment.sig>
PATCH 8/14 usb: dwc3: Add helper functions to enable snooping and burst settings
In reply to yinbo.zhuFrom: Rajat Srivastava <[email protected]>
Adds helper functions to enable snooping and outstanding burst beat settings.
--- drivers/usb/dwc3/core.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 7 +++++++ 2 files changed, 52 insertions(+)
drivers/usb/dwc3/core.c +45 -0
@@ -599,6 +599,51 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)#define DWC3_ALIGN_MASK (16 - 1) +void dwc3_core_incr_burst_enable (int index,int btype_incr_val, +int breq_limit) +{ +struct dwc3 *dwc; +u32 reg; + +list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* +* Change burst beat and outstanding pipelined +* transfers requests +*/ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); + reg = (reg & ~DWC3_INCR_BTYPE_MASK ) | btype_incr_val; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); + + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG1 ); + reg = (reg & ~DWC3_BREQ_LIMIT_MASK ) | (breq_limit <<8 ); +dwc3_writel (dwc->regs,DWC3_GSBUSCFG1 , reg); +break ; + } +} + +void dwc3_core_set_snooping (int index,bool snoop) +{ +struct dwc3 *dwc; +u32 reg; + +list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* Enable/Disable snooping */ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); +if (snoop) + reg |=DWC3_SNOOP_ENABLE ; +else + reg &= ~DWC3_SNOOP_ENABLE ; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); +break ; + } +} +/** * dwc3_uboot_init - dwc3 core uboot initialization code * @dwc3_dev: struct dwc3_device containing initialization data
drivers/usb/dwc3/core.h +7 -0
@@ -593,6 +593,13 @@ struct dwc3_hwparams {/* HWPARAMS7 */ #define DWC3_RAM1_DEPTH (n) ((n) & 0xffff) +/* GSBUSCFG0 */ +#define DWC3_SNOOP_ENABLE (0x22220000) +#define DWC3_INCR_BTYPE_MASK (0xff) + +/* GSBUSCFG1 */ +#define DWC3_BREQ_LIMIT_MASK (0xf00) +struct dwc3_request {struct usb_request request;struct list_head list;
Signature · 1 line
2.1.0.27.g96db324
PATCH 8/14 usb: dwc3: Add helper functions to enable snooping and burst settings
Quoted 76 lines · yinbo.zhu
From: Rajat Srivastava <[email protected]>
Adds helper functions to enable snooping and outstanding burst beat settings.
Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>--- drivers/usb/dwc3/core.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 7 +++++++ 2 files changed, 52 insertions(+)drivers/usb/dwc3/core.c +45
-0@@ -599,6 +599,51 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)#define DWC3_ALIGN_MASK (16 - 1) +void dwc3_core_incr_burst_enable (int index,int btype_incr_val, +int breq_limit) +{ +struct dwc3 *dwc; +u32 reg; + +list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* +* Change burst beat and outstanding pipelined +* transfers requests +*/ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); + reg = (reg & ~DWC3_INCR_BTYPE_MASK ) | btype_incr_val; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); + + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG1 ); + reg = (reg & ~DWC3_BREQ_LIMIT_MASK ) | (breq_limit <<8 ); +dwc3_writel (dwc->regs,DWC3_GSBUSCFG1 , reg); +break ; + } +} + +void dwc3_core_set_snooping (int index,bool snoop) +{ +struct dwc3 *dwc; +u32 reg; + +list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* Enable/Disable snooping */ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); +if (snoop) + reg |=DWC3_SNOOP_ENABLE ; +else + reg &= ~DWC3_SNOOP_ENABLE ; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); +break ; + } +} +/** * dwc3_uboot_init - dwc3 core uboot initialization code * @dwc3_dev: struct dwc3_device containing initialization data drivers/usb/dwc3/core.h +0
-0@@ -593,6 +593,13 @@ struct dwc3_hwparams {/* HWPARAMS7 */ #define DWC3_RAM1_DEPTH (n) ((n) & 0xffff)
drivers/usb/dwc3/core.h struct dwc3_hwparams { · line 605
Quoted 10 lines
drivers/usb/dwc3/core.h +7
-0+/* GSBUSCFG0 */ +#define DWC3_SNOOP_ENABLE (0x22220000) +#define DWC3_INCR_BTYPE_MASK (0xff) + +/* GSBUSCFG1 */ +#define DWC3_BREQ_LIMIT_MASK (0xf00) +struct dwc3_request {struct usb_request request;struct list_head list;
Marek?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/a00a1a74/attachment.sig>
PATCH 8/14 usb: dwc3: Add helper functions to enable snooping and burst settings
Quoted 43 lines · Tom Rini
Quoted 41 lines · yinbo.zhu
From: Rajat Srivastava <[email protected]>
Adds helper functions to enable snooping and outstanding burst beat settings.
Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>--- drivers/usb/dwc3/core.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 7 +++++++ 2 files changed, 52 insertions(+)drivers/usb/dwc3/core.c +21
-0@@ -599,6 +599,51 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)#define DWC3_ALIGN_MASK (16 - 1) +void dwc3_core_incr_burst_enable (int index,int btype_incr_val, +int breq_limit) +{ +struct dwc3 *dwc; +u32 reg; + +list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* +* Change burst beat and outstanding pipelined +* transfers requests +*/ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); + reg = (reg & ~DWC3_INCR_BTYPE_MASK ) | btype_incr_val; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); + + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG1 ); + reg = (reg & ~DWC3_BREQ_LIMIT_MASK ) | (breq_limit <<8 ); +dwc3_writel (dwc->regs,DWC3_GSBUSCFG1 , reg);
Quoted 8 lines
drivers/usb/dwc3/core.c static void dwc3_core_exit_mode(struct dwc3 *dwc) · line 630
Quoted 8 lines
drivers/usb/dwc3/core.c +8
-0+break ; + } +} + +void dwc3_core_set_snooping (int index,bool snoop) +{ +struct dwc3 *dwc; +u32 reg;
So how do you discern which controller should have this value increased/set and which shouldn't ? I believe that information should come from DT ... hacking it up such that you change it for all controllers doesn't scale.
Quoted 26 lines
Quoted 26 lines
drivers/usb/dwc3/core.c +15
-0+list_for_each_entry (dwc, &dwc3_list, list) { +if (dwc->index != index) +continue ; + +/* Enable/Disable snooping */ + reg =dwc3_readl (dwc->regs,DWC3_GSBUSCFG0 ); +if (snoop) + reg |=DWC3_SNOOP_ENABLE ; +else + reg &= ~DWC3_SNOOP_ENABLE ; +dwc3_writel (dwc->regs,DWC3_GSBUSCFG0 , reg); +break ; + } +} +/** * dwc3_uboot_init - dwc3 core uboot initialization code * @dwc3_dev: struct dwc3_device containing initialization data drivers/usb/dwc3/core.h +0
-0@@ -593,6 +593,13 @@ struct dwc3_hwparams {/* HWPARAMS7 */ #define DWC3_RAM1_DEPTH (n) ((n) & 0xffff)
Quoted 6 lines
drivers/usb/dwc3/core.h struct dwc3_hwparams { · line 601
Quoted 6 lines
drivers/usb/dwc3/core.h +6
-0+/* GSBUSCFG0 */ +#define DWC3_SNOOP_ENABLE (0x22220000) +#define DWC3_INCR_BTYPE_MASK (0xff) + +/* GSBUSCFG1 */ +#define DWC3_BREQ_LIMIT_MASK (0xf00)
Drop the parenthesis ...
Quoted 6 lines
drivers/usb/dwc3/core.h struct dwc3_hwparams { · line 605
Quoted 3 lines
drivers/usb/dwc3/core.h +0
-0struct dwc3_request {struct usb_request request;struct list_head list;Marek?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 9/14 usb: ums: support multiple controllers using controller_index
In reply to yinbo.zhuFrom: Rajesh Bhagat <[email protected]>
Adds a new field in fsg_common namely controller_index to support multiple controllers usb gadget support.
--- cmd/usb_mass_storage.c | 2 +- drivers/usb/gadget/f_mass_storage.c | 11 +++++++++-- include/usb_mass_storage.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-)
cmd/usb_mass_storage.c +1 -1
@@ -214,7 +214,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,while (1 ) {usb_gadget_handle_interrupts (controller_index); - rc =fsg_main_thread (NULL ); + rc =fsg_main_thread (controller_index);if (rc) {/* Check I/O error */ if (rc == -EIO )
drivers/usb/gadget/f_mass_storage.c +9 -2
@@ -362,6 +362,7 @@ struct fsg_common {char inquiry_string[8 +16 +4 +1 ];struct kref ref; +unsigned int controller_index; };struct fsg_config {
@@ -691,7 +692,7 @@ static int sleep_thread(struct fsg_common *common) k =0 ; } -usb_gadget_handle_interrupts (0 ); +usb_gadget_handle_interrupts (common->controller_index); } common->thread_wakeup_needed =0 ;return rc;
@@ -2402,10 +2403,14 @@ static void handle_exception(struct fsg_common *common)/*-------------------------------------------------------------------------*/ -int fsg_main_thread (void *common_) +int fsg_main_thread (unsigned int controller_index) {int ret;struct fsg_common *common = the_fsg_common; + +/* update the controller_index */ + common->controller_index = controller_index; +/* The main loop */ do { if (exception_in_progress(common)) {
@@ -2476,6 +2481,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, common->ops =NULL ; common->private_data =NULL ; + common->controller_index =0 ; common->gadget = gadget; common->ep0 = gadget->ep0;
@@ -2770,6 +2776,7 @@ int fsg_add(struct usb_configuration *c) fsg_common->ops =NULL ; fsg_common->private_data =NULL ; + fsg_common->controller_index =0 ; the_fsg_common = fsg_common;
include/usb_mass_storage.h +1 -1
@@ -28,6 +28,6 @@ struct ums {int fsg_init (struct ums *ums_devs,int count);void fsg_cleanup (void ); -int fsg_main_thread (void *); +int fsg_main_thread (unsigned int );int fsg_add (struct usb_configuration *c);#endif /* __USB_MASS_STORAGE_H__ */
Signature · 1 line
2.1.0.27.g96db324
PATCH 9/14 usb: ums: support multiple controllers using controller_index
Quoted 85 lines · yinbo.zhu
From: Rajesh Bhagat <[email protected]>
Adds a new field in
fsg_commonnamelycontroller_indexto support multiple controllers usb gadget support.Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Acked-by Lukasz Majewski <[email protected]>--- cmd/usb_mass_storage.c | 2 +- drivers/usb/gadget/f_mass_storage.c | 11 +++++++++-- include/usb_mass_storage.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-)cmd/usb_mass_storage.c +1
-1@@ -214,7 +214,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,while (1 ) {usb_gadget_handle_interrupts (controller_index); - rc =fsg_main_thread (NULL ); + rc =fsg_main_thread (controller_index);if (rc) {/* Check I/O error */ if (rc == -EIO )drivers/usb/gadget/f_mass_storage.c +9
-2@@ -362,6 +362,7 @@ struct fsg_common {char inquiry_string[8 +16 +4 +1 ];struct kref ref; +unsigned int controller_index; };struct fsg_config {@@ -691,7 +692,7 @@ static int sleep_thread(struct fsg_common *common) k =0 ; } -usb_gadget_handle_interrupts (0 ); +usb_gadget_handle_interrupts (common->controller_index); } common->thread_wakeup_needed =0 ;return rc;@@ -2402,10 +2403,14 @@ static void handle_exception(struct fsg_common *common)/*-------------------------------------------------------------------------*/ -int fsg_main_thread (void *common_) +int fsg_main_thread (unsigned int controller_index) {int ret;struct fsg_common *common = the_fsg_common; + +/* update the controller_index */ + common->controller_index = controller_index; +/* The main loop */ do { if (exception_in_progress(common)) {@@ -2476,6 +2481,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, common->ops =NULL ; common->private_data =NULL ; + common->controller_index =0 ; common->gadget = gadget; common->ep0 = gadget->ep0;@@ -2770,6 +2776,7 @@ int fsg_add(struct usb_configuration *c) fsg_common->ops =NULL ; fsg_common->private_data =NULL ; + fsg_common->controller_index =0 ; the_fsg_common = fsg_common;include/usb_mass_storage.h +0
-0
include/usb_mass_storage.h struct ums { · line 33
Quoted 7 lines
include/usb_mass_storage.h +1
-1@@ -28,6 +28,6 @@ struct ums {int fsg_init (struct ums *ums_devs,int count);void fsg_cleanup (void ); -int fsg_main_thread (void *); +int fsg_main_thread (unsigned int );int fsg_add (struct usb_configuration *c);#endif /* __USB_MASS_STORAGE_H__ */
Lukasz?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/b71a4db6/attachment.sig>
PATCH 9/14 usb: ums: support multiple controllers using controller_index
Hi Tom,
Quoted 10 lines · yinbo.zhu
Quoted 9 lines
From: Rajesh Bhagat <[email protected]>
Adds a new field in
fsg_commonnamelycontroller_indexto support multiple controllers usb gadget support.Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Acked-by Lukasz Majewski <[email protected]>
I've already acked this patch :-)
Best regards,
�ukasz
Quoted 78 lines
Quoted 78 lines
--- cmd/usb_mass_storage.c | 2 +- drivers/usb/gadget/f_mass_storage.c | 11 +++++++++-- include/usb_mass_storage.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-)cmd/usb_mass_storage.c +1
-1@@ -214,7 +214,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag, while (1) {usb_gadget_handle_interrupts (controller_index); - rc =fsg_main_thread (NULL ); + rc =fsg_main_thread (controller_index);if (rc) {/* Check I/O error */ if (rc == -EIO )(quoted diff) +0
-0
b/drivers/usb/gadget/f_mass_storage.cindex 1ecb92a..27ca5fe 100644drivers/usb/gadget/f_mass_storage.c +9
-2@@ -362,6 +362,7 @@ struct fsg_common {char inquiry_string[8 +16 +4 +1 ];struct kref ref; +unsigned int controller_index; };struct fsg_config {@@ -691,7 +692,7 @@ static int sleep_thread(struct fsg_common *common) k = 0; } -usb_gadget_handle_interrupts (0 ); +usb_gadget_handle_interrupts (common->controller_index); } common->thread_wakeup_needed =0 ;return rc;@@ -2402,10 +2403,14 @@ static void handle_exception(struct fsg_common *common)/*-------------------------------------------------------------------------*/ -int fsg_main_thread (void *common_) +int fsg_main_thread (unsigned int controller_index) {int ret;struct fsg_common *common = the_fsg_common; + +/* update the controller_index */ + common->controller_index = controller_index; +/* The main loop */ do { if (exception_in_progress(common)) {@@ -2476,6 +2481,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, common->ops = NULL; common->private_data =NULL ; + common->controller_index =0 ; common->gadget = gadget; common->ep0 = gadget->ep0;@@ -2770,6 +2776,7 @@ int fsg_add(struct usb_configuration *c) fsg_common->ops =NULL ; fsg_common->private_data =NULL ; + fsg_common->controller_index =0 ; the_fsg_common = fsg_common;include/usb_mass_storage.h +0
-0@@ -28,6 +28,6 @@ struct ums {
Quoted 9 lines
include/usb_mass_storage.h struct ums { · line 33
Quoted 6 lines
include/usb_mass_storage.h +1
-1int fsg_init (struct ums *ums_devs,int count);void fsg_cleanup (void ); -int fsg_main_thread (void *); +int fsg_main_thread (unsigned int );int fsg_add (struct usb_configuration *c);#endif /* __USB_MASS_STORAGE_H__ */ Lukasz?
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/d7ae2497/attachment.sig>
PATCH 9/14 usb: ums: support multiple controllers using controller_index
Quoted 6 lines · Lukasz Majewski
Hi Tom,
Quoted 4 lines · yinbo.zhu
Quoted 3 lines
From: Rajesh Bhagat <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Adds a new field in
fsg_commonnamelycontroller_indexto support multiple controllers usb gadget support.Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Acked-by Lukasz Majewski <[email protected]>I've already acked this patch :-)
D'oh, was just looking at the Cc list.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/9172910b/attachment.sig>
PATCH 10/14 config: ls1012aqds: Add USB EHCI support for ls1012aqds
In reply to yinbo.zhuFrom: Rajesh Bhagat <[email protected]>
Add USB EHCI support for ls1012aqds platform
--- arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 1 + include/configs/ls1012aqds.h | 2 ++ include/usb/ehci-ci.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +1 -0
@@ -35,6 +35,7 @@#define CONFIG_SYS_XHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x01f00000)#define CONFIG_SYS_XHCI_USB2_ADDR (CONFIG_SYS_IMMR + 0x02000000)#define CONFIG_SYS_XHCI_USB3_ADDR (CONFIG_SYS_IMMR + 0x02100000) +#define CONFIG_SYS_EHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x07600000)#define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_IMMR + 0x2400000)#define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_IMMR + 0x2500000)#define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_IMMR + 0x2600000)
include/configs/ls1012aqds.h +2 -0
@@ -118,6 +118,8 @@#ifdef CONFIG_HAS_FSL_DR_USB #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_FSL +#define CONFIG_USB_ULPI +#define CONFIG_USB_ULPI_VIEWPORT #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #endif
include/usb/ehci-ci.h +1 -1
@@ -159,7 +159,7 @@#elif defined(CONFIG_MPC512X )#define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_MPC512x_USB1_ADDR#define CONFIG_SYS_FSL_USB2_ADDR 0 -#elif defined(CONFIG_LS102XA ) +#elif defined(CONFIG_LS102XA ) || defined(CONFIG_ARCH_LS1012A )#define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_EHCI_USB1_ADDR#define CONFIG_SYS_FSL_USB2_ADDR 0#endif
Signature · 1 line
2.1.0.27.g96db324
PATCH 11/14 armv8: Add workaround for USB erratum A-009008
In reply to yinbo.zhuFrom: Suresh Gupta <[email protected]>
USB High Speed (HS) EYE Height Adjustment
This patch is adding the erratum for LS1043 and LS2080 SoCs.
--- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 7 ++++++ arch/arm/cpu/armv8/fsl-layerscape/soc.c | 26 ++++++++++++++++++++++ .../include/asm/arch-fsl-layerscape/immap_lsch3.h | 1 + 3 files changed, 34 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +7 -0
@@ -8,6 +8,7 @@ config ARCH_LS1012A select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009007 + select SYS_FSL_ERRATUM_A009008 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_HAS_CCI400
@@ -29,6 +30,7 @@ config ARCH_LS1043A select SYS_FSL_ERRATUM_A010315 select SYS_FSL_ERRATUM_A010539 select SYS_FSL_ERRATUM_A009007 + select SYS_FSL_ERRATUM_A009008 select SYS_FSL_HAS_DDR3 select SYS_FSL_HAS_DDR4 select ARCH_EARLY_INIT_R
@@ -53,6 +55,7 @@ config ARCH_LS1046A select SYS_FSL_ERRATUM_A010539 select SYS_FSL_ERRATUM_A009798 select SYS_FSL_ERRATUM_A009007 + select SYS_FSL_ERRATUM_A009008 select SYS_FSL_HAS_DDR4 select SYS_FSL_SRDS_2 select ARCH_EARLY_INIT_R
@@ -83,6 +86,7 @@ config ARCH_LS1088A select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008850 select SYS_FSL_ERRATUM_A009798 + select SYS_FSL_ERRATUM_A009008 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F select SYS_FSL_EC1
@@ -122,6 +126,7 @@ config ARCH_LS2080A select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A010165 select SYS_FSL_ERRATUM_A009203 + select SYS_FSL_ERRATUM_A009008 select SYS_FSL_HAS_CCN504 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F
@@ -133,6 +138,7 @@ config FSL_LSCH2 select SYS_FSL_SEC_BE select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009007 + select SYS_FSL_ERRATUM_A009008 select SYS_FSL_SRDS_1 select SYS_HAS_SERDES
@@ -142,6 +148,7 @@ config FSL_LSCH3 select SYS_HAS_SERDES select SYS_FSL_ERRATUM_A008997 select SYS_FSL_ERRATUM_A009007 + select SYS_FSL_ERRATUM_A009008 config FSL_MC_ENET bool "Management Complex network"
arch/arm/cpu/armv8/fsl-layerscape/soc.c +26 -0
@@ -28,6 +28,30 @@DECLARE_GLOBAL_DATA_PTR ; +static void erratum_a009008 (void ) +{ +#ifdef CONFIG_SYS_FSL_ERRATUM_A009008 +#if defined(CONFIG_LS1043A ) || defined(CONFIG_LS1046A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM1CR_USB1 /4 ); +val &= ~(0xF <<6 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB1 /4 , val|(USB_TXVREFTUNE <<6 )); +val =scfg_in32 (scfg +SCFG_USB3PRM1CR_USB2 /4 ); +val &= ~(0xF <<6 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB2 /4 , val|(USB_TXVREFTUNE <<6 )); +val =scfg_in32 (scfg +SCFG_USB3PRM1CR_USB3 /4 ); +val &= ~(0xF <<6 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR_USB3 /4 , val|(USB_TXVREFTUNE <<6 )); +#elif defined(CONFIG_LS2080A ) || defined(CONFIG_LS2085A ) +u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE ; +u32 val =scfg_in32 (scfg +SCFG_USB3PRM1CR /4 ); +val &= ~(0xF <<6 ); +scfg_out32 (scfg +SCFG_USB3PRM1CR /4 , val|(USB_TXVREFTUNE <<6 )); +#endif +#endif /* CONFIG_SYS_FSL_ERRATUM_A009008 */ +} + +static void erratum_a009798 (void ) {#ifdef CONFIG_SYS_FSL_ERRATUM_A009798
@@ -288,6 +312,7 @@ void fsl_lsch3_early_init_f(void)erratum_a008514 ();erratum_a008336 ();erratum_a009008 (); +erratum_a009008 ();erratum_a009798 ();erratum_a008997 ();erratum_a009007 ();
@@ -562,6 +587,7 @@ void fsl_lsch2_early_init_f(void)erratum_a009929 ();erratum_a009660 ();erratum_a010539 (); +erratum_a009008 ();erratum_a009798 ();erratum_a008997 ();erratum_a009007 ();
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +1 -0
@@ -149,6 +149,7 @@#define SCFG_USB3PRM2CR 0x004#define SCFG_USB3PRM1CR_INIT 0x27672b2a#define USB_TXVREFTUNE 0x9 +#define USB_TXVREFTUNE 0x9#define USB_SQRXTUNE 0xFC7FFFFF#define USB_PCSTXSWINGFULL 0x47#define SCFG_QSPICLKCTLR 0x10
Signature · 1 line
2.1.0.27.g96db324
PATCH 11/14 armv8: Add workaround for USB erratum A-009008
Quoted 8 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB High Speed (HS) EYE Height Adjustment
This patch is adding the erratum for LS1043 and LS2080 SoCs.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/352d450e/attachment.sig>
PATCH 12/14 armv8/fsl-layerscape: add dwc3 gadget driver support
In reply to yinbo.zhuFrom: Rajat Srivastava <[email protected]>
Implements the dwc3 gadget driver support for LS1043 platform, and performs below operations:
1. Enables snooping support for DWC3 controller.
2. Enables cache coherency in LS1043 platform.
--- arch/arm/cpu/armv8/fsl-layerscape/soc.c | 93 +++++++++++++++++++++- .../include/asm/arch-fsl-layerscape/immap_lsch2.h | 7 ++ 2 files changed, 99 insertions(+), 1 deletion(-)
arch/arm/cpu/armv8/fsl-layerscape/soc.c +92 -1
@@ -25,6 +25,9 @@#include <fsl_validate.h> #endif #include <fsl_immap.h> +#include <usb.h> +#include <dwc3-uboot.h> +#include <linux/usb/xhci-fsl.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -570,11 +573,19 @@ void fsl_lsch2_early_init_f(void)out_be32 (&scfg->qspi_cfg,SCFG_QSPI_CLKSEL );#endif /* Make SEC reads and writes snoopable */ +#if defined(CONFIG_LS1043A ) +setbits_be32 (&scfg->snpcnfgcr,SCFG_SNPCNFGCR_SECRDSNP | +SCFG_SNPCNFGCR_SECWRSNP |SCFG_SNPCNFGCR_USB1RDSNP | +SCFG_SNPCNFGCR_USB1WRSNP |SCFG_SNPCNFGCR_USB2RDSNP | +SCFG_SNPCNFGCR_USB2WRSNP |SCFG_SNPCNFGCR_USB3RDSNP | +SCFG_SNPCNFGCR_USB3WRSNP ); +#else +/* Make SEC reads and writes snoopable */ setbits_be32 (&scfg->snpcnfgcr,SCFG_SNPCNFGCR_SECRDSNP |SCFG_SNPCNFGCR_SECWRSNP |SCFG_SNPCNFGCR_SATARDSNP |SCFG_SNPCNFGCR_SATAWRSNP ); - +#endif /* * Enable snoop requests and DVM message requests for * Slave insterface S4 (A53 core cluster)
@@ -633,6 +644,86 @@ int qspi_ahb_init(void) }#endif +#ifdef CONFIG_USB_DWC3 + +#if defined(CONFIG_LS1043A ) +static struct dwc3_device dwc3_device_data0 = { + .maximum_speed =USB_SPEED_HIGH , + .base =CONFIG_SYS_FSL_XHCI_USB1_ADDR , + .dr_mode =USB_DR_MODE_PERIPHERAL , + .index =0 , +}; + +static struct dwc3_device dwc3_device_data1 = { + .maximum_speed =USB_SPEED_HIGH , + .base =CONFIG_SYS_FSL_XHCI_USB2_ADDR , + .dr_mode =USB_DR_MODE_PERIPHERAL , + .index =1 , +}; + +static struct dwc3_device dwc3_device_data2 = { + .maximum_speed =USB_SPEED_HIGH , + .base =CONFIG_SYS_FSL_XHCI_USB3_ADDR , + .dr_mode =USB_DR_MODE_PERIPHERAL , + .index =2 , +}; + +int usb_gadget_handle_interrupts (int index) +{ +dwc3_uboot_handle_interrupt (index); +return 0 ; +} +#endif + +int board_usb_init (int index,enum usb_init_type init) +{ +switch (init) { +case USB_INIT_DEVICE : +switch (index) { +#if defined(CONFIG_LS1043A ) +case 0 : +dwc3_uboot_init (&dwc3_device_data0); +break ; +case 1 : +dwc3_uboot_init (&dwc3_device_data1); +break ; +case 2 : +dwc3_uboot_init (&dwc3_device_data2); +break ; +#endif +default : +printf ("Invalid Controller Index\n" ); +return -1 ; + } +#if defined(CONFIG_LS1043A ) +dwc3_core_incr_burst_enable (index,0xf ,0xf ); +dwc3_core_set_snooping (index, true); +#endif +break ; +default : +break ; + } + +return 0 ; +} + +int board_usb_cleanup (int index,enum usb_init_type init) +{ +switch (init) { +case USB_INIT_DEVICE : +#if defined(CONFIG_LS1043A ) +dwc3_uboot_exit (index); +#endif +break ; +default : +break ; + } +return 0 ; +} +#endif + + +#ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void ) {
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +7 -0
@@ -361,6 +361,13 @@ struct ccsr_gur {#define SCFG_SNPCNFGCR_SECRDSNP 0x80000000#define SCFG_SNPCNFGCR_SECWRSNP 0x40000000 +#define SCFG_SNPCNFGCR_USB1RDSNP 0x00200000 +#define SCFG_SNPCNFGCR_USB1WRSNP 0x00100000 +#define SCFG_SNPCNFGCR_USB2RDSNP 0x00008000 +#define SCFG_SNPCNFGCR_USB2WRSNP 0x00010000 +#define SCFG_SNPCNFGCR_USB3RDSNP 0x00002000 +#define SCFG_SNPCNFGCR_USB3WRSNP 0x00004000 +#define SCFG_SNPCNFGCR_SATARDSNP 0x00800000#define SCFG_SNPCNFGCR_SATAWRSNP 0x00400000
Signature · 1 line
2.1.0.27.g96db324
PATCH 12/14 armv8/fsl-layerscape: add dwc3 gadget driver support
Quoted 10 lines · yinbo.zhu
From: Rajat Srivastava <[email protected]>
Implements the dwc3 gadget driver support for LS1043 platform, and performs below operations:
1. Enables snooping support for DWC3 controller.
2. Enables cache coherency in LS1043 platform.Signed-off-by Rajat Srivastava <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/56fff9a3/attachment.sig>
PATCH 13/14 drivers:usb:xhci:fsl: Implement Erratum A-010151 for FSL USB3 controller
In reply to yinbo.zhuFrom: Sriram Dash <[email protected]>
Currently the controller by default enables the Receive Detect feature in P3 mode in USB 3.0 PHY. However, USB 3.0 PHY does not reliably support receive detection in P3 mode.
Enabling the USB3 controller to configure USB in P2 mode whenever the Receive Detect feature is required.
--- drivers/usb/host/xhci-dwc3.c | 5 +++++ drivers/usb/host/xhci-fsl.c | 7 +++++++ include/linux/usb/dwc3.h | 1 + 3 files changed, 13 insertions(+)
drivers/usb/host/xhci-dwc3.c +5 -0
@@ -97,3 +97,8 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val)setbits_le32 (&dwc3_reg->g_fladj,GFLADJ_30MHZ_REG_SEL |GFLADJ_30MHZ (val)); } + +void dwc3_set_rxdetect_power_mode (struct dwc3 *dwc3_reg,u32 val) +{ +setbits_le32 (&dwc3_reg->g_usb3pipectl[0 ], val); +}
drivers/usb/host/xhci-fsl.c +7 -0
@@ -86,6 +86,13 @@ static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci)fsl_xhci_set_beat_burst_length (fsl_xhci->dwc3_reg);/* +* A-010151: USB controller to configure USB in P2 mode +* whenever the Receive Detect feature is required +*/ +dwc3_set_rxdetect_power_mode (fsl_xhci->dwc3_reg, +DWC3_GUSB3PIPECTL_DISRXDETP3 ); + +/* * A-010151: The dwc3 phy TSMC 28-nm HPM 0.9/1.8 V does not * reliably support Rx Detect in P3 mode(P3 is the default * setting). Therefore, some USB3.0 devices may not be detected
include/linux/usb/dwc3.h +1 -0
@@ -220,5 +220,6 @@ void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode);void dwc3_core_soft_reset (struct dwc3 *dwc3_reg);int dwc3_core_init (struct dwc3 *dwc3_reg);void dwc3_set_fladj (struct dwc3 *dwc3_reg,u32 val); +void dwc3_set_rxdetect_power_mode (struct dwc3 *dwc3_reg,u32 val);#endif #endif /* __DWC3_H_ */
Signature · 1 line
2.1.0.27.g96db324
PATCH 13/14 drivers:usb:xhci:fsl: Implement Erratum A-010151 for FSL USB3 controller
Quoted 53 lines · yinbo.zhu
From: Sriram Dash <[email protected]>
Currently the controller by default enables the Receive Detect feature in P3 mode in USB 3.0 PHY. However, USB 3.0 PHY does not reliably support receive detection in P3 mode.
Enabling the USB3 controller to configure USB in P2 mode whenever the Receive Detect feature is required.Signed-off-by Sriram Dash <[email protected]>Signed-off-by Rajesh Bhagat <[email protected]>Signed-off-by yinbo.zhu <[email protected]>--- drivers/usb/host/xhci-dwc3.c | 5 +++++ drivers/usb/host/xhci-fsl.c | 7 +++++++ include/linux/usb/dwc3.h | 1 + 3 files changed, 13 insertions(+)drivers/usb/host/xhci-dwc3.c +5
-0@@ -97,3 +97,8 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val)setbits_le32 (&dwc3_reg->g_fladj,GFLADJ_30MHZ_REG_SEL |GFLADJ_30MHZ (val)); } + +void dwc3_set_rxdetect_power_mode (struct dwc3 *dwc3_reg,u32 val) +{ +setbits_le32 (&dwc3_reg->g_usb3pipectl[0 ], val); +}drivers/usb/host/xhci-fsl.c +7
-0@@ -86,6 +86,13 @@ static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci)fsl_xhci_set_beat_burst_length (fsl_xhci->dwc3_reg);/* +* A-010151: USB controller to configure USB in P2 mode +* whenever the Receive Detect feature is required +*/ +dwc3_set_rxdetect_power_mode (fsl_xhci->dwc3_reg, +DWC3_GUSB3PIPECTL_DISRXDETP3 ); + +/* * A-010151: The dwc3 phy TSMC 28-nm HPM 0.9/1.8 V does not * reliably support Rx Detect in P3 mode(P3 is the default * setting). Therefore, some USB3.0 devices may not be detected include/linux/usb/dwc3.h +0
-0
include/linux/usb/dwc3.h void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode); · line 225
Quoted 6 lines
include/linux/usb/dwc3.h +1
-0@@ -220,5 +220,6 @@ void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode);void dwc3_core_soft_reset (struct dwc3 *dwc3_reg);int dwc3_core_init (struct dwc3 *dwc3_reg);void dwc3_set_fladj (struct dwc3 *dwc3_reg,u32 val); +void dwc3_set_rxdetect_power_mode (struct dwc3 *dwc3_reg,u32 val);#endif #endif /* __DWC3_H_ */
Marek?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/f60edcf8/attachment.sig>
PATCH 14/14 uboot: Kconfig: add ERRATUM config to Kconfig for solve compile issue.
In reply to yinbo.zhuadd erratum config to Kconfig and instead of config.h's config for solve ls2080rdb compiling issue
--- arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h | 1 + 1 file changed, 1 insertion(+)
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h +1 -0
@@ -130,6 +130,7 @@#define DCFG_RCWSR15_IFCGRPABASE_QSPI 0x3#define DCFG_DCSR_BASE 0X700100000ULL +#define DCSR_BASE 0x700000000ULL#define DCSR_USB_PHY1 0x4600000#define DCSR_USB_PHY2 0x4610000#define DCSR_USB_PHY_RX_OVRD_IN_HI 0x1006
Signature · 1 line
2.1.0.27.g96db324
PATCH 1/14 armv7: Add workaround for USB erratum A-009008
In reply to yinbo.zhuQuoted 7 lines · yinbo.zhu
From: Suresh Gupta <[email protected]>
USB High Speed (HS) EYE Height Adjustment
This patch is adding the erratum for LS1021.Signed-off-by Sriram Dash <[email protected]>Signed-off-by yinbo.zhu <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/0a856253/attachment.sig>