Skip to content

Commit

Permalink
Merge branch 'bugfix/eth_insert_min_hw_reset_time_v4.0' into 'release…
Browse files Browse the repository at this point in the history
…/v4.0'

ethernet: insert min assert time for PHY HW reset (v4.0)

See merge request espressif/esp-idf!9581
  • Loading branch information
david-cermak committed Jul 13, 2020
2 parents 80e0be6 + 0100d70 commit 5a99038
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/esp_eth/src/esp_eth_phy_dm9051.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ static esp_err_t dm9051_reset_hw(esp_eth_phy_t *phy)
gpio_pad_select_gpio(dm9051->reset_gpio_num);
gpio_set_direction(dm9051->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(dm9051->reset_gpio_num, 0);
ets_delay_us(100); // insert min input assert time
gpio_set_level(dm9051->reset_gpio_num, 1);
}
return ESP_OK;
Expand Down
1 change: 1 addition & 0 deletions components/esp_eth/src/esp_eth_phy_dp83848.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ static esp_err_t dp83848_reset_hw(esp_eth_phy_t *phy)
gpio_pad_select_gpio(dp83848->reset_gpio_num);
gpio_set_direction(dp83848->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(dp83848->reset_gpio_num, 0);
ets_delay_us(100); // insert min input assert time
gpio_set_level(dp83848->reset_gpio_num, 1);
}
return ESP_OK;
Expand Down
1 change: 1 addition & 0 deletions components/esp_eth/src/esp_eth_phy_ip101.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static esp_err_t ip101_reset_hw(esp_eth_phy_t *phy)
gpio_pad_select_gpio(ip101->reset_gpio_num);
gpio_set_direction(ip101->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(ip101->reset_gpio_num, 0);
ets_delay_us(100); // insert min input assert time
gpio_set_level(ip101->reset_gpio_num, 1);
}
return ESP_OK;
Expand Down
1 change: 1 addition & 0 deletions components/esp_eth/src/esp_eth_phy_lan8720.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ static esp_err_t lan8720_reset_hw(esp_eth_phy_t *phy)
gpio_pad_select_gpio(lan8720->reset_gpio_num);
gpio_set_direction(lan8720->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(lan8720->reset_gpio_num, 0);
ets_delay_us(100); // insert min input assert time
gpio_set_level(lan8720->reset_gpio_num, 1);
}
return ESP_OK;
Expand Down
1 change: 1 addition & 0 deletions components/esp_eth/src/esp_eth_phy_rtl8201.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ static esp_err_t rtl8201_reset_hw(esp_eth_phy_t *phy)
gpio_pad_select_gpio(rtl8201->reset_gpio_num);
gpio_set_direction(rtl8201->reset_gpio_num, GPIO_MODE_OUTPUT);
gpio_set_level(rtl8201->reset_gpio_num, 0);
ets_delay_us(100); // insert min input assert time
gpio_set_level(rtl8201->reset_gpio_num, 1);
}
return ESP_OK;
Expand Down

0 comments on commit 5a99038

Please sign in to comment.