Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions Documentation/devicetree/bindings/clock/siflower,sf21-topcrm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/siflower,sf21-topcrm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Siflower SF21 toplevel clock and reset module

maintainers:
- Chuanhong Guo <gch981213@gmail.com>

description: |
The toplevel clock and reset module on Siflower SF21 SoCs manages
the main PLLs, high-level clock muxes/dividers/gates, and some
reset lines.
Available clocks and resets are defined in:
include/dt-bindings/clock/siflower,sf21-topcrm.h

properties:
compatible:
const: siflower,sf21-topcrm

reg:
maxItems: 1

clocks:
maxItems: 1

clock-names:
const: xin25m

"#clock-cells":
const: 1

"#reset-cells":
const: 1

required:
- compatible
- reg
- clocks
- clock-names
- "#clock-cells"
- "#reset-cells"

additionalProperties: false

examples:
- |
#include <dt-bindings/clock/siflower,sf21-topcrm.h>
/ {
#address-cells = <1>;
#size-cells = <1>;

xin25m: clock-25000000 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <25000000>;
};

clock-controller@ce00400 {
compatible = "siflower,sf21-topcrm";
reg = <0x0ce00400 0x400>;
clocks = <&xin25m>;
clock-names = "xin25m";
#clock-cells = <1>;
#reset-cells = <1>;
};
};
7 changes: 7 additions & 0 deletions arch/riscv/Kconfig.socs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ config ARCH_SIFIVE
help
This enables support for SiFive SoC platform hardware.

config ARCH_SIFLOWER
bool "Siflower RISC-V SoCs"
select ARM_AMBA if TTY
select ERRATA_THEAD
help
This enables support for Siflower RISC-V SoC platform hardware.

config ARCH_SOPHGO
bool "Sophgo SoCs"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ source "drivers/clk/renesas/Kconfig"
source "drivers/clk/rockchip/Kconfig"
source "drivers/clk/samsung/Kconfig"
source "drivers/clk/sifive/Kconfig"
source "drivers/clk/siflower/Kconfig"
source "drivers/clk/socfpga/Kconfig"
source "drivers/clk/sophgo/Kconfig"
source "drivers/clk/spacemit/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ obj-y += renesas/
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
obj-$(CONFIG_CLK_SIFIVE) += sifive/
obj-$(CONFIG_CLK_SIFLOWER) += siflower/
obj-y += socfpga/
obj-y += sophgo/
obj-y += spacemit/
Expand Down
22 changes: 22 additions & 0 deletions drivers/clk/siflower/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: GPL-2.0

menuconfig CLK_SIFLOWER
bool "Clock driver for Siflower SoCs"
depends on ARCH_SIFLOWER || COMPILE_TEST
default ARCH_SIFLOWER
help
Clock drivers for Siflower Linux-capable SoCs.

if CLK_SIFLOWER

config CLK_SF21_TOPCRM
tristate "Clock driver for Siflower SF21 toplevel clock & reset module"
depends on ARCH_SIFLOWER || COMPILE_TEST
default ARCH_SIFLOWER
select RESET_CONTROLLER
help
Supports the toplevel clock and reset module in Siflower SF21 SoCs.
If this kernel is meant to run on Siflower SF21A6826 or SF21H8898,
enable this driver.

endif
1 change: 1 addition & 0 deletions drivers/clk/siflower/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_CLK_SF21_TOPCRM) += clk-sf21-topcrm.o
Loading
Loading