Skip to content

Add support for Yoto Mini and Yoto Player V3#10783

Merged
tannewt merged 12 commits intoadafruit:mainfrom
tannewt:yoto
Feb 4, 2026
Merged

Add support for Yoto Mini and Yoto Player V3#10783
tannewt merged 12 commits intoadafruit:mainfrom
tannewt:yoto

Conversation

@tannewt
Copy link
Member

@tannewt tannewt commented Jan 24, 2026

There were a bunch of changes to enable the boards:

  • Add web workflow for sdioio cards. Adds the "native" access.
  • Introduce i2cioexpander for native I2C expander support.
    • Introduce DigitalInOut protocol so that IOPins can be used where DigitalInOut would be traditionally.
    • Add mp_errno_t for clarifying what APIs return errno.
    • DigitalInOut protocol uses it to pass through I2C issues.
    • Switch bitbangio and fourwire to DigitalInOutProtocol.
    • Support the Mini's GC9306 display with CS and DC over IOPin.
    • DigitalInOutProtocol can fall back to Python-level access if not natively supported.
    • Make board.I2C() speed configurable to speed up IOExpander access.
  • Update codespell to work with Python 3.14.
  • Make static web workflow responses cachable by the browser for 1 day.

There were a bunch of changes to enable the boards:

* Add web workflow for sdioio cards. Adds the "native" access.
* Introduce `i2cioexpander` for native I2C expander support.
  * Introduce DigitalInOut protocol so that IOPins can be used
    where DigitalInOut would be traditionally.
  * Add mp_errno_t for clarifying what APIs return errno.
  * DigitalInOut protocol uses it to pass through I2C issues.
  * Switch `bitbangio` and `fourwire` to DigitalInOutProtocol.
  * Support the Mini's GC9306 display with CS and DC over IOPin.
  * DigitalInOutProtocol can fall back to Python-level access if
    not natively supported.
  * Make board.I2C() speed configurable to speed up IOExpander access.
* Update codespell to work with Python 3.14.
* Make static web workflow responses cachable by the browser for 1 day.
@tannewt tannewt linked an issue Jan 24, 2026 that may be closed by this pull request
@tannewt tannewt requested a review from dhalbert January 28, 2026 17:45
@tannewt tannewt marked this pull request as ready for review January 29, 2026 17:09
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

I suggested some minor file changes.

I thought about Union[microcontroller.Pin, digitalio.DigitalInOutProtocol] a bit, but didn't come to any conclusions. In the long run we might remove passing a Pin, perhaps. A long time ago I proposed a Pin.Configuration type in #9845, and that is a bit related to this kind of change

I tried some smoke tests on boards with fourwire displays, since there were significant changes there. Some worked; most did not. So there's some debugging to do on the display changes.

  • PyPortal Titano - worked
  • Monster M4MSK - didn't work, no CIRCUITPY, no REPL. Did work with 10.1.0-beta.1
  • FunHouse - didn't work, no CIRCUITPY, no REPL. Did work with 10.1.0-beta.1.
  • Feather TFT ESP32-S2 - didn't work, no CIRCUITPY, no REPL. Did work with 10.0.3.
  • Pybadge - didn't work, no CIRCUITPY, no REPL. Did work with 10.0.3.

@tannewt
Copy link
Member Author

tannewt commented Feb 3, 2026

I've fixed FunHouse and I suspect montermask had the same issue. PyBadge was broken for the same reason but needed an additional fix due to #10699 which removed the pin reset for the port reset. That's ok for after the vm runs but it is needed in port_init to get things into a good initial state. Feather S2 TFT may have the same issue but I'm out of time to test today and wanted to get these fixes out.

@tannewt tannewt requested a review from dhalbert February 3, 2026 01:03
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

On MONSTERM4MSK, the display shows the REPL, but I am getting a safe mode Hard fault: memory access or instruction error., and when running a sample program, I get this error (works in previous versions):

Traceback (most recent call last):
  File "code.py", line 54, in <module>
  File "adafruit_monsterm4sk.py", line 129, in __init__
ValueError: RIGHT_TFT_SCK in use

code.py.zip

Other boards are working and code changes look fine.

@dhalbert
Copy link
Collaborator

dhalbert commented Feb 3, 2026

I get the RIGHT_TFT_SCK in use only sometimes. When I do it does NOT go into safe mode. When I go into safe mode there is no precursor error printed.
offending line is

        right_spi = busio.SPI(board.RIGHT_TFT_SCK, MOSI=board.RIGHT_TFT_MOSI)

previous interesting lines:

        # Left screen spi bus
        left_spi = busio.SPI(board.LEFT_TFT_SCK, MOSI=board.LEFT_TFT_MOSI)
        left_tft_cs = board.LEFT_TFT_CS
        left_tft_dc = board.LEFT_TFT_DC

        left_display_bus = fourwire.FourWire(
            left_spi,
            command=left_tft_dc,
            chip_select=left_tft_cs,  # Reset on Seesaw
        )

        self.left_display = ST7789(left_display_bus, width=240, height=240, rowstart=80)

        # right backlight on board
        self.right_backlight = pwmio.PWMOut(board.RIGHT_TFT_LITE, frequency=5000, duty_cycle=0)
        # full brightness
        self.right_backlight.duty_cycle = 65535

        # right display spi bus
        right_spi = busio.SPI(board.RIGHT_TFT_SCK, MOSI=board.RIGHT_TFT_MOSI)

@tannewt
Copy link
Member Author

tannewt commented Feb 3, 2026

I get the safe mode happening on main as well. It doesn't on 10.0.x.

@tannewt
Copy link
Member Author

tannewt commented Feb 3, 2026

Monster mask and other two display boards are crashing. We have existing issues for it here: #7472 I'd like to get this in as-is. I think we need to do a proper multi-display fix instead.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

thanks for all this work!

@tannewt tannewt merged commit 4b7b098 into adafruit:main Feb 4, 2026
17 checks passed
@dhalbert
Copy link
Collaborator

dhalbert commented Feb 4, 2026

@tannewt

#10794, the m5stack_cores3_se PR, snuck in here and is causing some failures due to the pin object changes in this PR.
https://github.com/adafruit/circuitpython/actions/runs/21652843149/job/62421545388

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.

Add some kind of I/O expander pin to the core

2 participants