Skip to contentSkip to conversation

arm: mvebu: a38x: USB2 serdes changes

PATCH New Chris Packham 2 participants 5 messages Jun 25, 2020 – Jun 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover arm: mvebu: a38x: USB2 serdes changes

While debugging this issue with Marvell I found the change that was made to Marvell's u-boot but doesn't appear to have made it upstream. We're in the process of checking the affect it has on the USB compliance testing we're doing.

I have regression tested it against a couple of USB devices (Ethernet and Storage). But it'd be good to get some more coverage against other hardware platforms and USB devices.

Chris Packham (2):
arm: mvebu: a38x: Fix typo
arm: mvebu: a38x: Adjust UTMI PHY parameters

 .../serdes/a38x/high_speed_env_spec.c         | 27 +++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/2 arm: mvebu: a38x: Fix typo

Fix spelling of Alignment.

---

 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +1 -1
index 67a00cf1cf7b..d4480622c89c 100644
@@ -533,7 +533,7 @@ struct op_params pex_and_usb3_tx_config_params3[] = {
 struct op_params pex_by4_config_params[] = {
 	/* unit_base_reg, unit_offset, mask, data, wait_time, num_of_loops */
 	{GLOBAL_CLK_SRC_HI, 0x800, 0x7, {0x5, 0x0, 0x0, 0x2}, 0, 0},
-	/* Lane Alignement enable */
+	/* Lane Alignment enable */
 	{LANE_ALIGN_REG0, 0x800, 0x1000, {0x0, 0x0, 0x0, 0x0}, 0, 0},
 	/* Max PLL phy config */
 	{CALIBRATION_CTRL_REG, 0x800, 0x1000, {0x1000, 0x1000, 0x1000, 0x1000},
Signature · 1 line
2.27.0
#2 lore raw

PATCH 1/2 arm: mvebu: a38x: Fix typo

Quoted 3 lines · Chris Packham

Fix spelling of Alignment.

Thanks,
Stefan

Quoted 19 lines

---

  arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +1 -1
index 67a00cf1cf7b..d4480622c89c 100644
@@ -533,7 +533,7 @@ struct op_params pex_and_usb3_tx_config_params3[] = {
  struct op_params pex_by4_config_params[] = {
  	/* unit_base_reg, unit_offset, mask, data, wait_time, num_of_loops */
  	{GLOBAL_CLK_SRC_HI, 0x800, 0x7, {0x5, 0x0, 0x0, 0x2}, 0, 0},
-	/* Lane Alignement enable */
+	/* Lane Alignment enable */
  	{LANE_ALIGN_REG0, 0x800, 0x1000, {0x0, 0x0, 0x0, 0x0}, 0, 0},
  	/* Max PLL phy config */
  	{CALIBRATION_CTRL_REG, 0x800, 0x1000, {0x1000, 0x1000, 0x1000, 0x1000},
#3 lore raw

PATCH 2/2 arm: mvebu: a38x: Adjust UTMI PHY parameters

In reply to Chris Packham

When running USB compliance tests on our Armada-385 hardware platforms we have seen some eye mask violations. Marvell's internal documentation
says: Based on silicon test results, it is recommended to change the impedance calibration threshold setting to 0x6 prior to calibration.

Port changes from Marvell's u-boot fork[1] to address this.

[1] - https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/a6221551

---

 .../serdes/a38x/high_speed_env_spec.c         | 25 ++++++++++++++++---
 1 file changed, 21 insertions(+), 4 deletions(-)
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +21 -4
index d4480622c89c..2454730e6d86 100644
@@ -672,12 +672,29 @@ struct op_params usb2_power_up_params[] = {
 	{0xc200c, 0x0 /*NA*/, 0x1000000, {0x1000000}, 0, 0},
 	/* Phy0 register 3  - TX Channel control 0 */
 	{0xc400c, 0x0 /*NA*/, 0x1000000, {0x1000000}, 0, 0},
-	/* check PLLCAL_DONE is set and IMPCAL_DONE is set */
+	/* Decrease the amplitude of the low speed eye to meet the spec */
+	{0xc000c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	{0xc200c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	{0xc400c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	/* Change the High speed impedance threshold */
+	{0xc0008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	{0xc2008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	{0xc4008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	/* Change the squelch level of the receiver to meet the receiver electrical measurements (squelch and receiver sensitivity tests) */
+	{0xc0014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	{0xc2014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	{0xc4014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	/* Check PLLCAL_DONE is set and IMPCAL_DONE is set */
 	{0xc0008, 0x0 /*NA*/, 0x80800000, {0x80800000}, 1, 1000},
-	/* check REG_SQCAL_DONE  is set */
+	/* Check REG_SQCAL_DONE  is set */
 	{0xc0018, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000},
-	/* check PLL_READY  is set */
-	{0xc0000, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000}
+	/* Check PLL_READY  is set */
+	{0xc0000, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000},
+	/* Start calibrate of high seed impedance */
+	{0xc0008, 0x0 /*NA*/, 0x2000, {0x2000}, 0, 0},
+	{0x0, 0x0 /*NA*/, 0x0, {0x0}, 10, 0},
+	/* De-assert  the calibration signal */
+	{0xc0008, 0x0 /*NA*/, 0x2000, {0x0}, 0, 0},
 };
 
 /*
Signature · 1 line
2.27.0
#4 lore raw

PATCH 2/2 arm: mvebu: a38x: Adjust UTMI PHY parameters

Quoted 10 lines · Chris Packham

When running USB compliance tests on our Armada-385 hardware platforms we have seen some eye mask violations. Marvell's internal documentation
says: Based on silicon test results, it is recommended to change the impedance calibration threshold setting to 0x6 prior to calibration.

Port changes from Marvell's u-boot fork[1] to address this.

[1] - https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/a6221551

Thanks,
Stefan

Quoted 34 lines

---

  .../serdes/a38x/high_speed_env_spec.c         | 25 ++++++++++++++++---
  1 file changed, 21 insertions(+), 4 deletions(-)
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +14 -4
index d4480622c89c..2454730e6d86 100644
@@ -672,12 +672,29 @@ struct op_params usb2_power_up_params[] = {
  	{0xc200c, 0x0 /*NA*/, 0x1000000, {0x1000000}, 0, 0},
  	/* Phy0 register 3  - TX Channel control 0 */
  	{0xc400c, 0x0 /*NA*/, 0x1000000, {0x1000000}, 0, 0},
-	/* check PLLCAL_DONE is set and IMPCAL_DONE is set */
+	/* Decrease the amplitude of the low speed eye to meet the spec */
+	{0xc000c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	{0xc200c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	{0xc400c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
+	/* Change the High speed impedance threshold */
+	{0xc0008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	{0xc2008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	{0xc4008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
+	/* Change the squelch level of the receiver to meet the receiver electrical measurements (squelch and receiver sensitivity tests) */
+	{0xc0014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	{0xc2014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	{0xc4014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
+	/* Check PLLCAL_DONE is set and IMPCAL_DONE is set */
  	{0xc0008, 0x0 /*NA*/, 0x80800000, {0x80800000}, 1, 1000},
-	/* check REG_SQCAL_DONE  is set */
+	/* Check REG_SQCAL_DONE  is set */
  	{0xc0018, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000},
-	/* check PLL_READY  is set */
-	{0xc0000, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000}

arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c struct op_params usb2_power_up_params[] = { · line 700

Quoted 10 lines
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +7 -0
+	/* Check PLL_READY  is set */
+	{0xc0000, 0x0 /*NA*/, 0x80000000, {0x80000000}, 1, 1000},
+	/* Start calibrate of high seed impedance */
+	{0xc0008, 0x0 /*NA*/, 0x2000, {0x2000}, 0, 0},
+	{0x0, 0x0 /*NA*/, 0x0, {0x0}, 10, 0},
+	/* De-assert  the calibration signal */
+	{0xc0008, 0x0 /*NA*/, 0x2000, {0x0}, 0, 0},
  };
 
  /*

Viele Gr??e,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de