Commit graph

22 commits

Author SHA1 Message Date
Fin Maaß
9b570e90f2 raspberrypi: riscv: use riscv,isa-extensions dt prop
use riscv,isa-extensions dt prop for
raspberrypi riscv cpus.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-26 14:15:18 +01:00
Andy Lin
588d22464d soc: raspberrypi: rp235x/hazard3: Add support for ramfunc
Add support to run code from SRAM and future PSRAM for RP235x:hazard3.

Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
2026-01-11 13:06:14 +01:00
TOKITA Hiroshi
e0c706a7f5 soc: raspberrypi: rpi_pico: Defaultly turn off BINARY_INFO feature
The binary-info feature that introduced in #54290 causing trouble
with some rp2xxx variant boards.
Turning off this feature defaultly to solve these problems.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-01-07 14:56:56 +00:00
TOKITA Hiroshi
96b9b0f2df soc: raspberrypi: rpi_pico: Add support RpiPico binary info feature
Binary Info embeds program meta information in flash,
which can be viewed with RaspberryPi Pico's `picotool`.

Metadata is automatically collected from pinctrl.

It can be override by the Kconfig configurations, such as

```
CONFIG_RPI_PICO_BINARY_INFO_OVERRIDE_PROGRAM_NAME="my program name"
```

When this feature is enabled, pinctrl groups are restricted to
consisting of pins with a single rpi_pico function.
In other words, SPI's MISO and MOSI can be in the same group,
but I2C's SDA cannot be included in this group.
This is rarely an issue in normal use,
and can be resolved by dividing them into separate groups.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-01-06 16:07:16 +00:00
Dmitrii Sharshakov
e3ef835ffe soc: raspberrypi: rp2350: imply XIP
Imply XIP from the SoC config to make XIP the default to match the
behaviour between Cortex-M33 and Hazard3 variants.

This fixes cbe6a716d3, which stopped
selecting XIP at the SoC level.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-11-28 20:58:32 -05:00
Josuah Demangeon
23662f1e5d style: soc: apply coding style on CMakeLists.txt files
Apply the CMake style guidelines to CMakeList.txt files in soc/.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00
Peter Johanson
f89c00441a soc: raspberrypi: rpi_pico: Add RP2 bootloader support
Add an early init hook to check the boot mode and reset into the RP2 USB
bootloader if requested. Includes a snippet to use with any RP2040/RP2350
board to enable the necessary DTS/Kconfig to use the functionality, and
easy DTS includes for boards to use explicitly.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2025-10-02 11:46:31 +03:00
Andrew Featherstone
cb1e51b4df soc: rp2350: Add initial support for the Hazard3 cores
The RP2350 SoC series contain two Hazard3 cores, which use the RISC-V
instruction set. Define a new CPU cluster (`hazard3`), which is intended
to be used with the two Hazard3 cores 'plugged in' to the two 'sockets'
in the RP2350 series SoCs.

Update the linker script to support linking against the correct
(ISA-specific) linker script, and to generate a correct IMAGE_DEF for
the target ISA.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
80a54a89cd drivers: intc: RP2350: Add initial support for Hazard3
The RP2350 uses the Xh3irq interrupt controller, which supports nested
and prioritised interrupts. This adds initial support, configuring the
controller in 'direct' (non-vectored) mode.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Peter Marheine
bc9b80cb02 soc: rp2350: correctly handle GPIOs >31
RP2350 has 48 GPIOs, where only the first 30 are broken out to pins on
RP2350A (same as RP2040) and the remaining 18 are only usable on RP2350B.
This change makes the soc pinctrl driver support GPIOs above 31, where
previously it was impossible to configure GPIOs 32 through 47.

Tested on RP2350B, confirming that GPIO44 can be correctly configured for
PWM.

Signed-off-by: Peter Marheine <peter@taricorp.net>
2025-08-22 03:32:16 +02:00
Dmitrii Sharshakov
b2db425b62 soc: raspberrypi: rp2350: indicate DSP extension support
Confirmed by section 3.7.2 in the datasheet (version 29 July 2025) and
running a sample piece of code exercising smuad, smladx and
other DSP intrinsics.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-08-19 19:14:29 +02:00
Dmitrii Sharshakov
cbe6a716d3 soc: rp2350: add IMAGE_DEF using rom_start linker script
Use this approach for a simpler flow and to make relocation of images
into RAM easier.

