aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Persson <lars.persson@axis.com>2016-04-04 05:23:22 -0400
committerStephen Boyd <sboyd@codeaurora.org>2016-04-15 19:00:37 -0400
commit67bad3e5ce82b9eea2428118d909b2c8b80a71cf (patch)
tree9149563f4660ecd3fa9814d1e59ca6506d73915e
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
clk: add device tree binding for Artpec-6 clock controller
Add device tree documentation for the main clock controller in the Artpec-6 SoC. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lars Persson <larper@axis.com> [sboyd@codeaurora.org: Added unit address to binding example] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--Documentation/devicetree/bindings/clock/artpec6.txt41
-rw-r--r--include/dt-bindings/clock/axis,artpec6-clkctrl.h38
2 files changed, 79 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/artpec6.txt b/Documentation/devicetree/bindings/clock/artpec6.txt
new file mode 100644
index 000000000000..dff9cdf0009c
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/artpec6.txt
@@ -0,0 +1,41 @@
1* Clock bindings for Axis ARTPEC-6 chip
2
3The bindings are based on the clock provider binding in
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6External clocks:
7----------------
8
9There are two external inputs to the main clock controller which should be
10provided using the common clock bindings.
11- "sys_refclk": External 50 Mhz oscillator (required)
12- "i2s_refclk": Alternate audio reference clock (optional).
13
14Main clock controller
15---------------------
16
17Required properties:
18- #clock-cells: Should be <1>
19 See dt-bindings/clock/axis,artpec6-clkctrl.h for the list of valid identifiers.
20- compatible: Should be "axis,artpec6-clkctrl"
21- reg: Must contain the base address and length of the system controller
22- clocks: Must contain a phandle entry for each clock in clock-names
23- clock-names: Must include the external oscillator ("sys_refclk"). Optional
24 ones are the audio reference clock ("i2s_refclk") and the audio fractional
25 dividers ("frac_clk0" and "frac_clk1").
26
27Examples:
28
29ext_clk: ext_clk {
30 #clock-cells = <0>;
31 compatible = "fixed-clock";
32 clock-frequency = <50000000>;
33};
34
35clkctrl: clkctrl@f8000000 {
36 #clock-cells = <1>;
37 compatible = "axis,artpec6-clkctrl";
38 reg = <0xf8000000 0x48>;
39 clocks = <&ext_clk>;
40 clock-names = "sys_refclk";
41};
diff --git a/include/dt-bindings/clock/axis,artpec6-clkctrl.h b/include/dt-bindings/clock/axis,artpec6-clkctrl.h
new file mode 100644
index 000000000000..f9f04dccc996
--- /dev/null
+++ b/include/dt-bindings/clock/axis,artpec6-clkctrl.h
@@ -0,0 +1,38 @@
1/*
2 * ARTPEC-6 clock controller indexes
3 *
4 * Copyright 2016 Axis Comunications AB.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef DT_BINDINGS_CLK_ARTPEC6_CLKCTRL_H
12#define DT_BINDINGS_CLK_ARTPEC6_CLKCTRL_H
13
14#define ARTPEC6_CLK_CPU 0
15#define ARTPEC6_CLK_CPU_PERIPH 1
16#define ARTPEC6_CLK_NAND_CLKA 2
17#define ARTPEC6_CLK_NAND_CLKB 3
18#define ARTPEC6_CLK_ETH_ACLK 4
19#define ARTPEC6_CLK_DMA_ACLK 5
20#define ARTPEC6_CLK_PTP_REF 6
21#define ARTPEC6_CLK_SD_PCLK 7
22#define ARTPEC6_CLK_SD_IMCLK 8
23#define ARTPEC6_CLK_I2S_HST 9
24#define ARTPEC6_CLK_I2S0_CLK 10
25#define ARTPEC6_CLK_I2S1_CLK 11
26#define ARTPEC6_CLK_UART_PCLK 12
27#define ARTPEC6_CLK_UART_REFCLK 13
28#define ARTPEC6_CLK_I2C 14
29#define ARTPEC6_CLK_SPI_PCLK 15
30#define ARTPEC6_CLK_SPI_SSPCLK 16
31#define ARTPEC6_CLK_SYS_TIMER 17
32#define ARTPEC6_CLK_FRACDIV_IN 18
33#define ARTPEC6_CLK_DBG_PCLK 19
34
35/* This must be the highest clock index plus one. */
36#define ARTPEC6_CLK_NUMCLOCKS 20
37
38#endif