Skip to content

Conversation

@ma-lalonde
Copy link
Contributor

@ma-lalonde ma-lalonde commented May 30, 2022

This PR adds support for Connaxio's Espoir, a PoE+ mikroBUS mainboard based on the ESP32. More info: https://www.connaxio.com/electronics/espoir/

Espoir uses the KSZ8081, for which support was implemented in ESP-IDF v4.4. So I also updated the required network files, following the same pattern as the KSZ8041, which was added in v4.3.

@ma-lalonde ma-lalonde changed the title Add support for Connaxio's Espoir and required network dependency PHY_KSZ8081 Add support for Connaxio's Espoir and required dependency PHY KSZ8081 May 30, 2022
@ma-lalonde ma-lalonde changed the title Add support for Connaxio's Espoir and required dependency PHY KSZ8081 Add support for Connaxio Espoir and required dependency PHY KSZ8081 May 30, 2022
@ma-lalonde ma-lalonde force-pushed the feature/espoir branch 4 times, most recently from 2fb3e99 to 1e044e3 Compare June 1, 2022 15:48
@ma-lalonde ma-lalonde changed the title Add support for Connaxio Espoir and required dependency PHY KSZ8081 ports/esp32: Add support for Connaxio Espoir and required dependency PHY KSZ8081 Jun 1, 2022
Also adds support for Ethernet PHY KSZ8081, available since ESP-IDF v4.4.
@dpgeorge
Copy link
Member

Thanks for the contribution. The addition of KSZ8081 is good. But I don't think the new board definition is needed, instead one can use the GENERIC_UNICORE board, which was just added via #8365.

@dpgeorge
Copy link
Member

The support for KSZ8081 was merged in 30db33d

@dpgeorge dpgeorge closed this Jan 19, 2023
@seanlano
Copy link

seanlano commented Aug 21, 2023

I can confirm that using the ESP32 GENERIC nightly builds (tested with v1.20.0-379-ga18d62e06) works as expected with the KSZ8081 on the Espoir board.

The docs from Connaxio work unmodified to bring up the Ethernet, i.e. this is all that is needed:

from machine import Pin
import network

lan=network.LAN(mdc=Pin(32),mdio=Pin(33),power=None,phy_type=network.PHY_KSZ8081,phy_addr=0)
lan.active(1)

@seanlano
Copy link

Oh and also the Espoir does not need a unicore build, the ESP32-U4WDH processor used in the board was changed to be dual-core (see Espressif PCN-2021-021).

The Connaxio docs do say dual-core as expected, although this pull request initially seems to have been targeting uni-core.

@ma-lalonde
Copy link
Contributor Author

Hi Sean, you are right; when I initially designed Espoir, The MINI-1 was a single-core module (I still have a bunch of them on a shelf...), but by the time I launched it on Crowd Supply, I managed to get my hands on the newer, dual-core modules. It appears I forgot to fix that afterwards. Thankfully the generic build works, so nothing needs to be done except for me to update the docs.

@seanlano
Copy link

@ma-lalonde , are you able to confirm that all shipped Espoir boards used the newer dual-core parts?

I'm looking into reviving this board definition, I think it's justified to be it's own board because it has specific hardware and has named pins on the silkscreen, for which I've created a pins.csv file for so that e.g. I2C on the Mikro Bus can be used with Pins.board.SDA instead of needing to know that it's actually Pins(23)

@seanlano
Copy link

@dpgeorge what's the threshold for when a separate board definition makes sense? My thinking is that the labelled pins on the silkscreen are much more usable as named pins rather than needing GPIO numbers in the generic build.

Also I'm going to see what I can do to have some kind of convenience function that does the Ethernet init rather than needing the boilerplate line of:

lan=network.LAN(mdc=Pin.board.EMAC_MDC,mdio=Pin.board.EMAC_MDIO,power=None,phy_type=network.PHY_KSZ8081,phy_addr=0)

@ma-lalonde
Copy link
Contributor Author

@seanlano yes, all shipped boards have a dual-core processor. I kept the single-core modules here to support my own low-power personal projects, since most platforms (Arduino, tasmota) cna be compiled for single core, but for the average user, that's a bit over the top. And it would have made things complicated with managing many board branches

@mattytrentini
Copy link
Contributor

@seanlano Does this need to be reopened? Do you think you'll be able to pull together a useful board definition?

@seanlano
Copy link

seanlano commented Nov 1, 2023

Do you think you'll be able to pull together a useful board definition?

Yeah I reckon I can - would be very handy to have. It's on my to-do list!

RetiredWizard pushed a commit to RetiredWizard/micropython that referenced this pull request Dec 30, 2023
…n-main

Translations update from Hosted Weblate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants