Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/fmcomms1/AD9548/AD9548_cfg.h

raw symbols SCIP
1 /***************************************************************************//**
2 * @file AD9548_cfg.h
3 * @brief Header file of AD9548 Driver Configuration.
4 * @author DBogdan ([email protected])
5 ********************************************************************************
6 * Copyright 2012(c) Analog Devices, Inc.
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 * - Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * - Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 * - The use of this software may or may not infringe the patent rights
22 * of one or more patent holders. This license does not release you
23 * from the requirement that you obtain separate licenses from these
24 * patent holders to use this software.
25 * - Use of the software either in source or binary form, must be run
26 * on or directly connected to an Analog Devices Inc. component.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 ********************************************************************************
40 * SVN Revision: $WCREV$
41 *******************************************************************************/
42 #ifndef __AD9548_CFG_H__
43 #define __AD9548_CFG_H__
44
45 #define AD9548_SPI_3_WIRE 1
46
47 struct ad9548_reference_spec ad9548_references[] =
48 {
49 { //Ref A
50 0, //ref_num
51 30000000, //ref_freq
52 0, //power_down_en
53 0x00, //logic_family
54 1, //manual_profile_en
55 0, //manual_profile
56 }
57 };
58
59 struct ad9548_channel_spec ad9548_channels[] =
60 {
61 {
62 0, //channel_num
63 0x03, //channel_divider
64 0, //output_dis
65 0, //low_power_mode_en
66 0, //low_power_sync_en
67 0x04, //driver_mode
68 0, //cmos_mode_phase_invert
69 0, //polarity_invert_en
70 0, //drive_strength
71 0, //sync_ignore_en
72 "CH0_OUTPUT" //extended_name
73 },
74 {
75 1, //channel_num
76 0x00, //channel_divider
77 0, //output_dis
78 0, //low_power_mode_en
79 0, //low_power_sync_en
80 0x00, //driver_mode
81 0, //cmos_mode_phase_invert
82 0, //polarity_invert_en
83 1, //drive_strength
84 0, //sync_ignore_en
85 "CH1_OUTPUT" //extended_name
86 }
87 };
88
89 struct ad9548_platform_data ad9548_pdata_lpc =
90 {
91 /* System clock settings */
92 0, //sys_clk_ext_loop_filter_en
93 0, //sys_clk_charge_pump_manual_mode_en
94 0, //sys_clk_pll_lock_detect_timer_dis
95 0x03, //sys_clk_charge_pump_current
96 0x00, //sys_clk_pll_lock_detect_timer
97 0x28, //sys_clk_fedback_div
98 0, //sys_clk_m_div
99 0, //sys_clk_2x_mul_en
100 1, //sys_clk_pll_en
101 1, //sys_clk_source
102 0x13de43, //sys_clk_period
103 0x000001, //sys_clk_stability
104
105 /* DPLL Setting */
106 0x29, //dpll_tunning_word0
107 0x5c, //dpll_tunning_word1
108 0x8f, //dpll_tunning_word2
109 0xc2, //dpll_tunning_word3
110 0xf5, //dpll_tunning_word4
111 0x28, //dpll_tunning_word5
112 0x000000, //dpll_pull_in_range_limit_low
113 0xffffff, //dpll_pull_in_range_limit_high
114 0x00, //dpll_dds_phase_offset
115 0x0000, //dpll_closed_loop_phase_lock_offset_low
116 0x0000, //dpll_closed_loop_phase_lock_offset_high
117 0x03e8, //dpll_incremental_phase_lock_offset
118 0x0000, //dpll_phase_slew_limit
119 0x7530, //dpll_history_acc_timer
120 0x00, //dpll_history_mode
121 120000000, //dpll_out_freq
122
123 /* Clock distribution synchronization */
124 0, //clock_distr_ext_resistor
125 0, //clock_distr_high_freq_mode
126 0x00, //clock_distr_sync_source
127 0x02, //clock_distr_automatic_sync_mode
128
129 /* General settings */
130 0x00, //watchdog_timer
131 0x1ff, //aux_dac_full_scale_current
132 0, //aux_dac_shutdown
133 0x01, //ref_profile_sel_ssm_startup
134
135 /* Output Channel Configuration */
136 2, //num_channels
137 ad9548_channels, //channels
138
139 /* Reference inputs */
140 1, //num_references
141 ad9548_references, //references
142
143 /* Reference profiles */
144 0, //num_ref_profiles
145 0, //ref_profiles
146
147 "ad9548-lpc" //name
148 };
149
150 static const uint16_t ad9548_profiles[][2] = {
151 {0x0600, 0x00}, /* Profiles are 0x0600-0x07FF */
152 {0x0601, 0x55}, /* Profile 0 */
153 {0x0602, 0xA0}, /* 30MHz input from FPGA, 122.880MHz output clock */
154 {0x0603, 0xFC},
155 {0x0604, 0x01},
156 {0x0605, 0x00},
157 {0x0606, 0x00},
158 {0x0607, 0x00},
159 {0x0608, 0xE8},
160 {0x0609, 0x03},
161 {0x060A, 0x00},
162 {0x060B, 0xE8},
163 {0x060C, 0x03},
164 {0x060D, 0x00},
165 {0x060E, 0x88},
166 {0x060F, 0x13},
167 {0x0610, 0x88},
168 {0x0611, 0x13},
169 {0x0612, 0x0E},
170 {0x0613, 0xB2},
171 {0x0614, 0x08},
172 {0x0615, 0x82},
173 {0x0616, 0x62},
174 {0x0617, 0x42},
175 {0x0618, 0xD8},
176 {0x0619, 0x47},
177 {0x061A, 0x21},
178 {0x061B, 0xCB},
179 {0x061C, 0xC4},
180 {0x061D, 0x05},
181 {0x061E, 0x7F},
182 {0x061F, 0x00},
183 {0x0620, 0x00},
184 {0x0621, 0x00},
185 {0x0622, 0x0B},
186 {0x0623, 0x02},
187 {0x0624, 0x00},
188 {0x0625, 0x00},
189 {0x0626, 0x26},
190 {0x0627, 0xB0},
191 {0x0628, 0x00},
192 {0x0629, 0x10},
193 {0x062A, 0x27},
194 {0x062B, 0x20},
195 {0x062C, 0x44},
196 {0x062D, 0xF4},
197 {0x062E, 0x01},
198 {0x062F, 0x00},
199 {0x0630, 0x20},
200 {0x0631, 0x44},
201 };
202
203 #endif // __AD9548_CFG_H__