Skip to content
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ if(CONFIG_BUILD_OUTPUT_BIN AND CONFIG_BUILD_OUTPUT_UF2)
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/uf2conv.py
-c
-f ${CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID}
-b ${CONFIG_FLASH_LOAD_OFFSET}
-b ${CONFIG_BUILD_OUTPUT_UF2_OFFSET}
-o ${KERNEL_UF2_NAME}
${KERNEL_BIN_NAME}
)
Expand Down
6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
/soc/arm/nuvoton_npcx/ @MulinChao @WealianLiao @ChiHuaL
/soc/arm/nuvoton_numicro/ @ssekar15
/soc/arm/quicklogic_eos_s3/ @kowalewskijan @kgugala
/soc/arm/raspberrypi/ @yonsch
/soc/arm/silabs_exx32/efm32pg1b/ @rdmeneze
/soc/arm/silabs_exx32/efr32mg21/ @l-alfred
/soc/arm/st_stm32/ @erwango
Expand Down Expand Up @@ -124,6 +125,7 @@
/boards/arm/quick_feather/ @kowalewskijan @kgugala
/boards/arm/rak4631_nrf52840/ @gpaquet85
/boards/arm/rak5010_nrf52840/ @gpaquet85
/boards/arm/raspberrypi_pico/ @yonsch
/boards/arm/ronoth_lodev/ @NorthernDean
/boards/arm/xmc45_relax_kit/ @parthitce
/boards/arm/sam4e_xpro/ @nandojve
Expand Down Expand Up @@ -253,6 +255,7 @@
/drivers/gpio/*eos_s3* @wtatarski @kowalewskijan @kgugala
/drivers/gpio/*rcar* @julien-massot
/drivers/gpio/*esp32* @glaubermaroto
/drivers/gpio/*rpi_pico* @yonsch
/drivers/hwinfo/ @alexanderwachter
/drivers/i2c/i2c_common.c @sjg20
/drivers/i2c/i2c_emul.c @sjg20
Expand Down Expand Up @@ -333,6 +336,7 @@
/drivers/serial/uart_mcux_iuart.c @Mani-Sadhasivam
/drivers/serial/Kconfig.rtt @carlescufi @pkral78
/drivers/serial/uart_rtt.c @carlescufi @pkral78
/drivers/serial/*rpi_pico* @yonsch
/drivers/serial/Kconfig.xlnx @wjliang
/drivers/serial/uart_xlnx_ps.c @wjliang
/drivers/serial/uart_xlnx_uartlite.c @henrikbrixandersen
Expand Down Expand Up @@ -420,6 +424,7 @@
/dts/arm/nuvoton/ @ssekar15 @MulinChao @WealianLiao @ChiHuaL
/dts/arm/nxp/ @mmahadevan108 @dleach02
/dts/arm/microchip/ @franciscomunoz @albertofloyd @scottwcpg
/dts/arm/raspberrypi/ @yonsch
/dts/arm/silabs/efm32_pg_1b.dtsi @rdmeneze
/dts/arm/silabs/efm32gg11b* @oanerer
/dts/arm/silabs/efm32_jg_pg* @chrta
Expand Down Expand Up @@ -461,6 +466,7 @@
/dts/bindings/*/nordic* @anangl
/dts/bindings/*/nxp* @mmahadevan108 @dleach02
/dts/bindings/*/openisa* @dleach02
/dts/bindings/*/raspberrypi* @yonsch
/dts/bindings/*/st* @erwango
/dts/bindings/sensor/ams* @alexanderwachter
/dts/bindings/*/sifive* @mateusz-holenko @kgugala @pgielda
Expand Down
6 changes: 6 additions & 0 deletions Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ config BUILD_OUTPUT_UF2_FAMILY_ID
default "0xada52840" if SOC_NRF52840_QIAA
default "0x4fb2d5bd" if SOC_SERIES_IMX_RT
default "0x2abc77ec" if SOC_SERIES_LPC55XXX
default "0xe48bff56" if SOC_SERIES_RP2XXX
default "0x68ed2b88" if SOC_SERIES_SAMD21
default "0x55114460" if SOC_SERIES_SAMD51
default "0x647824b6" if SOC_SERIES_STM32F0X
Expand All @@ -486,6 +487,11 @@ config BUILD_OUTPUT_UF2_FAMILY_ID
name string. If the SoC in use is known by UF2, the Family ID will
be pre-filled with the known value.

config BUILD_OUTPUT_UF2_OFFSET
hex "UF2 Offset"
default 0x10000000 if SOC_SERIES_RP2XXX
default FLASH_LOAD_OFFSET if HAS_FLASH_LOAD_OFFSET

endif # BUILD_OUTPUT_UF2

config BUILD_OUTPUT_STRIPPED
Expand Down
6 changes: 6 additions & 0 deletions boards/arm/adafruit_kb2040/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2021 Pete Johanson
# SPDX-License-Identifier: Apache-2.0

config BOARD_ADAFRUIT_KB2040
bool "Adafruit KB2040 Board"
depends on SOC_RP2040
12 changes: 12 additions & 0 deletions boards/arm/adafruit_kb2040/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2021 Pete Johanson
# SPDX-License-Identifier: Apache-2.0

if BOARD_ADAFRUIT_KB2040

config BOARD
default "adafruit_kb2040"

config RP2_FLASH_W25Q080
default y

endif # BOARD_ADAFRUIT_KB2040
18 changes: 18 additions & 0 deletions boards/arm/adafruit_kb2040/adafruit_kb2040-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2021, Yonatan Schachter
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/rp2040-pinctrl.h>

&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_P20>;
};
group2 {
pinmux = <UART1_RX_P5>;
input-enable;
};
};
};
67 changes: 67 additions & 0 deletions boards/arm/adafruit_kb2040/adafruit_kb2040.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (c) 2021 Yonatan Schachter
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <raspberrypi/rp2040.dtsi>
#include "adafruit_kb2040-pinctrl.dtsi"
#include "sparkfun_pro_micro.dtsi"

/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart1;
zephyr,code-partition = &code_partition;
};
};

&flash0 {
/* 8MB of flash minus the 0x100 used for
* the second stage bootloader
*/
reg = <0x10000100 (DT_SIZE_M(8) - 0x100)>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/*
* Start at the beginning of usable flash, 8MB minus the
* second stage space and the 16 KiB reserved for settings
*/
code_partition: partition@0 {
label = "code";
reg = <0 ((DT_SIZE_M(8) - 0x100) - DT_SIZE_K(16))>;
read-only;
};

