Skip to content

ESP32 add support for lan867x phy - single pair ethernet #15731

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

Open
JohannesMaierhofer opened this issue Aug 27, 2024 · 9 comments
Open

ESP32 add support for lan867x phy - single pair ethernet #15731

JohannesMaierhofer opened this issue Aug 27, 2024 · 9 comments
Labels
enhancement Feature requests, new feature implementations port-esp32

Comments

@JohannesMaierhofer
Copy link

Description

Hello,
as the esp-idf component registry lists the Single Pair Ethernet (SPE) phy family LAN867x by Microchip, it would be nice to support this also in MicroPython.

https://components.espressif.com/components/espressif/lan867x/versions/1.0.0?language=en

Kind regards

Code Size

I don't think much additional code would be needed.

Implementation

I would like to sponsor development of this feature

Code of Conduct

Yes, I agree

@JohannesMaierhofer JohannesMaierhofer added the enhancement Feature requests, new feature implementations label Aug 27, 2024
@DuaneKaufman
Copy link

I too would like to sponsor development of this feature

Duane Kaufman

@dpgeorge
Copy link
Member

dpgeorge commented Oct 5, 2024

This shouldn't be too difficult to add. But looking at https://github.com/espressif/esp-eth-drivers/blob/master/lan867x/idf_component.yml this driver requires IDF 5.3 or greater.

MicroPython currently supports only IDF up to 5.2.2, although see #15733 for ongoing work to update to IDF 5.3.

@xorbit
Copy link
Contributor

xorbit commented Oct 11, 2024

Looking forward to this being officially added. I've been playing with this part and driver and a hacked-with-5.3 MicroPython, it seems to work quite well.

@DuaneKaufman
Copy link

Yes, I am eagerly awaiting this too.
I have a project in mind that would be greatly simplified with this inclusion.

I have two of the Mikroe T1S boards, numerous ESP32 boards, (and even the PIC eval board setup to evaluate the TIS implementation), so I am ready to test!

Sincerely,
Duane

@dpgeorge dpgeorge added this to the release-1.25.0 milestone Oct 22, 2024
@github-staff github-staff deleted a comment from YeGop0218 Oct 28, 2024
dpgeorge added a commit to dpgeorge/micropython that referenced this issue Dec 16, 2024
Untested.  Probably needs a way to disable it via config.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
Copy link
Member

See #16421 for a PR which adds LAN8670 support.

@DuaneKaufman
Copy link

I have two of the Mikroe T1S boards, numerous ESP32 boards

How would one implement/test this with a LAN865X-based board over SPI in MicroPython?

projectgus pushed a commit to dpgeorge/micropython that referenced this issue Jan 29, 2025
Untested.  Probably needs a way to disable it via config.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
projectgus pushed a commit to projectgus/micropython that referenced this issue Feb 4, 2025
Enabled conditionally via the main_esp32_idf53 component,
can be simplified again when we drop IDF V5.2 support.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
@projectgus
Copy link
Contributor

projectgus commented Feb 4, 2025

A note for anyone following this: the linked PR will implement support, but PHY_LAN8670 won't appear in any nightly builds until we start building with ESP-IDF V5.3.x (currently building with V5.2.2).

We'll probably bump the ESP-IDF version for builds after MicroPython 1.25.0 is released.

In the meantime, the only way to get support will be to build MicroPython locally using a newer supported ESP-IDF version.

projectgus added a commit to dpgeorge/micropython that referenced this issue Feb 4, 2025
Enabled conditionally for esp32 target, if IDF
version is new enough.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
projectgus added a commit to dpgeorge/micropython that referenced this issue Feb 4, 2025
Enabled conditionally for esp32 target, if IDF
version is new enough.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
projectgus added a commit to dpgeorge/micropython that referenced this issue Feb 4, 2025
Enabled conditionally for esp32 target, if IDF
version is new enough.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
projectgus added a commit to dpgeorge/micropython that referenced this issue Feb 5, 2025
Enabled conditionally for esp32 target, if IDF
version is new enough.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
projectgus added a commit to dpgeorge/micropython that referenced this issue Apr 8, 2025
Enabled conditionally for esp32 target, if IDF
version is new enough.

Fixes issue micropython#15731.

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
@DuaneKaufman
Copy link

Dear All,
Thanks for this. At this time then, what do I need to clone to get _both) ESP-IDF 5.4 and LAN8670 support?

Sincerely,
Duane

@projectgus
Copy link
Contributor

Dear All, Thanks for this. At this time then, what do I need to clone to get _both) ESP-IDF 5.4 and LAN8670 support?

Current master has supported for IDF 5.4 merged (although nightly builds are still on 5.2.2 I believe). So if you check out the branch for #16421 then that should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, new feature implementations port-esp32
Projects
None yet
Development

No branches or pull requests

7 participants
@projectgus @xorbit @DuaneKaufman @dpgeorge @JohannesMaierhofer and others