From c9a16e862caed343a55d6d192c833def3910d53a Mon Sep 17 00:00:00 2001 From: Vdragon Date: Sat, 4 Oct 2025 14:04:19 +0200 Subject: [PATCH] zephyr: Add boards files for rp2350's m33 on pico 2. Adds overlay and conf for RPi Pico2 ARM cpu on the zephyr port. Signed-off-by: Vdragon --- .../zephyr/boards/rpi_pico2_rp2350a_m33.conf | 17 +++++++ .../boards/rpi_pico2_rp2350a_m33.overlay | 50 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 ports/zephyr/boards/rpi_pico2_rp2350a_m33.conf create mode 100644 ports/zephyr/boards/rpi_pico2_rp2350a_m33.overlay diff --git a/ports/zephyr/boards/rpi_pico2_rp2350a_m33.conf b/ports/zephyr/boards/rpi_pico2_rp2350a_m33.conf new file mode 100644 index 0000000000..8460127247 --- /dev/null +++ b/ports/zephyr/boards/rpi_pico2_rp2350a_m33.conf @@ -0,0 +1,17 @@ +# Configure serial console over USB CDC ACM. +CONFIG_USB_DEVICE_STACK_NEXT=y +CONFIG_USBD_CDC_ACM_CLASS=y +CONFIG_UART_LINE_CTRL=y + +# Disable networking. +CONFIG_NETWORKING=n + +# Hardware features. +CONFIG_FLASH=y +CONFIG_FLASH_MAP=y +CONFIG_I2C=y +CONFIG_I2C_TARGET=y +CONFIG_SPI=y + +# MicroPython config. +CONFIG_MICROPY_HEAP_SIZE=458752 diff --git a/ports/zephyr/boards/rpi_pico2_rp2350a_m33.overlay b/ports/zephyr/boards/rpi_pico2_rp2350a_m33.overlay new file mode 100644 index 0000000000..e5261561f8 --- /dev/null +++ b/ports/zephyr/boards/rpi_pico2_rp2350a_m33.overlay @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + chosen { + /* Use USB CDC ACM as the console. */ + zephyr,console = &cdc_acm_uart0; + }; +}; + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + second_stage_bootloader: partition@0 { + label = "second_stage_bootloader"; + reg = <0x00000000 0x100>; + read-only; + }; + + code_partition: partition@100 { + label = "code-partition"; + reg = <0x0000100 (DT_SIZE_M(1) - 0x100)>; + read-only; + }; + + storage_partition: partition@100000 { + label = "storage"; + reg = <0x00100000 DT_SIZE_M(3)>; + }; + }; +}; + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +&i2c1 { + clock-frequency = ; + status = "okay"; + pinctrl-0 = <&i2c1_default>; + pinctrl-names = "default"; +};