openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
cdce906.h
Go to the documentation of this file.
1/*
2 * openMMC -- Open Source modular IPM Controller firmware
3 *
4 * Copyright (C) 2021 Augusto Fraga Giachero <augusto.fraga@cnpem.br>
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 as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
20 */
21
31#ifndef CDCE906_H_
32#define CDCE906_H_
33
34#include <stdint.h>
35
43
48
53
60
67
76
83
90
100
111
130
131typedef struct {
133 uint16_t pll_div_m[3];
134 uint16_t pll_div_n[3];
135 enum cdce906_pll_vco_mux pll_vco_mux[3];
136 enum cdce906_pll_fvco pll_fvco[3];
141 enum cdce906_px_pll_sel pll_sel[6];
142 uint8_t p_div[6];
143 enum cdce906_yx_slew_cfg y_slew[6];
144 enum cdce906_yx_px_sel y_p_sel[6];
145 enum cdce906_yx_out_cfg y_out[6];
147
156int cdce906_read_cfg(uint8_t chip_id, cdce906_cfg* cfg);
157
166int cdce906_write_cfg(uint8_t chip_id, const cdce906_cfg* cfg);
167
175int cdce906_write_eeprom(uint8_t chip_id);
176
177#endif
cdce906_s1_cfg
Definition cdce906.h:61
@ CDCE906_S1_CFG_I2C_ADDR
Definition cdce906.h:64
@ CDCE906_S1_CFG_Yx_TRISTATE_CTRL
Definition cdce906.h:63
@ CDCE906_S1_CFG_Yx_FIXED_OUTPUT_CTRL
Definition cdce906.h:62
@ CDCE906_S1_CFG_INVALID
Definition cdce906.h:65
cdce906_pll_fvco
Definition cdce906.h:49
@ CDCE906_PLL_FVCO_80_200MHZ
Definition cdce906.h:50
@ CDCE906_PLL_FVCO_180_300MHZ
Definition cdce906.h:51
cdce906_pll_vco_mux
Definition cdce906.h:44
@ CDCE906_PLL_VCO_MUX_VCO
Definition cdce906.h:46
@ CDCE906_PLL_VCO_MUX_PLL
Definition cdce906.h:45
cdce906_yx_px_sel
Definition cdce906.h:91
@ CDCE906_Yx_Px_SEL_P5
Definition cdce906.h:97
@ CDCE906_Yx_Px_SEL_P1
Definition cdce906.h:93
@ CDCE906_Yx_Px_SEL_P3
Definition cdce906.h:95
@ CDCE906_Yx_Px_SEL_P2
Definition cdce906.h:94
@ CDCE906_Yx_Px_SEL_INVALID
Definition cdce906.h:98
@ CDCE906_Yx_Px_SEL_P4
Definition cdce906.h:96
@ CDCE906_Yx_Px_SEL_P0
Definition cdce906.h:92
cdce906_clk_src
Definition cdce906.h:36
@ CDCE906_CLK_SRC_CRYSTAL
Definition cdce906.h:37
@ CDCE906_CLK_SRC_INVALID
Definition cdce906.h:41
@ CDCE906_CLK_SRC_CLKIN1_LVCMOS
Definition cdce906.h:39
@ CDCE906_CLK_SRC_CLKIN_DIFF
Definition cdce906.h:40
@ CDCE906_CLK_SRC_CLKIN0_LVCMOS
Definition cdce906.h:38
int cdce906_write_cfg(uint8_t chip_id, const cdce906_cfg *cfg)
Write the CDCE906 configuration.
Definition cdce906.c:600
int cdce906_read_cfg(uint8_t chip_id, cdce906_cfg *cfg)
Read the current CDCE906 configuration.
Definition cdce906.c:564
cdce906_yx_slew_cfg
Definition cdce906.h:84
@ CDCE906_Yx_SLEW_CFG_NOMINAL_2NS
Definition cdce906.h:87
@ CDCE906_Yx_SLEW_CFG_NOMINAL_1NS
Definition cdce906.h:86
@ CDCE906_Yx_SLEW_CFG_NOMINAL
Definition cdce906.h:85
@ CDCE906_Yx_SLEW_CFG_NOMINAL_3NS
Definition cdce906.h:88
cdce906_ssc_mod_amount
Definition cdce906.h:101
@ CDCE906_SSC_MOD_AMOUNT_2P0_DOWN
Definition cdce906.h:108
@ CDCE906_SSC_MOD_AMOUNT_3P0_DOWN
Definition cdce906.h:109
@ CDCE906_SSC_MOD_AMOUNT_0P4_CENTER
Definition cdce906.h:105
@ CDCE906_SSC_MOD_AMOUNT_1P0_DOWN
Definition cdce906.h:106
@ CDCE906_SSC_MOD_AMOUNT_1P5_DOWN
Definition cdce906.h:107
@ CDCE906_SSC_MOD_AMOUNT_0P1_CENTER
Definition cdce906.h:103
@ CDCE906_SSC_MOD_AMOUNT_0P25_CENTER
Definition cdce906.h:104
@ CDCE906_SSC_MOD_AMOUNT_OFF
Definition cdce906.h:102
cdce906_s0_cfg
Definition cdce906.h:54
@ CDCE906_S0_CFG_CLKSEL_CTRL
Definition cdce906.h:57
@ CDCE906_S0_CFG_PLL_DIV_BYPASS_CTRL
Definition cdce906.h:56
@ CDCE906_S0_CFG_POWER_DOWN_CTRL
Definition cdce906.h:55
@ CDCE906_S0_CFG_I2C_ADDR
Definition cdce906.h:58
cdce906_ssc_mod_freq
Definition cdce906.h:112
@ CDCE906_SSC_MOD_FREQ_2464
Definition cdce906.h:125
@ CDCE906_SSC_MOD_FREQ_4608
Definition cdce906.h:117
@ CDCE906_SSC_MOD_FREQ_5680
Definition cdce906.h:113
@ CDCE906_SSC_MOD_FREQ_1660
Definition cdce906.h:128
@ CDCE906_SSC_MOD_FREQ_2196
Definition cdce906.h:126
@ CDCE906_SSC_MOD_FREQ_4340
Definition cdce906.h:118
@ CDCE906_SSC_MOD_FREQ_5144
Definition cdce906.h:115
@ CDCE906_SSC_MOD_FREQ_3804
Definition cdce906.h:120
@ CDCE906_SSC_MOD_FREQ_3286
Definition cdce906.h:122
@ CDCE906_SSC_MOD_FREQ_4876
Definition cdce906.h:116
@ CDCE906_SSC_MOD_FREQ_5412
Definition cdce906.h:114
@ CDCE906_SSC_MOD_FREQ_1928
Definition cdce906.h:127
@ CDCE906_SSC_MOD_FREQ_3000
Definition cdce906.h:123
@ CDCE906_SSC_MOD_FREQ_2732
Definition cdce906.h:124
@ CDCE906_SSC_MOD_FREQ_3536
Definition cdce906.h:121
@ CDCE906_SSC_MOD_FREQ_4072
Definition cdce906.h:119
cdce906_yx_out_cfg
Definition cdce906.h:77
@ CDCE906_Yx_OUT_CFG_DIS_HIGH
Definition cdce906.h:81
@ CDCE906_Yx_OUT_CFG_EN
Definition cdce906.h:78
@ CDCE906_Yx_OUT_CFG_EN_INV
Definition cdce906.h:79
@ CDCE906_Yx_OUT_CFG_DIS_LOW
Definition cdce906.h:80
cdce906_px_pll_sel
Definition cdce906.h:68
@ CDCE906_Px_PLL_SEL_PLL1
Definition cdce906.h:70
@ CDCE906_Px_PLL_SEL_PLL2_SSC
Definition cdce906.h:72
@ CDCE906_Px_PLL_SEL_PLL2
Definition cdce906.h:71
@ CDCE906_Px_PLL_SEL_PLL3
Definition cdce906.h:73
@ CDCE906_Px_PLL_SEL_INVALID
Definition cdce906.h:74
@ CDCE906_Px_PLL_SEL_BYPASS
Definition cdce906.h:69
int cdce906_write_eeprom(uint8_t chip_id)
Save the current CDCE906 configuration to internal eeprom.
Definition cdce906.c:668
Definition cdce906.h:131
enum cdce906_s1_cfg s1_cfg
Definition cdce906.h:140
enum cdce906_ssc_mod_freq ssc_mod_freq
Definition cdce906.h:138
enum cdce906_clk_src clksrc
Definition cdce906.h:132
enum cdce906_ssc_mod_amount ssc_mod_amount
Definition cdce906.h:137
enum cdce906_s0_cfg s0_cfg
Definition cdce906.h:139