* MediaTek Frame Engine Ethernet: does it need any resets?
@ 2023-07-29 11:45 Rafał Miłecki
2023-07-29 13:58 ` Arınç ÜNAL
2023-07-31 15:04 ` Sergio Paracuellos
0 siblings, 2 replies; 3+ messages in thread
From: Rafał Miłecki @ 2023-07-29 11:45 UTC (permalink / raw)
To: Lorenzo Bianconi, Felix Fietkau, Matthias Brugger,
AngeloGioacchino Del Regno, Arınç ÜNAL
Cc: Network Development, devicetree@vger.kernel.org, linux-mips,
linux-arm-kernel, linux-mediatek
Hi,
I'm trying to understand MediaTek's Ethernet controller resets.
I noticed there is sth fishy when checking dts files. See following
errors:
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: resets: [[2, 6], [2, 23]] is too short
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: reset-names:1: 'gmac' was expected
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: reset-names: ['fe', 'eth'] is too short
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: Unevaluated properties are not allowed ('reset-names', 'resets' were unexpected)
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
1. Binding mediatek,net.yaml
It says that when present, there must be 3 resets: fe, gmac, ppe
2. mt7621.dtsi
It specifies 2 resets: fe, eth
3. mt7622.dtsi
It doesn't specify any resets
4. mt7629.dtsi
It doesn't specify any resets
5. drivers/net/ethernet/mediatek/
I don't see any reset_control_* code at all
Can someone help me what's the actual case with resets? Are they needed?
Are they used?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MediaTek Frame Engine Ethernet: does it need any resets?
2023-07-29 11:45 MediaTek Frame Engine Ethernet: does it need any resets? Rafał Miłecki
@ 2023-07-29 13:58 ` Arınç ÜNAL
2023-07-31 15:04 ` Sergio Paracuellos
1 sibling, 0 replies; 3+ messages in thread
From: Arınç ÜNAL @ 2023-07-29 13:58 UTC (permalink / raw)
To: Rafał Miłecki, Lorenzo Bianconi, Felix Fietkau,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Network Development, devicetree@vger.kernel.org, linux-mips,
linux-arm-kernel, linux-mediatek, Sergio Paracuellos,
Daniel Golle
On 29.07.2023 14:45, Rafał Miłecki wrote:
> Hi,
>
> I'm trying to understand MediaTek's Ethernet controller resets.
>
> I noticed there is sth fishy when checking dts files. See following
> errors:
>
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb:
> ethernet@1e100000: resets: [[2, 6], [2, 23]] is too short
> From schema:
> Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb:
> ethernet@1e100000: reset-names:1: 'gmac' was expected
> From schema:
> Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb:
> ethernet@1e100000: reset-names: ['fe', 'eth'] is too short
> From schema:
> Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb:
> ethernet@1e100000: Unevaluated properties are not allowed
> ('reset-names', 'resets' were unexpected)
> From schema:
> Documentation/devicetree/bindings/net/mediatek,net.yaml
Sigh, looks like this patch was applied regardless of my points here.
Now we're here picking up the pieces.
https://lore.kernel.org/netdev/b6c7462d-99fc-a8e1-1cc2-d0a1efc7c34d@arinc9.com/
>
>
> 1. Binding mediatek,net.yaml
> It says that when present, there must be 3 resets: fe, gmac, ppe
>
> 2. mt7621.dtsi
> It specifies 2 resets: fe, eth
>
> 3. mt7622.dtsi
> It doesn't specify any resets
>
> 4. mt7629.dtsi
> It doesn't specify any resets
>
> 5. drivers/net/ethernet/mediatek/
> I don't see any reset_control_* code at all
>
>
> Can someone help me what's the actual case with resets? Are they needed?
> Are they used?
I'm adding Sergio to CC as they've been the one working on this on
mt7621.dtsi.
There's relevant information here.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=64b2d6ffff862c0e7278198b4229e42e1abb3bb1
Arınç
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MediaTek Frame Engine Ethernet: does it need any resets?
2023-07-29 11:45 MediaTek Frame Engine Ethernet: does it need any resets? Rafał Miłecki
2023-07-29 13:58 ` Arınç ÜNAL
@ 2023-07-31 15:04 ` Sergio Paracuellos
1 sibling, 0 replies; 3+ messages in thread
From: Sergio Paracuellos @ 2023-07-31 15:04 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Lorenzo Bianconi, Felix Fietkau, Matthias Brugger,
AngeloGioacchino Del Regno, Arınç ÜNAL,
Network Development, devicetree@vger.kernel.org, linux-mips,
linux-arm-kernel, linux-mediatek
Hi Rafal,
On Sat, Jul 29, 2023 at 1:55 PM Rafał Miłecki <zajec5@gmail.com> wrote:
>
> Hi,
>
> I'm trying to understand MediaTek's Ethernet controller resets.
>
> I noticed there is sth fishy when checking dts files. See following
> errors:
>
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: resets: [[2, 6], [2, 23]] is too short
> From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: reset-names:1: 'gmac' was expected
> From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: reset-names: ['fe', 'eth'] is too short
> From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: Unevaluated properties are not allowed ('reset-names', 'resets' were unexpected)
> From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
>
>
> 1. Binding mediatek,net.yaml
> It says that when present, there must be 3 resets: fe, gmac, ppe
>
> 2. mt7621.dtsi
> It specifies 2 resets: fe, eth
>
> 3. mt7622.dtsi
> It doesn't specify any resets
>
> 4. mt7629.dtsi
> It doesn't specify any resets
>
> 5. drivers/net/ethernet/mediatek/
> I don't see any reset_control_* code at all
>
>
> Can someone help me what's the actual case with resets? Are they needed?
> Are they used?
At least for mt7621 bindings have been released after the ethernet
driver. The driver uses directly register offset for reset through the
system controller syscon [1].
Ideally reset_control APIs should be used since there is already a
reset driver for mt7621 [2]. I don't know about the other SoCs.
Hope this helps.
Best regards,
Sergio Paracuellos
[1]: https://elixir.bootlin.com/linux/v6.5-rc3/source/drivers/net/ethernet/mediatek/mtk_eth_soc.h#L495
[2]: https://elixir.bootlin.com/linux/v6.5-rc3/source/drivers/clk/ralink/clk-mt7621.c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-31 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-29 11:45 MediaTek Frame Engine Ethernet: does it need any resets? Rafał Miłecki
2023-07-29 13:58 ` Arınç ÜNAL
2023-07-31 15:04 ` Sergio Paracuellos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).