Skip to content

Commit 23c8ebc

Browse files
Anirudh Srinivasanpdp7
authored andcommitted
clk: tenstorrent: Add Atlantis clock controller driver
Add driver for clock controller in Tenstorrent Atlantis SoC. This version of the driver covers clocks from RCPU subsystem. 5 types of clocks generated by this controller: PLLs (PLLs with bypass functionality and an additional Gate clk at output), Shared Gates (Multiple Gate clks that share an enable bit), standard Muxes, Dividers and Gates. All clocks are implemented using custom clk ops and use the regmap interface associated with the syscon. All clocks are derived from a 24 Mhz oscillator. The reset controller is also setup as an auxiliary device of the clock controller. Signed-off-by: Anirudh Srinivasan <[email protected]> Reviewed-by: Brian Masney <[email protected]> Reviewed-by: Drew Fustini <[email protected]> Signed-off-by: Drew Fustini <[email protected]>
1 parent 89b23af commit 23c8ebc

6 files changed

Lines changed: 890 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22812,6 +22812,7 @@ T: git https://github.com/tenstorrent/linux.git
2281222812
F: Documentation/devicetree/bindings/clock/tenstorrent,atlantis-prcm-rcpu.yaml
2281322813
F: Documentation/devicetree/bindings/riscv/tenstorrent.yaml
2281422814
F: arch/riscv/boot/dts/tenstorrent/
22815+
F: drivers/clk/tenstorrent/
2281522816
F: drivers/reset/reset-tenstorrent-atlantis.c
2281622817
F: include/dt-bindings/clock/tenstorrent,atlantis-prcm-rcpu.h
2281722818

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ source "drivers/clk/starfive/Kconfig"
531531
source "drivers/clk/sunxi/Kconfig"
532532
source "drivers/clk/sunxi-ng/Kconfig"
533533
source "drivers/clk/tegra/Kconfig"
534+
source "drivers/clk/tenstorrent/Kconfig"
534535
source "drivers/clk/thead/Kconfig"
535536
source "drivers/clk/stm32/Kconfig"
536537
source "drivers/clk/ti/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ obj-y += starfive/
155155
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
156156
obj-y += sunxi-ng/
157157
obj-$(CONFIG_ARCH_TEGRA) += tegra/
158+
obj-y += tenstorrent/
158159
obj-$(CONFIG_ARCH_THEAD) += thead/
159160
obj-y += ti/
160161
obj-$(CONFIG_CLK_UNIPHIER) += uniphier/

drivers/clk/tenstorrent/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
config TENSTORRENT_ATLANTIS_PRCM
4+
tristate "Support for Tenstorrent Atlantis PRCM Clock Controller"
5+
depends on ARCH_TENSTORRENT || COMPILE_TEST
6+
default ARCH_TENSTORRENT
7+
select REGMAP_MMIO
8+
select AUXILIARY_BUS
9+
select MFD_SYSCON
10+
help
11+
Say yes here to support the different clock
12+
controllers found in the Tenstorrent Atlantis SoC.
13+
This includes the clocks from the RCPU, HSIO, MMIO
14+
and PCIE domain.

drivers/clk/tenstorrent/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_TENSTORRENT_ATLANTIS_PRCM) += atlantis-prcm.o

0 commit comments

Comments
 (0)