summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xboard/hardkernel/odroid-common/lt8619c.c7
-rw-r--r--board/hardkernel/odroidc4/odroidc4.c4
-rw-r--r--board/hardkernel/odroidn2/odroidn2.c4
3 files changed, 13 insertions, 2 deletions
diff --git a/board/hardkernel/odroid-common/lt8619c.c b/board/hardkernel/odroid-common/lt8619c.c
index efd1849749..0ddbebfae0 100755
--- a/board/hardkernel/odroid-common/lt8619c.c
+++ b/board/hardkernel/odroid-common/lt8619c.c
@@ -121,8 +121,10 @@ static int lt8619c_reg_write(uint8_t reg, uint8_t data)
outbuf[0] = reg;
outbuf[1] = data;
- if (aml_i2c_xfer(&msg, 1) != 1)
+ if (aml_i2c_xfer(&msg, 1) != 1) {
printf("i2c 0x%02x 0x%02x write failed\n", reg, data);
+ return -1;
+ }
return 0;
}
@@ -150,7 +152,8 @@ static bool lt8619c_check_chipid(void)
{
unsigned int chip_id[3];
- lt8619c_reg_write(0xff, 0x60);
+ if (lt8619c_reg_write(0xff, 0x60) < 0)
+ return false;
chip_id[0] = lt8619c_reg_read(0x00);
chip_id[1] = lt8619c_reg_read(0x01);
diff --git a/board/hardkernel/odroidc4/odroidc4.c b/board/hardkernel/odroidc4/odroidc4.c
index 5a858a3c32..561e9258a1 100644
--- a/board/hardkernel/odroidc4/odroidc4.c
+++ b/board/hardkernel/odroidc4/odroidc4.c
@@ -109,6 +109,10 @@ extern int designware_initialize(ulong base_addr, u32 interface);
int board_eth_init(bd_t *bis)
{
+ run_command("gpio clear GPIOZ_15", 0);
+ mdelay(100);
+ run_command("gpio input GPIOZ_15", 0);
+
#ifdef ETHERNET_EXTERNAL_PHY
dwmac_meson_cfg_drive_strength();
setup_net_chip_ext();
diff --git a/board/hardkernel/odroidn2/odroidn2.c b/board/hardkernel/odroidn2/odroidn2.c
index 1ad9f69f48..be391e9de7 100644
--- a/board/hardkernel/odroidn2/odroidn2.c
+++ b/board/hardkernel/odroidn2/odroidn2.c
@@ -108,6 +108,10 @@ extern int designware_initialize(ulong base_addr, u32 interface);
int board_eth_init(bd_t *bis)
{
+ run_command("gpio clear GPIOZ_15", 0);
+ mdelay(100);
+ run_command("gpio input GPIOZ_15", 0);
+
#ifdef ETHERNET_EXTERNAL_PHY
dwmac_meson_cfg_drive_strength();
setup_net_chip_ext();