Skip to content

Commit

Permalink
Merge branch 'clk-sunxi-ng' into clk-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Turquette committed Jul 9, 2016
2 parents a064982 + 0577e48 commit 7adb769
Show file tree
Hide file tree
Showing 34 changed files with 3,669 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/clock/sunxi-ccu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Allwinner Clock Control Unit Binding
------------------------------------

Required properties :
- compatible: must contain one of the following compatible:
- "allwinner,sun8i-h3-ccu"

- reg: Must contain the registers base address and length
- clocks: phandle to the oscillators feeding the CCU. Two are needed:
- "hosc": the high frequency oscillator (usually at 24MHz)
- "losc": the low frequency oscillator (usually at 32kHz)
- clock-names: Must contain the clock names described just above
- #clock-cells : must contain 1
- #reset-cells : must contain 1

Example:
ccu: clock@01c20000 {
compatible = "allwinner,sun8i-h3-ccu";
reg = <0x01c20000 0x400>;
clocks = <&osc24M>, <&osc32k>;
clock-names = "hosc", "losc";
#clock-cells = <1>;
#reset-cells = <1>;
};
1 change: 1 addition & 0 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ source "drivers/clk/mvebu/Kconfig"
source "drivers/clk/qcom/Kconfig"
source "drivers/clk/renesas/Kconfig"
source "drivers/clk/samsung/Kconfig"
source "drivers/clk/sunxi-ng/Kconfig"
source "drivers/clk/tegra/Kconfig"
source "drivers/clk/ti/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/
obj-$(CONFIG_PLAT_SPEAR) += spear/
obj-$(CONFIG_ARCH_STI) += st/
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
obj-$(CONFIG_ARCH_SUNXI) += sunxi-ng/
obj-$(CONFIG_ARCH_TEGRA) += tegra/
obj-y += ti/
obj-$(CONFIG_ARCH_U8500) += ux500/
Expand Down
65 changes: 65 additions & 0 deletions drivers/clk/sunxi-ng/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
config SUNXI_CCU
bool "Clock support for Allwinner SoCs"
default ARCH_SUNXI

if SUNXI_CCU

# Base clock types

config SUNXI_CCU_DIV
bool
select SUNXI_CCU_MUX

config SUNXI_CCU_FRAC
bool

config SUNXI_CCU_GATE
bool

config SUNXI_CCU_MUX
bool

config SUNXI_CCU_PHASE
bool

# Multi-factor clocks

config SUNXI_CCU_NK
bool
select SUNXI_CCU_GATE

config SUNXI_CCU_NKM
bool
select RATIONAL
select SUNXI_CCU_GATE

config SUNXI_CCU_NKMP
bool
select RATIONAL
select SUNXI_CCU_GATE

config SUNXI_CCU_NM
bool
select RATIONAL
select SUNXI_CCU_FRAC
select SUNXI_CCU_GATE

config SUNXI_CCU_MP
bool
select SUNXI_CCU_GATE
select SUNXI_CCU_MUX

# SoC Drivers

config SUN8I_H3_CCU
bool "Support for the Allwinner H3 CCU"
select SUNXI_CCU_DIV
select SUNXI_CCU_NK
select SUNXI_CCU_NKM
select SUNXI_CCU_NKMP
select SUNXI_CCU_NM
select SUNXI_CCU_MP
select SUNXI_CCU_PHASE
default ARCH_SUN8I

endif
20 changes: 20 additions & 0 deletions drivers/clk/sunxi-ng/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Common objects
obj-$(CONFIG_SUNXI_CCU) += ccu_common.o
obj-$(CONFIG_SUNXI_CCU) += ccu_reset.o

# Base clock types
obj-$(CONFIG_SUNXI_CCU_DIV) += ccu_div.o
obj-$(CONFIG_SUNXI_CCU_FRAC) += ccu_frac.o
obj-$(CONFIG_SUNXI_CCU_GATE) += ccu_gate.o
obj-$(CONFIG_SUNXI_CCU_MUX) += ccu_mux.o
obj-$(CONFIG_SUNXI_CCU_PHASE) += ccu_phase.o

# Multi-factor clocks
obj-$(CONFIG_SUNXI_CCU_NK) += ccu_nk.o
obj-$(CONFIG_SUNXI_CCU_NKM) += ccu_nkm.o
obj-$(CONFIG_SUNXI_CCU_NKMP) += ccu_nkmp.o
obj-$(CONFIG_SUNXI_CCU_NM) += ccu_nm.o
obj-$(CONFIG_SUNXI_CCU_MP) += ccu_mp.o

# SoC support
obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
Loading

0 comments on commit 7adb769

Please sign in to comment.