xref: /linux/sound/pci/oxygen/cs2000.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 #ifndef CS2000_H_INCLUDED
2 #define CS2000_H_INCLUDED
3 
4 #define CS2000_DEV_ID		0x01
5 #define CS2000_DEV_CTRL		0x02
6 #define CS2000_DEV_CFG_1	0x03
7 #define CS2000_DEV_CFG_2	0x04
8 #define CS2000_GLOBAL_CFG	0x05
9 #define CS2000_RATIO_0		0x06 /* 32 bits, big endian */
10 #define CS2000_RATIO_1		0x0a
11 #define CS2000_RATIO_2		0x0e
12 #define CS2000_RATIO_3		0x12
13 #define CS2000_FUN_CFG_1	0x16
14 #define CS2000_FUN_CFG_2	0x17
15 #define CS2000_FUN_CFG_3	0x1e
16 
17 /* DEV_ID */
18 #define CS2000_DEVICE_MASK		0xf8
19 #define CS2000_REVISION_MASK		0x07
20 
21 /* DEV_CTRL */
22 #define CS2000_UNLOCK			0x80
23 #define CS2000_AUX_OUT_DIS		0x02
24 #define CS2000_CLK_OUT_DIS		0x01
25 
26 /* DEV_CFG_1 */
27 #define CS2000_R_MOD_SEL_MASK		0xe0
28 #define CS2000_R_MOD_SEL_1		0x00
29 #define CS2000_R_MOD_SEL_2		0x20
30 #define CS2000_R_MOD_SEL_4		0x40
31 #define CS2000_R_MOD_SEL_8		0x60
32 #define CS2000_R_MOD_SEL_1_2		0x80
33 #define CS2000_R_MOD_SEL_1_4		0xa0
34 #define CS2000_R_MOD_SEL_1_8		0xc0
35 #define CS2000_R_MOD_SEL_1_16		0xe0
36 #define CS2000_R_SEL_MASK		0x18
37 #define CS2000_R_SEL_SHIFT		3
38 #define CS2000_AUX_OUT_SRC_MASK		0x06
39 #define CS2000_AUX_OUT_SRC_REF_CLK	0x00
40 #define CS2000_AUX_OUT_SRC_CLK_IN	0x02
41 #define CS2000_AUX_OUT_SRC_CLK_OUT	0x04
42 #define CS2000_AUX_OUT_SRC_PLL_LOCK	0x06
43 #define CS2000_EN_DEV_CFG_1		0x01
44 
45 /* DEV_CFG_2 */
46 #define CS2000_LOCK_CLK_MASK		0x06
47 #define CS2000_LOCK_CLK_SHIFT		1
48 #define CS2000_FRAC_N_SRC_MASK		0x01
49 #define CS2000_FRAC_N_SRC_STATIC	0x00
50 #define CS2000_FRAC_N_SRC_DYNAMIC	0x01
51 
52 /* GLOBAL_CFG */
53 #define CS2000_FREEZE			0x08
54 #define CS2000_EN_DEV_CFG_2		0x01
55 
56 /* FUN_CFG_1 */
57 #define CS2000_CLK_SKIP_EN		0x80
58 #define CS2000_AUX_LOCK_CFG_MASK	0x40
59 #define CS2000_AUX_LOCK_CFG_PP_HIGH	0x00
60 #define CS2000_AUX_LOCK_CFG_OD_LOW	0x40
61 #define CS2000_REF_CLK_DIV_MASK		0x18
62 #define CS2000_REF_CLK_DIV_4		0x00
63 #define CS2000_REF_CLK_DIV_2		0x08
64 #define CS2000_REF_CLK_DIV_1		0x10
65 
66 /* FUN_CFG_2 */
67 #define CS2000_CLK_OUT_UNL		0x10
68 #define CS2000_L_F_RATIO_CFG_MASK	0x08
69 #define CS2000_L_F_RATIO_CFG_20_12	0x00
70 #define CS2000_L_F_RATIO_CFG_12_20	0x08
71 
72 /* FUN_CFG_3 */
73 #define CS2000_CLK_IN_BW_MASK		0x70
74 #define CS2000_CLK_IN_BW_1		0x00
75 #define CS2000_CLK_IN_BW_2		0x10
76 #define CS2000_CLK_IN_BW_4		0x20
77 #define CS2000_CLK_IN_BW_8		0x30
78 #define CS2000_CLK_IN_BW_16		0x40
79 #define CS2000_CLK_IN_BW_32		0x50
80 #define CS2000_CLK_IN_BW_64		0x60
81 #define CS2000_CLK_IN_BW_128		0x70
82 
83 #endif
84