/*
* The final 16 KiB is reserved for the application.
* Storage partition may be used by FCB or LittleFS.
*/
storage_partition: partition@7fbe00 {
label = "storage";
reg = <0x007fbe00 DT_SIZE_K(16)>;
};
};
};

&uart1 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};

&gpio0 {
status = "okay";
};

&usbd {
status = "okay";
};
12 changes: 12 additions & 0 deletions boards/arm/adafruit_kb2040/adafruit_kb2040.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
identifier: raspberrypi_pico
name: RaspberryPi-Pico
type: mcu
arch: arm
flash: 2048
ram: 264
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- serial
23 changes: 23 additions & 0 deletions boards/arm/adafruit_kb2040/adafruit_kb2040_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_RP2XXX=y
CONFIG_SOC_RP2040=y
CONFIG_BOARD_ADAFRUIT_KB2040=y

CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=240000000

# Enable GPIO
CONFIG_GPIO=y

# enable uart driver
CONFIG_SERIAL=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Code partition needed to target the correct flash range
CONFIG_USE_DT_CODE_PARTITION=y

# Output UF2 by default, native bootloader supports it.
CONFIG_BUILD_OUTPUT_UF2=y
Empty file.
39 changes: 39 additions & 0 deletions boards/arm/adafruit_kb2040/sparkfun_pro_micro.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/

/ {
pro_micro: connector {
compatible = "sparkfun,pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 0 0> /* D0 */
, <1 0 &gpio0 1 0> /* D1 */
, <2 0 &gpio0 2 0> /* D2 */
, <3 0 &gpio0 3 0> /* D3 */
, <4 0 &gpio0 4 0> /* D4/A6 */
, <5 0 &gpio0 5 0> /* D5 */
, <6 0 &gpio0 6 0> /* D6/A7 */
, <7 0 &gpio0 7 0> /* D7 */
, <8 0 &gpio0 8 0> /* D8/A8 */
, <9 0 &gpio0 9 0> /* D9/A9 */
, <10 0 &gpio0 10 0> /* D10/A10 */
, <16 0 &gpio0 19 0> /* D16 */
, <14 0 &gpio0 20 0> /* D14 */
, <15 0 &gpio0 18 0> /* D15 */
, <18 0 &gpio0 26 0> /* D18/A0 */
, <19 0 &gpio0 27 0> /* D19/A1 */
, <20 0 &gpio0 28 0> /* D20/A2 */
, <21 0 &gpio0 29 0> /* D21/A3 */
;
};

};

// pro_micro_i2c: &i2c0 {};
// pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};
6 changes: 6 additions & 0 deletions boards/arm/raspberrypi_pico/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0

config BOARD_RPI_PICO
bool "Raspberry Pi Pico Board"
depends on SOC_RP2040
12 changes: 12 additions & 0 deletions boards/arm/raspberrypi_pico/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0

if BOARD_RPI_PICO

config BOARD
default "raspberrypi_pico"

config RP2_FLASH_W25Q080
default y

endif # BOARD_RPI_PICO
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions boards/arm/raspberrypi_pico/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. _raspberrypi_pico:

Raspberry Pi Pico
#################

Overview
********

The Raspberry Pi Pico is a small, low-cost, versatile board from
Raspberry Pi. It is equipped with an RP2040 SoC, an on-board LED,
a USB connector, and an SWD interface. The USB bootloader allows it
to be flashed without any adapter, in a drag-and-drop manner.
It is also possible to flash and debug the Pico with its SWD interface,
using an external adapter.

Hardware
********
- Dual core Arm Cortex-M0+ processor running up to 133MHz
- 264KB on-chip SRAM
- 2MB on-board QSPI flash with XIP capabilities
- 26 GPIO pins
- 3 Analog inputs
- 2 UART peripherals
- 2 SPI controllers
- 2 I2C controllers
- 16 PWM channels
- USB 1.1 controller (host/device)
- 8 Programmable I/O (PIO) for custom peripherals
- On-board LED


.. figure:: img/raspberrypi_pico.png
:width: 150px
:align: center
:alt: Raspberry Pi Pico

Raspberry Pi Pico (Image courtesy of Raspberry Pi)

Supported Features
==================

The raspberrypi_pico board configuration supports the following
hardware features:

+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| UART | on-chip | serial port |
+-----------+------------+----------------------+
| GPIO | on-chip | GPIO driver |
+-----------+------------+----------------------+
18 changes: 18 additions & 0 deletions boards/arm/raspberrypi_pico/raspberrypi_pico-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2021, Yonatan Schachter
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/rp2040-pinctrl.h>

&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_P0>;
};
group2 {
pinmux = <UART0_RX_P1>;
input-enable;
};
};
};
Loading