From 6e9635679f93c8d06be585c7aa1d2d96408fc6ed Mon Sep 17 00:00:00 2001 From: Andrew Featherstone Date: Sun, 22 Dec 2024 02:03:30 +0100 Subject: [PATCH] rpi_pico2: rp2350: Add PIO support and extend samples Add initial support for the RP2350's PIO peripherals, extend the existing example under samples/boards/raspberrypi/rpi_pico/uart_pio to demonstrate this on the Raspberry Pi Pico 2, and update the board's documentation. Signed-off-by: Andrew Featherstone Signed-off-by: Manuel Aebischer --- boards/raspberrypi/rpi_pico2/doc/index.rst | 3 +++ dts/arm/raspberrypi/rpi_pico/rp2350.dtsi | 23 +++++++++++++++++++ .../boards/rpi_pico2_rp2350a_m33.overlay | 8 +++++++ 3 files changed, 34 insertions(+) create mode 100644 samples/boards/raspberrypi/rpi_pico/uart_pio/boards/rpi_pico2_rp2350a_m33.overlay diff --git a/boards/raspberrypi/rpi_pico2/doc/index.rst b/boards/raspberrypi/rpi_pico2/doc/index.rst index 9ce2395cf5a..aba385c0b5f 100644 --- a/boards/raspberrypi/rpi_pico2/doc/index.rst +++ b/boards/raspberrypi/rpi_pico2/doc/index.rst @@ -69,6 +69,9 @@ hardware features: * - UART - :kconfig:option:`CONFIG_SERIAL` - :dtcompatible:`raspberrypi,pico-uart` + * - UART (PIO) + - :kconfig:option:`CONFIG_SERIAL` + - :dtcompatible:`raspberrypi,pico-uart-pio` Connections and IOs =================== diff --git a/dts/arm/raspberrypi/rpi_pico/rp2350.dtsi b/dts/arm/raspberrypi/rpi_pico/rp2350.dtsi index e0e0fe419a7..b0e03ad6b45 100644 --- a/dts/arm/raspberrypi/rpi_pico/rp2350.dtsi +++ b/dts/arm/raspberrypi/rpi_pico/rp2350.dtsi @@ -386,6 +386,29 @@ status = "disabled"; }; + pio0: pio@50200000 { + compatible = "raspberrypi,pico-pio"; + reg = <0x50200000 DT_SIZE_K(4)>; + clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>; + resets = <&reset RPI_PICO_RESETS_RESET_PIO0>; + status = "disabled"; + }; + + pio1: pio@50300000 { + compatible = "raspberrypi,pico-pio"; + reg = <0x50300000 DT_SIZE_K(4)>; + clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>; + resets = <&reset RPI_PICO_RESETS_RESET_PIO1>; + status = "disabled"; + }; + + pio2: pio@50400000 { + compatible = "raspberrypi,pico-pio"; + reg = <0x50400000 DT_SIZE_K(4)>; + clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>; + resets = <&reset RPI_PICO_RESETS_RESET_PIO2>; + status = "disabled"; + }; }; pinctrl: pin-controller { diff --git a/samples/boards/raspberrypi/rpi_pico/uart_pio/boards/rpi_pico2_rp2350a_m33.overlay b/samples/boards/raspberrypi/rpi_pico/uart_pio/boards/rpi_pico2_rp2350a_m33.overlay new file mode 100644 index 00000000000..8b83efe6ea0 --- /dev/null +++ b/samples/boards/raspberrypi/rpi_pico/uart_pio/boards/rpi_pico2_rp2350a_m33.overlay @@ -0,0 +1,8 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright (c) 2024 Andrew Featherstone + */ + +/* Pico 2 is compatible with the Pico 1, so reuse. */ +#include "rpi_pico.overlay"