[PATCH v4 2/3] reset: tenstorrent: Add reset controller for Atlantis

Anirudh Srinivasan asrinivasan at oss.tenstorrent.com
Mon Feb 16 14:17:27 PST 2026


Helo Philipp,

On Mon, Feb 2, 2026 at 8:05 AM Philipp Zabel <p.zabel at pengutronix.de> wrote:
>
> On Fr, 2026-01-30 at 11:50 -0600, Anirudh Srinivasan wrote:
> > Adds Atlantis Reset Controller and auxiliary device definitions for
> > reset to share same regmap interface as prcm (clock controller).
> >
> > This version of the reset controller driver covers resets from the RCPU
> > prcm.
> >
> > Signed-off-by: Anirudh Srinivasan <asrinivasan at oss.tenstorrent.com>
> > ---
> >  MAINTAINERS                                |   2 +
> >  drivers/reset/Kconfig                      |  11 ++
> >  drivers/reset/Makefile                     |   1 +
> >  drivers/reset/reset-tenstorrent-atlantis.c | 160 +++++++++++++++++++++++++++++
> >  include/soc/tenstorrent/atlantis-prcm.h    |  31 ++++++
> >  5 files changed, 205 insertions(+)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 0fc7bc6d0458..0cde1774567d 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -22537,7 +22537,9 @@ T:    git https://github.com/tenstorrent/linux.git
> >  F:   Documentation/devicetree/bindings/clock/tenstorrent,atlantis-prcm.yaml
> >  F:   Documentation/devicetree/bindings/riscv/tenstorrent.yaml
> >  F:   arch/riscv/boot/dts/tenstorrent/
> > +F:   drivers/reset/reset-tenstorrent-atlantis.c
> >  F:   include/dt-bindings/clock/tenstorrent,atlantis-prcm.h
> > +F:   include/soc/tenstorrent/
> >
> >  RISC-V THEAD SoC SUPPORT
> >  M:   Drew Fustini <fustini at kernel.org>
> > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > index 6e5d6deffa7d..cade77717492 100644
> > --- a/drivers/reset/Kconfig
> > +++ b/drivers/reset/Kconfig
> > @@ -324,6 +324,17 @@ config RESET_SUNXI
> >       help
> >         This enables the reset driver for Allwinner SoCs.
> >
> > +config RESET_TENSTORRENT_ATLANTIS
> > +     tristate "Tenstorrent atlantis reset driver"
> > +     depends on ARCH_TENSTORRENT || COMPILE_TEST
> > +     select AUXILIARY_BUS
> > +     default ARCH_TENSTORRENT
> > +     help
> > +       This enables the driver for the reset controller
> > +       present in the Tenstorrent Atlantis SoC.
> > +       Enable this option to be able to use hardware
> > +       resets on Atalantis based systems.
> > +
> >  config RESET_TH1520
> >       tristate "T-HEAD TH1520 reset controller"
> >       depends on ARCH_THEAD || COMPILE_TEST
> > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
> > index 9c3e484dfd81..a31959da0a88 100644
> > --- a/drivers/reset/Makefile
> > +++ b/drivers/reset/Makefile
> > @@ -41,6 +41,7 @@ obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
> >  obj-$(CONFIG_RESET_SPACEMIT) += reset-spacemit.o
> >  obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
> >  obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
> > +obj-$(CONFIG_RESET_TENSTORRENT_ATLANTIS) += reset-tenstorrent-atlantis.o
> >  obj-$(CONFIG_RESET_TH1520) += reset-th1520.o
> >  obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o
> >  obj-$(CONFIG_RESET_TI_SYSCON) += reset-ti-syscon.o
> > diff --git a/drivers/reset/reset-tenstorrent-atlantis.c b/drivers/reset/reset-tenstorrent-atlantis.c
> > new file mode 100644
> > index 000000000000..6fe9143ad76c
> > --- /dev/null
> > +++ b/drivers/reset/reset-tenstorrent-atlantis.c
> > @@ -0,0 +1,160 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Tenstorrent Atlantis PRCM Reset Driver
> > + *
> > + * Copyright (c) 2026 Tenstorrent
> > + */
> > +
> > +#include <dt-bindings/clock/tenstorrent,atlantis-prcm.h>
> > +#include <linux/auxiliary_bus.h>
> > +#include <linux/reset-controller.h>
> > +#include <linux/regmap.h>
> > +#include <soc/tenstorrent/atlantis-prcm.h>
> > +
> > +struct atlantis_reset_data {
> > +     u8 bit;
> > +     u16 reg;
> > +     bool active_low;
> > +};
> > +
> > +struct atlantis_reset_controller_data {
> > +     const struct atlantis_reset_data *reset_data;
> > +     size_t count;
> > +};
> > +
> > +struct atlantis_reset_controller {
> > +     struct reset_controller_dev rcdev;
> > +     const struct atlantis_reset_controller_data *data;
> > +     struct regmap *regmap;
> > +};
> > +
> > +#define to_atlantis_reset_controller(_rcdev) \
> > +     container_of((_rcdev), struct atlantis_reset_controller, rcdev)
>
> Please make this an inline function as well. With that,
>
> Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

I've made some non-trivial changes to the reset driver in v6 based on
some comments I received in v5, so I have dropped your Rb tag.


>
> Since this patch both depends on patch 1 and is a dependency for patch
> 3, I suppose this should go through the clock tree.
>
> regards
> Philipp



More information about the linux-riscv mailing list