aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 19:43:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 19:43:54 -0400
commit362ed48dee509abe24cf84b7e137c7a29a8f4d2d (patch)
treef2c2397afa517becf3ff3d8ac4c5c542dfed9795 /include/linux/platform_data
parent61f3d0a9883d965b498edeb673235bddc92770fd (diff)
parent1e435256d625c203660f0105f1155cd2af283051 (diff)
Merge tag 'clk-for-linus-3.10' of git://git.linaro.org/people/mturquette/linux
Pull clock framework update from Michael Turquette: "The common clock framework changes for 3.10 include many fixes for existing platforms, as well as adoption of the framework by new platforms and devices. Some long-needed fixes to the core framework are here as well as new features such as improved initialization of clocks from DT as well as framework reentrancy for nested clock operations." * tag 'clk-for-linus-3.10' of git://git.linaro.org/people/mturquette/linux: (44 commits) clk: add clk_ignore_unused option to keep boot clocks on clk: ux500: fix mismatched types clk: vexpress: Add separate SP810 driver clk: si5351: make clk-si5351 depend on CONFIG_OF clk: export __clk_get_flags for modular clock providers clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate. clk: sunxi: Unify oscillator clock clk: composite: allow fixed rates & fixed dividers clk: composite: rename 'div' references to 'rate' clk: add si5351 i2c common clock driver clk: add device tree fixed-factor-clock binding support clk: Properly handle notifier return values clk: ux500: abx500: Define clock tree for ab850x clk: ux500: Add support for sysctrl clocks clk: mvebu: Fix valid value range checking for cpu_freq_select clk: Fixup locking issues for clk_set_parent clk: Fixup errorhandling for clk_set_parent clk: Restructure code for __clk_reparent clk: sunxi: drop an unnecesary kmalloc clk: sunxi: drop CLK_IGNORE_UNUSED ...
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/si5351.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/include/linux/platform_data/si5351.h b/include/linux/platform_data/si5351.h
new file mode 100644
index 000000000000..92dabcaf6499
--- /dev/null
+++ b/include/linux/platform_data/si5351.h
@@ -0,0 +1,114 @@
1/*
2 * Si5351A/B/C programmable clock generator platform_data.
3 */
4
5#ifndef __LINUX_PLATFORM_DATA_SI5351_H__
6#define __LINUX_PLATFORM_DATA_SI5351_H__
7
8struct clk;
9
10/**
11 * enum si5351_variant - SiLabs Si5351 chip variant
12 * @SI5351_VARIANT_A: Si5351A (8 output clocks, XTAL input)
13 * @SI5351_VARIANT_A3: Si5351A MSOP10 (3 output clocks, XTAL input)
14 * @SI5351_VARIANT_B: Si5351B (8 output clocks, XTAL/VXCO input)
15 * @SI5351_VARIANT_C: Si5351C (8 output clocks, XTAL/CLKIN input)
16 */
17enum si5351_variant {
18 SI5351_VARIANT_A = 1,
19 SI5351_VARIANT_A3 = 2,
20 SI5351_VARIANT_B = 3,
21 SI5351_VARIANT_C = 4,
22};
23
24/**
25 * enum si5351_pll_src - Si5351 pll clock source
26 * @SI5351_PLL_SRC_DEFAULT: default, do not change eeprom config
27 * @SI5351_PLL_SRC_XTAL: pll source clock is XTAL input
28 * @SI5351_PLL_SRC_CLKIN: pll source clock is CLKIN input (Si5351C only)
29 */
30enum si5351_pll_src {
31 SI5351_PLL_SRC_DEFAULT = 0,
32 SI5351_PLL_SRC_XTAL = 1,
33 SI5351_PLL_SRC_CLKIN = 2,
34};
35
36/**
37 * enum si5351_multisynth_src - Si5351 multisynth clock source
38 * @SI5351_MULTISYNTH_SRC_DEFAULT: default, do not change eeprom config
39 * @SI5351_MULTISYNTH_SRC_VCO0: multisynth source clock is VCO0
40 * @SI5351_MULTISYNTH_SRC_VCO1: multisynth source clock is VCO1/VXCO
41 */
42enum si5351_multisynth_src {
43 SI5351_MULTISYNTH_SRC_DEFAULT = 0,
44 SI5351_MULTISYNTH_SRC_VCO0 = 1,
45 SI5351_MULTISYNTH_SRC_VCO1 = 2,
46};
47
48/**
49 * enum si5351_clkout_src - Si5351 clock output clock source
50 * @SI5351_CLKOUT_SRC_DEFAULT: default, do not change eeprom config
51 * @SI5351_CLKOUT_SRC_MSYNTH_N: clkout N source clock is multisynth N
52 * @SI5351_CLKOUT_SRC_MSYNTH_0_4: clkout N source clock is multisynth 0 (N<4)
53 * or 4 (N>=4)
54 * @SI5351_CLKOUT_SRC_XTAL: clkout N source clock is XTAL
55 * @SI5351_CLKOUT_SRC_CLKIN: clkout N source clock is CLKIN (Si5351C only)
56 */
57enum si5351_clkout_src {
58 SI5351_CLKOUT_SRC_DEFAULT = 0,
59 SI5351_CLKOUT_SRC_MSYNTH_N = 1,
60 SI5351_CLKOUT_SRC_MSYNTH_0_4 = 2,
61 SI5351_CLKOUT_SRC_XTAL = 3,
62 SI5351_CLKOUT_SRC_CLKIN = 4,
63};
64
65/**
66 * enum si5351_drive_strength - Si5351 clock output drive strength
67 * @SI5351_DRIVE_DEFAULT: default, do not change eeprom config
68 * @SI5351_DRIVE_2MA: 2mA clock output drive strength
69 * @SI5351_DRIVE_4MA: 4mA clock output drive strength
70 * @SI5351_DRIVE_6MA: 6mA clock output drive strength
71 * @SI5351_DRIVE_8MA: 8mA clock output drive strength
72 */
73enum si5351_drive_strength {
74 SI5351_DRIVE_DEFAULT = 0,
75 SI5351_DRIVE_2MA = 2,
76 SI5351_DRIVE_4MA = 4,
77 SI5351_DRIVE_6MA = 6,
78 SI5351_DRIVE_8MA = 8,
79};
80
81/**
82 * struct si5351_clkout_config - Si5351 clock output configuration
83 * @clkout: clkout number
84 * @multisynth_src: multisynth source clock
85 * @clkout_src: clkout source clock
86 * @pll_master: if true, clkout can also change pll rate
87 * @drive: output drive strength
88 * @rate: initial clkout rate, or default if 0
89 */
90struct si5351_clkout_config {
91 enum si5351_multisynth_src multisynth_src;
92 enum si5351_clkout_src clkout_src;
93 enum si5351_drive_strength drive;
94 bool pll_master;
95 unsigned long rate;
96};
97
98/**
99 * struct si5351_platform_data - Platform data for the Si5351 clock driver
100 * @variant: Si5351 chip variant
101 * @clk_xtal: xtal input clock
102 * @clk_clkin: clkin input clock
103 * @pll_src: array of pll source clock setting
104 * @clkout: array of clkout configuration
105 */
106struct si5351_platform_data {
107 enum si5351_variant variant;
108 struct clk *clk_xtal;
109 struct clk *clk_clkin;
110 enum si5351_pll_src pll_src[2];
111 struct si5351_clkout_config clkout[8];
112};
113
114#endif