1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * clk-synthesizer.h
4  *
5  * Clock synthesizer header
6  *
7  * Copyright (C) 2016, Texas Instruments, Incorporated - http://www.ti.com/
8  */
9 
10 #ifndef __CLK_SYNTHESIZER_H
11 #define __CLK_SYNTHESIZER_H
12 
13 #include <common.h>
14 
15 #define CLK_SYNTHESIZER_ID_REG		0x0
16 #define CLK_SYNTHESIZER_XCSEL		0x05
17 #define CLK_SYNTHESIZER_MUX_REG		0x14
18 #define CLK_SYNTHESIZER_PDIV2_REG	0x16
19 #define CLK_SYNTHESIZER_PDIV3_REG	0x17
20 
21 #define CLK_SYNTHESIZER_BYTE_MODE	0x80
22 
23 /**
24  * struct clk_synth: This structure holds data neeed for configuring
25  *		     for clock synthesizer.
26  * @id: The id of synthesizer
27  * @capacitor: value of the capacitor attached
28  * @mux: mux settings.
29  * @pdiv2: Div to be applied to second output
30  * @pdiv3: Div to be applied to third output
31  */
32 struct clk_synth {
33 	u32 id;
34 	u32 capacitor;
35 	u32 mux;
36 	u32 pdiv2;
37 	u32 pdiv3;
38 };
39 
40 int setup_clock_synthesizer(struct clk_synth *data);
41 
42 #endif
43