mirror of
https://github.com/meshtastic/firmware.git
synced 2026-06-06 15:55:36 -04:00
update boards and pins_arduino.h definition
This commit is contained in:
32
boards/crowpanel-p4.json
Normal file
32
boards/crowpanel-p4.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"build": {
|
||||
"core": "esp32",
|
||||
"extra_flags": ["-DBOARD_HAS_PSRAM"],
|
||||
"f_cpu": "360000000L",
|
||||
"f_flash": "80000000L",
|
||||
"f_psram": "200000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [["0x1A86", "0x7522"]],
|
||||
"mcu": "esp32p4",
|
||||
"chip_variant": "esp32p4_es",
|
||||
"variant": "esp32p4"
|
||||
},
|
||||
"arduino": {
|
||||
"partitions": "default_16MB.csv"
|
||||
},
|
||||
"connectivity": ["bluetooth", "openthread"],
|
||||
"debug": {
|
||||
"openocd_target": "esp32p4.cfg"
|
||||
},
|
||||
"frameworks": ["arduino", "espidf"],
|
||||
"name": "CrowPanel Advanced ESP32-P4 HMI AI Display",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 512000,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 1500000
|
||||
},
|
||||
"url": "https://www.elecrow.com/crowpanel-advanced-5inch-esp32-p4-hmi-ai-display-800x480-ips-touch-screen-with-wifi-6.html",
|
||||
"vendor": "Elecrow"
|
||||
}
|
||||
112
variants/esp32p4/crowpanel-advanced-p4/pins_arduino.h
Normal file
112
variants/esp32p4/crowpanel-advanced-p4/pins_arduino.h
Normal file
@@ -0,0 +1,112 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// BOOT_MODE 35
|
||||
// BOOT_MODE2 36 pullup
|
||||
|
||||
static const uint8_t TX = 37;
|
||||
static const uint8_t RX = 38;
|
||||
|
||||
#if defined(CROWPANEL_ADV_P4_50)
|
||||
static const uint8_t SDA = 45;
|
||||
static const uint8_t SCL = 46;
|
||||
#else
|
||||
static const uint8_t SDA = 46;
|
||||
static const uint8_t SCL = 46;
|
||||
#endif
|
||||
|
||||
// Use GPIOs 36 or lower on the P4 DevKit to avoid LDO power issues with high numbered GPIOs.
|
||||
static const uint8_t SS = 30;
|
||||
static const uint8_t MOSI = 48;
|
||||
static const uint8_t MISO = 47;
|
||||
static const uint8_t SCK = 26;
|
||||
|
||||
static const uint8_t A0 = 16;
|
||||
static const uint8_t A1 = 17;
|
||||
static const uint8_t A2 = 18;
|
||||
static const uint8_t A3 = 19;
|
||||
static const uint8_t A4 = 20;
|
||||
static const uint8_t A5 = 21;
|
||||
static const uint8_t A6 = 22;
|
||||
static const uint8_t A7 = 23;
|
||||
static const uint8_t A8 = 49;
|
||||
static const uint8_t A9 = 50;
|
||||
static const uint8_t A10 = 51;
|
||||
static const uint8_t A11 = 52;
|
||||
static const uint8_t A12 = 53;
|
||||
static const uint8_t A13 = 54;
|
||||
|
||||
static const uint8_t T0 = 2;
|
||||
static const uint8_t T1 = 3;
|
||||
static const uint8_t T2 = 4;
|
||||
static const uint8_t T3 = 5;
|
||||
static const uint8_t T4 = 6;
|
||||
static const uint8_t T5 = 7;
|
||||
static const uint8_t T6 = 8;
|
||||
static const uint8_t T7 = 9;
|
||||
static const uint8_t T8 = 10;
|
||||
static const uint8_t T9 = 11;
|
||||
static const uint8_t T10 = 12;
|
||||
static const uint8_t T11 = 13;
|
||||
static const uint8_t T12 = 14;
|
||||
static const uint8_t T13 = 15;
|
||||
|
||||
/* ESP32-P4 EV Function board specific definitions */
|
||||
// ETH
|
||||
// #define ETH_PHY_TYPE ETH_PHY_TLK110
|
||||
// #define ETH_PHY_ADDR 1
|
||||
// #define ETH_PHY_MDC 31
|
||||
// #define ETH_PHY_MDIO 52
|
||||
// #define ETH_PHY_POWER 51
|
||||
// #define ETH_RMII_TX_EN 49
|
||||
// #define ETH_RMII_TX0 34
|
||||
// #define ETH_RMII_TX1 35
|
||||
// #define ETH_RMII_RX0 29
|
||||
// #define ETH_RMII_RX1_EN 30
|
||||
// #define ETH_RMII_CRS_DV 28
|
||||
// #define ETH_RMII_CLK 50
|
||||
// #define ETH_CLK_MODE EMAC_CLK_EXT_IN
|
||||
|
||||
// SDMMC
|
||||
#define BOARD_HAS_SDMMC
|
||||
#define BOARD_HAS_SD_SDMMC
|
||||
#define SDMMC_CMD 44 // SD_CMD/MOSI
|
||||
#define SDMMC_CLK 43 // SD_CLK
|
||||
#define SDMMC_D0 39 // SD_D0/MISO
|
||||
#define SD_CS -1 // No CS pin in SDMMC mode
|
||||
|
||||
#if defined(CROWPANEL_ADV_P4_50)
|
||||
#define BOARD_SDMMC_SLOT 1
|
||||
#else
|
||||
#define BOARD_SDMMC_SLOT 0
|
||||
#endif
|
||||
#define BOARD_SDMMC_POWER_CHANNEL 4
|
||||
#define BOARD_SDMMC_POWER_PIN -1
|
||||
#define BOARD_SDMMC_POWER_ON_LEVEL LOW
|
||||
|
||||
// WIFI - ESP32C6 (CrowPanel Advanced P4)
|
||||
#define BOARD_HAS_SDIO_ESP_HOSTED
|
||||
#ifdef CROWPANEL_ADV_P4_50
|
||||
// CrowPanel Advanced P4 50": 4-bit SDIO on Slot 1 with GPIO 53/54/52/51/50/49
|
||||
#define BOARD_SDIO_ESP_HOSTED_CLK 53
|
||||
#define BOARD_SDIO_ESP_HOSTED_CMD 54
|
||||
#define BOARD_SDIO_ESP_HOSTED_D0 52
|
||||
#define BOARD_SDIO_ESP_HOSTED_D1 51
|
||||
#define BOARD_SDIO_ESP_HOSTED_D2 50
|
||||
#define BOARD_SDIO_ESP_HOSTED_D3 49
|
||||
#define BOARD_SDIO_ESP_HOSTED_RESET 20
|
||||
#else
|
||||
// CrowPanel Advanced P4 70/90/101": 1-bit SDIO on Slot 1 with GPIO 18/19/14/15
|
||||
#define BOARD_SDIO_ESP_HOSTED_CLK 18
|
||||
#define BOARD_SDIO_ESP_HOSTED_CMD 19
|
||||
#define BOARD_SDIO_ESP_HOSTED_D0 14
|
||||
#define BOARD_SDIO_ESP_HOSTED_D1 15
|
||||
#define BOARD_SDIO_ESP_HOSTED_D2 16
|
||||
#define BOARD_SDIO_ESP_HOSTED_D3 17
|
||||
#define BOARD_SDIO_ESP_HOSTED_RESET 32
|
||||
#endif
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
@@ -1,6 +1,6 @@
|
||||
[env:crowpanel-advanced-p4-50]
|
||||
extends = esp32p4_base
|
||||
board = esp32-p4-evboard
|
||||
board = crowpanel-p4
|
||||
board_check = true
|
||||
board_build.partitions = default_16MB.csv
|
||||
|
||||
@@ -66,23 +66,15 @@ lib_deps =
|
||||
|
||||
custom_sdkconfig =
|
||||
${esp32p4_base.custom_sdkconfig}
|
||||
CONFIG_BT_BLUEDROID_ENABLED=y
|
||||
;CONFIG_BT_NIMBLE_ENABLED=y
|
||||
;CONFIG_BT_NIMBLE_EXT_ADV=n
|
||||
# Disable external SDMMC IO power control to avoid GPIO conflicts
|
||||
CONFIG_SOC_SDMMC_IO_POWER_EXTERNAL=n
|
||||
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
|
||||
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
|
||||
CONFIG_ESP_HOSTED_ENABLE_BT_BLUEDROID=y
|
||||
|
||||
# Force hosted transport/target selection for this env.
|
||||
CONFIG_ESP_HOSTED_CP_TARGET_ESP32C6=y
|
||||
CONFIG_ESP_HOSTED_CP_TARGET_ESP32H2=n
|
||||
CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET="esp32c6"
|
||||
CONFIG_ESP_HOSTED_SPI_HOST_INTERFACE=n
|
||||
CONFIG_ESP_HOSTED_SDIO_HOST_INTERFACE=y
|
||||
|
||||
CONFIG_ESP_HOSTED_SDIO_4_BIT_BUS=y
|
||||
CONFIG_ESP_HOSTED_SDIO_CLOCK_FREQ_KHZ=40000
|
||||
# CrowPanel SDIO pins (happen to match P4 Slot 1 defaults)
|
||||
# CrowPanel SDIO pins
|
||||
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CMD_SLOT_1=54
|
||||
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CLK_SLOT_1=53
|
||||
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D0_SLOT_1=52
|
||||
@@ -102,15 +94,6 @@ custom_sdkconfig =
|
||||
|
||||
# SDIO Slot 1 via GPIO matrix
|
||||
CONFIG_ESP_HOSTED_SDIO_SLOT_1=y
|
||||
|
||||
# 1-bit bus (proven stable on CrowPanel)
|
||||
;CONFIG_ESP_HOSTED_SDIO_1_BIT_BUS=y
|
||||
;CONFIG_ESP_HOSTED_SDIO_BUS_WIDTH=1
|
||||
|
||||
# Conservative 10 MHz clock for OTA reliability
|
||||
CONFIG_ESP_HOSTED_SDIO_CLOCK_FREQ_KHZ=10000
|
||||
|
||||
# Reset pin: GPIO32, active high (R77 pullup on CrowPanel)
|
||||
CONFIG_ESP_HOSTED_SDIO_RESET_ACTIVE_HIGH=y
|
||||
CONFIG_ESP_HOSTED_SDIO_GPIO_RESET_SLAVE=20
|
||||
CONFIG_ESP_HOSTED_GPIO_SLAVE_RESET_SLAVE=20
|
||||
@@ -185,9 +168,7 @@ lib_deps =
|
||||
|
||||
custom_sdkconfig =
|
||||
${esp32p4_base.custom_sdkconfig}
|
||||
;CONFIG_BT_BLUEDROID_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_EXT_ADV=n
|
||||
CONFIG_SOC_SDMMC_IO_POWER_EXTERNAL=n
|
||||
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
|
||||
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
|
||||
# SDIO Slot 1 via GPIO matrix
|
||||
|
||||
@@ -13,7 +13,7 @@ build_flags =
|
||||
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||
|
||||
build_src_filter =
|
||||
${esp32_common.build_src_filter} -<libpax/> -<nimble/> -<platform/stm32wl> -<mesh/http/> -<platform/rp2xx0> -<mesh/raspihttp> -<serialization/>
|
||||
${esp32_common.build_src_filter} -<libpax/> -<platform/stm32wl> -<nimble> -<mesh/http/> -<platform/rp2xx0> -<mesh/raspihttp> -<serialization/>
|
||||
|
||||
monitor_speed = 460800
|
||||
monitor_filters = esp32_c3_exception_decoder
|
||||
@@ -43,10 +43,10 @@ custom_component_remove =
|
||||
custom_sdkconfig =
|
||||
${esp32_common.custom_sdkconfig}
|
||||
CONFIG_ARDUINO_SELECTIVE_SD_MMC=y
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BT_CONTROLLER_DISABLED=y
|
||||
# esp_hosted core
|
||||
CONFIG_ESP_HOSTED_ENABLED=y
|
||||
CONFIG_ESP_WIFI_REMOTE_ENABLED=n
|
||||
CONFIG_ESP_WIFI_REMOTE_ENABLED=y
|
||||
# Board: custom (not Espressif EV board)
|
||||
CONFIG_ESP_HOSTED_P4_DEV_BOARD_NONE=y
|
||||
# Delay after C6 reset to allow boot (e.g. old v2.3.0 may be slow)
|
||||
@@ -61,7 +61,8 @@ custom_sdkconfig =
|
||||
CONFIG_ESP_HOSTED_PRIV_SDIO_OPTION=y
|
||||
CONFIG_ESP_HOSTED_SPI_HOST_INTERFACE=n
|
||||
CONFIG_ESP_HOSTED_SDIO_HOST_INTERFACE=y
|
||||
CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET="esp32c6"
|
||||
CONFIG_ESP_HOSTED_TRANSPORT_SDIO=y
|
||||
CONFIG_ESP_HOSTED_ENABLE_NIMBLE=y
|
||||
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
|
||||
CONFIG_ESP_HOSTED_NIMBLE_HCI_VHCI=y
|
||||
CONFIG_ESP_HOSTED_ENABLE_PEER_DATA_TRANSFER=y
|
||||
@@ -93,7 +94,6 @@ lib_ignore =
|
||||
${esp32_common.lib_ignore}
|
||||
libpax
|
||||
esp8266-oled-ssd1306
|
||||
NimBLE-Arduino
|
||||
bsec2
|
||||
esp32_idf5_https_server
|
||||
esp_driver_cam
|
||||
|
||||
Reference in New Issue
Block a user