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

dts: arm: raspberrypi: rpi_pico: rp2350: Add DMA configuration #79469

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f7faedd
manifest: update hal_rpi_pico
soburi Aug 10, 2024
2f24931
modules: hal_rpi_pico: Update to fit for 2.0.0 directory structure
soburi Aug 9, 2024
ffbf439
drivers: gpio: rpi_pico: Fitting for the changes made in pico-sdk 2.0.0
soburi Aug 10, 2024
9796fdd
drivers: flash: rpi_pico: Rename to avoid conflicting with SDK
soburi Aug 10, 2024
c8111f8
dts: arm: Move rpi_pico under raspberrypi
ajf58 Aug 27, 2024
b87c8a2
dts: arm: rp2040: Improve naming of included files
ajf58 Aug 27, 2024
c0fe9de
drivers: clock_control: rpi_pico: Correct bitfields during init
ajf58 Aug 29, 2024
6582d22
drivers: clock_control: rpi_pico: Make pinctrl-0 optional
ajf58 Sep 27, 2024
7b01d18
soc: rp2350: Add initial support for the Raspberry Pi RP2350
ajf58 Aug 21, 2024
0c35680
drivers: clock_control: rpi_pico: Add support for the RP2350.
ajf58 Aug 21, 2024
cacef41
drivers: hwinfo: rp2350: Add initial support for RP2350
ajf58 Aug 23, 2024
e415533
drivers: clock_control: rpi_pico: Start tick generators for timers
ajf58 Sep 1, 2024
9cc824b
drivers: watchdog: rpi_pico: Add support for RP2350
soburi Sep 2, 2024
4ffd58a
drivers: counter: rpi_pico_timer: Add support for RP2350
ajf58 Sep 25, 2024
c9591f9
pinctrl: raspberrypi: rp2350: Add support for RP2350X
ajf58 Sep 9, 2024
9d7db13
boards: Add initial support for the Raspberry Pi Pico 2
ajf58 Aug 21, 2024
1bae56a
UF2: Enable support for Raspberry Pi RP2350
oscardagrach Sep 20, 2024
a94b76b
samples: rpi_pico2: Add ADC-related samples for rpi_pico2
ajf58 Aug 31, 2024
32f4df7
tests: drivers: adc_api: Add support for the Raspberry Pi Pico 2
ajf58 Sep 3, 2024
ff899d4
tests: drivers: counter_basic_api: Add support for the Raspberry Pi P…
ajf58 Sep 25, 2024
bd3c339
doc: rpi_pico2: Document Raspberry Pi Pico 2 and related changes
ajf58 Aug 31, 2024
8d691cc
boards: raspberrypi: rpi_pico2: add OpenOCD runner configuration
ajf58 Sep 27, 2024
db604ca
boards: raspberrypi: rpi_pico2: Tidy up OpenOCD configuration
ajf58 Sep 27, 2024
48e8648
tests: gpio_api_1pin: rpi_pico2: Support using external pulldowns
ajf58 Oct 4, 2024
46bec14
dts: arm: raspberrypi: rpi_pico: rp2350: Add DMA configuration
soburi Oct 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
/dts/arm/nxp/ @mmahadevan108 @dleach02
/dts/arm/nxp/nxp_s32* @manuargue
/dts/arm/microchip/ @franciscomunoz @albertofloyd @sjvasanth1
/dts/arm/rpi_pico/ @yonsch
/dts/arm/raspberry/rpi_pico/ @yonsch
/dts/arm/silabs/efm32_pg_1b.dtsi @rdmeneze
/dts/arm/silabs/efm32gg11b* @oanerer
/dts/arm/silabs/efr32bg13p* @mnkp
Expand Down
3 changes: 2 additions & 1 deletion Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ config BUILD_OUTPUT_UF2_FAMILY_ID
default "0xada52840" if SOC_NRF52840_QIAA
default "0x4fb2d5bd" if SOC_SERIES_IMXRT10XX || SOC_SERIES_IMXRT11XX
default "0x2abc77ec" if SOC_SERIES_LPC55XXX
default "0xe48bff56" if SOC_SERIES_RP2XXX
default "0xe48bff56" if SOC_SERIES_RP2040
default "0xe48bff57" if SOC_SERIES_RP2350
default "0x68ed2b88" if SOC_SERIES_SAMD21
default "0x55114460" if SOC_SERIES_SAMD51
default "0x647824b6" if SOC_SERIES_STM32F0X
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3473,7 +3473,7 @@ Raspberry Pi Pico Platforms:
- boards/raspberrypi/
- boards/adafruit/kb2040/
- boards/sparkfun/pro_micro_rp2040/
- dts/arm/rpi_pico/
- dts/arm/raspberrypi/rpi_pico/
- dts/bindings/*/raspberrypi,pico*
- drivers/*/*rpi_pico
- drivers/*/*rpi_pico*/
Expand Down
3 changes: 0 additions & 3 deletions boards/adafruit/kb2040/adafruit_kb2040-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
};
};

