teres1, how to export the SoC built-in ethernet (if it's possible)?

Started by DiTBho, March 13, 2024, 09:32:02 AM

Previous topic - Next topic

DiTBho

the SoC should have built-in ethernet, so is it possible, by some hardware hack, to export it on RJ45-PHY?

A thing that I do really find annoying on teres-1 is the lack of an ethernet port as it's extremelly useful to tftpboot kernels from uboot and then to NFS.

kreyren

Quote from: DiTBho on March 13, 2024, 09:32:02 AMthe SoC should have built-in ethernet, so is it possible, by some hardware hack, to export it on RJ45-PHY?

A thing that I do really find annoying on teres-1 is the lack of an ethernet port as it's extremelly useful to tftpboot kernels from uboot and then to NFS.

Most teres users use this mod for teres to address this issue https://www.olimex.com/Products/USB-Modules/USB-GIGABIT/open-source-hardware for ethernet and if you are able to fabricate the open-source 3D printable case then you can make it easily built in.. If it's internals are not filled with jumper-wires then it's not proper teres! :p
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

kreyren

Quote from: DiTBho on March 13, 2024, 09:32:02 AMthe SoC should have built-in ethernet, so is it possible, by some hardware hack, to export it on RJ45-PHY?

beyond that if you want to wire the ethernet port directly to the chip on teres then the kicad files for OlinuXino-A64 should have everything you need to do that
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho

Quote from: kreyren on March 13, 2024, 01:01:03 PMProducts USB-Module for ethernet and if you are able to fabricate the open-source 3D printable case then you can make it easily built in

the point is that usb-ethernet is very annoying to tftpboot since I would have to hack uboot in order to support a full usb-stack and an usb-ethernet driver




olimex

A64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

DiTBho

Quote from: olimex on March 14, 2024, 08:01:19 PMA64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

"I've seen things you people wouldn't believe...", and that's exactly one of the doubts that came to me.

Throughout history of my personal experiences with SoCs, I have really seen everything ... gpio shares between /USB_PHY_EN  and an input button (RBM33G), /CS shared between a SDI device (SDI-to-RS232, the debug port) and RTC (RS/Pro, where CS=high enables the serial, CS=low enables the RTC), even USB3 and sATA shared (OrangePI) ...



At this point there are only these USB-Ethernet options, already supported in u-boot-2024/Git:
  • ASIX AX8817X
  • MOSCHIP MCS7830 ... umm?+={ MCS7730?, MCS7830?, MCS7832?}
  • Realtek { RTL8152B, RTL8153}
  • SMSC LAN95x
  • to add a custom driver

DiTBho

If still based on the same SoC, in Teres-2, you could add a rtl8153 chip

SoC-USB-Host
  + --> USB-hub
     + ---> RTL8151 USB-Ethernet
     + ---> USB-user_port1
     + ---> USB-user_port2


kreyren

Quote from: olimex on March 14, 2024, 08:01:19 PMA64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

As far as i was told that applies only for the LCD interface, you could still use the display over MIPI-DSI to enable the ethernet which might even be the more power efficient solution that could do touchscreen over e.g. I2C

Quote from: DiTBho on March 15, 2024, 06:12:06 PMIf still based on the same SoC, in Teres-2, you could add a rtl8153 chip

I would argue for the Quactel EG25 as it seems to have more open and reliable drivers while supporting 4G and 5GHz, but i still need to do more testing as i am concerned about the battery life -- https://git.dotya.ml/KREYLIMEX/TERES/issues/6
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho

Quote from: kreyren on March 18, 2024, 02:51:20 PMI would argue for the Quactel EG25 as it seems to have more open and reliable drivers while supporting 4G and 5GHz, but

I need wired Ethernet not wifi.

DiTBho

Quote from: kreyren on March 18, 2024, 02:51:20 PM
Quote from: olimex on March 14, 2024, 08:01:19 PMA64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

As far as i was told that applies only for the LCD interface, you could still use the display over MIPI-DSI to enable the ethernet which might even be the more power efficient solution that could do touchscreen over e.g. I2C

So, could you check, and it's possible, could you do it for Teres-v1/Rev${next} and/or Teres-v1.5?


DiTBho

(kernel)/drivers/net/usb/asix_devices.c
ASIX AX8817X based USB 2.0 Ethernet Devices
        // Apple USB Ethernet Adapter
        USB_DEVICE(0x05ac, 0x1402),
lsusb reports "ID 05ac:1402 Apple, Inc. Ethernet Adapter [A1277]"

so, it's supported by the linux kernel, and it seems also supported by uboot(2024/git)

kreyren

Quote from: DiTBho on March 18, 2024, 05:20:08 PM
Quote from: kreyren on March 18, 2024, 02:51:20 PM
Quote from: olimex on March 14, 2024, 08:01:19 PMA64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

As far as i was told that applies only for the LCD interface, you could still use the display over MIPI-DSI to enable the ethernet which might even be the more power efficient solution that could do touchscreen over e.g. I2C

So, could you check, and it's possible, could you do it for Teres-v1/Rev${next} and/or Teres-v1.5?



Replied in https://www.olimex.com/forum/index.php?topic=9315.msg39446#msg39446 for teres 1.5 and 2.0 development through KREYLIMEX
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

kreyren

Quote from: olimex on March 14, 2024, 08:01:19 PMA64 Ethernet is shared with the LCD, so if you want to use the build in Ethernet you lose the LCD, quite annoying decision but Allwinner made A64 thinking for tablets where Ethernet is not mandatory

Can you elaborate on why was teres designed to use display this way over the Ethernet?

I am looking through kicads and can't think of any sensible rationale.. Like teres is a power-efficient netbook the MIPI-DSI seems to be more energy efficient, economical and better fit for this usecase and would make integrating touchscreen less painful.

(I am aware of the potential loss of resolution, but that still seems worth it to me)
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking