* [PATCH v1 0/3] MIPS: dts: ralink: mt7628a: Tweak for GARDENA smart Gateway @ 2025-06-11 19:47 Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler ` (2 more replies) 0 siblings, 3 replies; 20+ messages in thread From: Ezra Buehler @ 2025-06-11 19:47 UTC (permalink / raw) To: linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Various devicetree changes needed for the MT7688-based GARDENA smart Gateway. Ezra Buehler (3): MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED .../boot/dts/ralink/gardena_smart_gateway_mt7688.dts | 2 +- arch/mips/boot/dts/ralink/mt7628a.dtsi | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) -- 2.43.0 ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-11 19:47 [PATCH v1 0/3] MIPS: dts: ralink: mt7628a: Tweak for GARDENA smart Gateway Ezra Buehler @ 2025-06-11 19:47 ` Ezra Buehler 2025-06-12 7:34 ` Stefan Roese 2025-06-12 11:22 ` Krzysztof Kozlowski 2025-06-11 19:47 ` [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED Ezra Buehler 2 siblings, 2 replies; 20+ messages in thread From: Ezra Buehler @ 2025-06-11 19:47 UTC (permalink / raw) To: linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Otherwise, the MT7688-based GARDENA smart Gateway will fail to boot printing "Kernel panic - not syncing: unable to get CPU clock, err=-2". Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> --- arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi index 0212700c4fb4..10221a41f02a 100644 --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi @@ -33,7 +33,7 @@ palmbus@10000000 { #size-cells = <1>; sysc: syscon@0 { - compatible = "ralink,mt7628-sysc", "syscon"; + compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon"; reg = <0x0 0x60>; #clock-cells = <1>; #reset-cells = <1>; -- 2.43.0 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler @ 2025-06-12 7:34 ` Stefan Roese 2025-06-12 11:22 ` Krzysztof Kozlowski 1 sibling, 0 replies; 20+ messages in thread From: Stefan Roese @ 2025-06-12 7:34 UTC (permalink / raw) To: Ezra Buehler, linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Thomas Bogendoerfer, devicetree, Ezra Buehler On 11.06.25 21:47, Ezra Buehler wrote: > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > Otherwise, the MT7688-based GARDENA smart Gateway will fail to boot > printing "Kernel panic - not syncing: unable to get CPU clock, err=-2". > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de> Thanks, Stefan > --- > arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi > index 0212700c4fb4..10221a41f02a 100644 > --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi > +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi > @@ -33,7 +33,7 @@ palmbus@10000000 { > #size-cells = <1>; > > sysc: syscon@0 { > - compatible = "ralink,mt7628-sysc", "syscon"; > + compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon"; > reg = <0x0 0x60>; > #clock-cells = <1>; > #reset-cells = <1>; Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler 2025-06-12 7:34 ` Stefan Roese @ 2025-06-12 11:22 ` Krzysztof Kozlowski 2025-06-13 11:50 ` Ezra Buehler 1 sibling, 1 reply; 20+ messages in thread From: Krzysztof Kozlowski @ 2025-06-12 11:22 UTC (permalink / raw) To: Ezra Buehler, linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On 11/06/2025 21:47, Ezra Buehler wrote: > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > Otherwise, the MT7688-based GARDENA smart Gateway will fail to boot > printing "Kernel panic - not syncing: unable to get CPU clock, err=-2". > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > --- > arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi > index 0212700c4fb4..10221a41f02a 100644 > --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi > +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi > @@ -33,7 +33,7 @@ palmbus@10000000 { > #size-cells = <1>; > > sysc: syscon@0 { > - compatible = "ralink,mt7628-sysc", "syscon"; > + compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon"; This is in contradiction to bindings, so you need to fix bindings first - with proper justification. If this happened in separate patchset, then the DTS thread MUST provide lore link to that. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-12 11:22 ` Krzysztof Kozlowski @ 2025-06-13 11:50 ` Ezra Buehler 2025-06-13 12:11 ` Krzysztof Kozlowski 0 siblings, 1 reply; 20+ messages in thread From: Ezra Buehler @ 2025-06-13 11:50 UTC (permalink / raw) To: Krzysztof Kozlowski, Sergio Paracuellos Cc: linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Thu, Jun 12, 2025 at 1:22 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On 11/06/2025 21:47, Ezra Buehler wrote: > > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > > > Otherwise, the MT7688-based GARDENA smart Gateway will fail to boot > > printing "Kernel panic - not syncing: unable to get CPU clock, err=-2". > > > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > --- > > arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi > > index 0212700c4fb4..10221a41f02a 100644 > > --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi > > +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi > > @@ -33,7 +33,7 @@ palmbus@10000000 { > > #size-cells = <1>; > > > > sysc: syscon@0 { > > - compatible = "ralink,mt7628-sysc", "syscon"; > > + compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon"; > This is in contradiction to bindings, so you need to fix bindings first > - with proper justification. If this happened in separate patchset, then > the DTS thread MUST provide lore link to that. As the MT7628 and MT7688 are identical in most respects, mt7628a.dtsi is used for both SoCs. Therefore, I'd rather suggest adapting the driver to return "ralink,mt7628-sysc" in both cases and remove "ralink,mt7688-sysc" from the DT bindings. I'd love to hear Sergio's (or any other) opinion on this matter. Cheers, Ezra ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 11:50 ` Ezra Buehler @ 2025-06-13 12:11 ` Krzysztof Kozlowski 2025-06-13 12:20 ` Ezra Buehler 0 siblings, 1 reply; 20+ messages in thread From: Krzysztof Kozlowski @ 2025-06-13 12:11 UTC (permalink / raw) To: Ezra Buehler, Sergio Paracuellos Cc: linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On 13/06/2025 13:50, Ezra Buehler wrote: >>> diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi >>> index 0212700c4fb4..10221a41f02a 100644 >>> --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi >>> +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi >>> @@ -33,7 +33,7 @@ palmbus@10000000 { >>> #size-cells = <1>; >>> >>> sysc: syscon@0 { >>> - compatible = "ralink,mt7628-sysc", "syscon"; >>> + compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon"; >> This is in contradiction to bindings, so you need to fix bindings first >> - with proper justification. If this happened in separate patchset, then >> the DTS thread MUST provide lore link to that. > > As the MT7628 and MT7688 are identical in most respects, mt7628a.dtsi is > used for both SoCs. Therefore, I'd rather suggest adapting the driver to > return "ralink,mt7628-sysc" in both cases and remove "ralink,mt7688-sysc" > from the DT bindings. Not sure what you propose here, but just in case: devices need specific compatibles. > > I'd love to hear Sergio's (or any other) opinion on this matter. > > Cheers, > Ezra Best regards, Krzysztof ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 12:11 ` Krzysztof Kozlowski @ 2025-06-13 12:20 ` Ezra Buehler 2025-06-13 12:41 ` Krzysztof Kozlowski 0 siblings, 1 reply; 20+ messages in thread From: Ezra Buehler @ 2025-06-13 12:20 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Sergio Paracuellos, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Fri, Jun 13, 2025 at 2:11 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > Not sure what you propose here, but just in case: devices need specific > compatibles. Something like this diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c index 9db73fcac522..7ce9acec3a01 100644 --- a/arch/mips/ralink/clk.c +++ b/arch/mips/ralink/clk.c @@ -48,11 +48,9 @@ static const char *clk_cpu(int *idx) *idx = 2; return "ralink,mt7620-sysc"; case MT762X_SOC_MT7628AN: - *idx = 1; - return "ralink,mt7628-sysc"; case MT762X_SOC_MT7688: *idx = 1; - return "ralink,mt7688-sysc"; + return "ralink,mt7628-sysc"; default: *idx = -1; return "invalid"; while leaving mt7628a.dtsi as it is, resolves the issue. Is this not an option? Cheers, Ezra ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 12:20 ` Ezra Buehler @ 2025-06-13 12:41 ` Krzysztof Kozlowski 2025-06-13 12:56 ` Ezra Buehler 0 siblings, 1 reply; 20+ messages in thread From: Krzysztof Kozlowski @ 2025-06-13 12:41 UTC (permalink / raw) To: Ezra Buehler Cc: Sergio Paracuellos, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On 13/06/2025 14:20, Ezra Buehler wrote: > On Fri, Jun 13, 2025 at 2:11 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> Not sure what you propose here, but just in case: devices need specific >> compatibles. > > Something like this > > diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c > index 9db73fcac522..7ce9acec3a01 100644 > --- a/arch/mips/ralink/clk.c > +++ b/arch/mips/ralink/clk.c > @@ -48,11 +48,9 @@ static const char *clk_cpu(int *idx) > *idx = 2; > return "ralink,mt7620-sysc"; > case MT762X_SOC_MT7628AN: > - *idx = 1; > - return "ralink,mt7628-sysc"; > case MT762X_SOC_MT7688: > *idx = 1; > - return "ralink,mt7688-sysc"; > + return "ralink,mt7628-sysc"; > default: > *idx = -1; > return "invalid"; > > while leaving mt7628a.dtsi as it is, resolves the issue. > > Is this not an option? That's not a binding, but driver, so obviously it is fine since you are not removing it from bindings. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 12:41 ` Krzysztof Kozlowski @ 2025-06-13 12:56 ` Ezra Buehler 2025-06-13 13:13 ` Krzysztof Kozlowski 0 siblings, 1 reply; 20+ messages in thread From: Ezra Buehler @ 2025-06-13 12:56 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Sergio Paracuellos, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > That's not a binding, but driver, so obviously it is fine since you are > not removing it from bindings. And, if we also remove all occurrences of "ralink,mt7688-sysc" from the code, as it is not needed from a technical standpoint, can we remove it from mediatek,mtmips-sysc.yaml or is there no going back? Cheers, Ezra. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 12:56 ` Ezra Buehler @ 2025-06-13 13:13 ` Krzysztof Kozlowski 2025-06-13 17:39 ` Ezra Buehler 0 siblings, 1 reply; 20+ messages in thread From: Krzysztof Kozlowski @ 2025-06-13 13:13 UTC (permalink / raw) To: Ezra Buehler Cc: Sergio Paracuellos, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On 13/06/2025 14:56, Ezra Buehler wrote: > On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> That's not a binding, but driver, so obviously it is fine since you are >> not removing it from bindings. > > And, if we also remove all occurrences of "ralink,mt7688-sysc" from the > code, as it is not needed from a technical standpoint, can we remove it > from mediatek,mtmips-sysc.yaml or is there no going back? But it is needed. MT7688 needs it to fulfill the DT bindings requirement (see writing bindings): specific compatible. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 13:13 ` Krzysztof Kozlowski @ 2025-06-13 17:39 ` Ezra Buehler 2025-06-14 5:01 ` Sergio Paracuellos 0 siblings, 1 reply; 20+ messages in thread From: Ezra Buehler @ 2025-06-13 17:39 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Sergio Paracuellos, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Fri, Jun 13, 2025 at 3:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 13/06/2025 14:56, Ezra Buehler wrote: > > On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > >> That's not a binding, but driver, so obviously it is fine since you are > >> not removing it from bindings. > > > > And, if we also remove all occurrences of "ralink,mt7688-sysc" from the > > code, as it is not needed from a technical standpoint, can we remove it > > from mediatek,mtmips-sysc.yaml or is there no going back? > But it is needed. MT7688 needs it to fulfill the DT bindings requirement > (see writing bindings): specific compatible. I see. In that case, it seems to me that the only reasonable solution is to adapt the bindings (mediatek,mtmips-sysc.yaml) and go forward with the initial patch. Cheers, Ezra. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-13 17:39 ` Ezra Buehler @ 2025-06-14 5:01 ` Sergio Paracuellos 2025-06-14 5:46 ` Ezra Buehler 0 siblings, 1 reply; 20+ messages in thread From: Sergio Paracuellos @ 2025-06-14 5:01 UTC (permalink / raw) To: Ezra Buehler Cc: Krzysztof Kozlowski, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler Hi Ezra, On Fri, Jun 13, 2025 at 7:40 PM Ezra Buehler <ezra@easyb.ch> wrote: > > On Fri, Jun 13, 2025 at 3:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On 13/06/2025 14:56, Ezra Buehler wrote: > > > On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > >> That's not a binding, but driver, so obviously it is fine since you are > > >> not removing it from bindings. > > > > > > And, if we also remove all occurrences of "ralink,mt7688-sysc" from the > > > code, as it is not needed from a technical standpoint, can we remove it > > > from mediatek,mtmips-sysc.yaml or is there no going back? > > But it is needed. MT7688 needs it to fulfill the DT bindings requirement > > (see writing bindings): specific compatible. > > I see. In that case, it seems to me that the only reasonable solution is > to adapt the bindings (mediatek,mtmips-sysc.yaml) and go forward with > the initial patch. Compatibles in ralink are a bit messy historically since there are platforms that are pretty similar and were developed before having proper bindings mainlined, For example, as you said, mt7628 and mt7688 are pretty similar but having wildcard mt76x8 was not an option since specific compatibles are mandatory, so I ended introducing also the mt7688-sysc in bindings to match MT762X_SOC_MT7688 type [0]. I have checked also openWRT tree and I think just modifying clk.c [1] returning the expected sysc would be a valid and functional approach: diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c index 9db73fcac522..7ce9acec3a01 100644 --- a/arch/mips/ralink/clk.c +++ b/arch/mips/ralink/clk.c @@ -48,11 +48,9 @@ static const char *clk_cpu(int *idx) *idx = 2; return "ralink,mt7620-sysc"; case MT762X_SOC_MT7628AN: *idx = 1; return "ralink,mt7628-sysc"; case MT762X_SOC_MT7688: *idx = 1; - return "ralink,mt7688-sysc"; + return "ralink,mt7628-sysc"; default: *idx = -1; return "invalid"; Since you are not touching bindings at all but driver code, it should be ok. Obviously if you want to adapt the bindings I will also check them when you do so. Thanks, Sergio Paracuellos [0]: https://elixir.bootlin.com/linux/v6.15.1/source/arch/mips/include/asm/mach-ralink/ralink_regs.h#L28 [1]: https://elixir.bootlin.com/linux/v6.15.1/source/arch/mips/ralink/clk.c#L55 > > Cheers, > Ezra. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-14 5:01 ` Sergio Paracuellos @ 2025-06-14 5:46 ` Ezra Buehler 2025-06-14 6:43 ` Sergio Paracuellos 0 siblings, 1 reply; 20+ messages in thread From: Ezra Buehler @ 2025-06-14 5:46 UTC (permalink / raw) To: Sergio Paracuellos Cc: Krzysztof Kozlowski, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Sat, Jun 14, 2025 at 7:01 AM Sergio Paracuellos <sergio.paracuellos@gmail.com> wrote: > > Hi Ezra, > > On Fri, Jun 13, 2025 at 7:40 PM Ezra Buehler <ezra@easyb.ch> wrote: > > > > On Fri, Jun 13, 2025 at 3:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > On 13/06/2025 14:56, Ezra Buehler wrote: > > > > On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > >> That's not a binding, but driver, so obviously it is fine since you are > > > >> not removing it from bindings. > > > > > > > > And, if we also remove all occurrences of "ralink,mt7688-sysc" from the > > > > code, as it is not needed from a technical standpoint, can we remove it > > > > from mediatek,mtmips-sysc.yaml or is there no going back? > > > But it is needed. MT7688 needs it to fulfill the DT bindings requirement > > > (see writing bindings): specific compatible. > > > > I see. In that case, it seems to me that the only reasonable solution is > > to adapt the bindings (mediatek,mtmips-sysc.yaml) and go forward with > > the initial patch. > > Compatibles in ralink are a bit messy historically since there are > platforms that are pretty similar and were developed before having > proper bindings mainlined, For example, as you said, mt7628 and mt7688 > are pretty similar but having wildcard mt76x8 was not an option since > specific compatibles are mandatory, so I ended introducing also the > mt7688-sysc in bindings to match MT762X_SOC_MT7688 type [0]. > > I have checked also openWRT tree and I think just modifying clk.c [1] > returning the expected sysc would be a valid and functional approach: > > diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c > index 9db73fcac522..7ce9acec3a01 100644 > --- a/arch/mips/ralink/clk.c > +++ b/arch/mips/ralink/clk.c > @@ -48,11 +48,9 @@ static const char *clk_cpu(int *idx) > *idx = 2; > return "ralink,mt7620-sysc"; > case MT762X_SOC_MT7628AN: > *idx = 1; > return "ralink,mt7628-sysc"; > case MT762X_SOC_MT7688: > *idx = 1; > - return "ralink,mt7688-sysc"; > + return "ralink,mt7628-sysc"; > default: > *idx = -1; > return "invalid"; > > Since you are not touching bindings at all but driver code, it should be ok. > The issue I see here is that if someone decides to put compatible = "ralink,mt7688-sysc", "syscon"; into their DT, which seems very reasonable, the system will not boot. Therefore, I would not go with that change unless one removes support for ralink,mt7688-sysc all together. Cheers, Ezra. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 2025-06-14 5:46 ` Ezra Buehler @ 2025-06-14 6:43 ` Sergio Paracuellos 0 siblings, 0 replies; 20+ messages in thread From: Sergio Paracuellos @ 2025-06-14 6:43 UTC (permalink / raw) To: Ezra Buehler Cc: Krzysztof Kozlowski, linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Sat, Jun 14, 2025 at 7:47 AM Ezra Buehler <ezra@easyb.ch> wrote: > > On Sat, Jun 14, 2025 at 7:01 AM Sergio Paracuellos > <sergio.paracuellos@gmail.com> wrote: > > > > Hi Ezra, > > > > On Fri, Jun 13, 2025 at 7:40 PM Ezra Buehler <ezra@easyb.ch> wrote: > > > > > > On Fri, Jun 13, 2025 at 3:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > > On 13/06/2025 14:56, Ezra Buehler wrote: > > > > > On Fri, Jun 13, 2025 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > > >> That's not a binding, but driver, so obviously it is fine since you are > > > > >> not removing it from bindings. > > > > > > > > > > And, if we also remove all occurrences of "ralink,mt7688-sysc" from the > > > > > code, as it is not needed from a technical standpoint, can we remove it > > > > > from mediatek,mtmips-sysc.yaml or is there no going back? > > > > But it is needed. MT7688 needs it to fulfill the DT bindings requirement > > > > (see writing bindings): specific compatible. > > > > > > I see. In that case, it seems to me that the only reasonable solution is > > > to adapt the bindings (mediatek,mtmips-sysc.yaml) and go forward with > > > the initial patch. > > > > Compatibles in ralink are a bit messy historically since there are > > platforms that are pretty similar and were developed before having > > proper bindings mainlined, For example, as you said, mt7628 and mt7688 > > are pretty similar but having wildcard mt76x8 was not an option since > > specific compatibles are mandatory, so I ended introducing also the > > mt7688-sysc in bindings to match MT762X_SOC_MT7688 type [0]. > > > > I have checked also openWRT tree and I think just modifying clk.c [1] > > returning the expected sysc would be a valid and functional approach: > > > > diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c > > index 9db73fcac522..7ce9acec3a01 100644 > > --- a/arch/mips/ralink/clk.c > > +++ b/arch/mips/ralink/clk.c > > @@ -48,11 +48,9 @@ static const char *clk_cpu(int *idx) > > *idx = 2; > > return "ralink,mt7620-sysc"; > > case MT762X_SOC_MT7628AN: > > *idx = 1; > > return "ralink,mt7628-sysc"; > > case MT762X_SOC_MT7688: > > *idx = 1; > > - return "ralink,mt7688-sysc"; > > + return "ralink,mt7628-sysc"; > > default: > > *idx = -1; > > return "invalid"; > > > > Since you are not touching bindings at all but driver code, it should be ok. > > > > The issue I see here is that if someone decides to put > > compatible = "ralink,mt7688-sysc", "syscon"; > > into their DT, which seems very reasonable, the system will not boot. > Therefore, I would not go with that change unless one removes support > for ralink,mt7688-sysc all together. Yes, you are right. Properly fixing it would be the correct thing to do. I was talking only about the already available platforms in the openWRT tree which seems to not be using that compatible at all. I'll wait for your patches, then :-). Thanks, Sergio Paracuellos > > Cheers, > Ezra. ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings 2025-06-11 19:47 [PATCH v1 0/3] MIPS: dts: ralink: mt7628a: Tweak for GARDENA smart Gateway Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler @ 2025-06-11 19:47 ` Ezra Buehler 2025-06-12 7:34 ` Stefan Roese 2025-06-14 4:47 ` Sergio Paracuellos 2025-06-11 19:47 ` [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED Ezra Buehler 2 siblings, 2 replies; 20+ messages in thread From: Ezra Buehler @ 2025-06-11 19:47 UTC (permalink / raw) To: linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Most notably, add the mediatek,sysctl phandle and remove the redundant reset/interrupt-related properties from the watchdog node. This is in line with the corresponding devicetree (mt7628an.dtsi) used by the OpenWrt project. This has been tested on the MT7688-based GARDENA smart Gateway. Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> --- arch/mips/boot/dts/ralink/mt7628a.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi index 10221a41f02a..5d7a6cfa9e2b 100644 --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi @@ -134,13 +134,8 @@ pinmux_p4led_an_gpio: p4led-an-gpio-pins { watchdog: watchdog@100 { compatible = "mediatek,mt7621-wdt"; - reg = <0x100 0x30>; - - resets = <&sysc 8>; - reset-names = "wdt"; - - interrupt-parent = <&intc>; - interrupts = <24>; + reg = <0x100 0x100>; + mediatek,sysctl = <&sysc>; status = "disabled"; }; -- 2.43.0 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings 2025-06-11 19:47 ` [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings Ezra Buehler @ 2025-06-12 7:34 ` Stefan Roese 2025-06-14 4:47 ` Sergio Paracuellos 1 sibling, 0 replies; 20+ messages in thread From: Stefan Roese @ 2025-06-12 7:34 UTC (permalink / raw) To: Ezra Buehler, linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Thomas Bogendoerfer, devicetree, Ezra Buehler On 11.06.25 21:47, Ezra Buehler wrote: > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > Most notably, add the mediatek,sysctl phandle and remove the redundant > reset/interrupt-related properties from the watchdog node. This is in > line with the corresponding devicetree (mt7628an.dtsi) used by the > OpenWrt project. > > This has been tested on the MT7688-based GARDENA smart Gateway. > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de> Thanks, Stefan > --- > arch/mips/boot/dts/ralink/mt7628a.dtsi | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi > index 10221a41f02a..5d7a6cfa9e2b 100644 > --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi > +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi > @@ -134,13 +134,8 @@ pinmux_p4led_an_gpio: p4led-an-gpio-pins { > > watchdog: watchdog@100 { > compatible = "mediatek,mt7621-wdt"; > - reg = <0x100 0x30>; > - > - resets = <&sysc 8>; > - reset-names = "wdt"; > - > - interrupt-parent = <&intc>; > - interrupts = <24>; > + reg = <0x100 0x100>; > + mediatek,sysctl = <&sysc>; > > status = "disabled"; > }; Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings 2025-06-11 19:47 ` [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings Ezra Buehler 2025-06-12 7:34 ` Stefan Roese @ 2025-06-14 4:47 ` Sergio Paracuellos 1 sibling, 0 replies; 20+ messages in thread From: Sergio Paracuellos @ 2025-06-14 4:47 UTC (permalink / raw) To: Ezra Buehler Cc: linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Wed, Jun 11, 2025 at 9:47 PM Ezra Buehler <ezra@easyb.ch> wrote: > > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > Most notably, add the mediatek,sysctl phandle and remove the redundant > reset/interrupt-related properties from the watchdog node. This is in > line with the corresponding devicetree (mt7628an.dtsi) used by the > OpenWrt project. > > This has been tested on the MT7688-based GARDENA smart Gateway. > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > --- > arch/mips/boot/dts/ralink/mt7628a.dtsi | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED 2025-06-11 19:47 [PATCH v1 0/3] MIPS: dts: ralink: mt7628a: Tweak for GARDENA smart Gateway Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings Ezra Buehler @ 2025-06-11 19:47 ` Ezra Buehler 2025-06-12 7:35 ` Stefan Roese 2025-06-14 4:47 ` Sergio Paracuellos 2 siblings, 2 replies; 20+ messages in thread From: Ezra Buehler @ 2025-06-11 19:47 UTC (permalink / raw) To: linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> When starting up, the GARDENA smart Gateway's power LED should be flashing green. It is unclear why it was initially set to "off". The LED frequency cannot be configured in the devicetree. Luckily, the default is 1 Hz, which is what we want. Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> --- arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts index 7743d014631a..0bfb1dde9764 100644 --- a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts +++ b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts @@ -56,7 +56,7 @@ led-power-blue { led-power-green { label = "smartgw:power:green"; gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; - default-state = "off"; + linux,default-trigger = "timer"; }; led-power-red { -- 2.43.0 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED 2025-06-11 19:47 ` [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED Ezra Buehler @ 2025-06-12 7:35 ` Stefan Roese 2025-06-14 4:47 ` Sergio Paracuellos 1 sibling, 0 replies; 20+ messages in thread From: Stefan Roese @ 2025-06-12 7:35 UTC (permalink / raw) To: Ezra Buehler, linux-mips Cc: Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Sergio Paracuellos, Thomas Bogendoerfer, devicetree, Ezra Buehler On 11.06.25 21:47, Ezra Buehler wrote: > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > When starting up, the GARDENA smart Gateway's power LED should be > flashing green. It is unclear why it was initially set to "off". > > The LED frequency cannot be configured in the devicetree. Luckily, the > default is 1 Hz, which is what we want. > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de> Thanks, Stefan > --- > arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts > index 7743d014631a..0bfb1dde9764 100644 > --- a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts > +++ b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts > @@ -56,7 +56,7 @@ led-power-blue { > led-power-green { > label = "smartgw:power:green"; > gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; > - default-state = "off"; > + linux,default-trigger = "timer"; > }; > > led-power-red { Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED 2025-06-11 19:47 ` [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED Ezra Buehler 2025-06-12 7:35 ` Stefan Roese @ 2025-06-14 4:47 ` Sergio Paracuellos 1 sibling, 0 replies; 20+ messages in thread From: Sergio Paracuellos @ 2025-06-14 4:47 UTC (permalink / raw) To: Ezra Buehler Cc: linux-mips, Conor Dooley, Harvey Hunt, Krzysztof Kozlowski, Reto Schneider, Rob Herring, Stefan Roese, Thomas Bogendoerfer, devicetree, Ezra Buehler On Wed, Jun 11, 2025 at 9:47 PM Ezra Buehler <ezra@easyb.ch> wrote: > > From: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > > When starting up, the GARDENA smart Gateway's power LED should be > flashing green. It is unclear why it was initially set to "off". > > The LED frequency cannot be configured in the devicetree. Luckily, the > default is 1 Hz, which is what we want. > > Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com> > --- > arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2025-06-14 6:44 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-11 19:47 [PATCH v1 0/3] MIPS: dts: ralink: mt7628a: Tweak for GARDENA smart Gateway Ezra Buehler 2025-06-11 19:47 ` [PATCH v1 1/3] MIPS: dts: ralink: mt7628a: Fix sysc's compatible property for MT7688 Ezra Buehler 2025-06-12 7:34 ` Stefan Roese 2025-06-12 11:22 ` Krzysztof Kozlowski 2025-06-13 11:50 ` Ezra Buehler 2025-06-13 12:11 ` Krzysztof Kozlowski 2025-06-13 12:20 ` Ezra Buehler 2025-06-13 12:41 ` Krzysztof Kozlowski 2025-06-13 12:56 ` Ezra Buehler 2025-06-13 13:13 ` Krzysztof Kozlowski 2025-06-13 17:39 ` Ezra Buehler 2025-06-14 5:01 ` Sergio Paracuellos 2025-06-14 5:46 ` Ezra Buehler 2025-06-14 6:43 ` Sergio Paracuellos 2025-06-11 19:47 ` [PATCH v1 2/3] MIPS: dts: ralink: mt7628a: Update watchdog node according to bindings Ezra Buehler 2025-06-12 7:34 ` Stefan Roese 2025-06-14 4:47 ` Sergio Paracuellos 2025-06-11 19:47 ` [PATCH v1 3/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: Fix power LED Ezra Buehler 2025-06-12 7:35 ` Stefan Roese 2025-06-14 4:47 ` 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).