clocks_default: clocks_default {
};

ws2812_pio0_default: ws2812_pio0_default {
ws2812 {
pinmux = <PIO0_P17>;
Expand Down
7 changes: 1 addition & 6 deletions boards/adafruit/kb2040/adafruit_kb2040.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/dts-v1/;

#include <rpi_pico/rp2040.dtsi>
#include <raspberrypi/rpi_pico/rp2040.dtsi>
#include "adafruit_kb2040-pinctrl.dtsi"
#include "sparkfun_pro_micro_connector.dtsi"
#include <freq.h>
Expand Down Expand Up @@ -56,11 +56,6 @@
};
};

&clocks {
pinctrl-0 = <&clocks_default>;
pinctrl-names = "default";
};

&uart0 {
current-speed = <115200>;
status = "okay";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
};
};

clocks_default: clocks_default {
};

ws2812_pio1_default: ws2812_pio1_default {
ws2812 {
pinmux = <PIO1_P12>;
Expand Down
7 changes: 1 addition & 6 deletions boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/dts-v1/;

#include <rpi_pico/rp2040.dtsi>
#include <raspberrypi/rpi_pico/rp2040.dtsi>
#include "adafruit_qt_py_rp2040-pinctrl.dtsi"
#include "seeed_xiao_connector.dtsi"
#include <freq.h>
Expand Down Expand Up @@ -56,11 +56,6 @@
};
};

&clocks {
pinctrl-0 = <&clocks_default>;
pinctrl-names = "default";
};

&uart1 {
current-speed = <115200>;
status = "okay";
Expand Down
30 changes: 30 additions & 0 deletions boards/raspberrypi/common/rpi_pico-led.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2021 Yonatan Schachter
*
* SPDX-License-Identifier: Apache-2.0
*/

/* Pico and Pico 2 boards (but not Pico W) have a common LED placement. */
/ {
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
label = "LED";
};
};

pwm_leds {
compatible = "pwm-leds";
status = "disabled";
pwm_led0: pwm_led_0 {
pwms = <&pwm 9 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM_LED";
};
};

aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
};
};
57 changes: 57 additions & 0 deletions boards/raspberrypi/common/rpi_pico-pinctrl-common.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2021, Yonatan Schachter
* SPDX-License-Identifier: Apache-2.0
*/

/* The Pico and Pico 2 are pin compatible. */
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_P0>;
};
group2 {
pinmux = <UART0_RX_P1>;
input-enable;
};
};

i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_P4>, <I2C0_SCL_P5>;
input-enable;
input-schmitt-enable;
};
};

i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P6>, <I2C1_SCL_P7>;
input-enable;
input-schmitt-enable;
};
};

spi0_default: spi0_default {
group1 {
pinmux = <SPI0_CSN_P17>, <SPI0_SCK_P18>, <SPI0_TX_P19>;
};
group2 {
pinmux = <SPI0_RX_P16>;
input-enable;
};
};

