-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Feature Request] Support for RTL830xMB (RTL8304MB/RTL8306MB) (IDFGH-11144) #17
Comments
@DjordjeMandic thanks for the suggestion. Actually, I've been also thinking about extending the offer of supported switch chips. I'll investigate. |
@DjordjeMandic are you aware if any devbaord of RTL8306MB exists? It could potentially ease development otherwise custom board would have to be designed... |
@kostaond it does not afaik. Currently biggest issue is that I just cannot find datasheet that contains description of registers for both RTL8304MB or RTL8306MB. RTL8306E-CG seems to have well documented datasheet but its little bit different(2x RMII) Maybe there is something on https://csdn.net/ |
@DjordjeMandic Hey. Were you unable to find the datasheet at the moment? I have same chip in one project and have the same problem. Link from lcsc.com not works for me, unfortunately. I use this as a reference datasheet and tried to check out registers manually, with gdb. First 5-or-6 registers have been the same as reference, but another values turned out to be different |
I put this project on the hold for now because of missing documentation and free time. Alternative that I found promising is Realtek-Unmanaged-Switch-Arduino-Library. Realtek_switch_hacking is good place to start. You might be able to find some useful info there. Are you trying just to connect it and configure it as unmanaged or you're trying to use all of the features in it? Gigabit ones have 8051 in them for managing(web interface and etc) but there is no RMII, only MII. (I don't know a lot about MII interface but I guess MII is pretty easy to implement but uses a lot of gpio. On other hand small cheap FPGA can bridge MII or even SMII from switch to RMII on ESP32) |
@DjordjeMandic thanks for reply. I'll study carefully into the links soon. I trying to connect rtl8304mb to MCU with RMII for work with 2 ports. At the first view all works fine, but connection does not establish. And status register have 0 bit in Link Status. I have found this project which includes realtek switch driver today. It contains some interesting addresses, which does not described in realtek datasheets. Additionally it have defines for RTL8305MB. |
@DjordjeMandic Hey. I have done work with the switch. Driver code from https://github.com/lloves/RTL8309M-RK3288-KERNEL-3.4 has been working fine for my purpose. In my free time I could try to contribute my results to the project. But unfortunately I don't have experience with ESP-IDF previously and I isn't having any ESP's chip at this moment, for testing. My project target MCU was Gigadevice. |
That's awesome, at least we have confirmed info so porting should be easy. Does vlan tagging and untagging work? |
Yes. SDK API pdf at the link contains description for vlan functions of the driver. I used the default vlan config where PVID is 1 for all ports |
@alexgoto Hi there. We have a custom esp32 hw with the RTL8304MB chip on it. The ESP32 is connected to the RTL on 4th port (RMII Port), and there are 2 LAN connectors connected to the 1st and 2nd port. The first one would be used for the LAN connection, and the 2nd will allow other devices to connect to it and share the same LAN connection. In other words, a simple 2-port switch. |
@DjordjeMandic maybe you? |
@rikelme Hi. I can try to help you, but only "blindly" because I don't have a board with esp32 and rtl8304 at the moment. |
Hi @rikelme, I currently only have ESP32 NodeMCU modules, so I don’t have the necessary hardware for this project. Ideally, I would need a PCB with the RTL chip and ESP32, or a breakout board for the RTL chip with at least two RJ45 ports. Test points for the SMI interface would also be useful for debugging with a logic analyzer if needed. It seems that @alexgoto has already identified some good reference materials, which is a great starting point. From my perspective, the next step would be to try configuring the RTL chip to see if RMII works correctly. If that works, writing a driver would be the logical next step to simplify future implementations. By the way, have you tried anything yourself so far, or have you primarily focused on developing the hardware without diving into the software part yet? This would help us understand the current state of your project and where we might assist. While I don’t have experience with ESP-IDF, I’m confident that the many available examples would make it feasible to learn. I’d be happy to assist with development where I can, but my availability is limited due to my current studies. Without the hardware, I won’t be able to test or debug directly, but I can offer guidance as needed. |
Thanks Djorde. I do have few hw prototypes. esp is flashed and running but
the ETH driver fails to initialize.
I have sent you an IM on Instagram.
…On Sun, Dec 22, 2024 at 14:20 Djordje Mandic ***@***.***> wrote:
Hi @rikelme <https://github.com/rikelme>,
I currently only have ESP32 NodeMCU modules, so I don’t have the necessary
hardware for this project. Ideally, I would need a PCB with the RTL chip
and ESP32, or a breakout board for the RTL chip with at least two RJ45
ports. Test points for the SMI interface would also be useful for debugging
with a logic analyzer if needed.
It seems that @alexgoto <https://github.com/alexgoto> has already
identified some good reference materials, which is a great starting point.
From my perspective, the next step would be to try configuring the RTL chip
to see if RMII works correctly. If that works, writing a driver would be
the logical next step to simplify future implementations.
By the way, have you tried anything yourself so far, or have you primarily
focused on developing the hardware without diving into the software part
yet? This would help us understand the current state of your project and
where we might assist.
While I don’t have experience with ESP-IDF, I’m confident that the many
available examples would make it feasible to learn. I’d be happy to assist
with development where I can, but my availability is limited due to my
current studies. Without the hardware, I won’t be able to test or debug
directly, but I can offer guidance as needed.
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUNOLER6JKJUBM6IIYART2G24DJAVCNFSM6AAAAABUAUOHM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJYGQ2TIOJWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I see good use for KSZ8863 driver. Similar driver for RTL8306MB would be nice because it is low cost and available and supports 100BASE-FX. Lot of 10/100M media converters use this chip. I see good use for integrated media converter and switch that also provides ethernet to ESP32. This is just cross post of IDFFGH-9043 because it doesn't belong there.
The text was updated successfully, but these errors were encountered: