Skip to content

Commit 4fb79e3

Browse files
committed
boards: raspberrypi: rpi_pico: Add MCUboot variants
Add MCUboot variants to RPI Pico / Pico W and SysBuild parititions: - rpi_pico/rp2040/mcuboot - rpi_pico/rp2040/w/mcuboot Signed-off-by: John Lin <john.lin@beechwoods.com>
1 parent c4ed1c0 commit 4fb79e3

7 files changed

+168
-3
lines changed

boards/raspberrypi/rpi_pico/board.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ board:
33
full_name: Raspberry Pi Pico
44
vendor: raspberrypi
55
socs:
6-
- name: rp2040
7-
variants:
8-
- name: w
6+
- name: rp2040
7+
variants:
8+
- name: w
9+
variants:
10+
- name: mcuboot
11+
- name: mcuboot
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2021 Yonatan Schachter
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "rpi_pico-common.dtsi"
10+
#include "../common/rpi_pico-led.dtsi"
11+
12+
/delete-node/ &code_partition;
13+
#include <raspberrypi/partitions_2M_sysbuild.dtsi>
14+
/ {
15+
chosen {
16+
zephyr,code-partition = &slot0_partition;
17+
};
18+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
identifier: rpi_pico/mcuboot
2+
name: Raspberry Pi Pico - MCUboot
3+
type: mcu
4+
arch: arm
5+
flash: 2048
6+
ram: 264
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- uart
12+
- gpio
13+
- adc
14+
- i2c
15+
- spi
16+
- hwinfo
17+
- watchdog
18+
- pwm
19+
- flash
20+
- dma
21+
- counter
22+
- clock
23+
- usbd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CONFIG_SERIAL=y
2+
CONFIG_CONSOLE=y
3+
CONFIG_UART_CONSOLE=y
4+
CONFIG_GPIO=y
5+
CONFIG_USE_DT_CODE_PARTITION=y
6+
CONFIG_BUILD_OUTPUT_UF2=y
7+
CONFIG_BUILD_OUTPUT_HEX=y
8+
CONFIG_UART_INTERRUPT_DRIVEN=y
9+
CONFIG_RESET=y
10+
CONFIG_CLOCK_CONTROL=y
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
* Copyright (c) 2023 Dave Rensberger - Beechwoods Software
3+
* Copyright (c) 2024 Steve Boylan <stephen.boylan@beechwoods.com>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/dts-v1/;
9+
10+
#include "rpi_pico-common.dtsi"
11+
12+
/delete-node/ &code_partition;
13+
#include <raspberrypi/partitions_2M_sysbuild.dtsi>
14+
/ {
15+
chosen {
16+
zephyr,code-partition = &slot0_partition;
17+
};
18+
};
19+
20+
&pinctrl {
21+
pio0_spi0_default: pio0_spi0_default {
22+
/* gpio 25 is used for chip select, not assigned to the PIO */
23+
group1 {
24+
pinmux = <PIO0_P29>;
25+
};
26+
};
27+
28+
airoc_wifi_default: airoc_wifi_default {
29+
/* Control of GPIO24 is done through the WiFi driver */
30+
group1 {
31+
pinmux = <PIO0_P24>;
32+
input-enable;
33+
};
34+
};
35+
36+
airoc_wifi_host_wake: airoc_wifi_host_wake {
37+
/* Assign GPIO24 to SIO (GPIO) for use as an interrupt source */
38+
group1 {
39+
/* Lacking a specific SIO pin definition, use the RP2040_PINMUX macro */
40+
pinmux = <RP2XXX_PINMUX(24, RP2_PINCTRL_GPIO_FUNC_SIO)>;
41+
input-enable;
42+
};
43+
};
44+
};
45+
46+
&pio0 {
47+
status = "okay";
48+
49+
pio0_spi0: pio0_spi0 {
50+
compatible = "raspberrypi,pico-spi-pio";
51+
clocks = < &clocks RPI_PICO_CLKID_CLK_SYS >;
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
55+
clk-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
56+
sio-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
57+
pinctrl-0 = <&pio0_spi0_default>;
58+
pinctrl-names = "default";
59+
status = "okay";
60+
airoc-wifi@0 {
61+
compatible = "infineon,airoc-wifi";
62+
reg = < 0 >;
63+
wifi-reg-on-gpios = < &gpio0 23 GPIO_ACTIVE_HIGH >;
64+
bus-select-gpios = < &gpio0 24 GPIO_ACTIVE_HIGH >;
65+
wifi-host-wake-gpios = < &gpio0 24 GPIO_ACTIVE_HIGH >;
66+
spi-max-frequency = < 10000000 >;
67+
spi-half-duplex;
68+
spi-data-irq-shared;
69+
pinctrl-0 = <&airoc_wifi_default>;
70+
pinctrl-1 = <&airoc_wifi_host_wake>;
71+
pinctrl-names = "default", "host_wake";
72+
status = "okay";
73+
};
74+
};
75+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
identifier: rpi_pico/rp2040/w/mcuboot
2+
name: Raspberry Pi Pico W - MCUboot
3+
type: mcu
4+
arch: arm
5+
flash: 2048
6+
ram: 264
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- uart
12+
- gpio
13+
- adc
14+
- i2c
15+
- spi
16+
- hwinfo
17+
- watchdog
18+
- pwm
19+
- flash
20+
- dma
21+
- pio
22+
- counter
23+
- clock
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CONFIG_SERIAL=y
2+
CONFIG_CONSOLE=y
3+
CONFIG_UART_CONSOLE=y
4+
CONFIG_GPIO=y
5+
CONFIG_USE_DT_CODE_PARTITION=y
6+
CONFIG_BUILD_OUTPUT_UF2=y
7+
CONFIG_BUILD_OUTPUT_HEX=y
8+
CONFIG_UART_INTERRUPT_DRIVEN=y
9+
CONFIG_RESET=y
10+
CONFIG_CLOCK_CONTROL=y
11+
12+
# Default networking configuration
13+
CONFIG_CYW43439=y

0 commit comments

Comments
 (0)