Skip to content

Implement Tulip Creative Computer 4r11 - #608

Merged
KenVanHoeylandt merged 7 commits into
TactilityProject:mainfrom
NellowTCS:tulip-cc
Aug 8, 2026
Merged

Implement Tulip Creative Computer 4r11#608
KenVanHoeylandt merged 7 commits into
TactilityProject:mainfrom
NellowTCS:tulip-cc

Conversation

@NellowTCS

@NellowTCS NellowTCS commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for the Tulip Creative Computer 4 (rev R11) hardware platform, including device configuration, driver bindings, and hardware-specific adjustments. The changes introduce a new device definition, update driver modules to support the Tulip 4 R11's peripherals, and enhance the GT911 touch controller driver for greater board compatibility.

Driver and binding improvements

  • Updated the dummy I2S amplifier driver and bindings to support the TI PCM5101A DAC used on Tulip 4 R11, including YAML schema, header, and driver registration.
  • Enhanced the GT911 touch controller driver and YAML schema to support board-specific reset polarity, reset pulse count, and coordinate calibration (offsets and scaling), necessary for correct operation on Tulip 4 R11.

Summary by CodeRabbit

  • New Features
    • Added support for the Tulip Creative Computer 4R11, including its display, touch input, audio, battery sensing, USB host, and storage configuration.
    • Added touch calibration with reset timing, coordinate offsets, scaling, and persisted calibration settings.
    • Added RGB565-to-RGB332 display conversion for compatible panels.
    • Added PCM5101A-compatible audio support.
  • Documentation
    • Added the Apache License 2.0 text.

@NellowTCS

Copy link
Copy Markdown
Contributor Author

There is no proper fix for the display being yellow-green and the icons being a shade lighter, as that's one of the drawbacks of RGB332

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fea073de-0cd3-4cb9-9c8c-e1ee86505569

📥 Commits

Reviewing files that changed from the base of the PR and between 0dbc519 and 4bcb46b.

📒 Files selected for processing (3)
  • Drivers/rgb-display-module/include/drivers/software_pixel_mapper.h
  • Drivers/rgb-display-module/source/rgb_display.cpp
  • Drivers/rgb-display-module/source/software_pixel_mapper.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • Drivers/rgb-display-module/source/rgb_display.cpp

📝 Walkthrough

Walkthrough

Adds Tulip 4R11 device integration with hardware properties, device-tree nodes, module registration, display, touch, audio, and USB host configuration. Extends the GT911 driver with reset pulsing and coordinate calibration. Adds RGB565-to-RGB332 software conversion for RGB displays. Applies persisted touch calibration during LVGL startup.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.06% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding support for the Tulip Creative Computer 4r11.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Drivers/rgb-display-module/source/rgb_display.cpp (1)

240-270: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Free rgb332_scratch on later startup failures.

If semaphore creation or callback registration fails, the function frees internal but leaks the RGB332 scratch buffer. A retry can leak one full-frame buffer per failed start.

