]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
reset: reset-meson: Add support for Amlogic T7 SoC reset controller
authorZelong Dong <zelong.dong@amlogic.com>
Mon, 22 Apr 2024 11:11:44 +0000 (19:11 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 2 Sep 2024 10:09:17 +0000 (12:09 +0200)
There are 7 sets of Reset Source in Amlogic T7 SoC reset controller,
and the offset between base and level registers is 0x40.
Add a new compatible string and struct meson_reset_param to support
the reset controller on T7 SoC.

Signed-off-by: Zelong Dong <zelong.dong@amlogic.com>
Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240422-t7-reset-v2-2-cb82271d3296@amlogic.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/reset-meson.c

index f78be97898bc05378cd4d7754f1a1be0b2adb9a1..1e9fca3e30e8e36688fbb48c982a3eadb981115b 100644 (file)
@@ -102,6 +102,11 @@ static const struct meson_reset_param meson_s4_param = {
        .level_offset   = 0x40,
 };
 
+static const struct meson_reset_param t7_param = {
+       .reg_count      = 7,
+       .level_offset   = 0x40,
+};
+
 static const struct of_device_id meson_reset_dt_ids[] = {
         { .compatible = "amlogic,meson8b-reset",    .data = &meson8b_param},
         { .compatible = "amlogic,meson-gxbb-reset", .data = &meson8b_param},
@@ -109,6 +114,7 @@ static const struct of_device_id meson_reset_dt_ids[] = {
         { .compatible = "amlogic,meson-a1-reset",   .data = &meson_a1_param},
         { .compatible = "amlogic,meson-s4-reset",   .data = &meson_s4_param},
         { .compatible = "amlogic,c3-reset",   .data = &meson_s4_param},
+        { .compatible = "amlogic,t7-reset",   .data = &t7_param},
         { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);