Skip to content

diy: add M5StickS3 support - #346

Open
BitromNO wants to merge 3 commits into
Blockstream:masterfrom
BitromNO:m5sticks3-port
Open

BitromNO wants to merge 3 commits into
Blockstream:masterfrom
BitromNO:m5sticks3-port

Conversation

@BitromNO

Copy link
Copy Markdown

Summary

Adds support for the M5Stack M5StickS3 (ESP32-S3, N8R8, ST7789P3 135x240 IPS LCD, two buttons, 120mAh battery) as a DIY board, using the existing CUSTOM board option.

What changed

  • main/Kconfig.projbuild: new HAS_M5PM1 option (depends on BOARD_TYPE_CUSTOM) selecting the M5PM1 PMIC driver.
  • main/power.c: dispatch to power/m5pm1.inc when CONFIG_HAS_M5PM1.
  • main/power/m5pm1.inc: new M5PM1 (I2C 0x6E, SDA=G47/SCL=G48) driver. The StickS3 uses the M5PM1 rather than AXP/IP5306. Critical detail: the PMIC's PYG2 output (active high) gates the L3B rail that powers the LCD/backlight, so the driver asserts PYG2 in power_init() and drives it from power_screen_on(). Register writes are best-effort (boot continues even if the PMIC is unresponsive) and the driver disables the PMIC i2c idle-sleep timeout + watchdog.
  • configs/sdkconfig_display_m5sticks3.defaults: build profile (SPI display pins, buttons, octal PSRAM, TinyUSB CDC).
  • gitlab/diy_fw.yml: build_diy_display_m5sticks3 CI job.
  • diy/README.md: hardware entry.

Notes

  • USB VID/PID is 303a:4001 (ESP32-S3 native USB) - differs from retail Jade, so custom Electrum/HWI builds are required until added (documented in diy/README.md, same as T-Display S3).
  • As a custom-board build the OTA board type reports UNKNOWN; hardware detection is unaffected.
  • Not wired up: battery voltage/charging reporting (M5PM1 battery register offsets not yet pinned out) and the speaker amp (PYG3 held off).

Testing

Verified on hardware: display (ST7789P3 135x240), both buttons, USB wallet pairing with Blockstream Green and Sparrow, BLE pairing with the iPhone Blockstream Green app. Boot logs confirm M5PM1 registers (DEVICE_ID 0x50, MODE 0x0c, OUT 0x04 = PYG2 high/L3B on).

Add support for the M5Stack StickS3 (ESP32-S3, ST7789P3 135x240, M5PM1 PMIC).

The StickS3 is configured through the existing custom-board option with the
new CONFIG_HAS_M5PM1 flag selecting the M5PM1 power driver. The M5PM1's PYG2
output (active high) gates the L3B rail that powers the LCD, so the driver
asserts it in power_init() and exposes it via m5pm1_set_lcd_power().

Adds:
- main/Kconfig.projbuild: HAS_M5PM1 option (depends on BOARD_TYPE_CUSTOM)
- main/power.c: dispatch to power/m5pm1.inc when CONFIG_HAS_M5PM1
- main/power/m5pm1.inc: M5PM1 driver (I2C 0x6E, SDA=G47/SCL=G48)
- configs/sdkconfig_display_m5sticks3.defaults: build profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant