Skip to content

Conversation

cetola
Copy link

@cetola cetola commented Oct 15, 2025

Add initial support for the Waveshare RP2350-Zero, a low-cost, high-performance Pico-like development board based on the Raspberry Pi RP2350A microcontroller.

This commit introduces the board definition, devicetree files, pin control configuration, Kconfig options, and board documentation.

The RP2350-Zero’s Arm and RISC-V cores are supported with this port. Basic peripherals (GPIO, UART, I2C) are configured and tested. Verified by building and running the Zephyr "hello_world" sample on the RP2350-Zero / RP2350-One boards, and manually testing the GPIO, I2C, PIO, and RGB LED.

Copy link

Hello @cetola, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@cetola cetola force-pushed the rp2350_zero branch 2 times, most recently from 0d202ba to b39093a Compare October 15, 2025 18:53
@dsseng dsseng self-requested a review October 15, 2025 19:57
Copy link
Member

@dsseng dsseng left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Please find some suggestions attached

board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]")
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]")

# The adapter speed is expected to be set by interface configuration.
Copy link
Member

Choose a reason for hiding this comment

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

It's safe to assume probe-rs also works for this target, please consider adding it by copying from other files, like here: https://github.com/zephyrproject-rtos/zephyr/pull/94542/files

Copy link
Author

@cetola cetola Oct 15, 2025

Choose a reason for hiding this comment

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

Sounds good, added this. I'll see if I can get a probe-rs debug probe and test this out as well.


west flash

In alternative you can locate the generated file at ``build/zephyr/zephyr.uf2 file`` and simply drag-and-drop to the device after entreing the UF2 flashing mode.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In alternative you can locate the generated file at ``build/zephyr/zephyr.uf2 file`` and simply drag-and-drop to the device after entreing the UF2 flashing mode.
Alternatively, you can locate the generated file at ``build/zephyr/zephyr.uf2 file`` and simply drag-and-drop to the device after entering the UF2 flashing mode.

:goals: build
:compact:

You must flash the RP2350-Zero with an UF2 file. One option is to use West (Zephyr’s meta-tool). To enter the UF2 flashing mode just keep the ``BOOT`` button pressed while you connect the USB port, it will appear on the host as a mass storage device. In alternative with the board already connected via USB you can keep the ``RESET`` button pressed, press and release ``BOOT``, release ``RESET``. At this point you can flash the image file by running:
Copy link
Member

Choose a reason for hiding this comment

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

uf2 isn't the must option, I'm pretty sure picotool can load elf as well. Also, it seems the button press order should be different:

Suggested change
You must flash the RP2350-Zero with an UF2 file. One option is to use West (Zephyr’s meta-tool). To enter the UF2 flashing mode just keep the ``BOOT`` button pressed while you connect the USB port, it will appear on the host as a mass storage device. In alternative with the board already connected via USB you can keep the ``RESET`` button pressed, press and release ``BOOT``, release ``RESET``. At this point you can flash the image file by running:
You can flash the RP2350-Zero with an UF2 file. One option is to use West (Zephyr’s meta-tool). To enter the UF2 flashing mode just keep the ``BOOT`` button pressed while you connect the USB port, it will appear on the host as a mass storage device. In alternative with the board already connected via USB you can keep the ``BOOT`` button pressed, press and release ``RUN``, release ``BOOT``. At this point you can flash the image file by running:

Copy link
Contributor

Choose a reason for hiding this comment

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

Image

please use this one (it has transparent bg, is cropped to avoid unnecessary white space, and webp so size is smaller)

Copy link
Contributor

@kartben kartben Oct 16, 2025

Choose a reason for hiding this comment

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

cwebp rp2350_zero_pinout.jpg -q 50 -o rp2350_zero_pinout.webp -m 6 -af 

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

but fwiw I would rather you link to the product webpage rather than unnecessarily cluttering the Zehpyr git repo with this file

Copy link
Author

Choose a reason for hiding this comment

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

