Skip to content

Commit 48cf7e0

Browse files
committed
clk: sophgo: Add SG2042 clock driver
Add a driver for the SOPHGO SG2042 clocks. Signed-off-by: Chen Wang <[email protected]>
1 parent 5911423 commit 48cf7e0

File tree

6 files changed

+2063
-0
lines changed

6 files changed

+2063
-0
lines changed

drivers/clk/sophgo/Kconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,31 @@ config CLK_SOPHGO_CV1800
99
The driver require a 25MHz Oscillator to function generate clock.
1010
It includes PLLs, common clock function and some vendor clock for
1111
IPs of CV18XX series SoC
12+
13+
config CLK_SOPHGO_SG2042_PLL
14+
tristate "Sophgo SG2042 PLL clock support"
15+
depends on ARCH_SOPHGO || COMPILE_TEST
16+
help
17+
This driver supports the PLL clock controller on the
18+
Sophgo SG2042 SoC. This clock IP uses three oscillators with
19+
frequency of 25 MHz as input, which are used for Main/Fixed
20+
PLL, DDR PLL 0 and DDR PLL 1 respectively.
21+
22+
config CLK_SOPHGO_SG2042_CLKGEN
23+
tristate "Sophgo SG2042 Clock Generator support"
24+
depends on CLK_SOPHGO_SG2042_PLL
25+
help
26+
This driver supports the Clock Generator on the
27+
Sophgo SG2042 SoC. This clock IP depends on SG2042 PLL clock
28+
because it uses PLL clocks as input.
29+
This driver provides clock function such as DIV/Mux/Gate.
30+
31+
config CLK_SOPHGO_SG2042_RPGATE
32+
tristate "Sophgo SG2042 RP subsystem clock controller support"
33+
depends on CLK_SOPHGO_SG2042_CLKGEN
34+
help
35+
This driver supports the RP((Riscv Processors)) subsystem clock
36+
controller on the Sophgo SG2042 SoC.
37+
This clock IP depends on SG2042 Clock Generator because it uses
38+
clock from Clock Generator IP as input.
39+
This driver provides Gate function for RP.

drivers/clk/sophgo/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ clk-sophgo-cv1800-y += clk-cv1800.o
55
clk-sophgo-cv1800-y += clk-cv18xx-common.o
66
clk-sophgo-cv1800-y += clk-cv18xx-ip.o
77
clk-sophgo-cv1800-y += clk-cv18xx-pll.o
8+
9+
obj-$(CONFIG_CLK_SOPHGO_SG2042_CLKGEN) += clk-sg2042-clkgen.o
10+
obj-$(CONFIG_CLK_SOPHGO_SG2042_PLL) += clk-sg2042-pll.o
11+
obj-$(CONFIG_CLK_SOPHGO_SG2042_RPGATE) += clk-sg2042-rpgate.o

0 commit comments

Comments
 (0)