-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rp2040 zero #1871
Add rp2040 zero #1871
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! A few items that need addressing. Also check out the pre-commit check failure for issues there.
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,console = &uart0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For boards added to ZMK directly, we usually set the console to be the CDC ACM node added to the usb node. See https://github.com/zmkfirmware/zmk/blob/main/app/boards/arm/nice_nano/nice_nano.dtsi#L64 for an example node.
|
||
&uart1 { | ||
current-speed = <115200>; | ||
status = "okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ZMK boards, don't enable the UART, SPI, etc by default. This is a bit different from the upstream Zephyr board approach.
@@ -0,0 +1,12 @@ | |||
identifier: waveshare_rp2040_zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This .zmk.yml
file format is not the same as the Zephyr format. See existing ZMK boards for examples of the metadata we use.
CONFIG_SOC_RP2040=y | ||
CONFIG_BOARD_WAVESHARE_RP2040_ZERO=y | ||
|
||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=240000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=240000000 | |
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 |
I had to fix this in our other boards recently, they had the wrong sys clock frequency set.
@petejohanson I noticed that ZMK's Zephyr fork has quite a few custom RP2040 boards defined there https://github.com/zmkfirmware/zephyr/tree/v3.2.0%2Bzmk-fixes/boards/arm. Is there a rule of thumb for which boards should go in upstream Zephyr, the ZMK Zephyr fork, vs the ZMK boards directory? |
Anything that I'd like to upstream, given time, I try to put in our Zephyr fork. That usually means anything more popular/general purpose. The Zero is theoretically generic enough we could choose to put there as well. |
Closing due to inactivity. Feel free to reopen whenever you're back to this. |
Board/Shield Check-list
.zmk.yml
metadata file added&pro_micro
used in favor of&pro_micro_d/a
if applicable.conf
file has optional extra features commented out