Skip to content

Add decktrix-v1 custom PCB build target#14

Open
kyatsen wants to merge 15 commits into
mainfrom
feat/decktrix-board
Open

Add decktrix-v1 custom PCB build target#14
kyatsen wants to merge 15 commits into
mainfrom
feat/decktrix-board

Conversation

@kyatsen
Copy link
Copy Markdown
Contributor

@kyatsen kyatsen commented Apr 3, 2026

Summary

Add --variant decktrix build target for the Decktrix v1 custom PCB (STM32MP157F).

Key pin differences from DK2 devboard

Component Devboard (DK2) Decktrix PCB
PMIC I2C4 SCL PZ4 PD12 (AF4)
PMIC I2C4 SDA PZ5 PD13 (AF4)
LCD reset PE4 PD11
LCD backlight PA15 PF6
Touch IRQ PF2 PG7
Touch reset PF4 PE10
BT UART USART2 (PA2/3 + RTS/CTS) UART7 (PE7/8)
BT shutdown PZ6 PB10
WiFi reset PH4 PE6

Changes per component

  • Kernel: new decktrix-v1.dts with custom I2C4 pinctrl, Jadard JD9365TN display and touch with board-specific GPIOs, BT on UART7 without RTS/CTS
  • TF-A: decktrix-v1.dts and fw-config with I2C4 pinctrl override for STPMIC1 on PD12/PD13, same DDR/clock config as DK2
  • U-Boot: decktrix-v1.dts with DSI disabled and I2C4 pinctrl override, plus u-boot.dtsi overlay for binman/DDR/clocks
  • build-image.sh: variant-aware TFA/U-Boot builds that copy board-specific DTS and use correct DEVICE_TREE/DTB_FILE_NAME

Usage

docker compose run build --variant decktrix --prefetch-debootstrap
docker compose run build --variant decktrix --use-prefetch-debootstrap

Tested

Full build via Docker completes successfully and produces deploy/sdcard.img.

kyatsen added 15 commits April 3, 2026 12:43
- Complete Dockerfile with all build dependencies (debootstrap, qemu-user-static)
- Add docker-compose.yml for easy build orchestration with privileged mode
- Add .dockerignore to exclude build outputs from Docker context
- Fix debootstrap function name conflict causing infinite loop in Docker
- Replace sudo calls with MAYBE_SUDO variable (skipped when running as root)
- Update README with Docker build instructions
Add support for the Decktrix v1 custom PCB based on STM32MP157F with
the same RAM as the Discovery Kit but different pinout and peripherals.

Key pin differences from DK2 devboard (from schematics):

  Component          | Devboard (DK2) | Decktrix PCB
  -------------------|----------------|-------------
  PMIC I2C4 SCL      | PZ4            | PD12 (AF4)
  PMIC I2C4 SDA      | PZ5            | PD13 (AF4)
  LCD reset           | PE4            | PD11
  LCD backlight       | PA15           | PF6
  Touch IRQ           | PF2            | PG7
  Touch reset         | PF4            | PE10
  BT UART             | USART2 (PA2/3) | UART7 (PE7/8)
  BT shutdown         | PZ6            | PB10
  WiFi reset          | PH4            | PE6

Changes per component:

- Kernel: new decktrix-v1.dts with custom I2C4 pinctrl, Jadard display
  and touch with board-specific GPIOs, BT on UART7 without RTS/CTS
- TF-A: decktrix-v1.dts and fw-config with I2C4 pinctrl override for
  STPMIC1 on PD12/PD13, same DDR/clock config as DK2
- U-Boot: decktrix-v1.dts with DSI disabled and I2C4 pinctrl override,
  plus u-boot.dtsi overlay for binman/DDR/clocks

Usage:
  docker compose run build --variant decktrix --prefetch-debootstrap
  docker compose run build --variant decktrix --use-prefetch-debootstrap
Changes:
- Jadard driver: devm_gpiod_get -> devm_gpiod_get_optional for
  vdd/vccio/dbg (display powered by always-on PMIC regulators)
- Kernel DTS: remove vdd/vccio GPIOs from panel node, override
  PMIC LDO1 to 2.8V (display AVDD) and LDO6 to 1.8V (display IOVCC),
  disable sdmmc2/uart7 (u-blox MAYA-W166 uses SDMMC3/UART8, TBD)
- I2C4 pinctrl patches for kernel, U-Boot, TFA: change default
  pins from PZ4/PZ5 to PD12/PD13 (decktrix PCB wiring)
- TFA DTS: LDO1 at 2.8V, LDO6 at 1.8V for display power
- Simplified TFA/U-Boot DTS files (pinctrl handled by patches)

Display power analysis from schematics:
  LDO1 (pin 23) -> 2V8 rail -> display AVDD (needs 2.8V, was 1.8V)
  LDO6 (pin 43) -> 1V8 rail -> display IOVCC (needs 1.8V, was 1.2V)
  Both regulators are always-on, display powered at boot.
Instead of patching stm32mp15xx-dkx.dtsi to change LDO1/LDO6
voltages (which affects all boards), override them in the
decktrix-v1.dts files. Cleaner separation - devboard config
stays untouched.

Also add pcb/ to .gitignore.
Fix all three I2C4 pinctrl patches to match exact source indentation.
Add gzip_sdcard_img() to compress sdcard.img after build.
- scripts/gdrive-upload.sh: upload file to shared Drive folder
- scripts/gdrive-auth.sh: re-authenticate when refresh token expires
- AGENTS.md: document upload workflow and token refresh steps
- Build instructions (Docker, variants, commands)
- Decktrix v1 board differences table
- Google Drive upload usage
- Full Google Cloud Console setup steps (19 steps)
- Token refresh instructions
- Fix TF-A pinctrl patch: keep empty &pinctrl_z section
- Update U-Boot/Linux pinctrl patches to match working board-share
- Minimize Docker image: mount source dirs instead of COPY
- Add build.sh wrapper script
Now repos are owned by ubuntu user instead of root
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