Re: [PATCH v3 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC

Benjamin Larsson
2024-06-23T23:02:33Z

Hi,
> Code like this is making me wounder about the split between MAC
> driver, DSA driver and DSA tag driver. Or if it should actually be a
> pure switchdev driver?
>
> If there some open architecture documentation for this device?
>
> What are these ports about?
>
>> +static int airoha_dev_open(struct net_device *dev)
>> +{
>> + struct airoha_eth *eth = netdev_priv(dev);
>> + int err;
>> +
>> + if (netdev_uses_dsa(dev))
>> + airoha_fe_set(eth, REG_GDM1_INGRESS_CFG, GDM1_STAG_EN_MASK);
>> + else
>> + airoha_fe_clear(eth, REG_GDM1_INGRESS_CFG, GDM1_STAG_EN_MASK);
> Does that imply both instances of the GMAC are not connected to the
> switch? Can one be used with a PHY?
>
> Andrew

https://mirror2.openwrt.org/docs/MT7981B_Wi-Fi6_Platform_Datasheet_Open_V1.0.pdf

page 107 (text for 9.1.1 is relevant but not a complete match). In the
EN7581 case there is a 5 port switch in the place of GMAC1 (one switch
port is connected to GDM1).

This is documentation for another SoC but it should hopefully answer
your questions.

MvH

Benjamin Larsson