Commit Graph

5 Commits

Author SHA1 Message Date
Geert Uytterhoeven
fdea114ac2 pmdomain: renesas: rcar-sysc: Add R-Car M3-W power-off delay quirk
R-Car M3-W needs a delay of 1 µs before powering off the A3IR and A3VC
power domains.  Add support for this using a new flag, which indicates
that a power area is subject to this quirk.

Inspired by a patch in the BSP by Dien Pham.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/ecbc3465c598084c904dd3714e2894463094ed9a.1713348705.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-04-18 16:52:00 +02:00
Geert Uytterhoeven
c8d8770444 pmdomain: renesas: rcar-sysc: Remove rcar_sysc_nullify() helper
There are no more users left of the rcar_sysc_nullify() helper, so it
can be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/ad61b09283cc8a9cf93a5ea9fffd1cb283b9db92.1713348705.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-04-18 16:51:56 +02:00
Geert Uytterhoeven
ce5e83925c pmdomain: renesas: rcar-sysc: Absorb rcar_sysc_ch into rcar_sysc_pd
Until commit 7e8a50df26 ("soc: renesas: rcar-sysc: Drop legacy
handling") in v4.19, the rcar_sysc_ch structure was part of the API for
legacy board code not yet using DT.  Since then, there is no longer a
reason to keep it as a separate structure.

Moreover, a future quirk handling will need access to the rcar_sysc_pd
structure's flags member in rcar_sysc_pwr_on_off().  Hence absorb the
rcar_sysc_ch structure into the rcar_sysc_pd structure, and pass around
the latter instead of the former.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/672805a8c52ce63200e342212bbe6f84a445397b.1713348705.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-04-18 16:51:28 +02:00
Dien Pham
713240877a pmdomain: renesas: Adjust the waiting time to cover the worst case
Description in HWM rev0.51E, 9.4 Usage notes, page 455 tells

	"It takes several hundreds of microseconds to shutting off and
	 resuming power domain. Because actual time required for
	 shutting off and resuming depends on the status of on-board
	 power line, shutoff/resume time is not guaranteed by
	 electrical specification"

Let's assume the safe value of waiting is about 1000us.

Signed-off-by: Dien Pham <dien.pham.ry@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/8734tx8b18.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-14 10:26:12 +01:00
Ulf Hansson
e2ad626f8f pmdomain: Rename the genpd subsystem to pmdomain
It has been pointed out that naming a subsystem "genpd" isn't very
self-explanatory and the acronym itself that means Generic PM Domain, is
known only by a limited group of people.

In a way to improve the situation, let's rename the subsystem to pmdomain,
which ideally should indicate that this is about so called Power Domains or
"PM domains" as we often also use within the Linux Kernel terminology.

Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230912221127.487327-1-ulf.hansson@linaro.org
2023-09-13 11:09:21 +02:00