OpenWrt Forum Archive

Topic: VGV7519 - Lantiq PEF7071v LED/VLAN/(USB?) support

The content of this topic has been archived on 4 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I have a VGV7519 with 3 Lantiq PHY's. But there seems to be an issue.

There are 2 versions of the VGV7519 R01 and R02. They both have another version of the PHY chip.

The PHY's are all technically functioning but some of the ports are not giving a propper LED signal. Example:

R01: Does have 1 correctly working LED on LAN3 and 4 impropper configured LEDs.
R02: Does have 4 correctly working LEDs on WAN1 and LAN1,2,3 and a incorrectly LED on LAN4.

With impropper working LED I mean that it is continually lit(with and without activity on the port) when there is a Gigabit-ethernet link and continually blinking(100hz) when there is a fast Ethernet link. So it seems that the LED is indicating the link speed instead of the activity.

Does some one have an idea? I have posted thesame question in another topic but because this is such a specific problem I tought it is better to start a seperate topic.

Regards,
Timeless

(Last edited by Timeless on 3 May 2016, 11:07)

No one?

Each PEF7071 (phy11G) chip has connectors for three leds. Each of the leds can be controlled individually.

The current OpenWrt configuration is:

LED0:
    Constant On: 1000MBit
    Blink Fast: 100MBit
    Blink Slow: 10 Mbit
    Pulse: None
   
LED1:
    Constant On: 10/100/1000MBit
    Blink Fast: None
    Blink Slow: None
    Pulse: TX/RX
   
LED2:
    Constant On: 100MBit
    Blink Fast: None
    Blink Slow: None
    Pulse: None

There is a fourth led that can be controlled but I've no clue where the LED should be connected to:

LED3:
    Constant On: 1000MBit
    Blink Fast: None
    Blink Slow: 100MBit
    Pulse: None

Based on your blink sequence, if would guess the VGV7519 LAN LEDs are wired the following way:

R01:
    LAN3 connected to LED1
    LAN1,2,4+WAN connected to LED0

R02:
    LAN1,2,3+WAN connected to LED1
    LAN4 connected to LED0
   
Long story short, there are two possible ways to fix this and I will need to talk to the lantiq maintainer which is the preferred way.

Depending on the maintainers reply it might be possible that you need to test things on the VGV7519s. Do you know how to compile OpenWrt from source?

Thanks for your reply! Yeah sure I have no problem compiling OpenWRT. Soms weeks ago I compiled multiple images for 2 platforms based on the trunk repository. So yes if the lantiq maintainer can help I'll do whatever is needed to compile and deploy the builds on my VGV7519 targets.

Also another thing. These Lantiq PHY's do they support vlans? I don't see them in swconfig sad

Hi Timeless,

would you please test the following patch: https://patchwork.ozlabs.org/patch/615786/. It fixes the constant flashing issue on my vgv7510kw22 and should work for the VGV7519 as well. My vgv7510kw22 has still an issue with one of the lan leds, which does not flash on RX/TX. Do you see something similar on your devices?


Timeless wrote:

Also another thing. These Lantiq PHY's do they support vlans? I don't see them in swconfig sad

Regarding your VLANs question, please check the following bug report: https://dev.openwrt.org/ticket/17795.

Hi,

