diff --git a/eth_dummy_phy/README.md b/eth_dummy_phy/README.md index da9a160..4c58075 100644 --- a/eth_dummy_phy/README.md +++ b/eth_dummy_phy/README.md @@ -23,8 +23,14 @@ Note that usage of the `Dummy PHY` component does not conform with the RevMII st eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG(); // Update vendor specific MAC config based on board configuration // No SMI, speed/duplex must be statically configured the same in both devices + // MIIM interface is not used since does not provide access to all registers +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0) + esp32_emac_config.smi_gpio.mdc_num = -1; + esp32_emac_config.smi_gpio.mdio_num = -1; +#else esp32_emac_config.smi_mdc_gpio_num = -1; esp32_emac_config.smi_mdio_gpio_num = -1; +#endif // Create new ESP32 Ethernet MAC instance esp_eth_mac_t *mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config); diff --git a/ksz8863/examples/simple_switch/main/simple_switch_main.c b/ksz8863/examples/simple_switch/main/simple_switch_main.c index f6afbeb..946b3ff 100644 --- a/ksz8863/examples/simple_switch/main/simple_switch_main.c +++ b/ksz8863/examples/simple_switch/main/simple_switch_main.c @@ -274,8 +274,9 @@ void app_main(void) eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG(); phy_config.reset_gpio_num = -1; // KSZ8863 is reset by separate function call since multiple instances exist - esp32_emac_config.smi_mdc_gpio_num = -1; // MIIM interface is not used since does not provide access to all registers - esp32_emac_config.smi_mdio_gpio_num = -1; + // MIIM interface is not used since does not provide access to all registers + esp32_emac_config.smi_gpio.mdc_num = -1; + esp32_emac_config.smi_gpio.mdio_num = -1; // Init Host Ethernet Interface (Port 3) esp_eth_mac_t *host_mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config); diff --git a/ksz8863/examples/switch_mode/main/switch_main.c b/ksz8863/examples/switch_mode/main/switch_main.c index 5860e62..3d91da9 100644 --- a/ksz8863/examples/switch_mode/main/switch_main.c +++ b/ksz8863/examples/switch_mode/main/switch_main.c @@ -313,8 +313,9 @@ void app_main(void) eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG(); phy_config.reset_gpio_num = -1; // KSZ8863 is reset by separate function call since multiple instances exist - esp32_emac_config.smi_mdc_gpio_num = -1; // MIIM interface is not used since does not provide access to all registers - esp32_emac_config.smi_mdio_gpio_num = -1; + // MIIM interface is not used since does not provide access to all registers + esp32_emac_config.smi_gpio.mdc_num = -1; + esp32_emac_config.smi_gpio.mdio_num = -1; // Init Host Ethernet Interface (Port 3) esp_eth_mac_t *host_mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config); diff --git a/ksz8863/examples/two_ports_mode/main/two_ports_main.c b/ksz8863/examples/two_ports_mode/main/two_ports_main.c index 61ea8c0..4e2c574 100644 --- a/ksz8863/examples/two_ports_mode/main/two_ports_main.c +++ b/ksz8863/examples/two_ports_mode/main/two_ports_main.c @@ -306,8 +306,9 @@ void app_main(void) eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG(); phy_config.reset_gpio_num = -1; // KSZ8863 is reset by separate function call since multiple instances exist - esp32_emac_config.smi_mdc_gpio_num = -1; // MIIM interface is not used since does not provide access to all registers - esp32_emac_config.smi_mdio_gpio_num = -1; + // MIIM interface is not used since does not provide access to all registers + esp32_emac_config.smi_gpio.mdc_num = -1; + esp32_emac_config.smi_gpio.mdio_num = -1; // Init Host Ethernet Interface (Port 3) esp_eth_mac_t *host_mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config); diff --git a/ksz8863/idf_component.yml b/ksz8863/idf_component.yml index b30f973..2e3a796 100644 --- a/ksz8863/idf_component.yml +++ b/ksz8863/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.2.5" +version: "0.2.6" targets: - esp32 - esp32p4 diff --git a/ksz8863/src/esp_eth_pmac_ksz8863.c b/ksz8863/src/esp_eth_pmac_ksz8863.c index 3737166..c835007 100644 --- a/ksz8863/src/esp_eth_pmac_ksz8863.c +++ b/ksz8863/src/esp_eth_pmac_ksz8863.c @@ -329,7 +329,7 @@ static esp_err_t pmac_ksz8863_get_mac_tbl(pmac_ksz8863_t *pmac, ksz8863_indir_ac return ret; } -static esp_err_t pmac_ksz8863_custom_ioctl(esp_eth_mac_t *mac, uint32_t cmd, void *data) +static esp_err_t pmac_ksz8863_custom_ioctl(esp_eth_mac_t *mac, int cmd, void *data) { esp_err_t ret = ESP_OK; pmac_ksz8863_t *pmac = __containerof(mac, pmac_ksz8863_t, parent);