Skip to content
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/clock/eswin,eic7700-clock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/eswin,eic7700-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Eswin EIC7700 SoC clock controller

maintainers:
- Yifeng Huang <huangyifeng@eswincomputing.com>
- Xuyang Dong <dongxuyang@eswincomputing.com>

description:
The clock controller generates and supplies clock to all the modules
for eic7700 SoC.

properties:
compatible:
const: eswin,eic7700-clock

reg:
maxItems: 1

clocks:
items:
- description: External 24MHz oscillator clock

'#clock-cells':
const: 1

required:
- compatible
- reg
- clocks
- '#clock-cells'

additionalProperties: false

examples:
- |
clock-controller@51828000 {
compatible = "eswin,eic7700-clock";
reg = <0x51828000 0x300>;
clocks = <&xtal24m>;
#clock-cells = <1>;
};
63 changes: 63 additions & 0 deletions Documentation/devicetree/bindings/clock/eswin,eic7700-hspcrg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/eswin,eic7700-hspcrg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ESWIN EIC7700 HSP Clock and Reset Generator

maintainers:
- Xuyang Dong <dongxuyang@eswincomputing.com>

description:
Clock and reset generator for the ESWIN EIC7700 HSP (high-speed peripherals).

properties:
compatible:
const: eswin,eic7700-hspcrg

reg:
maxItems: 1

clocks:
items:
- description: HSP configuration top clock
- description: MMC top clock
- description: SATA top clock

clock-names:
items:
- const: hsp_cfg
- const: hsp_mmc
- const: hsp_usb_sata

'#clock-cells':
const: 1
description:
See <dt-bindings/clock/eswin,eic7700-hspcrg.h> for valid indices.

'#reset-cells':
const: 1
description:
See <dt-bindings/reset/eswin,eic7700-hspcrg.h> for valid indices.

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

additionalProperties: false

examples:
- |
clock-controller@50440000 {
compatible = "eswin,eic7700-hspcrg";
reg = <0x50440000 0x2000>;
clocks = <&clock 171>, <&clock 254>, <&clock 187>;
clock-names = "hsp_cfg", "hsp_mmc", "hsp_usb_sata";
#clock-cells = <1>;
#reset-cells = <1>;
};
11 changes: 11 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9372,6 +9372,17 @@ T: git https://github.com/eswincomputing/linux-next.git
F: Documentation/devicetree/bindings/riscv/eswin.yaml
F: arch/riscv/boot/dts/eswin/

ESWIN EIC7700 CLOCK DRIVER
M: Yifeng Huang <huangyifeng@eswincomputing.com>
M: Xuyang Dong <dongxuyang@eswincomputing.com>
S: Maintained
F: Documentation/devicetree/bindings/clock/eswin,eic7700-clock.yaml
F: Documentation/devicetree/bindings/clock/eswin,eic7700-hspcrg.yaml
F: drivers/clk/eswin/
F: include/dt-bindings/clock/eswin,eic7700-clock.h
F: include/dt-bindings/clock/eswin,eic7700-hspcrg.h
F: include/dt-bindings/reset/eswin,eic7700-hspcrg.h

ET131X NETWORK DRIVER
M: Mark Einon <mark.einon@gmail.com>
S: Odd Fixes
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ source "drivers/clk/actions/Kconfig"
source "drivers/clk/analogbits/Kconfig"
source "drivers/clk/baikal-t1/Kconfig"
source "drivers/clk/bcm/Kconfig"
source "drivers/clk/eswin/Kconfig"
source "drivers/clk/hisilicon/Kconfig"
source "drivers/clk/imgtec/Kconfig"
source "drivers/clk/imx/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ obj-$(CONFIG_CLK_BAIKAL_T1) += baikal-t1/
obj-y += bcm/
obj-$(CONFIG_ARCH_BERLIN) += berlin/
obj-$(CONFIG_ARCH_DAVINCI) += davinci/
obj-$(CONFIG_COMMON_CLK_ESWIN) += eswin/
obj-$(CONFIG_ARCH_HISI) += hisilicon/
obj-y += imgtec/
obj-y += imx/
Expand Down
27 changes: 27 additions & 0 deletions drivers/clk/eswin/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-2.0

config COMMON_CLK_ESWIN
bool

config COMMON_CLK_EIC7700
tristate "EIC7700 Clock Driver"
depends on ARCH_ESWIN || COMPILE_TEST
select COMMON_CLK_ESWIN
default ARCH_ESWIN
help
This driver provides support for clock controller on ESWIN EIC7700
SoC. The clock controller generates and supplies clocks to various
peripherals within the SoC.
Say yes here to support the clock controller on the EIC7700 SoC.

config COMMON_CLK_EIC7700_HSP
tristate "EIC7700 HSP Clock Driver"
depends on ARCH_ESWIN || COMPILE_TEST
select AUXILIARY_BUS
select COMMON_CLK_EIC7700
select RESET_EIC7700_HSP if RESET_CONTROLLER
help
This driver provides support for clock controller on ESWIN EIC7700
HSP. The clock controller generates and supplies clocks to high
speed peripherals within the SoC.
Say yes here to support the clock controller on the EIC7700 HSP.
9 changes: 9 additions & 0 deletions drivers/clk/eswin/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
#
# Eswin Clock specific Makefile
#

obj-$(CONFIG_COMMON_CLK_ESWIN) += clk.o

obj-$(CONFIG_COMMON_CLK_EIC7700) += clk-eic7700.o
obj-$(CONFIG_COMMON_CLK_EIC7700_HSP) += clk-eic7700-hsp.o
Loading