Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lars Persson and committed by
Stephen Boyd
67bad3e5 f55532a0

+79
+41
Documentation/devicetree/bindings/clock/artpec6.txt
··· 1 + * Clock bindings for Axis ARTPEC-6 chip 2 + 3 + The bindings are based on the clock provider binding in 4 + Documentation/devicetree/bindings/clock/clock-bindings.txt 5 + 6 + External clocks: 7 + ---------------- 8 + 9 + There are two external inputs to the main clock controller which should be 10 + provided using the common clock bindings. 11 + - "sys_refclk": External 50 Mhz oscillator (required) 12 + - "i2s_refclk": Alternate audio reference clock (optional). 13 + 14 + Main clock controller 15 + --------------------- 16 + 17 + Required 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 + 27 + Examples: 28 + 29 + ext_clk: ext_clk { 30 + #clock-cells = <0>; 31 + compatible = "fixed-clock"; 32 + clock-frequency = <50000000>; 33 + }; 34 + 35 + clkctrl: 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 + };
+38
include/dt-bindings/clock/axis,artpec6-clkctrl.h
··· 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