From e5f185eb82e56d59750b58d527de5b8da9a88ea5 Mon Sep 17 00:00:00 2001 From: yangshixing Date: Mon, 26 Oct 2026 18:13:42 +0800 Subject: [PATCH] feat: add ESP32-C5 Touch LCD 1.9 board profile --- README.md | 1 + README_ZH.md | 1 + boards/esp32_c5_touch_lcd_1_9/README.md | 26 +++++ boards/esp32_c5_touch_lcd_1_9/README_ZH.md | 21 +++++ .../esp32_c5_touch_lcd_1_9/board_devices.yaml | 74 +++++++++++++++ boards/esp32_c5_touch_lcd_1_9/board_info.yaml | 5 + .../board_peripherals.yaml | 94 +++++++++++++++++++ docs/CI.md | 4 +- docs/CI_ZH.md | 2 +- 9 files changed, 225 insertions(+), 3 deletions(-) create mode 100644 boards/esp32_c5_touch_lcd_1_9/README.md create mode 100644 boards/esp32_c5_touch_lcd_1_9/README_ZH.md create mode 100644 boards/esp32_c5_touch_lcd_1_9/board_devices.yaml create mode 100644 boards/esp32_c5_touch_lcd_1_9/board_info.yaml create mode 100644 boards/esp32_c5_touch_lcd_1_9/board_peripherals.yaml diff --git a/README.md b/README.md index 7a27db8..53e6fca 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ such as `spi_sd` describe a bus; they do not imply a complete storage applicatio | Board | Chip | Device definitions | Peripheral definitions | | --- | --- | --- | --- | +| [`esp32_c5_touch_lcd_1_9`](boards/esp32_c5_touch_lcd_1_9/) | ESP32-C5 | `lcd_st7789v2`, `touch_cst816d`, `imu_qmi8658`, `tf_card`, `bat_axp2602` | `i2c_master`, `spi_tf`, `gpio_boot`, `gpio_power_key`, `ledc_backlight`, `gpio_touch_reset`, `gpio_touch_int`, `gpio_imu_int`, `gpio_axp_int` | | [`esp32_s3_lr1121_oled_1_54_xf`](boards/esp32_s3_lr1121_oled_1_54_xf/) | ESP32-S3 | `button_boot`, `button_power`, `button_menu`, `button_ptt`, `button_rtc_irq`, `radio`, `oled`, `rtc`, `battery`, `audio`, `sdcard` | `i2c_main`, `spi_radio`, `gpio_boot`, `gpio_power`, `gpio_menu`, `gpio_ptt`, `gpio_rtc_irq`, `gpio_amplifier`, `gpio_radio_cs`, `gpio_radio_irq`, `gpio_radio_reset`, `gpio_radio_busy`, `i2s_speaker`, `i2s_microphone` | | [`esp32_s3_touch_amoled_1_75c`](boards/esp32_s3_touch_amoled_1_75c/) | ESP32-S3 | `axp2101_power_manager`, `audio_dac`, `audio_adc`, `display_lcd`, `lcd_touch` | `i2c_master`, `i2s_audio_out`, `i2s_audio_in`, `gpio_pa_control`, `spi_display` | | [`esp32_s3_touch_amoled_1_8`](boards/esp32_s3_touch_amoled_1_8/) | ESP32-S3 | `gpio_expander`, `axp2101_power_manager`, `audio_dac`, `audio_adc`, `display_lcd`, `lcd_touch`, `fs_sdcard` | `i2c_master`, `i2s_audio_out`, `i2s_audio_in`, `gpio_pa_control`, `spi_display` | diff --git a/README_ZH.md b/README_ZH.md index 2e96c29..a246d8f 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -91,6 +91,7 @@ | 开发板 | 芯片 | 设备定义 | 外设定义 | | --- | --- | --- | --- | +| [`esp32_c5_touch_lcd_1_9`](boards/esp32_c5_touch_lcd_1_9/) | ESP32-C5 | `lcd_st7789v2`, `touch_cst816d`, `imu_qmi8658`, `tf_card`, `bat_axp2602` | `i2c_master`, `spi_tf`, `gpio_boot`, `gpio_power_key`, `ledc_backlight`, `gpio_touch_reset`, `gpio_touch_int`, `gpio_imu_int`, `gpio_axp_int` | | [`esp32_s3_lr1121_oled_1_54_xf`](boards/esp32_s3_lr1121_oled_1_54_xf/) | ESP32-S3 | `button_boot`, `button_power`, `button_menu`, `button_ptt`, `button_rtc_irq`, `radio`, `oled`, `rtc`, `battery`, `audio`, `sdcard` | `i2c_main`, `spi_radio`, `gpio_boot`, `gpio_power`, `gpio_menu`, `gpio_ptt`, `gpio_rtc_irq`, `gpio_amplifier`, `gpio_radio_cs`, `gpio_radio_irq`, `gpio_radio_reset`, `gpio_radio_busy`, `i2s_speaker`, `i2s_microphone` | | [`esp32_s3_touch_amoled_1_75c`](boards/esp32_s3_touch_amoled_1_75c/) | ESP32-S3 | `axp2101_power_manager`, `audio_dac`, `audio_adc`, `display_lcd`, `lcd_touch` | `i2c_master`, `i2s_audio_out`, `i2s_audio_in`, `gpio_pa_control`, `spi_display` | | [`esp32_s3_touch_amoled_1_8`](boards/esp32_s3_touch_amoled_1_8/) | ESP32-S3 | `gpio_expander`, `axp2101_power_manager`, `audio_dac`, `audio_adc`, `display_lcd`, `lcd_touch`, `fs_sdcard` | `i2c_master`, `i2s_audio_out`, `i2s_audio_in`, `gpio_pa_control`, `spi_display` | diff --git a/boards/esp32_c5_touch_lcd_1_9/README.md b/boards/esp32_c5_touch_lcd_1_9/README.md new file mode 100644 index 0000000..805713b --- /dev/null +++ b/boards/esp32_c5_touch_lcd_1_9/README.md @@ -0,0 +1,26 @@ +# ESP32-C5-Touch-LCD-1.9 + +[简体中文](README_ZH.md) + +Waveshare ESP32-C5-WROOM-1-N16R8 board with a 1.9-inch SPI LCD. +This profile is imported from the product examples and preserves their named +peripherals and custom device metadata. Applications implement product policy; +custom devices use `init_skip: true` so generic Board Manager initialization does +not implicitly initialize the display, sensors, storage or battery gauge. + +- I2C: port 0, SDA GPIO2, SCL GPIO3, internal pull-ups enabled. +- SPI2 shared by LCD and TF: MOSI5, MISO6, SCLK7; TF CS4. +- LCD: ST7789-compatible, 170 x 320, X gap35; CS23/DC24/RESET26, backlight10. +- Touch: CST816D-compatible 0x15, RESET8/INT0. +- IMU: QMI8658 0x6B, INT1; gauge: AXP2602 0x62, INT25, 10 milliohm shunt. +- BOOT28 and power-key9 are inputs. The power latch is not a software output. + +Reference: [product documentation](https://www.waveshare.com/wiki/ESP32-C5-Touch-LCD-1.9). +Pin assignments were compared with the supplied product schematic. LCD controller, +visible geometry, gap and touch compatibility retain the product implementation; +physical confirmation remains pending. Flash/PSRAM and application features are +configured by the consuming application, not inferred from profile generation. + +Validation and migration: this change adds a profile and does not certify physical +operation. The product repository must retain its local definition until this PR +is merged, the component registry publishes it and consuming application tests pass. diff --git a/boards/esp32_c5_touch_lcd_1_9/README_ZH.md b/boards/esp32_c5_touch_lcd_1_9/README_ZH.md new file mode 100644 index 0000000..16f44fd --- /dev/null +++ b/boards/esp32_c5_touch_lcd_1_9/README_ZH.md @@ -0,0 +1,21 @@ +# ESP32-C5-Touch-LCD-1.9 + +[English](README.md) + +微雪 ESP32-C5-WROOM-1-N16R8、1.9 英寸 SPI LCD 开发板。 +本配置保留产品示例的外设名称和自定义设备元数据;自定义设备使用 +`init_skip: true`,显示、传感器、存储和电量计的初始化策略由应用实现。 + +- I2C:端口 0,SDA GPIO2、SCL GPIO3,启用内部上拉。 +- LCD 与 TF 共用 SPI2:MOSI5、MISO6、SCLK7;TF CS4。 +- LCD:ST7789 兼容,170 x 320,X 偏移35;CS23/DC24/RESET26,背光10。 +- 触摸:CST816D 兼容,地址0x15,RESET8/INT0。 +- IMU:QMI8658 0x6B、INT1;电量计:AXP2602 0x62、INT25、10毫欧采样电阻。 +- BOOT28 与电源按键9均为输入,不通过软件驱动电源锁存按键。 + +参考:[产品文档](https://www.waveshare.com/wiki/ESP32-C5-Touch-LCD-1.9)。 +引脚与提供的产品原理图进行了核对。LCD 控制器、显示尺寸、偏移和触摸兼容性 +沿用产品实现,仍需实物确认。Flash、PSRAM 和应用功能由使用方配置。 + +本变更新增板型,不代表硬件功能已通过。产品仓库应在本 PR 合入、组件注册表 +发布且使用方验证通过后,再删除自己的本地板定义。 diff --git a/boards/esp32_c5_touch_lcd_1_9/board_devices.yaml b/boards/esp32_c5_touch_lcd_1_9/board_devices.yaml new file mode 100644 index 0000000..732d0c9 --- /dev/null +++ b/boards/esp32_c5_touch_lcd_1_9/board_devices.yaml @@ -0,0 +1,74 @@ +devices: + - name: lcd_st7789v2 + chip: st7789v2 + type: custom + version: 1.0.0 + init_skip: true + config: + width: 170 + height: 320 + x_gap: 35 + pclk_hz: 40000000 + invert_color: true + sclk_gpio: 7 + mosi_gpio: 5 + cs_gpio: 23 + dc_gpio: 24 + reset_gpio: 26 + backlight_gpio: 10 + backlight_active_level: 1 + + - name: touch_cst816d + chip: cst816d + type: custom + version: 1.0.0 + init_skip: true + config: + address: 0x15 + frequency: 400000 + reset_gpio: 8 + interrupt_gpio: 0 + width: 170 + height: 320 + peripherals: + - name: i2c_master + + - name: imu_qmi8658 + chip: qmi8658 + type: custom + version: 1.0.0 + init_skip: true + config: + address: 0x6B + interrupt_gpio: 1 + peripherals: + - name: i2c_master + + - name: tf_card + chip: micro_sd + type: custom + version: 1.0.0 + init_skip: true + config: + mode: sdspi + cs_gpio: 4 + mosi_gpio: 5 + miso_gpio: 6 + sclk_gpio: 7 + peripherals: + - name: spi_tf + + - name: bat_axp2602 + chip: axp2602 + type: custom + version: 1.0.0 + init_skip: true + config: + address: 0x62 + frequency: 400000 + sense_resistor_mohm: 10 + idle_current_threshold_ma: 1 + interrupt_gpio: 25 + irq_connected: true + peripherals: + - name: i2c_master diff --git a/boards/esp32_c5_touch_lcd_1_9/board_info.yaml b/boards/esp32_c5_touch_lcd_1_9/board_info.yaml new file mode 100644 index 0000000..ac99f65 --- /dev/null +++ b/boards/esp32_c5_touch_lcd_1_9/board_info.yaml @@ -0,0 +1,5 @@ +board: esp32_c5_touch_lcd_1_9 +chip: esp32c5 +version: 1.0.0 +description: "Waveshare ESP32-C5-Touch-LCD-1.9 (N16R8)" +manufacturer: "Waveshare" diff --git a/boards/esp32_c5_touch_lcd_1_9/board_peripherals.yaml b/boards/esp32_c5_touch_lcd_1_9/board_peripherals.yaml new file mode 100644 index 0000000..dfd602e --- /dev/null +++ b/boards/esp32_c5_touch_lcd_1_9/board_peripherals.yaml @@ -0,0 +1,94 @@ +peripherals: + - name: i2c_master + type: i2c + role: master + config: + port: 0 + pins: + sda: 2 + scl: 3 + enable_internal_pullup: true + glitch_count: 7 + + # LCD and TF share GPIO5 as MOSI and GPIO7 as SCLK. TF reads data on GPIO6. + - name: spi_tf + type: spi + role: master + config: + spi_bus_config: + spi_port: SPI2_HOST + mosi_io_num: 5 + miso_io_num: 6 + sclk_io_num: 7 + quadwp_io_num: -1 + quadhd_io_num: -1 + max_transfer_sz: 13600 + + - name: gpio_boot + type: gpio + role: io + config: + pin: 28 + mode: GPIO_MODE_INPUT + pull_up: true + pull_down: false + default_level: 1 + + - name: gpio_power_key + type: gpio + role: io + config: + pin: 9 + mode: GPIO_MODE_INPUT + pull_up: true + pull_down: false + + - name: ledc_backlight + type: ledc + role: none + config: + gpio_num: 10 + channel: LEDC_CHANNEL_0 + timer_sel: LEDC_TIMER_0 + freq_hz: 1000 + duty: 0 + duty_resolution: LEDC_TIMER_8_BIT + speed_mode: LEDC_LOW_SPEED_MODE + output_invert: false + sleep_mode: LEDC_SLEEP_MODE_NO_ALIVE_NO_PD + + - name: gpio_touch_reset + type: gpio + role: io + config: + pin: 8 + mode: GPIO_MODE_OUTPUT + default_level: 1 + + - name: gpio_touch_int + type: gpio + role: io + config: + pin: 0 + mode: GPIO_MODE_INPUT + pull_up: true + pull_down: false + + - name: gpio_imu_int + type: gpio + role: io + config: + pin: 1 + mode: GPIO_MODE_INPUT + pull_up: true + pull_down: false + + - name: gpio_axp_int + type: gpio + role: io + config: + pin: 25 + mode: GPIO_MODE_INPUT + pull_up: true + pull_down: false + intr_type: GPIO_INTR_NEGEDGE diff --git a/docs/CI.md b/docs/CI.md index 2772a80..3f12b56 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -15,8 +15,8 @@ published versions satisfying the range are tested, with duplicates removed. Registry lookup failures fail the job. Each matrix entry records an exact version. The initial Board Manager floor is **0.7.2**, matching the reference board-pack -template. Five board profiles are discovered. Each resolved Board Manager version -adds ten builds across the two IDF lines. Keep the floor until a deliberate +template. Six board profiles are discovered. Each resolved Board Manager version +adds twelve builds across the two IDF lines. Keep the floor until a deliberate compatibility change is tested. Unsupported catalog profiles or generation failures fail CI; they are not counted as successful builds. diff --git a/docs/CI_ZH.md b/docs/CI_ZH.md index b7b51d2..001b3c2 100644 --- a/docs/CI_ZH.md +++ b/docs/CI_ZH.md @@ -13,7 +13,7 @@ 相同版本合并。组件库查询失败会使任务失败,每个矩阵项均记录明确版本。 Board Manager 初始最低版本为 **0.7.2**,与参考板卡包模板一致。 -当前发现五块板卡,每个解析出的 Board Manager 版本在两个 IDF 版本线上共十项编译。 +当前发现六块板卡,每个解析出的 Board Manager 版本在两个 IDF 版本线上共十二项编译。 调整最低版本前需要明确兼容性变更并测试。 不支持的芯片能力配置或生成失败会使 CI 失败,不会被计为编译成功。