P4
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#define NUKI_HUB_VERSION "9.09"
|
||||
#define NUKI_HUB_VERSION_INT (uint32_t)909
|
||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||
#define NUKI_HUB_DATE "2025-02-20"
|
||||
#define NUKI_HUB_DATE "2025-03-03"
|
||||
|
||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||
@@ -120,6 +120,8 @@
|
||||
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32-gl-s10.bin"
|
||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_LATEST_RELEASE_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32.bin"
|
||||
#define GITHUB_LATEST_UPDATER_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin"
|
||||
#define NUKI_HUB_HW (char*)"ESP32-GL-S10"
|
||||
#define BOOT_BUTTON_GPIO (gpio_num_t)0
|
||||
#else
|
||||
@@ -135,6 +137,8 @@
|
||||
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32.bin"
|
||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_LATEST_RELEASE_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32-gl-s10.bin"
|
||||
#define GITHUB_LATEST_UPDATER_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin"
|
||||
#define NUKI_HUB_HW (char*)"ESP32"
|
||||
#define BOOT_BUTTON_GPIO (gpio_num_t)0
|
||||
#endif
|
||||
|
||||
@@ -329,7 +329,7 @@ const std::vector<int> Gpio::getDisabledPins() const
|
||||
disabledPins.push_back(_preferences->getInt(preference_network_custom_mdc, -1));
|
||||
disabledPins.push_back(_preferences->getInt(preference_network_custom_mdio, -1));
|
||||
break;
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
case 4:
|
||||
disabledPins.push_back(12);
|
||||
disabledPins.push_back(ETH_RESET_PIN_LAN8720);
|
||||
|
||||
@@ -1609,6 +1609,11 @@ esp_err_t WebCfgServer::buildOtaHtml(PsychicRequest *request, PsychicResponse* r
|
||||
{
|
||||
response.print("<form onsubmit=\"return confirm('Do you really want to update to the latest release?');\" action=\"/get\" method=\"get\" style=\"float: left; margin-right: 10px\"><input type=\"hidden\" name=\"page\" value=\"autoupdate\"><input type=\"hidden\" name=\"other\" value=\"1\" /><input type=\"hidden\" name=\"release\" value=\"1\" /><input type=\"hidden\" name=\"token\" value=\"" + _confirmCode + "\" /><br><input type=\"submit\" style=\"background: blue\" value=\"Update to other PSRAM release version\"></form>");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32) && !defined(NUKI_TARGET_GL_S10)
|
||||
if(_preferences->getInt(preference_network_hardware) == 8)
|
||||
{
|
||||
response.print("<form onsubmit=\"return confirm('Do you really want to update to the latest release?');\" action=\"/get\" method=\"get\" style=\"float: left; margin-right: 10px\"><input type=\"hidden\" name=\"page\" value=\"autoupdate\"><input type=\"hidden\" name=\"other\" value=\"1\" /><input type=\"hidden\" name=\"release\" value=\"1\" /><input type=\"hidden\" name=\"token\" value=\"" + _confirmCode + "\" /><br><input type=\"submit\" style=\"background: blue\" value=\"Update to specific GL-S10 release version\"></form>");
|
||||
}
|
||||
#endif
|
||||
response.print("<div style=\"clear: both\"></div><br>");
|
||||
|
||||
@@ -4825,7 +4830,7 @@ esp_err_t WebCfgServer::buildCustomNetworkConfigHtml(PsychicRequest *request, Ps
|
||||
response.print("<table>");
|
||||
printDropDown(&response, "NWCUSTPHY", "PHY", String(_preferences->getInt(preference_network_custom_phy)), getNetworkCustomPHYOptions(), "");
|
||||
printInputField(&response, "NWCUSTADDR", "ADDR", _preferences->getInt(preference_network_custom_addr, 1), 6, "");
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
printDropDown(&response, "NWCUSTCLK", "CLK", String(_preferences->getInt(preference_network_custom_clk, 0)), getNetworkCustomCLKOptions(), "internalopt");
|
||||
printInputField(&response, "NWCUSTPWR", "PWR", _preferences->getInt(preference_network_custom_pwr, 12), 6, "class=\"internalopt\"");
|
||||
printInputField(&response, "NWCUSTMDIO", "MDIO", _preferences->getInt(preference_network_custom_mdio), 6, "class=\"internalopt\"");
|
||||
@@ -6732,7 +6737,7 @@ esp_err_t WebCfgServer::processUpdate(PsychicRequest *request, PsychicResponse*
|
||||
_preferences->putString(preference_ota_main_url, GITHUB_MASTER_RELEASE_BINARY_URL);
|
||||
//}
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
#if (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32)) && !defined(CONFIG_FREERTOS_UNICORE)
|
||||
else if(request->hasParam("other"))
|
||||
{
|
||||
res = buildConfirmHtml(request, resp, "Rebooting to update Nuki Hub and Nuki Hub updater<br/>Updating to latest RELEASE version", 2, true);
|
||||
@@ -6981,7 +6986,7 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomPHYOp
|
||||
options.push_back(std::make_pair("1", "W5500"));
|
||||
options.push_back(std::make_pair("2", "DN9051"));
|
||||
options.push_back(std::make_pair("3", "KSZ8851SNL"));
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
options.push_back(std::make_pair("4", "LAN8720"));
|
||||
options.push_back(std::make_pair("5", "RTL8201"));
|
||||
options.push_back(std::make_pair("6", "TLK110/IP101"));
|
||||
@@ -6992,7 +6997,7 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomPHYOp
|
||||
|
||||
return options;
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomCLKOptions() const
|
||||
{
|
||||
std::vector<std::pair<String, String>> options;
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
const std::vector<std::pair<String, String>> getNetworkDetectionOptions() const;
|
||||
const std::vector<std::pair<String, String>> getGpioOptions() const;
|
||||
const std::vector<std::pair<String, String>> getNetworkCustomPHYOptions() const;
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
const std::vector<std::pair<String, String>> getNetworkCustomCLKOptions() const;
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
|
||||
@@ -8,6 +8,16 @@ dependencies:
|
||||
|
||||
espressif/libsodium: "^1.0.20~2"
|
||||
|
||||
espressif/esp_hosted:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
espressif/esp_wifi_remote:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
# # Defining a dependency from the registry:
|
||||
# # https://components.espressif.com/component/example/cmp
|
||||
# example/cmp: "^3.3.3" # Automatically update minor releases
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "../RestartReason.h"
|
||||
#include "../EspMillis.h"
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#include "esp_private/esp_gpio_reserve.h"
|
||||
#include <bootloader_common.h>
|
||||
#include "esp_psram.h"
|
||||
@@ -90,7 +90,7 @@ void EthernetDevice::initialize()
|
||||
_hardwareInitialized = ETH.begin(_type, _phy_addr, _cs, _irq, _rst, SPI);
|
||||
ethCriticalFailure = false;
|
||||
}
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
else
|
||||
{
|
||||
Log->println("Use RMII");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef CONFIG_IDF_TARGET_ESP32
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
typedef enum {
|
||||
ETH_CLOCK_GPIO0_IN = 0,
|
||||
ETH_CLOCK_GPIO0_OUT = 1,
|
||||
@@ -11,11 +11,26 @@ typedef enum {
|
||||
#define ETH_PHY_TYPE_LAN8720 ETH_PHY_MAX
|
||||
#else
|
||||
#define ETH_PHY_TYPE_LAN8720 ETH_PHY_LAN8720
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define ETH_CLOCK_GPIO0_IN EMAC_CLK_EXT_IN
|
||||
#define ETH_CLOCK_GPIO0_OUT EMAC_CLK_OUT
|
||||
#define ETH_CLOCK_GPIO16_OUT EMAC_CLK_OUT
|
||||
#define ETH_CLOCK_GPIO17_OUT EMAC_CLK_OUT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define ETH_CLK_MODE_LAN8720 EMAC_CLK_EXT_IN
|
||||
#define ETH_PHY_ADDR_LAN8720 0
|
||||
#define ETH_PHY_MDC_LAN8720 31
|
||||
#define ETH_PHY_MDIO_LAN8720 52
|
||||
#define ETH_PHY_POWER_LAN8720 51
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#else
|
||||
#define ETH_CLK_MODE_LAN8720 ETH_CLOCK_GPIO0_IN
|
||||
#define ETH_PHY_ADDR_LAN8720 0
|
||||
#define ETH_PHY_MDC_LAN8720 23
|
||||
#define ETH_PHY_MDIO_LAN8720 18
|
||||
#define ETH_PHY_POWER_LAN8720 -1
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ NetworkDevice *NetworkDeviceInstantiator::Create(NetworkDeviceType networkDevice
|
||||
preferences->getInt(preference_network_custom_mosi, -1),
|
||||
custEthtype);
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
else if(custPHY >= 4 && custPHY <= 9)
|
||||
{
|
||||
int custCLKpref = preferences->getInt(preference_network_custom_clk, 0);
|
||||
|
||||
@@ -77,7 +77,7 @@ std::string NetworkUtil::GetCustomEthernetDeviceName(int custPHY)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
eth_phy_type_t NetworkUtil::GetCustomEthernetType(int custPHY)
|
||||
{
|
||||
switch(custPHY)
|
||||
|
||||
@@ -9,7 +9,7 @@ class NetworkUtil
|
||||
public:
|
||||
static NetworkDeviceType GetDeviceTypeFromPreference(int hardwareDetect, int customPhy);
|
||||
static std::string GetCustomEthernetDeviceName(int custPHY);
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
static eth_phy_type_t GetCustomEthernetType(int custPHY);
|
||||
static eth_clock_mode_t GetCustomClock(int custCLKpref);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user