Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions boards/waveshare/rp2040_plus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
# SPDX-License-Identifier: Apache-2.0

config BOARD_RP2040_PLUS
bool
select RP2_FLASH_W25Q080

config BOARD_RP2040_PLUS_16MB
bool
select RP2_FLASH_W25Q080
Comment on lines 4 to 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't be adding bool to these symbols, will have to do a workaround similar to:

config BOARD_HAS_W25Q080
	bool
	default y if BOARD_RP2040_PLUS || BOARD_RP2040_PLUS_16MB
	select RP2_FLASH_W25Q080

though this still doesn't make sense as the w25q080 is an 8Mbit part?

4 changes: 2 additions & 2 deletions boards/waveshare/rp2040_plus/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2025 David Schneider
# SPDX-License-Identifier: Apache-2.0

if BOARD_RP2040_PLUS
if BOARD_RP2040_PLUS || BOARD_RP2040_PLUS_16MB

if I2C_DW

Expand All @@ -10,4 +10,4 @@ config I2C_DW_CLOCK_SPEED

endif # I2C_DW

endif # BOARD_RP2040_PLUS
endif # BOARD_RP2040_PLUS || BOARD_RP2040_PLUS_16MB
5 changes: 5 additions & 0 deletions boards/waveshare/rp2040_plus/Kconfig.rp2040_plus_16mb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 David Schneider
# SPDX-License-Identifier: Apache-2.0

config BOARD_RP2040_PLUS_16MB
select SOC_RP2040
17 changes: 11 additions & 6 deletions boards/waveshare/rp2040_plus/board.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I can do a multi-line suggestion, but I think the more Zephyr-y way of doing this would be to define multiple boards here. Like this:

boards:
  - name: rp2040_plus
    full_name: RP2040-Plus
    vendor: waveshare
    socs:
    - name: rp2040

  - name: rp2040_plus_16m
    full_name: RP2040-Plus-16MB
    vendor: waveshare
    socs:
    - name: rp2040

This would mean the full_name in Zephyr == Part Number at https://www.waveshare.com/rp2040-plus.htm?sku=23503 and https://www.waveshare.com/rp2040-plus.htm?sku=20290

Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
board:
name: rp2040_plus
full_name: RP2040-Plus
vendor: waveshare
socs:
- name: rp2040
boards:
- name: rp2040_plus
full_name: RP2040-Plus
vendor: waveshare
socs:
- name: rp2040
- name: rp2040_plus_16mb
full_name: RP2040-Plus-16MB
vendor: waveshare
socs:
- name: rp2040
5 changes: 5 additions & 0 deletions boards/waveshare/rp2040_plus/rp2040_plus_16mb.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "rp2040_plus.dts"

&flash0 {
reg = <0x10000000 DT_SIZE_M(16)>;
};
23 changes: 23 additions & 0 deletions boards/waveshare/rp2040_plus/rp2040_plus_16mb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
identifier: rp2040_plus
name: Waveshare RP2040-Plus
type: mcu
arch: arm
flash: 16384
ram: 264
toolchain:
- zephyr
- gnuarmemb
supported:
- uart
- gpio
- adc
- i2c
- spi
- hwinfo
- watchdog
- pwm
- flash
- dma
- counter
- clock
- usbd
12 changes: 12 additions & 0 deletions boards/waveshare/rp2040_plus/rp2040_plus_16mb_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_RESET=y
CONFIG_CLOCK_CONTROL=y