pwm_ch4b_default: pwm_ch4b_default {
group1 {
pinmux = <PWM_4B_P25>;
};
};

adc_default: adc_default {
group1 {
pinmux = <ADC_CH0_P26>, <ADC_CH1_P27>, <ADC_CH2_P28>, <ADC_CH3_P29>;
input-enable;
};
};

};
7 changes: 1 addition & 6 deletions boards/raspberrypi/rpi_pico/rpi_pico-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <freq.h>

#include <rpi_pico/rp2040.dtsi>
#include <raspberrypi/rpi_pico/rp2040.dtsi>
#include "rpi_pico-pinctrl.dtsi"
#include <zephyr/dt-bindings/pwm/pwm.h>

Expand Down Expand Up @@ -89,11 +89,6 @@
};
};

&clocks {
pinctrl-0 = <&clocks_default>;
pinctrl-names = "default";
};

&uart0 {
current-speed = <115200>;
status = "okay";
Expand Down
54 changes: 1 addition & 53 deletions boards/raspberrypi/rpi_pico/rpi_pico-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,4 @@

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

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

i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_P4>, <I2C0_SCL_P5>;
input-enable;
input-schmitt-enable;
};
};

i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P6>, <I2C1_SCL_P7>;
input-enable;
input-schmitt-enable;
};
};

spi0_default: spi0_default {
group1 {
pinmux = <SPI0_CSN_P17>, <SPI0_SCK_P18>, <SPI0_TX_P19>;
};
group2 {
pinmux = <SPI0_RX_P16>;
input-enable;
};
};

pwm_ch4b_default: pwm_ch4b_default {
group1 {
pinmux = <PWM_4B_P25>;
};
};

adc_default: adc_default {
group1 {
pinmux = <ADC_CH0_P26>, <ADC_CH1_P27>, <ADC_CH2_P28>, <ADC_CH3_P29>;
input-enable;
};
};

clocks_default: clocks_default {
};
};
#include "../common/rpi_pico-pinctrl-common.dtsi"
25 changes: 1 addition & 24 deletions boards/raspberrypi/rpi_pico/rpi_pico.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,4 @@
/dts-v1/;

#include "rpi_pico-common.dtsi"

/ {
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
label = "LED";
};
};

pwm_leds {
compatible = "pwm-leds";
status = "disabled";
pwm_led0: pwm_led_0 {
pwms = <&pwm 9 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM_LED";
};
};

aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
};
};
#include "../common/rpi_pico-led.dtsi"
9 changes: 9 additions & 0 deletions boards/raspberrypi/rpi_pico2/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024 Andrew Featherstone
# SPDX-License-Identifier: Apache-2.0

if BOARD_RPI_PICO2

config USB_SELF_POWERED
default n

endif # BOARD_RPI_PICO2
5 changes: 5 additions & 0 deletions boards/raspberrypi/rpi_pico2/Kconfig.rpi_pico2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Andrew Featherstone
# SPDX-License-Identifier: Apache-2.0

config BOARD_RPI_PICO2
select SOC_RP2350A
18 changes: 18 additions & 0 deletions boards/raspberrypi/rpi_pico2/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: Apache-2.0

if ("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "")
set(RPI_PICO_DEBUG_ADAPTER "cmsis-dap")
endif()

board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]")
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]")

# The adapter speed is expected to be set by interface configuration.
# The Raspberry Pi's OpenOCD fork doesn't, so match their documentation at
# https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#debugging-with-swd
board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 5000")

board_runner_args(uf2 "--board-id=RP2350")

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
5 changes: 5 additions & 0 deletions boards/raspberrypi/rpi_pico2/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: rpi_pico2
vendor: raspberrypi
socs:
- name: rp2350a
Binary file added boards/raspberrypi/rpi_pico2/doc/img/pico-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading