-
Notifications
You must be signed in to change notification settings - Fork 7.6k
boards: Add support WizNet W5500 EVB Pico2 #84834
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
board: | ||
name: w5500_evb_pico | ||
full_name: W5500 Evaluation Pico | ||
full_name: W5500-EVB-Pico | ||
vendor: wiznet | ||
socs: | ||
- name: rp2040 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2025 TOKITA Hiroshi | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_W5500_EVB_PICO2 | ||
|
||
if NETWORKING | ||
|
||
config NET_L2_ETHERNET | ||
default y | ||
|
||
endif # NETWORKING | ||
|
||
config USB_SELF_POWERED | ||
default n | ||
|
||
config SYS_CLOCK_HW_CYCLES_PER_SEC | ||
default 150000000 | ||
|
||
endif # BOARD_W5500_EVB_PICO2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 TOKITA Hiroshi | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_W5500_EVB_PICO2 | ||
select SOC_RP2350A_M33 if BOARD_W5500_EVB_PICO2_RP2350A_M33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: w5500_evb_pico2 | ||
full_name: W5500-EVB-Pico2 | ||
vendor: wiznet | ||
socs: | ||
- name: rp2350a |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
.. zephyr:board:: w5500_evb_pico2 | ||
|
||
Overview | ||
******** | ||
|
||
W5500-EVB-Pico2 is a microcontroller evaluation board based on the Raspberry | ||
Pi RP2350A and fully hardwired TCP/IP controller W5500 - and basically works | ||
the same as Raspberry Pi Pico2 board but with additional Ethernet via W5500. | ||
The USB bootloader allows the ability to flash without any adapter, in a | ||
drag-and-drop manner. It is also possible to flash and debug the boards with | ||
their SWD interface, using an external adapter. | ||
|
||
Hardware | ||
******** | ||
|
||
- Dual core Arm Cortex-M33 or Hazard3 processor running up to 133MHz | ||
- 520KB on-chip SRAM | ||
- 16MB on-board QSPI flash with XIP capabilities | ||
- 26 GPIO pins | ||
- 3 Analog inputs | ||
- 2 UART peripherals | ||
- 2 SPI controllers | ||
- 2 I2C controllers | ||
- 16 PWM channels | ||
- USB 1.1 controller (host/device) | ||
- 3 Programmable I/O (PIO) for custom peripherals | ||
- On-board LED | ||
- 1 Watchdog timer peripheral | ||
- Wiznet W5500 Ethernet MAC/PHY | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
Pin Mapping | ||
=========== | ||
|
||
The peripherals of the RP2350A SoC can be routed to various pins on the board. | ||
The configuration of these routes can be modified through DTS. Please refer to | ||
the datasheet to see the possible routings for each peripheral. | ||
|
||
External pin mapping on the W5500_EVB_PICO2 is identical to the Raspberry Pi | ||
Pico2. Since GPIO 25 is routed to the on-board LED on, similar to the Raspberry | ||
Pi Pico, the blinky example works as intended. The W5500 is routed to the SPI0 | ||
(P16-P19), with the reset and interrupt signal for the W5500 routed to P20 and | ||
P21, respectively. All of these are shared with the edge connector on the | ||
board. | ||
|
||
Refer to `W55500 Evaluation Board Pico2 Documentation`_ for a board schematic and | ||
other certifications. | ||
|
||
Default Zephyr Peripheral Mapping: | ||
---------------------------------- | ||
|
||
.. rst-class:: rst-columns | ||
|
||
- UART0_TX : P0 | ||
- UART0_RX : P1 | ||
- I2C0_SDA : P4 | ||
- I2C0_SCL : P5 | ||
- I2C1_SDA : P14 | ||
- I2C1_SCL : P15 | ||
- SPI0_RX : P16 | ||
- SPI0_CSN : P17 | ||
- SPI0_SCK : P18 | ||
- SPI0_TX : P19 | ||
- W5500 Reset : P20 | ||
- W5500 Interrupt : P21 | ||
- ADC_CH0 : P26 | ||
- ADC_CH1 : P27 | ||
- ADC_CH2 : P28 | ||
- ADC_CH3 : P29 | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
Flashing | ||
======== | ||
|
||
Using OpenOCD | ||
------------- | ||
|
||
The overall explanation regarding flashing and debugging is the same as or | ||
``rpi_pico``. | ||
See :ref:`rpi_pico_flashing_using_openocd`. in ``rpi_pico`` documentation. | ||
|
||
A typical build command for w5500_evb_pico2 is as follows. | ||
This assumes a CMSIS-DAP adapter such as the RaspberryPi Debug Probe, | ||
but if you are using something else, specify ``RPI_PICO_DEBUG_ADAPTER``. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: w5500_evb_pico2 | ||
:goals: build flash | ||
:gen-args: -DOPENOCD=/usr/local/bin/openocd | ||
|
||
Using UF2 | ||
--------- | ||
|
||
If you don't have an SWD adapter, you can flash the Raspberry Pi Pico with | ||
a UF2 file. By default, building an app for this board will generate a | ||
:file:`build/zephyr/zephyr.uf2` file. If the Pico is powered on with the ``BOOTSEL`` | ||
button pressed, it will appear on the host as a mass storage device. The | ||
UF2 file should be drag-and-dropped to the device, which will flash the Pico. | ||
|
||
Debugging | ||
========= | ||
|
||
The SWD interface can also be used to debug the board. To achieve this, you can | ||
either use SEGGER JLink or OpenOCD. | ||
|
||
Using OpenOCD | ||
------------- | ||
|
||
Install OpenOCD as described for flashing the board. | ||
|
||
Here is an example for debugging the :zephyr:code-sample:`blinky` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: w5500_evb_pico2 | ||
:maybe-skip-config: | ||
:goals: debug | ||
:gen-args: -DOPENOCD=/usr/local/bin/openocd | ||
|
||
.. target-notes:: | ||
|
||
.. _pico_setup.sh: | ||
https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh | ||
|
||
.. _Getting Started with Raspberry Pi Pico: | ||
https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf | ||
|
||
.. _W55500 Evaluation Board Pico2 Documentation: | ||
https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2025 TOKITA Hiroshi | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Checking and set 'adapter speed'. | ||
# Set the adaptor speed, if unset, and given as an argument. | ||
proc set_adapter_speed_if_not_set { speed } { | ||
puts "checking adapter speed..." | ||
if { [catch {adapter speed} ret] } { | ||
adapter speed $speed | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
boards/wiznet/w5500_evb_pico2/w5500_evb_pico2-pinctrl.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2021, Yonatan Schachter | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/rpi-pico-rp2350a-pinctrl.h> | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0_TX_P0>; | ||
}; | ||
|
||
group2 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. newline needed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed it. |
||
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 { | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.