diff mbox

[U-Boot] arm: mvebu: clearfog: reset uSOM onboard 1512 phy

Message ID 20170509115444.GA4503@eris.local
State Accepted
Commit fb9765d5f9a1fbe7ca9c472cca9ceb561b02c1a1
Delegated to: Stefan Roese
Headers show

Commit Message

Patrick Wildt May 9, 2017, 11:54 a.m. UTC
Use GPIO19 which is wired to the uSOM phy reset signal in order to reset
the uSOM's 1512 Gigabit Ethernet phy.

This GPIO is valid on ClearFog rev 2.1 and newer.

Taken from SolidRun's specialised u-boot, see
https://github.com/SolidRun/u-boot-armada38x/commit/f906e3df172e07ac82cdd87b278d7896949262ea

Signed-off-by: Patrick Wildt <patrick@blueri.se>
---
 board/solidrun/clearfog/clearfog.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stefan Roese May 31, 2017, 8:57 a.m. UTC | #1
On 09.05.2017 13:54, Patrick Wildt wrote:
> Use GPIO19 which is wired to the uSOM phy reset signal in order to reset
> the uSOM's 1512 Gigabit Ethernet phy.
> 
> This GPIO is valid on ClearFog rev 2.1 and newer.
> 
> Taken from SolidRun's specialised u-boot, see
> https://github.com/SolidRun/u-boot-armada38x/commit/f906e3df172e07ac82cdd87b278d7896949262ea
> 
> Signed-off-by: Patrick Wildt <patrick@blueri.se>

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox

Patch

diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 2773f5957e..3a8257cac3 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -131,8 +131,12 @@  int board_init(void)
 	/* Toggle GPIO41 to reset onboard switch and phy */
 	clrbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
 	clrbits_le32(MVEBU_GPIO1_BASE + 0x4, BIT(9));
+	/* GPIO 19 on ClearFog rev 2.1 controls the uSOM onboard phy reset */
+	clrbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19));
+	clrbits_le32(MVEBU_GPIO0_BASE + 0x4, BIT(19));
 	mdelay(1);
 	setbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
+	setbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19));
 	mdelay(10);
 
 	/* Init I2C IO expanders */