Skip to contentSkip to conversation

Bananapi: Fix ethernet device initialization

PATCH New Maxin B. John 2 participants 2 messages Jun 7, 2015 – Jun 8, 2015

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

PATCH v2 1/1 Bananapi: Fix ethernet device initialization

Ethernet device initialization fails with the following message:
Net: PH: dir_output: error: gpio PH23 not reserved
Phy 1 not found
PHY reset timed out
eth0: ethernet at 01c50000

Tested on Banana Pi board.

---
 arch/arm/cpu/armv7/sunxi/board.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/sunxi/board.c +1 -0
index a82c8b9..4b2494e 100644
@@ -223,6 +223,7 @@ int cpu_eth_init(bd_t *bis)
 	__maybe_unused int rc;
 
 #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "macpwr");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 Bananapi: Fix ethernet device initialization

Hi Maxin,

Quoted 9 lines · Maxin B. John

Ethernet device initialization fails with the following message:
Net: PH: dir_output: error: gpio PH23 not reserved
Phy 1 not found
PHY reset timed out
eth0: ethernet at 01c50000

Tested on Banana Pi board.

Thanks, I actually wrote exactly the same patch myself yesterday, and that just got acked by Ian today. I'll make sure to get the fix upstream soonish.

Regards,

Hans

Quoted 17 lines
---
  arch/arm/cpu/armv7/sunxi/board.c | 1 +
  1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/sunxi/board.c +1 -0
index a82c8b9..4b2494e 100644
@@ -223,6 +223,7 @@ int cpu_eth_init(bd_t *bis)
  	__maybe_unused int rc;
 
  #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "macpwr");
  	gpio_direction_output(CONFIG_MACPWR, 1);
  	mdelay(200);
  #endif