Ethernet port 2 (PHY2)
-
I have enabled the Ethernet port 1 (PHY1) and 2 (PHY2) in omega2s+ and set it as Ethernet host . Another onion omega2s+ is set as Ethernet client (PHY1). Onion omega2s+ (client) Ethernet hardware is not getting detected when I connect Ethernet port 2 of omega2s+ (host). But when I connect Ethernet port 1(PHY1) of onion omega2s+ (host) to omega2s+ (client) its getting detected. If the same Ethernet Port 2 of onion omega2s+ (host) is connected to PC its working properly. What would be the reason ? Is there any limitation in Ethernet port 2 ?
-
@vrinda-nair-0 From the Omega2S Data sheet:
https://github.com/OnionIoT/Omega2/raw/master/Documents/Omega2S Datasheet.pdf
2.5.6 Ethernet
The Omega2 has a single 10/100M Ethernet integrated PHY.
It is recommended that typical ethernet magnetics be used, however for very short runs (<5m) a
simpler approach using capacitive decoupling is possible. See the Omega2S reference schematic for
details.
-
We have designed Ethernet circuit (PHY1 and PHY2) as per the the Omega2s reference schematic and we have used Ethernet magnetics ( HR911105A) connector.
-
the MT7688AN SoC (see Datasheet) has 5 Ethernet Ports, numbered 0..4.
Those 5 ports are part of an internal switch (as the MT7688 is an internet router chip), that switch has two more (internal) ports 5 and 6.
As far as I understand, the internal port 6 is the actual eth0 interface, and the standard switch config is such that port6 and port0..4 work as a simple switch. The internal port5 could be configured as an eth1 interface, and switch config can be modified to connect some of the external port0..4 to eth1 rather than eth0. There is (at least in vanilla OpenWrt builds) a utility called
swconfig
that can be used to view and modify switch settings.But all of this hinges on one not so well documented detail: bits 16..20 in the
AGPIO_CFG
(0x1000003c) register. Bit 16 must be set to 0 to enable ethernet port 0, and Bits17..20 must all be set to 0 to enable port1..4 (unfortunately, altough there are 4 bits, ports1..4 can only be enabled or disabled together). See MT7688 datasheet pg. 59ff.By default, the
AGPIO_CFG
is set to 0x00FE01FF, which means port0 is enabled (bit16==0), but ports1..4 are disabled.If you have the
devmem
utility (not sure if it is part of the standard Onion FW, but it is available in OpenWrt), you can view the currentAGPIO_CFG
:devmem 0x1000003C 32
And to make ethernet ports1..4 active (and in turn loose GPIO14..29):
devmem 0x1000003C 32 0x000001FF
Hope this helps!