200-clearfog-reset-usom-onboard-1512-phy.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. From 15d52c4067b8d8a1d7a002aec41c5e6c0a8678cd Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jonas.gorski@gmail.com>
  3. Date: Fri, 23 Sep 2016 13:58:14 +0200
  4. Subject: [PATCH] clearfog: reset usom onboard 1512 phy
  5. Use GPIO19 which is wired to the uSOM phy reset signal in order to reset
  6. the uSOM's 88E81512 gigabit Ethernet phy.
  7. This GPIO is valid on ClearFog rev 2.1 and newer.
  8. Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
  9. [jonas.gorski: adapted to upstream u-boot code]
  10. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
  11. ---
  12. board/solidrun/clearfog/clearfog.c | 4 ++++
  13. 1 file changed, 4 insertions(+)
  14. --- a/board/solidrun/clearfog/clearfog.c
  15. +++ b/board/solidrun/clearfog/clearfog.c
  16. @@ -131,8 +131,12 @@ int board_init(void)
  17. /* Toggle GPIO41 to reset onboard switch and phy */
  18. clrbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
  19. clrbits_le32(MVEBU_GPIO1_BASE + 0x4, BIT(9));
  20. + /* GPIO 19 on ClearFog rev 2.1 controls the uSOM onboard phy reset */
  21. + clrbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19));
  22. + clrbits_le32(MVEBU_GPIO0_BASE + 0x4, BIT(19));
  23. mdelay(1);
  24. setbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
  25. + setbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19));
  26. mdelay(10);
  27. /* Init I2C IO expanders */