1/*	$NetBSD$ */
2
3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jukka Ruohonen.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright
15 *    notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 *    notice, this list of conditions and the following disclaimer in the
18 *    documentation and/or other materials provided with the distribution.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32#ifndef _DEV_I2C_ZL10353REG_H_
33#define _DEV_I2C_ZL10353REG_H_
34
35#define ZL10353_DEFAULT_CLOCK_MHZ		450560	/* 45.056 MHz */
36#define ZL10353_DEFAULT_INPUT_FREQ		 52606
37
38#define ZL10353_REG_STATUS_LOCK			0x0006
39#define		ZL10353_STATUS_LOCK_ON		0x0020
40#define		ZL10353_STATUS_LOCK_VITERBI	0x0002
41#define		ZL10353_STATUS_LOCK_CARRIER	0x0004
42
43#define ZL10353_REG_STATUS_SYNC			0x0007
44#define		ZL10353_STATUS_SYNC_ON		0x0010
45
46#define ZL10353_REG_STATUS_SIGNAL		0x0008
47#define		ZL10353_STATUS_SIGNAL_ON	0x0040
48
49#define ZL10353_REG_SIGSTR_1			0x000a
50#define ZL10353_REG_SIGSTR_2			0x000b
51#define ZL10353_REG_SNR				0x0010
52
53#define ZL10353_REG_GATE			0x0062
54#define		ZL10353_GATE_ENABLE		0x001a
55#define		ZL10353_GATE_DISABLE		0x000a
56
57#define ZL10353_REG_AGC_TARGET			0x0056
58#define		ZL10353_AGC_TARGET_DEFAULT	0x0028
59
60#define ZL10353_REG_AGC_CTRL			0x005e
61#define		ZL10353_AGC_CTRL_MODE_NONAUTO	0x0001
62#define		ZL10353_AGC_CTRL_GUARD_NONAUTO	0x0002
63
64#define	ZL10353_REG_BW_1			0x005c
65#define		ZL10353_BW_1_6_MHZ		0x0097
66#define		ZL10353_BW_1_7_MHZ		0x0086
67#define		ZL10353_BW_1_8_MHZ		0x0075
68
69#define	ZL10353_REG_BW_2			0x0064
70#define		ZL10353_BW_2_6_MHZ		0x0034
71#define		ZL10353_BW_2_7_MHZ		0x0035
72#define		ZL10353_BW_2_8_MHZ		0x0036
73
74#define	ZL10353_REG_BW_3			0x00cc
75#define		ZL10353_BW_3_6_MHZ		0x00dd
76#define		ZL10353_BW_3_7_MHZ		0x0073
77#define		ZL10353_BW_3_8_MHZ		0x0073
78
79#define ZL10353_REG_RATE_1			0x0065
80#define ZL10353_REG_RATE_2			0x0066
81#define ZL10353_REG_FREQ_1			0x006c
82#define ZL10353_REG_FREQ_2			0x006d
83
84#define ZL10353_REG_TPS_1			0x006e
85#define	ZL10353_REG_TPS_2			0x006f
86#define		ZL10353_TPS_GUARD_1_4		0x000c
87#define		ZL10353_TPS_GUARD_1_8		0x0008
88#define		ZL10353_TPS_GUARD_1_16		0x0004
89#define		ZL10353_TPS_GUARD_1_32		0x0000
90#define		ZL10353_TPS_GUARD_AUTO		0x0000
91#define		ZL10353_TPS_MODE_2K		0x0000
92#define		ZL10353_TPS_MODE_8K		0x0001
93#define		ZL10353_TPS_MODE_AUTO		0x0000
94#define		ZL10353_TPS_MODULATION_QPSK	0x0000
95#define		ZL10353_TPS_MODULATION_QAM_16	0x2000
96#define		ZL10353_TPS_MODULATION_QAM_64	0x4000
97#define		ZL10353_TPS_MODULATION_QAM_AUTO	0x2000
98#define		ZL10353_TPS_HIERARCHY_1		0x0400
99#define		ZL10353_TPS_HIERARCHY_2		0x0800
100#define		ZL10353_TPS_HIERARCHY_4		0x0c00
101#define		ZL10353_TPS_HIERARCHY_NONE	0x0000
102#define		ZL10353_TPS_HIERARCHY_AUTO	0x0000
103#define		ZL10353_TPS_HP_FEC_1_2		0x0000
104#define		ZL10353_TPS_HP_FEC_2_3		0x0080
105#define		ZL10353_TPS_HP_FEC_3_4		0x0100
106#define		ZL10353_TPS_HP_FEC_5_6		0x0180
107#define		ZL10353_TPS_HP_FEC_7_8		0x0200
108#define		ZL10353_TPS_HP_FEC_AUTO		0x0000
109#define		ZL10353_TPS_LP_FEC_1_2		0x0000
110#define		ZL10353_TPS_LP_FEC_2_3		0x0010
111#define		ZL10353_TPS_LP_FEC_3_4		0x0020
112#define		ZL10353_TPS_LP_FEC_5_6		0x0030
113#define		ZL10353_TPS_LP_FEC_7_8		0x0040
114#define		ZL10353_TPS_LP_FEC_AUTO		0x0000
115
116#define	ZL10353_REG_FSM				0x0071
117#define		ZL10353_FSM_START		0x0001
118
119#define	ZL10353_REG_ID				0x007f
120#define		ZL10353_ID_ZL10353		0x0014
121#define		ZL10353_ID_CE6230		0x0018
122#define		ZL10353_ID_CE6231		0x0019
123
124#endif	/* !_DEV_I2C_ZL10353REG_H */
125