* [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain
@ 2025-09-30 10:16 Wolfram Sang
2025-09-30 10:16 ` [RFC PATCH 1/4] clk: renesas: mstp: mark 'spibsc' clocks as critical Wolfram Sang
2025-10-01 7:55 ` [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2025-09-30 10:16 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Conor Dooley, devicetree, Geert Uytterhoeven,
Krzysztof Kozlowski, linux-clk, Magnus Damm, Michael Turquette,
Rob Herring, Stephen Boyd
Addressing this dtb_check...
arch/arm/boot/dts/renesas/r7s72100-genmai.dtb: flash@18000000 (mtd-rom): Unevaluated properties are not allowed ('clocks', 'power-domains' were unexpected)
from schema $id: http://devicetree.org/schemas/mtd/mtd-physmap.yaml#
... I came to the solution proposed here that the clocks we cannot
define will be marked as critical. We could also try to add 'clocks' and
'power-domains' to MTD physmap but I could understand some objection to
that. Opinions?
Wolfram Sang (4):
clk: renesas: mstp: mark 'spibsc' clocks as critical
ARM: dts: renesas: genmai: mtd-rom has no clock and power domain
ARM: dts: renesas: gr-peach: mtd-rom has no clock and power domain
ARM: dts: renesas: rskrza1: mtd-rom has no clock and power domain
arch/arm/boot/dts/renesas/r7s72100-genmai.dts | 3 ---
arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts | 3 ---
arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts | 2 --
drivers/clk/renesas/clk-mstp.c | 7 +++++--
4 files changed, 5 insertions(+), 10 deletions(-)
--
2.47.2
^ permalink raw reply [flat|nested] 4+ messages in thread* [RFC PATCH 1/4] clk: renesas: mstp: mark 'spibsc' clocks as critical
2025-09-30 10:16 [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Wolfram Sang
@ 2025-09-30 10:16 ` Wolfram Sang
2025-10-01 7:55 ` [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2025-09-30 10:16 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
linux-clk
They can be used for XIP (grpeach) and we cannot define them in the DT
because MTD physmap does not allow clock properties.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/clk/renesas/clk-mstp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c
index 2f65fe2c6bdf..5601e104d167 100644
--- a/drivers/clk/renesas/clk-mstp.c
+++ b/drivers/clk/renesas/clk-mstp.c
@@ -157,8 +157,11 @@ static struct clk * __init cpg_mstp_clock_register(const char *name,
init.name = name;
init.ops = &cpg_mstp_clock_ops;
init.flags = CLK_SET_RATE_PARENT;
- /* INTC-SYS is the module clock of the GIC, and must not be disabled */
- if (!strcmp(name, "intc-sys")) {
+ /*
+ * INTC-SYS is the module clock of the GIC, and must not be disabled (r8a73a4)
+ * SPIBSC<x> is for memory-mapped flash which might be needed for XIP (r7s72100)
+ */
+ if (!strcmp(name, "intc-sys") || !strncmp(name, "spibsc", 6)) {
pr_debug("MSTP %s setting CLK_IS_CRITICAL\n", name);
init.flags |= CLK_IS_CRITICAL;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain
2025-09-30 10:16 [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Wolfram Sang
2025-09-30 10:16 ` [RFC PATCH 1/4] clk: renesas: mstp: mark 'spibsc' clocks as critical Wolfram Sang
@ 2025-10-01 7:55 ` Geert Uytterhoeven
2025-10-01 13:10 ` Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-10-01 7:55 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Conor Dooley, devicetree, Geert Uytterhoeven,
Krzysztof Kozlowski, linux-clk, Magnus Damm, Michael Turquette,
Rob Herring, Stephen Boyd
Hi Wolfram,
On Tue, 30 Sept 2025 at 12:17, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Addressing this dtb_check...
>
> arch/arm/boot/dts/renesas/r7s72100-genmai.dtb: flash@18000000 (mtd-rom): Unevaluated properties are not allowed ('clocks', 'power-domains' were unexpected)
> from schema $id: http://devicetree.org/schemas/mtd/mtd-physmap.yaml#
>
> ... I came to the solution proposed here that the clocks we cannot
> define will be marked as critical. We could also try to add 'clocks' and
> 'power-domains' to MTD physmap but I could understand some objection to
> that. Opinions?
I would rather add clocks and power-domains to the DT bindings, for
two reasons:
1. It describes the hardware better,
2. It avoids keeping the clock running on systems where the FLASH
is not used.
Does mtd-rom go through drivers/mtd/maps/physmap-core.c?
Then the clock domain is handled through Runtime PM since commit
0bc448b49e8a017e ("mtd: maps: physmap: Add minimal Runtime PM support").
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain
2025-10-01 7:55 ` [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Geert Uytterhoeven
@ 2025-10-01 13:10 ` Wolfram Sang
0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2025-10-01 13:10 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, Conor Dooley, devicetree, Geert Uytterhoeven,
Krzysztof Kozlowski, linux-clk, Magnus Damm, Michael Turquette,
Rob Herring, Stephen Boyd
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
Hi Geert,
> Does mtd-rom go through drivers/mtd/maps/physmap-core.c?
> Then the clock domain is handled through Runtime PM since commit
> 0bc448b49e8a017e ("mtd: maps: physmap: Add minimal Runtime PM support").
Thank you, Geert, for the pointers. I will have a try.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-01 13:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30 10:16 [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Wolfram Sang
2025-09-30 10:16 ` [RFC PATCH 1/4] clk: renesas: mstp: mark 'spibsc' clocks as critical Wolfram Sang
2025-10-01 7:55 ` [RFC PATCH 0/4] ARM: dts: renesas: mtd-rom has no clock and power domain Geert Uytterhoeven
2025-10-01 13:10 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox