add psram check for RMII workaround

This commit is contained in:
technyon
2024-12-21 07:44:07 +01:00
parent 43c425f762
commit dc43b45f33
5 changed files with 35 additions and 2 deletions

View File

@@ -6,6 +6,9 @@
#ifdef CONFIG_IDF_TARGET_ESP32
#include "esp_private/esp_gpio_reserve.h"
#include "util/PSRAM.h"
#include <bootloader_common.h>
#endif
extern bool ethCriticalFailure;
@@ -97,7 +100,11 @@ void EthernetDevice::initialize()
// sources:
// https://github.com/arendst/Tasmota/commit/f8fbe153000591727e40b5007e0de78c33833131
// https://github.com/arendst/Tasmota/commit/f8fbe153000591727e40b5007e0de78c33833131#diff-32fc0eefbf488dd507b3bef52189bbe37158737aba6f96fe98a8746dc5021955R417
esp_gpio_revoke(0xFFFFFFFFFFFFFFFF);
uint32_t pkg_version = bootloader_common_get_chip_ver_pkg();
if(PSRAM::found && pkg_version <= 3)
{
esp_gpio_revoke(0xFFFFFFFFFFFFFFFF);
}
ethCriticalFailure = true;
_hardwareInitialized = ETH.begin(_type, _phy_addr, _mdc, _mdio, _power, _clock_mode);