Also do not force-select CONFIG_XIP (which is a default anyway), since
RP2350 can boot from SRAM.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-07-31 10:50:41 +01:00
TOKITA Hiroshi
344357a5b4 soc: raspberrrypi: rp2350: Add missing FPU support
Add CPU_HAS_FPU to make available the FPU feature.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-06-11 16:19:59 -07:00
TOKITA Hiroshi
a76ed223d5 soc: rpi_pico: Set the default SYS_CLOCK_HW_CYCLES_PER_SEC from dt
Avoid the individual `CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` for each
board instead to referencing the dt value.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-06-04 15:50:44 -04:00
Manuel Aebischer
da6f39172f rp2350: Only add IMAGE_DEF for apps at start of flash.
The image_def header shall not be added to apps that are booted by a
bootloader, e.g. mcuboot. Added proper handling for UF2 by hanan619.

Signed-off-by: Manuel Aebischer <manuel.aebischer@belden.com>
2025-05-15 22:14:01 +02:00
Martin Meyer
010d7d1b9a soc: raspberrypi: common: reformat pinctrl include
Apply clang-format on source files.

Signed-off-by: Martin Meyer <meyer.m90@gmail.com>
2025-05-01 13:42:17 +02:00
Martin Meyer
5d39cc1eea drivers: pinctrl: rp2040: extend pin override config
Add a device-tree property to configure the override
functionalities of RP2040 GPIO pins.

Signed-off-by: Martin Meyer <meyer.m90@gmail.com>
2025-05-01 13:42:17 +02:00
TOKITA Hiroshi
123472013a soc: raspberrypi: rp2350: Add initial support for the RP2350B
RP2350B is a rich IO variant in the RP2350 series.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-10 11:20:30 +01:00
Ryan Grachek
47b4e4c2fb UF2: Enable support for Raspberry Pi RP2350
Add UF2 Family ID for Raspberry Pi 2350 and build
UF2 image by default for Pico 2 board

Signed-off-by: Ryan Grachek <grachek@gmail.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Peter Johanson
05e0aad2f3 rp2350: Fix for storing larger pinctrl alt func
On RP2350, the alt function value can be up to 0x1F, so store as 5 bits.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
ae1a098c7a pinctrl: raspberrypi: rp2350: Add support for RP2350X
A significant amount of the pin muxing is duplicated between the RP2040,
the RP2350A, and RP2350B. Reflect this in the file structure, with a
`-common` suffix used to to indicate this.

Macros are defined in ascending order of the function index in the
relevant table in the datasheet. SoC/SoC-series specific macros are
defined in their respective tables. Functions that are not currently
used (e.g. the new HSTX) are intentionally not defined here as they do
not (currently) have any use in the Zephyr tree (i.e. there's no drivers
that make use of this functionality).

clang-format has been run over the existing definitions to reduce the
noise generated by CI. These are cosmetic changes; I've tried to retain
attribution to the relevant authors where applicable.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Benjamin Cabé
cc4a985316 soc: rp2350: Add initial support for the Raspberry Pi RP2350
RP2350 is Raspberry Pi's newest SoC. From the datasheet:

"RP2350 is a new family of microcontrollers from Raspberry Pi that
offers significant enhancements over RP2040. Key features include:
• Dual Cortex-M33 or Hazard3 processors at 150 MHz
• 520 kB on-chip SRAM, in 10 independent banks
• 8 kB of one-time-programmable storage (OTP)
• Up to 16 MB of external QSPI flash/PSRAM via dedicated QSPI bus
...
"

This commit introduces some changes to support the existing RP2040 and
what is describe by Raspberry Pi as the "RP2350 family". Currently there
are 4 published products in the family: RP2350A, RP2350B, RP2354A, and
RP2354A. Within Zephyr's taxonomy, split the configuration as follows:
Family: Raspberry Pi Pico. This contains all RP2XXX SoCs,
SoC Series: RP2040 and RP2350.
SoC: RP2040 and, for now, just the RP2350A, which is present on the Pico
2, where the A suffix indicates  QFN-60 package type. This structure is
reflected in `soc/raspberrypi/soc.yml`, and somewhat assumes that there
won't be a RP2050, for example, as a RP2040 with more RAM.

This is foundation work ahead of introducing support for Raspberry Pi's
Pico 2 board, which is fitted with a RP2350A and 4MB of flash.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-23 23:57:57 +01:00