Proposed fix
     internal->frame_complete_semaphore = xSemaphoreCreateBinary();
     if (internal->frame_complete_semaphore == nullptr) {
+        heap_caps_free(internal->rgb332_scratch);
         esp_lcd_panel_del(internal->panel_handle);
         free(internal);
         return ERROR_OUT_OF_MEMORY;
@@
         LOG_E(TAG, "Failed to register panel event callbacks");
         vSemaphoreDelete(internal->frame_complete_semaphore);
+        heap_caps_free(internal->rgb332_scratch);
         esp_lcd_panel_del(internal->panel_handle);
         free(internal);
         return ERROR_RESOURCE;

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f1d48502-bd33-4702-b25f-d8ea6fa44b12

📥 Commits

Reviewing files that changed from the base of the PR and between d2c69ee and 471bf13.

⛔ Files ignored due to path filters (9)
  • partitions-16mb-no-sd-dev.csv is excluded by !**/*.csv
  • partitions-16mb-no-sd.csv is excluded by !**/*.csv
  • partitions-16mb-with-sd.csv is excluded by !**/*.csv
  • partitions-32mb-no-sd-dev.csv is excluded by !**/*.csv
  • partitions-32mb-no-sd.csv is excluded by !**/*.csv
  • partitions-4mb-with-sd.csv is excluded by !**/*.csv
  • partitions-8mb-no-sd-dev.csv is excluded by !**/*.csv
  • partitions-8mb-no-sd.csv is excluded by !**/*.csv
  • partitions-8mb-with-sd.csv is excluded by !**/*.csv
📒 Files selected for processing (14)
  • Devices/tulip-4r11/CMakeLists.txt
  • Devices/tulip-4r11/LICENSE-Apache-2.0.md
  • Devices/tulip-4r11/device.properties
  • Devices/tulip-4r11/devicetree.yaml
  • Devices/tulip-4r11/source/module.cpp
  • Devices/tulip-4r11/tulip-4r11.dts
  • Drivers/dummy-i2s-amp-module/bindings/ti,pcm5101a.yaml
  • Drivers/dummy-i2s-amp-module/include/bindings/dummy_i2s_amp.h
  • Drivers/dummy-i2s-amp-module/source/dummy_i2s_amp.cpp
  • Drivers/gt911-module/bindings/goodix,gt911.yaml
  • Drivers/gt911-module/include/drivers/gt911.h
  • Drivers/gt911-module/source/gt911.cpp
  • Drivers/rgb-display-module/source/rgb_display.cpp
  • Tactility/Source/Tactility.cpp

Comment thread Drivers/gt911-module/bindings/goodix,gt911.yaml
Removed outdated comment about Tulip 4 R11 Y range.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
Drivers/rgb-display-module/source/rgb_display.cpp (1)

246-296: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Release mapper resources on every startup failure path.

The unsupported-format path frees internal but leaves panel_handle allocated. The semaphore and callback-registration failure paths delete the panel but leave pixel_mapper_scratch and mapper state allocated.

Use one cleanup path that destroys mapper state, frees scratch memory, deletes the panel, and frees internal. Otherwise, repeated failed starts can exhaust display or heap resources.

Drivers/gt911-module/bindings/goodix,gt911.yaml (2)

41-46: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Constrain reset-pulses to the downstream type.

reset_controller_pin accepts uint8_t, but this binding accepts any signed int. A value of -1 becomes 255 pulses, while 256 becomes zero pulses. Reject values outside the supported range before the driver narrows them.


59-68: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate the coordinate scale values.

The driver multiplies coordinates by x-scale and y-scale before clamping. The binding permits zero, negative, and arbitrarily large values. Require positive bounded values, or validate them before the arithmetic.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a8a412ed-9826-427b-b000-630c625a100b

📥 Commits

Reviewing files that changed from the base of the PR and between 66396fe and 0dbc519.

📒 Files selected for processing (10)
  • Devices/tulip-4r11/device.properties
  • Devices/tulip-4r11/tulip-4r11.dts
  • Drivers/gt911-module/bindings/goodix,gt911.yaml
  • Drivers/gt911-module/include/drivers/gt911.h
  • Drivers/gt911-module/source/gt911.cpp
  • Drivers/rgb-display-module/bindings/espressif,esp32-rgb-display.yaml
  • Drivers/rgb-display-module/include/drivers/rgb_display.h
  • Drivers/rgb-display-module/source/rgb_display.cpp
  • TactilityKernel/include/tactility/drivers/software_pixel_mapper.h
  • TactilityKernel/source/drivers/software_pixel_mapper.cpp
💤 Files with no reviewable changes (1)
  • Drivers/gt911-module/include/drivers/gt911.h
🚧 Files skipped from review as they are similar to previous changes (3)
  • Devices/tulip-4r11/device.properties
  • Devices/tulip-4r11/tulip-4r11.dts
  • Drivers/gt911-module/source/gt911.cpp

Comment thread Drivers/rgb-display-module/source/rgb_display.cpp Outdated
Comment thread Drivers/rgb-display-module/include/drivers/software_pixel_mapper.h
@KenVanHoeylandt

Copy link
Copy Markdown
Contributor

I confirmed that GT911 still works fine on other devices 👍

@KenVanHoeylandt

Copy link
Copy Markdown
Contributor

Thanks, this looks great!

@KenVanHoeylandt
KenVanHoeylandt merged commit 564d8af into TactilityProject:main Aug 8, 2026
63 checks passed
@NellowTCS
NellowTCS deleted the tulip-cc branch August 8, 2026 19:39
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.

2 participants