All of lore.kernel.org
 help / color / mirror / Atom feed
From: yinbo.zhu <yinbo.zhu@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/14] armv7: Add workaround for USB erratum A-009007
Date: Wed, 17 May 2017 20:04:56 +0800	[thread overview]
Message-ID: <1495022706-20200-4-git-send-email-yinbo.zhu@nxp.com> (raw)
In-Reply-To: <1495022706-20200-1-git-send-email-yinbo.zhu@nxp.com>

From: Suresh Gupta <suresh.gupta@freescale.com>

USB3PHY Observing Intermittent Failure in Rx
This patch is adding the erratum for LS1021.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
---
 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(+)

diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig
index 92afe09..926903b 100644
--- a/arch/arm/cpu/armv7/ls102xa/Kconfig
+++ b/arch/arm/cpu/armv7/ls102xa/Kconfig
@@ -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
diff --git a/arch/arm/cpu/armv7/ls102xa/soc.c b/arch/arm/cpu/armv7/ls102xa/soc.c
index 19eb361..4754907 100644
--- a/arch/arm/cpu/armv7/ls102xa/soc.c
+++ b/arch/arm/cpu/armv7/ls102xa/soc.c
@@ -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;
 }
 
diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
index 5f05e0d..fc406f7 100644
--- a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
+++ b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
@@ -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 */
-- 
2.1.0.27.g96db324

  parent reply	other threads:[~2017-05-17 12:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 12:04 [U-Boot] [PATCH 01/14] armv7: Add workaround for USB erratum A-009008 yinbo.zhu
2017-05-17 12:04 ` [U-Boot] [PATCH 02/14] armv7: Add workaround for USB erratum A-009798 yinbo.zhu
2017-05-17 12:04 ` [U-Boot] [PATCH 03/14] armv7: Add workaround for USB erratum A-008997 yinbo.zhu
2017-05-17 12:04 ` yinbo.zhu [this message]
2017-05-17 12:04 ` [U-Boot] [PATCH 05/14] armv8: Add workaround for USB erratum A-009798 yinbo.zhu
2017-05-17 12:04 ` [U-Boot] [PATCH 06/14] armv8: Add workaround for USB erratum A-008997 yinbo.zhu
2017-05-17 12:04 ` [U-Boot] [PATCH 07/14] armv8: Add workaround for USB erratum A-009007 yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 08/14] usb: dwc3: Add helper functions to enable snooping and burst settings yinbo.zhu
2017-05-25 17:53   ` york sun
2017-09-14 19:59   ` [U-Boot] [U-Boot, " York Sun
2017-05-17 12:05 ` [U-Boot] [PATCH 09/14] usb: ums: support multiple controllers using controller_index yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 10/14] config: ls1012aqds: Add USB EHCI support for ls1012aqds yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 11/14] armv8: Add workaround for USB erratum A-009008 yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 12/14] armv8/fsl-layerscape: add dwc3 gadget driver support yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 13/14] drivers:usb:xhci:fsl: Implement Erratum A-010151 for FSL USB3 controller yinbo.zhu
2017-05-17 12:05 ` [U-Boot] [PATCH 14/14] uboot: Kconfig: add ERRATUM config to Kconfig for solve compile issue yinbo.zhu
  -- strict thread matches above, loose matches on Subject: below --
2017-05-17 11:06 [U-Boot] [PATCH 01/14] armv7: Add workaround for USB erratum A-009008 yinbo.zhu
2017-05-17 11:06 ` [U-Boot] [PATCH 04/14] armv7: Add workaround for USB erratum A-009007 yinbo.zhu
2017-05-16 12:16 [U-Boot] [PATCH 01/14] armv7: Add workaround for USB erratum A-009008 yinbo.zhu
2017-05-16 12:16 ` [U-Boot] [PATCH 04/14] armv7: Add workaround for USB erratum A-009007 yinbo.zhu
2017-05-16 19:33   ` Tom Rini
2017-05-05  6:07 [U-Boot] [PATCH 01/14] armv7: Add workaround for USB erratum A-009008 yinbo.zhu
2017-05-05  6:07 ` [U-Boot] [PATCH 04/14] armv7: Add workaround for USB erratum A-009007 yinbo.zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495022706-20200-4-git-send-email-yinbo.zhu@nxp.com \
    --to=yinbo.zhu@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.