Add support for W55RP20-EVB-Pico and WIZNET_PIO_SPI communication.#10440
Add support for W55RP20-EVB-Pico and WIZNET_PIO_SPI communication.#10440wizhannah wants to merge 7 commits intoadafruit:mainfrom
Conversation
0412f0a to
56ffd4e
Compare
dhalbert
left a comment
There was a problem hiding this comment.
Thanks for adding these new boards.
We don't put board- or port-specific stuff in shared-bindings. The idea of shared-bindings is that the Python API is common across all the ports that implement it.
Instead, put the port-specific stuff in ports/raspberrypi/bindings. There are already some RP2xxx-specific things there, which you can use as models.
In this case, it would make sense to create a new module, called, say piospi with a class piospi.SPI(). The you can have a flag, say, CIRCUITPY_PIOSPI, which would be enabled only for these boards.
I am not sure if this is true, but is it the case that this PIO implementation is not limited to Wiznet boards? Could it be used on any PIO-capable RP2 board? That is why I suggested the name above. Internally, you can then drop the "wiznet" part of the names, and just use 'piospi`.
We could also consider naming the top-level module piobusio. for right now only includes SPI, but could include PIO-based I2C or UART in the future.
How does this all sound to you?
|
Thank you for your detailed explanation. Thank you for your suggestion, but in this case, I believe the PIO SPI code is limited to Wiznet boards, since wizchip_pio_spi.c implements the SPI protocol specifically for the W5500 chip. Given this, would it be appropriate to create a new module named wiznet_pio, with a class wiznet_pio.SPI()? Please let me know if this structure is correct, or if you have any further recommendations. |
Sorry for the delay in replying. I thought maybe the PIO SPI could be used for any SPI device, but if that's not true, then your naming makes sense. So there would be a If there is only SPI in You will need |
|
Thank you for your feedback. As you suggested, I changed the module name to wiznet and added the PIO SPI functionality. However, while my local build does not exceed the flash size for the wiznet_w55rp20_evb_pico board, the pre-commit workflow fails with a "region FLASH_FIRMWARE overflowed" error. |
|
The pre-commit errors have to do with formatting style changes: https://github.com/adafruit/circuitpython/actions/runs/16258353450/job/45898635679?pr=10440#logs. If you install pre-commit locally, pre-commit will check locally and fix up the source. See https://learn.adafruit.com/building-circuitpython/build-circuitpython#install-pre-commit-3096511 for details. The size issue is for certain builds. Some languages are larger than others. |
|
Thank you for your helpful feedback. I have made the changes according to your suggestions. |
The W55RP20-EVB-Pico is an evaluation board for the W55RP20, a SiP (System in Package) chip that integrates the W5500 (wired TCP/IP controller) and the RP2040. As a result, both the features of the Raspberry Pi Pico and the W5500 can be utilized.
The W55RP20 features two identical PIO (Programmable Input/Output) blocks, one of which is used for communication with the W5500. For more detailed information on PIO, please refer to section 3 "PIO" in the RP2040 datasheet.
This PR adds initial support for the W55RP20-EVB-Pico board. The changes included in this PR are as follows:
The wiznet5k_simpleserver example ran without any issues:
Additionally, the following examples were also tested and passed successfully: