[PATCH v4 0/3] Add Model for Tenstorrent Atlantis PRCM

Anirudh Srinivasan posted 3 patches 3 weeks, 1 day ago
MAINTAINERS                        |   2 +
docs/system/riscv/tt_atlantis.rst  |   1 +
hw/misc/meson.build                |   1 +
hw/misc/trace-events               |   4 +
hw/misc/tt_atlantis_prcm.c         | 428 +++++++++++++++++++++++++++++++++++++
hw/riscv/tt_atlantis.c             | 125 ++++++++++-
include/hw/misc/tt_atlantis_prcm.h |  51 +++++
include/hw/riscv/tt_atlantis.h     |  28 +++
8 files changed, 632 insertions(+), 8 deletions(-)
[PATCH v4 0/3] Add Model for Tenstorrent Atlantis PRCM
Posted by Anirudh Srinivasan 3 weeks, 1 day ago
This series adds a qemu model for the PRCM blocks present in Tenstorrent
Atlantis. This block controls clock, reset and other misc functionality
in the SoC. Linux support for the Clocks/Resets served by the RCPU PRCM
was added in [1]. This PRCM model has been tested with a linux DT that
enables the PRCM and sets the UART clk to the one provided by the PRCM.
This DT will be sent out shortly.

[1] https://lore.kernel.org/linux-riscv/20260306-atlantis-clocks-v8-0-6c9b14a4aa8e@oss.tenstorrent.com/

Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
---
Changes in v4:
- Addressed style comments from Joel's review
- Added error handling for sysbus_realize calls
- Dropped redundant realize/ops setting lines for PRCM subclasses
- Updated PRCM min_access_size to allow byte accesses
- Added back clock-frequency prop to UART node to allow linux boots without clk driver
- Added back bus clock-frequency prop to I2C node
- Link to v3: https://lore.kernel.org/qemu-devel/20260904-atlantis_prcm-v3-0-8bf20795a381@oss.tenstorrent.com

Changes in v3:
- Rebase on top of Joel's socify series v3 https://lore.kernel.org/qemu-riscv/20260903055131.257903-1-joel@jms.id.au/T/#t
- I2C and UART now use clk provided by PRCM, and periph_clk is dropped
- Addressed style edit comments from Joel (comment about clk IDs coming from DT bindings,) and Alistair (drop size from trace prints, move decalartions to top of function, use PRCM_DOMAIN enums)
- Link to v2: https://lore.kernel.org/qemu-devel/20260817-atlantis_prcm-v2-0-ffba0b944419@oss.tenstorrent.com

Changes in v2:
- Coding style edits based on Chao Liu's feedback
- Changed prcm to use Resettable inferface instead of legacy reset
- Edits requested by Daniel related to tracing, pll_en logic and unnecessary switch/case statement
- Added comments to some of the magic numbers in the reset values for PRCM registers
- Link to v1: https://lore.kernel.org/qemu-devel/20260729-atlantis_prcm-v1-0-502882933e51@oss.tenstorrent.com

---
Anirudh Srinivasan (3):
      hw/misc: Add Tenstorrent Atlantis PRCM model
      hw/riscv/tt-atlantis: Add PRCMs to tt-atlantis model
      hw/riscv/tt-atlantis: Update UART and I2C to use clk from PRCM

 MAINTAINERS                        |   2 +
 docs/system/riscv/tt_atlantis.rst  |   1 +
 hw/misc/meson.build                |   1 +
 hw/misc/trace-events               |   4 +
 hw/misc/tt_atlantis_prcm.c         | 428 +++++++++++++++++++++++++++++++++++++
 hw/riscv/tt_atlantis.c             | 125 ++++++++++-
 include/hw/misc/tt_atlantis_prcm.h |  51 +++++
 include/hw/riscv/tt_atlantis.h     |  28 +++
 8 files changed, 632 insertions(+), 8 deletions(-)
---
base-commit: b23a62773a7856299cbb3782e64968b6a92c792f
change-id: 20260727-atlantis_prcm-b642cfb37d57

Best regards,
--  
Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
Re: [PATCH v4 0/3] Add Model for Tenstorrent Atlantis PRCM
Posted by Alistair 2 weeks, 2 days ago
On Thu, 2026-10-01 at 08:52 -0500, Anirudh Srinivasan wrote:
> This series adds a qemu model for the PRCM blocks present in
> Tenstorrent
> Atlantis. This block controls clock, reset and other misc
> functionality
> in the SoC. Linux support for the Clocks/Resets served by the RCPU
> PRCM
> was added in [1]. This PRCM model has been tested with a linux DT
> that
> enables the PRCM and sets the UART clk to the one provided by the
> PRCM.
> This DT will be sent out shortly.
> 
> [1]
> https://lore.kernel.org/linux-riscv/20260306-atlantis-clocks-v8-0-6c9b14a4aa8e@oss.tenstorrent.com/
> 
> Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
> Changes in v4:
> - Addressed style comments from Joel's review
> - Added error handling for sysbus_realize calls
> - Dropped redundant realize/ops setting lines for PRCM subclasses
> - Updated PRCM min_access_size to allow byte accesses
> - Added back clock-frequency prop to UART node to allow linux boots
> without clk driver
> - Added back bus clock-frequency prop to I2C node
> - Link to v3:
> https://lore.kernel.org/qemu-devel/20260904-atlantis_prcm-v3-0-8bf20795a381@oss.tenstorrent.com
> 
> Changes in v3:
> - Rebase on top of Joel's socify series v3
> https://lore.kernel.org/qemu-riscv/20260903055131.257903-1-joel@jms.id.au/T/#t
> - I2C and UART now use clk provided by PRCM, and periph_clk is
> dropped
> - Addressed style edit comments from Joel (comment about clk IDs
> coming from DT bindings,) and Alistair (drop size from trace prints,
> move decalartions to top of function, use PRCM_DOMAIN enums)
> - Link to v2:
> https://lore.kernel.org/qemu-devel/20260817-atlantis_prcm-v2-0-ffba0b944419@oss.tenstorrent.com
> 
> Changes in v2:
> - Coding style edits based on Chao Liu's feedback
> - Changed prcm to use Resettable inferface instead of legacy reset
> - Edits requested by Daniel related to tracing, pll_en logic and
> unnecessary switch/case statement
> - Added comments to some of the magic numbers in the reset values for
> PRCM registers
> - Link to v1:
> https://lore.kernel.org/qemu-devel/20260729-atlantis_prcm-v1-0-502882933e51@oss.tenstorrent.com
> 
> ---
> Anirudh Srinivasan (3):
>       hw/misc: Add Tenstorrent Atlantis PRCM model
>       hw/riscv/tt-atlantis: Add PRCMs to tt-atlantis model
>       hw/riscv/tt-atlantis: Update UART and I2C to use clk from PRCM
> 
>  MAINTAINERS                        |   2 +
>  docs/system/riscv/tt_atlantis.rst  |   1 +
>  hw/misc/meson.build                |   1 +
>  hw/misc/trace-events               |   4 +
>  hw/misc/tt_atlantis_prcm.c         | 428
> +++++++++++++++++++++++++++++++++++++
>  hw/riscv/tt_atlantis.c             | 125 ++++++++++-
>  include/hw/misc/tt_atlantis_prcm.h |  51 +++++
>  include/hw/riscv/tt_atlantis.h     |  28 +++
>  8 files changed, 632 insertions(+), 8 deletions(-)
> ---
> base-commit: b23a62773a7856299cbb3782e64968b6a92c792f
> change-id: 20260727-atlantis_prcm-b642cfb37d57
> 
> Best regards,
> --  
> Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
>