Skip to content
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

RP2040 basic support (draft) #33172

Closed
wants to merge 2 commits into from

Conversation

ioannisg
Copy link
Member

@ioannisg ioannisg commented Mar 9, 2021

Draft PR for RP2040 basic support

  • SoC and SoC series definition

  • Device tree support

  • Board support (pico)

  • Basic drivers
    - timer (SysTick)
    - serial

  • Requires HAL definition

Add basic Kconfig definitions for the Raspberry Pi
RP20xx MCU line.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add basic Kconfig definitions for the RP2040 SoC:
- SoC series and RP2040 Kconfig definitions
- soc header and soc.c implementation

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
@ioannisg ioannisg added the In progress For PRs: is work in progress and should not be merged yet. For issues: Is being worked on label Mar 9, 2021
@atharvalele
Copy link

Hey! I'm interested in Zephyr and helping with the port for RPi Pico. Do you have any suggestions/tasks that I might take up?

I've gone through the documentation at https://docs.zephyrproject.org/1.12.0/porting/board_porting.html

@burumaj
Copy link
Contributor

burumaj commented Mar 13, 2021

I don't think the serial driver has to be implemented. The UART peripheral is based on the ARM PL011, which is already supported by zephyr.

@burumaj
Copy link
Contributor

burumaj commented Mar 14, 2021

Another thing that would need to happen is adding a stage 2 bootloader. This part would be responsible for initializing the XIP hardware. This how the pico sdk does this (https://github.com/raspberrypi/pico-sdk/tree/master/src/rp2_common/boot_stage2).
For the pico this would be using boot2_w25q080.S file. This code needs to be located at the start of the firmware image to be bootable.

Since this is a board specific property this should probably be placed in the pico board folder. Another option I can see to do this, is to configure this when selecting the SoC for example add this to KConfig.series:

if SOC_SERIES_RP20XX
choice BOOT_STAGE2_LOADER
    prompt "Support for XIP flash"

config SOC_BOOT_STAGE2_W25Q080
    bool "w25q080 stage 2"

endchoice
endif

then add configs options for all supported flash devices. Probably starting out with all devices supported by pico-sdk.
For more information on the second stage loader refer to the RP2040 datasheet chapter 2.8.1.3. Flash Second Stage.

@coderkalyan
Copy link
Contributor

Hello @ioannisg , I also started this but seems you've made more progress than I have! Let me know if I can be of help

@soundsreal
Copy link

hi @ioannisg any work on the device tree support? I just bought a few chips, keen on helping out.

@gmarull
Copy link
Member

gmarull commented Feb 3, 2022

Support has been merged now, closing

@gmarull gmarull closed this Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In progress For PRs: is work in progress and should not be merged yet. For issues: Is being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants