Re: [PATCH net-next v2 5/7] net: dsa: mt7530: Add the support of MT7531 switch

From: Chuanhong Guo
Date: Thu Aug 20 2020 - 11:30:05 EST


Hi!

On Thu, Aug 20, 2020 at 7:55 AM René van Dorst <opensource@xxxxxxxxxx> wrote:
>
> With the current mainline code [1], the dsa code tries to detect how the MAC5
> is used. All the three modes are supported. MAC5 -> PHY0, MAC5 ->
> PHY4, MAC5 ->
> EXTERNAL PHY and MAC5 to external MAC.
>
> When MAC5 is a DSA port it skips settings the delay settings. See [2].
>
> Maybe you can use a similar concept.

Current detection relies on an incorrect assumption that mt753x switch
is always used with mtk_eth_soc. It's a really hacky solution to use
dt properties that don't belong to this switch at all and I think this
approach should not be followed further by future code.
The usage of mac5 should be explicitly defined as a dt property
under mt753x node.
--
Regards,
Chuanhong Guo