Updated the PR with a link to the product webpage.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, pushed the wrong rst file. Should be updated now.

# SPDX-License-Identifier: Apache-2.0

if("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "")
set(RPI_PICO_DEBUG_ADAPTER "cmsis-dap")
Copy link
Contributor

Choose a reason for hiding this comment

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

cmake indent is 2 spaces

group1 {
pinmux = <UART0_TX_P0>;
};
group2 {
Copy link
Contributor

Choose a reason for hiding this comment

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

newline gaps missing e.g. line 11, fix in whole PR

Copy link
Contributor

Choose a reason for hiding this comment

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

To put some of this in context, take a look at 2d22884 which might help.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. Funny enough, I fixed the issue and then immediately started looking for a linter. 😆

<28 0 &gpio0 28 0>, /* GP28 */
<29 0 &gpio0 29 0>; /* GP29 */
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 14 to 16
CONFIG_LED=y
CONFIG_LED_STRIP=y
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
CONFIG_LED=y
CONFIG_LED_STRIP=y
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y

Comment on lines 14 to 16
CONFIG_LED=y
CONFIG_LED_STRIP=y
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
CONFIG_LED=y
CONFIG_LED_STRIP=y
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y

Copy link
Author

Choose a reason for hiding this comment

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

PR updated to remove the LED. Is best practice here to keep the defconfig as minimal as possible?

Copy link
Contributor

@ajf58 ajf58 Oct 16, 2025

Choose a reason for hiding this comment

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

PR updated to remove the LED. Is best practice here to keep the defconfig as minimal as possible?

https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#general-recommendations is the best their is, AFAIK.

Extending https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/led/led_strip/boards might be the way to go.

CONFIG_WS2812_STRIP_RPI_PICO_PIO shouldn't be required, for example, because that'll just sort itself out when the node is enabled in the device tree, (and LED_STRIP is enabled) for example. It does raise an interesting (but beyond the scope of this PR) question: should samples/basic/rgb_led also include RGB LEDs that are driven via a LED 'strip'? To a lot of people (including me) that difference is nuanced.

@cetola cetola force-pushed the rp2350_zero branch 3 times, most recently from 76f7ae1 to 314aa51 Compare October 16, 2025 16:13
@cetola cetola requested review from kartben and nordicjm October 16, 2025 19:01
Copy link
Contributor

@ajf58 ajf58 left a comment

Choose a reason for hiding this comment

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

The I2C configuration is the thing that needs the closest attention, IMHO.

Comment on lines 9 to 14
if I2C_DW

config I2C_DW_CLOCK_SPEED
default 125

endif # I2C_DW
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if I2C_DW
config I2C_DW_CLOCK_SPEED
default 125
endif # I2C_DW

This doesn't look right, clk_sys runs at 150MHz by default, and clk_peri is derived from that. Is this a copy-paste error from RP2040 code?

Copy link
Author

Choose a reason for hiding this comment

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

I looked through my notes and I cannot find a reason I would have set this, so it is likely a copy/paste error from the RP2040. I used both the RP2040 and the Pico 2 as references.

Comment on lines 95 to 98
&wdt0 {
status = "okay";
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
&wdt0 {
status = "okay";
};

Duplicated on line 146, remove.

@cetola cetola force-pushed the rp2350_zero branch 2 times, most recently from 3e4e896 to b1d9842 Compare October 16, 2025 20:54
Add initial support for the Waveshare RP2350-Zero, a low-cost,
high-performance Pico-like development board based on the Raspberry
Pi RP2350A microcontroller.

This commit introduces the board definition, devicetree files, pin
control configuration, Kconfig options, and board documentation.

The RP2350-Zero’s Arm and RISC-V cores are supported with this
port. Basic peripherals (GPIO, UART, I2C) are configured and
tested. Verified by building and running the Zephyr "hello_world"
sample on the RP2350-Zero / RP2350-One boards, and manually testing
the GPIO, I2C, PIO, and RGB LED.

Signed-off-by: Stephano Cetola <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants