From what I've read, this is a "non-standard" switch that may require additional development work to have functional VLANs. It seems as though the two Ethernet phys are internally "wired" to VLANs off switch port 0.
These devices appear to be dual-NIC devices, which
may be almost certainly are a different wrinkle than dealt with in other threads / patches as the NICs appear "hard wired" to various ports by the DT at driver-init time.
The goal of this topic is to collect any additional information on these or related devices and what might be done to get VLAN configuration into OpenWrt (especially as @chunkeey's patch, referenced below, doesn't look like it was accepted).
- QCA Ethernet Switch ESS-SWITCH is used to forward the packet among LAN, WAN and Host processor. Documentation/devicetree/bindings/arm/msm/ess-switch.txt
(I have been unable to locate ess-switch.txt so far.)
Potentially Related Threads / Topics
If you accept the default configuration, you end up with a functional switch for OEM-style use
VLAN 1: vid: 1 ports: 0t 1 2 3 4 VLAN 2: vid: 2 ports: 0t 5
if you try something different, it fights back
config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4' config switch_vlan option device 'switch1' option vlan '2' option ports '5 6'
VLAN 1: vid: 1 ports: 0 1 2 3 4 VLAN 2: vid: 2 ports: 0t 5
config switch_vlan option device 'switch0' option vlan '10' option ports '0 1 2 3 4' config switch_vlan option device 'switch1' option vlan '56' option ports '5 6'
VLAN 1: vid: 1 ports: 0t 1t 2t 3t 4t VLAN 2: vid: 2 ports: 0t 5 VLAN 10: vid: 10 ports: 0 1 2 3 4
(Edit: Yes, I have since confirmed that the QCA AR40xx only has six ports supported by the driver -- I was poking at a "black box" to try to figure out where that second phy was actually connected.)