xref: /openbmc/linux/drivers/media/i2c/max2175.h (revision 59d8bf5d)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Maxim Integrated MAX2175 RF to Bits tuner driver
4  *
5  * This driver & most of the hard coded values are based on the reference
6  * application delivered by Maxim for this device.
7  *
8  * Copyright (C) 2016 Maxim Integrated Products
9  * Copyright (C) 2017 Renesas Electronics Corporation
10  */
11 
12 #ifndef __MAX2175_H__
13 #define __MAX2175_H__
14 
15 #define MAX2175_EU_XTAL_FREQ	36864000	/* In Hz */
16 #define MAX2175_NA_XTAL_FREQ	40186125	/* In Hz */
17 
18 enum max2175_region {
19 	MAX2175_REGION_EU = 0,	/* Europe */
20 	MAX2175_REGION_NA,	/* North America */
21 };
22 
23 enum max2175_band {
24 	MAX2175_BAND_AM = 0,
25 	MAX2175_BAND_FM,
26 	MAX2175_BAND_VHF,
27 	MAX2175_BAND_L,
28 };
29 
30 enum max2175_eu_mode {
31 	/* EU modes */
32 	MAX2175_EU_FM_1_2 = 0,
33 	MAX2175_DAB_1_2,
34 
35 	/*
36 	 * Other possible modes to add in future
37 	 * MAX2175_DAB_1_0,
38 	 * MAX2175_DAB_1_3,
39 	 * MAX2175_EU_FM_2_2,
40 	 * MAX2175_EU_FMHD_4_0,
41 	 * MAX2175_EU_AM_1_0,
42 	 * MAX2175_EU_AM_2_2,
43 	 */
44 };
45 
46 enum max2175_na_mode {
47 	/* NA modes */
48 	MAX2175_NA_FM_1_0 = 0,
49 	MAX2175_NA_FM_2_0,
50 
51 	/*
52 	 * Other possible modes to add in future
53 	 * MAX2175_NA_FMHD_1_0,
54 	 * MAX2175_NA_FMHD_1_2,
55 	 * MAX2175_NA_AM_1_0,
56 	 * MAX2175_NA_AM_1_2,
57 	 */
58 };
59 
60 /* Supported I2S modes */
61 enum {
62 	MAX2175_I2S_MODE0 = 0,
63 	MAX2175_I2S_MODE1,
64 	MAX2175_I2S_MODE2,
65 	MAX2175_I2S_MODE3,
66 	MAX2175_I2S_MODE4,
67 };
68 
69 /* Coefficient table groups */
70 enum {
71 	MAX2175_CH_MSEL = 0,
72 	MAX2175_EQ_MSEL,
73 	MAX2175_AA_MSEL,
74 };
75 
76 /* HSLS LO injection polarity */
77 enum {
78 	MAX2175_LO_BELOW_DESIRED = 0,
79 	MAX2175_LO_ABOVE_DESIRED,
80 };
81 
82 /* Channel FSM modes */
83 enum max2175_csm_mode {
84 	MAX2175_LOAD_TO_BUFFER = 0,
85 	MAX2175_PRESET_TUNE,
86 	MAX2175_SEARCH,
87 	MAX2175_AF_UPDATE,
88 	MAX2175_JUMP_FAST_TUNE,
89 	MAX2175_CHECK,
90 	MAX2175_LOAD_AND_SWAP,
91 	MAX2175_END,
92 	MAX2175_BUFFER_PLUS_PRESET_TUNE,
93 	MAX2175_BUFFER_PLUS_SEARCH,
94 	MAX2175_BUFFER_PLUS_AF_UPDATE,
95 	MAX2175_BUFFER_PLUS_JUMP_FAST_TUNE,
96 	MAX2175_BUFFER_PLUS_CHECK,
97 	MAX2175_BUFFER_PLUS_LOAD_AND_SWAP,
98 	MAX2175_NO_ACTION
99 };
100 
101 #endif /* __MAX2175_H__ */
102