Skip to contentSkip to conversation

board/t2080rdb: reset cs4315 phy

PATCH New Shengzhou Liu 2 participants 2 messages Apr 22, 2015 – May 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/t2080rdb: reset cs4315 phy

CS4315 PHY doesn't support phy-reset by software, it needs to reset it by hardware via CPLD control.

---
 board/freescale/t208xrdb/cpld.h     | 3 +++
 board/freescale/t208xrdb/t208xrdb.c | 7 +++++++
 2 files changed, 10 insertions(+)
board/freescale/t208xrdb/cpld.h +3 -0
index 3f15338..9bd5247 100644
@@ -40,3 +40,6 @@ void cpld_write(unsigned int reg, u8 value);
 #define CPLD_LBMAP_RESET	0xFF
 #define CPLD_LBMAP_SHIFT	0x03
 #define CPLD_BOOT_SEL		0x80
+
+/* RSTCON Register */
+#define CPLD_RSTCON_EDC_RST	0x04
board/freescale/t208xrdb/t208xrdb.c +7 -0
index ad393df..0c2c1c5 100644
@@ -107,6 +107,13 @@ unsigned long get_board_ddr_clk(void)
 
 int misc_init_r(void)
 {
+	u8 reg;
+
+	/* Reset CS4315 PHY */
+	reg = CPLD_READ(reset_ctl);
+	reg |= CPLD_RSTCON_EDC_RST;
+	CPLD_WRITE(reset_ctl, reg);
+
 	return 0;
 }
 
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/1 board/t2080rdb: reset cs4315 phy

Quoted 9 lines · Shengzhou Liu

CS4315 PHY doesn't support phy-reset by software, it needs to reset it by hardware via CPLD control.

---
 board/freescale/t208xrdb/cpld.h     | 3 +++
 board/freescale/t208xrdb/t208xrdb.c | 7 +++++++
 2 files changed, 10 insertions(+)

Applied to u-boot-mpc85xx master. Awaiting upstream.

York