2022-07-27 21:32:51

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: Aw: [RFC PATCH net-next] dt-bindings: net: dsa: mediatek,mt7530: completely rework binding

On 27.07.2022 23:31, Frank Wunderlich wrote:
>
>> Gesendet: Dienstag, 26. Juli 2022 um 14:24 Uhr
>> Von: "Arınç ÜNAL" <[email protected]>
>
> Hi,
>
>> To Frank:
>> Let me know if MII bindings for port 5 and 6 on MT7531 are okay.
>
> I ack krzysztof, that the change is really huge and it is hard to understand what exactly is changed and why. So please split. I have converted
> it to yaml, but not have changed the logic itself. I guess you know the switch better than me.
>
>> Does your recent patch for MT7531 make it possible to set any port for CPU,
>> including user ports? For now, I put a rule to restrict CPU ports to 5 and
>> 6, as described on the description of dsa port reg property.
>
> i only know that port 5 and 6 are possible, not about the other ports. Afair there was a check if port 5 or 6 (followed by available modes
> like rgmii, trgmii or sgmii) and then allow cpu-port-mode else allow only user-port mode. Had not changed this, so currently only these 2
> ports can be used as CPU.
>
>> I suppose your patch does not bring support for using MT7530's port 5 as
>> CPU port. We could try this on a BPI-R2. Device schematics show that
>> MT7530's GMII pins are wired to GMAC1 of MT7623NI to work as RGMII.
>
> my patches (and the version from Vladimir that was merged) only solves the Problem that CPU-Port was fixed to 6 before. I tested Patches on r2
> (mt7530) and r64 too (mt7531) that they do not break anything. But i have not disabled port 6 (maybe i had to do so for a port5-only mode), only
> enabled port 5 too and run iperf3 over a vlan-aware bridge between wan-port and port 5.

I've seen this under mt7530_setup():
The bit for MHWTRAP_P6_DIS is cleared to enable port 6 with the comment
"Enable Port 6 only; P5 as GMAC5 which currently is not supported".

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2189

I'm slowly learning C programming so I can't currently manage to do
something on my own here, just letting you know.

Arınç


2022-07-27 21:42:28

by Frank Wunderlich

[permalink] [raw]
Subject: Re: Aw: [RFC PATCH net-next] dt-bindings: net: dsa: mediatek,mt7530: completely rework binding

Am 27. Juli 2022 22:59:16 MESZ schrieb "Arınç ÜNAL" <[email protected]>:
>On 27.07.2022 23:31, Frank Wunderlich wrote:
>>

>I've seen this under mt7530_setup():
>The bit for MHWTRAP_P6_DIS is cleared to enable port 6 with the comment "Enable Port 6 only; P5 as GMAC5 which currently is not supported".
>
>https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2189

Later in same function it looks comment is obsolete.

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2234

I know that rene added p5 support while phylink conversion,but not sure it was complete.

regards Frank

2022-07-27 22:53:20

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: Aw: [RFC PATCH net-next] dt-bindings: net: dsa: mediatek,mt7530: completely rework binding

On 28.07.2022 00:26, Frank Wunderlich wrote:
> Am 27. Juli 2022 22:59:16 MESZ schrieb "Arınç ÜNAL" <[email protected]>:
>> On 27.07.2022 23:31, Frank Wunderlich wrote:
>>>
>
>> I've seen this under mt7530_setup():
>> The bit for MHWTRAP_P6_DIS is cleared to enable port 6 with the comment "Enable Port 6 only; P5 as GMAC5 which currently is not supported".
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2189
>
> Later in same function it looks comment is obsolete.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2234
>
> I know that rene added p5 support while phylink conversion,but not sure it was complete.

Thanks for pointing it out. I suppose it works fine since you tested it.
I will update my patch to allow setting port 5 as cpu port along with
splitting the patch.

Arınç