Thanks I'm building a Image right now and I'll post the results sunday/monday (don't have time to test my image earlier). And yes I saw the same not flashing problem on LAN4 on the R02. But this was before the patch. I'll test the patch and check if it's fixed or not

About the VLANs. Last activity on this bug report is 9 months ago. Is there any activity going on there or is it forgotten? Also if vlans do not work does that mean that the default WAN LAN vlans do not work either? Last time I checked I don't even have a "switch 0" visible, in the bug report they do.

Regards,
Timeless

(Last edited by Timeless on 29 Apr 2016, 08:46)

Hi,

I've tested the outcome of that patch. And it seems that everything is fixed for R02. But R01 does have all ports show "some" activity. And with "some" I mean that the led blinks so now and often instead of blinking for every packet like the others do. even when I ping the gateway itself it only blinks 1 time in like 4 seconds. R01 has LEDs LAN1, LAN2 working and LAN3, LAN4 and WAN in a semi-working state. But atleast it is not hyperblinking anymore.

(Last edited by Timeless on 1 May 2016, 21:16)

Yeah that now and often blinking was the issue I'm talking about. I was able to fix it for my vgv7510kw22 and since your vgv7519 is near to identical to my device, the same changes should do the job.

// Edit

Forget about it. The GPIO configuration on your device is way more complex. I'm in doubt that I can provide a fix for the blinking issue without getting hands on the devices.

(Last edited by mkresin on 1 May 2016, 21:57)

Thanks, the R02 is working and I have more of this hardware anyhow.
Don't get me wrong, I would like to get the R01 fixed. but right now I'm in the right direction with the R02. But still need the VLANs on the R02.

Is there anything I can do for you to fix these R01 problems? These devices are cheap here on the local 2nd hand auctions. So maybe I can send you a unit?

Regards,
Time

Timeless wrote:

But still need the VLANs on the R02.

I've done some tests with VLANs and yes, it does work. However, swconfig reports all the time enable_vlan = 0. Looks like a display error.

But aware, as soon as you assign a vlan to one switch port, all other switch ports need to have a vlan assigned as well. Even the separate WAN port. Especially regard the wan port, I'm not yet sure if its by design or a bug in the switch driver.

The following configuration should create a default vlan 1 with the lan ports 2,3 & 4  associated, vlan 2 with the first lan port associated and a vlan 10 with the wan port associated:

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 4 6t'

config switch_vlan
    option device 'switch0'
    option vlan '2'        
    option ports '0 6t'

config switch_vlan
    option device 'switch0'
    option vlan '10'        
    option ports '5 6t'
    
config interface 'lan'
    option type 'bridge'
    option ifname 'eth0.1'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config device 'lan_dev'
    option name 'eth0.1'
    option macaddr '11:22:33:44:55:66'

config interface 'lan2'
    option type 'bridge'
    option ifname 'eth0.2'
    option ipaddr '192.168.2.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
        
config device 'lan2_dev'
    option name 'eth0.2'
    option macaddr '22:33:44:55:66:77'
    
config interface 'wan'
    option ifname 'eth1.10'
    option proto 'dhcp'
    
config device 'wan_dev'
    option name 'eth1.10'
    option macaddr '33:44:55:66:77:88'
Timeless wrote:

Is there anything I can do for you to fix these R01 problems? These devices are cheap here on the local 2nd hand auctions. So maybe I can send you a unit?

Can you please check whether the LAN Ports of the R01 blink correctly with the OEM firmware installed!

Can we switch over to mail communication regarding the R01 problem? I'm still interested in fixing this device. With mail it's way more easier for me to send patches and keep track of communication. You will find my mail address in the patch I've linked in #6. Please send me a mail so that I've your address. Everything else follows via mail.

mkresin wrote:

But aware, as soon as you assign a vlan to one switch port, all other switch ports need to have a vlan assigned as well. Even the separate WAN port. Especially regard the wan port, I'm not yet sure if its by design or a bug in the switch driver.

Do you mean that it won't work when one(or more) port does not have a vlan?

Im not sure but I seem to recall that my VGV7519 does have a eth1 and eth0 ethernet interface. So no vlans by default? And last time I checked swconfig did not report a switch0 and neither is it visible in LuCI. I'll recheck this when I'm at home (10 hours from now).

mkresin wrote:

Can you please check whether the LAN Ports of the R01 blink correctly with the OEM firmware installed!

I'm sure that the default firmware works. I think that even the bootloader outputs the right LED rx/tx signal.  Same as above I'll check this tonight.

mkresin wrote:

Can we switch over to mail communication regarding the R01 problem? I'm still interested in fixing this device. With mail it's way more easier for me to send patches and keep track of communication. You will find my mail address in the patch I've linked in #6. Please send me a mail so that I've your address. Everything else follows via mail.

Yeah sure. But I think its also good to keep posting the progress here, so other people that are interested can also view and maybe provide advise on the subject.

(Last edited by Timeless on 3 May 2016, 08:45)

Timeless wrote:
mkresin wrote:

But aware, as soon as you assign a vlan to one switch port, all other switch ports need to have a vlan assigned as well. Even the separate WAN port. Especially regard the wan port, I'm not yet sure if its by design or a bug in the switch driver.

Do you mean that it won't work when one(or more) port does not have a vlan?

The other ports are not usable as long as they don't have a vlan. Simple rule: If you start using vlans, use it on all ports. What I'm was surprised by, was the fact that it even applies to the wan port which is separated from the switch by some switch driver magic using the 'lantiq,wan' property in http://git.openwrt.org/?p=openwrt.git;a … HEAD#l280.

Timeless wrote:

Im not sure but I seem to recall that my VGV7519 does have a eth1 and eth0 ethernet interface. So no vlans by default?

Correct. Have a look at the initial/default config of your board: http://git.openwrt.org/?p=openwrt.git;a … =HEAD#l126 and compare it with the initial/default config of my VGV7510KW22 which has for some reasons a default VLAN1 set up.

Timeless wrote:

And last time I checked swconfig did not report a switch0 and neither is it visible in LuCI. I'll recheck this when I'm at home (10 hours from now).

Make sure you are using the latest trunk version of openwrt. I've checked it only with trunk. And if it works with my VGV7510KW22 it should work with your VGV7519 as well. No idea about luci. Haven't used it for a while.

Would you please do me another favour? The VLAN config I've posted above is about switch ports and doesn't necessarily have to match the RJ45 ports on the back (Switch Port 2 could be wired to RJ45 LAN port 4).

Would you please attach a network cable only to LAN1 and check with 'swconfig dev switch0 show' which switch port is connected/has link. Do it the same way for all LAN Ports and report back the mapping. Switch port 5 should be the WAN Port. Switch Port 6 is the connection between cpu and switch and is always connect. For the same reason switch port 6 is a member of all vlans.

(Last edited by mkresin on 3 May 2016, 09:48)

Thanks for your reply. I understand the theoretical VLAN principle smile and I will check it tonight after work. I think that the VGV7519 has a default LAN setup on eth0 and the WAN on a separate eth1 because it is configured to use ADSL/VDSL as WAN instead of the WAN-RJ45. And the VGV7510KW22 uses the RJ46 as ethernet WAN tough the IP101A LF? On the ToC page for the VGV7519 I noticed that there is no swconfig support for the lantiq switch? (Please note that the creator of that article has copied text from the ARV7510pw ToC page so I don't know what is accurate and what is not)

Currently I'm using a trunk r49274 image which was the lastest version during my compile time last week.

Ps. I also saw that user pe0fko has problems with the VLANs and USB on the VGV7519 link. I updated the topic description to include VLAN from now on, and maybe USB? So we can continue to post updates in this "support" topic.

(Last edited by Timeless on 3 May 2016, 11:31)

Timeless wrote:

I think that the VGV7519 has a default LAN setup on eth0 and the WAN on a separate eth1 because it is configured to use ADSL/VDSL as WAN instead of the WAN-RJ45.

This configuration isn't specific to the VGV7519. The BT HomeHub 5 has the same configuration but vlans setup by default.

My point is, the default VLAN configuration isn't required at all. The switch driver takes care of creating the separate wan eth1. The only benefit of having a default vlan configuration is that it is more obvious for users how to configure vlans on the switch. But with the disadvantage that the wan port doesn't work out of the box any longer (aka needs a vlan config as well).  Have look at https://openwrt.ebilan.co.uk/viewtopic. … t=10#p946.

Timeless wrote:

And the VGV7510KW22 uses the RJ46 as ethernet WAN tough the IP101A LF?

Yes, but not yet. The patches for adding support for the IP101A are sitting in my local queue. The RJ45 port is used for xDSL as well as ethernet. The Pins 1,2,3,6 of the RJ45 are connected to the IP101A and the pins 4,5 are connected to xdsl chip. IMHO a neat solution.

Working on supporting the IP101A was the reason why I had a look at the vlan stuff.

So, the VGV7510KW22 as it's in current trunk, has four lan ports and similar to the HomeHub 5, a more or less useless default VLAN set up.

Timeless wrote:

On the ToC page for the VGV7519 I noticed that there is no swconfig support for the lantiq switch? (Please note that the creator of that article has copied text from the ARV7510pw ToC page so I don't know what is accurate and what is not)

The vrx268/vrx288 SoC has the switch build in. If the switch works with one vrx268/vrx288 based board it should work on all (as long as the board doesn't use an extra switch chip).

The danube Soc based boards like the ARV7510pw doesn't have a build-in switch. You will find various switch chips used on that boards. Some are supported and some are not supported.

Timeless wrote:

Ps. I also saw that user pe0fko has problems with the VLANs and USB on the VGV7519 link. I updated the topic description to include VLAN from now on, and maybe USB? So we can continue to post updates in this "support" topic.

I prefer one thread per problem. Those mixed up threads are hard to follow. Unfortunally, we already broke with the one thread per problem rule...

mkresin wrote:

This configuration isn't specific to the VGV7519. The BT HomeHub 5 has the same configuration but vlans setup by default.

My point is, the default VLAN configuration isn't required at all. The switch driver takes care of creating the separate wan eth1. The only benefit of having a default vlan configuration is that it is more obvious for users how to configure vlans on the switch. But with the disadvantage that the wan port doesn't work out of the box any longer (aka needs a vlan config as well).  Have look at https://openwrt.ebilan.co.uk/viewtopic. … t=10#p946.

Thanks, unfortunately I don't have a switch0 visible on my VGV7519 see:

root@OpenWrt:~# swconfig dev switch0 show
Failed to connect to the switch. Use the "list" command to see which switches are available.
root@OpenWrt:~# swconfig list
root@OpenWrt:~# //no output from swconfig
mkresin wrote:

The vrx268/vrx288 SoC has the switch build in. If the switch works with one vrx268/vrx288 based board it should work on all (as long as the board doesn't use an extra switch chip).

See my reply about the switch0 above

mkresin wrote:

The danube Soc based boards like the ARV7510pw doesn't have a build-in switch. You will find various switch chips used on that boards. Some are supported and some are not supported.

Yeah thats also the case with the VGV7519 which has 3 external Ethernet PHY's

Timeless wrote:

Thanks, unfortunately I don't have a switch0 visible on my VGV7519 see:

root@OpenWrt:~# swconfig dev switch0 show
Failed to connect to the switch. Use the "list" command to see which switches are available.
root@OpenWrt:~# swconfig list
root@OpenWrt:~# //no output from swconfig

I found the issue. The switch definition in the device tree source file misses a required keyword. The following patch should fix it:

diff --git a/target/linux/lantiq/dts/VGV7519.dtsi b/target/linux/lantiq/dts/VGV7519.dtsi
index 95de6e5..4751bc3 100644
--- a/target/linux/lantiq/dts/VGV7519.dtsi
+++ b/target/linux/lantiq/dts/VGV7519.dtsi
@@ -244,6 +244,7 @@
         #size-cells = <0>;
         reg = <0>;
         mac-address = [ 00 11 22 33 44 55 ];
+        lantiq,switch;
 
         ethernet@0 {
             compatible = "lantiq,xrx200-pdi-port";


Timeless wrote:
mkresin wrote:

The vrx268/vrx288 SoC has the switch build in. If the switch works with one vrx268/vrx288 based board it should work on all (as long as the board doesn't use an extra switch chip).

See my reply about the switch0 above

See my reply above :-).


Timeless wrote:
mkresin wrote:

The danube Soc based boards like the ARV7510pw doesn't have a build-in switch. You will find various switch chips used on that boards. Some are supported and some are not supported.

Yeah thats also the case with the VGV7519 which has 3 external Ethernet PHY's

Nope. It uses the same build-in switch as all other vrx268/vrx288 boards. Otherwise none of the lan ports would work.

Hi,

I've tested the patch you send(mailed) me mkresin. And for now I can confirm that USB/Switch0/VLANS are working on both R01 and R02. which is great smile
I used the following network config:

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0 1 2 3 4 6t'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '64'
        option ipaddr '192.168.1.1'

config interface 'wan'
        option proto 'dhcp'
        option ifname 'eth1.2'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option ifname 'eth1.2'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '5 6t'

I still don't understand why the WAN port must have a VLAN on both eth1 and eth0 (in my case vlanID2) But for now it seems to work.

Then the only remaining problem is the TX/RX LEDs on the R01 unit (R02 still works after applying the patch)
Here is the dmesg ouput of the ports that have a incorrectly set LED. I plugged the cable from port to port:

[  163.059724] eth0: port 0 got link
[  167.048089] eth0: port 0 lost link
[  168.049006] eth1: port 5 got link
[  178.047847] eth1: port 5 lost link
[  178.050142] eth0: port 1 got link
[  178.054320] eth0: port 1 lost link

Summary:

Port 0 = LAN 4
Port 1 = LAN 3
Port 2 = LAN 2
Port 3 = Not connected to a RJ45? Maybe VDSL/ADSL or something?
Port 4 = LAN 1
Port 5 = WAN
Port 6 = CPU

USB still gives me some warnings but it seems to function anyway:

[    4.594437] dwc2 1e101000.ifxhcd: requested GPIO 488
[    4.598035] dwc2 1e101000.ifxhcd: Configuration mismatch. Forcing host mode
[    5.459895] dwc2 1e101000.ifxhcd: DWC OTG Controller
[    5.463493] dwc2 1e101000.ifxhcd: new USB bus registered, assigned bus number 1
[    5.470811] dwc2 1e101000.ifxhcd: irq 62, io mem 0x00000000
[    5.476348] dwc2 1e101000.ifxhcd: Hardware does not support descriptor DMA mode -
[    5.483773] dwc2 1e101000.ifxhcd: falling back to buffer DMA mode.
[    5.491224] hub 1-0:1.0: USB hub found
[    5.494188] hub 1-0:1.0: 1 port detected
[    5.498255] dwc2 1e106000.ifxhcd: Configuration mismatch. Forcing host mode
[    6.359915] dwc2 1e106000.ifxhcd: DWC OTG Controller
[    6.363508] dwc2 1e106000.ifxhcd: new USB bus registered, assigned bus number 2
[    6.370844] dwc2 1e106000.ifxhcd: irq 91, io mem 0x00000000
[    6.376359] dwc2 1e106000.ifxhcd: Hardware does not support descriptor DMA mode -
[    6.383793] dwc2 1e106000.ifxhcd: falling back to buffer DMA mode.
[    6.391471] hub 2-0:1.0: USB hub found
[    6.394254] hub 2-0:1.0: 1 port detected

Another thing is when VDSL is not used the log get spammed with :

daemon.err uhttpd[1104]: killall: vdsl_cpe_control: no process killed

I removed [ltq-vdsl-app] which stopped the load and dmesg output.

(Last edited by Timeless on 4 May 2016, 13:19)

Yes, the switch is here also working on the R02 version!!

Did download the develop version (not the CC) and changed the VGV7519.dtsi for the switch and USB and the switch is working (vlan's) and USB #2 is also working, thanks mkresin!

Will do some more testing.

73, Fred

Timeless wrote:

Then the only remaining problem is the TX/RX LEDs on the R01 unit (R02 still works after applying the patch)
Here is the dmesg ouput of the ports that have a incorrectly set LED. I plugged the cable from port to port:

[  163.059724] eth0: port 0 got link
[  167.048089] eth0: port 0 lost link
[  168.049006] eth1: port 5 got link
[  178.047847] eth1: port 5 lost link
[  178.050142] eth0: port 1 got link
[  178.054320] eth0: port 1 lost link

That is something that can't be easily fixed. The difference between the R01 and the R02 devices are the used external network chips (PEF 7071 v1.3 for R01 and PEF 7071 v1.5 for R02).

I got a confirmation that it's a known bug with the firmware version 1.3. The firmware counts the packages but doesn't trigger the led.

To workaround the issue it's required to transfer control of the leds to the switch driver (which has knowledge about packages received/send over a port). But I couldn't spot any existing code for this so far.

At the moment I'm not interested in writing the required code.

(Last edited by mkresin on 22 May 2016, 20:06)

The discussion might have continued from here.