Go to the documentation of this file.
4 #ifndef HAVE_DP83640_REGISTERS
5 #define HAVE_DP83640_REGISTERS
11 #define PTP_CTL 0x0014
12 #define PTP_TDR 0x0015
13 #define PTP_STS 0x0016
14 #define PTP_TSTS 0x0017
15 #define PTP_RATEL 0x0018
16 #define PTP_RATEH 0x0019
17 #define PTP_RDCKSUM 0x001a
18 #define PTP_WRCKSUM 0x001b
19 #define PTP_TXTS 0x001c
20 #define PTP_RXTS 0x001d
21 #define PTP_ESTS 0x001e
22 #define PTP_EDATA 0x001f
25 #define PTP_TRIG 0x0014
26 #define PTP_EVNT 0x0015
27 #define PTP_TXCFG0 0x0016
28 #define PTP_TXCFG1 0x0017
29 #define PSF_CFG0 0x0018
30 #define PTP_RXCFG0 0x0019
31 #define PTP_RXCFG1 0x001a
32 #define PTP_RXCFG2 0x001b
33 #define PTP_RXCFG3 0x001c
34 #define PTP_RXCFG4 0x001d
35 #define PTP_TRDL 0x001e
36 #define PTP_TRDH 0x001f
39 #define PTP_COC 0x0014
40 #define PSF_CFG1 0x0015
41 #define PSF_CFG2 0x0016
42 #define PSF_CFG3 0x0017
43 #define PSF_CFG4 0x0018
44 #define PTP_SFDCFG 0x0019
45 #define PTP_INTCTL 0x001a
46 #define PTP_CLKSRC 0x001b
47 #define PTP_ETR 0x001c
48 #define PTP_OFF 0x001d
49 #define PTP_GPIOMON 0x001e
50 #define PTP_RXHASH 0x001f
53 #define BC_WRITE (1<<11)
56 #define TRIG_SEL_SHIFT (10)
57 #define TRIG_SEL_MASK (0x7)
58 #define TRIG_DIS (1<<9)
59 #define TRIG_EN (1<<8)
60 #define TRIG_READ (1<<7)
61 #define TRIG_LOAD (1<<6)
62 #define PTP_RD_CLK (1<<5)
63 #define PTP_LOAD_CLK (1<<4)
64 #define PTP_STEP_CLK (1<<3)
65 #define PTP_ENABLE (1<<2)
66 #define PTP_DISABLE (1<<1)
67 #define PTP_RESET (1<<0)
70 #define TXTS_RDY (1<<11)
71 #define RXTS_RDY (1<<10)
72 #define TRIG_DONE (1<<9)
73 #define EVENT_RDY (1<<8)
74 #define TXTS_IE (1<<3)
75 #define RXTS_IE (1<<2)
76 #define TRIG_IE (1<<1)
77 #define EVENT_IE (1<<0)
80 #define TRIG7_ERROR (1<<15)
81 #define TRIG7_ACTIVE (1<<14)
82 #define TRIG6_ERROR (1<<13)
83 #define TRIG6_ACTIVE (1<<12)
84 #define TRIG5_ERROR (1<<11)
85 #define TRIG5_ACTIVE (1<<10)
86 #define TRIG4_ERROR (1<<9)
87 #define TRIG4_ACTIVE (1<<8)
88 #define TRIG3_ERROR (1<<7)
89 #define TRIG3_ACTIVE (1<<6)
90 #define TRIG2_ERROR (1<<5)
91 #define TRIG2_ACTIVE (1<<4)
92 #define TRIG1_ERROR (1<<3)
93 #define TRIG1_ACTIVE (1<<2)
94 #define TRIG0_ERROR (1<<1)
95 #define TRIG0_ACTIVE (1<<0)
98 #define PTP_RATE_DIR (1<<15)
99 #define PTP_TMP_RATE (1<<14)
100 #define PTP_RATE_HI_SHIFT (0)
101 #define PTP_RATE_HI_MASK (0x3ff)
104 #define EVNTS_MISSED_SHIFT (8)
105 #define EVNTS_MISSED_MASK (0x7)
106 #define EVNT_TS_LEN_SHIFT (6)
107 #define EVNT_TS_LEN_MASK (0x3)
108 #define EVNT_RF (1<<5)
109 #define EVNT_NUM_SHIFT (2)
110 #define EVNT_NUM_MASK (0x7)
111 #define MULT_EVNT (1<<1)
112 #define EVENT_DET (1<<0)
115 #define E7_RISE (1<<15)
116 #define E7_DET (1<<14)
117 #define E6_RISE (1<<13)
118 #define E6_DET (1<<12)
119 #define E5_RISE (1<<11)
120 #define E5_DET (1<<10)
121 #define E4_RISE (1<<9)
122 #define E4_DET (1<<8)
123 #define E3_RISE (1<<7)
124 #define E3_DET (1<<6)
125 #define E2_RISE (1<<5)
126 #define E2_DET (1<<4)
127 #define E1_RISE (1<<3)
128 #define E1_DET (1<<2)
129 #define E0_RISE (1<<1)
130 #define E0_DET (1<<0)
133 #define TRIG_PULSE (1<<15)
134 #define TRIG_PER (1<<14)
135 #define TRIG_IF_LATE (1<<13)
136 #define TRIG_NOTIFY (1<<12)
137 #define TRIG_GPIO_SHIFT (8)
138 #define TRIG_GPIO_MASK (0xf)
139 #define TRIG_TOGGLE (1<<7)
140 #define TRIG_CSEL_SHIFT (1)
141 #define TRIG_CSEL_MASK (0x7)
142 #define TRIG_WR (1<<0)
145 #define EVNT_RISE (1<<14)
146 #define EVNT_FALL (1<<13)
147 #define EVNT_SINGLE (1<<12)
148 #define EVNT_GPIO_SHIFT (8)
149 #define EVNT_GPIO_MASK (0xf)
150 #define EVNT_SEL_SHIFT (1)
151 #define EVNT_SEL_MASK (0x7)
152 #define EVNT_WR (1<<0)
155 #define SYNC_1STEP (1<<15)
156 #define DR_INSERT (1<<13)
157 #define NTP_TS_EN (1<<12)
158 #define IGNORE_2STEP (1<<11)
159 #define CRC_1STEP (1<<10)
160 #define CHK_1STEP (1<<9)
161 #define IP1588_EN (1<<8)
162 #define TX_L2_EN (1<<7)
163 #define TX_IPV6_EN (1<<6)
164 #define TX_IPV4_EN (1<<5)
165 #define TX_PTP_VER_SHIFT (1)
166 #define TX_PTP_VER_MASK (0xf)
167 #define TX_TS_EN (1<<0)
170 #define BYTE0_MASK_SHIFT (8)
171 #define BYTE0_MASK_MASK (0xff)
172 #define BYTE0_DATA_SHIFT (0)
173 #define BYTE0_DATA_MASK (0xff)
176 #define MAC_SRC_ADD_SHIFT (11)
177 #define MAC_SRC_ADD_MASK (0x3)
178 #define MIN_PRE_SHIFT (8)
179 #define MIN_PRE_MASK (0x7)
180 #define PSF_ENDIAN (1<<7)
181 #define PSF_IPV4 (1<<6)
182 #define PSF_PCF_RD (1<<5)
183 #define PSF_ERR_EN (1<<4)
184 #define PSF_TXTS_EN (1<<3)
185 #define PSF_RXTS_EN (1<<2)
186 #define PSF_TRIG_EN (1<<1)
187 #define PSF_EVNT_EN (1<<0)
190 #define DOMAIN_EN (1<<15)
191 #define ALT_MAST_DIS (1<<14)
192 #define USER_IP_SEL (1<<13)
193 #define USER_IP_EN (1<<12)
194 #define RX_SLAVE (1<<11)
195 #define IP1588_EN_SHIFT (8)
196 #define IP1588_EN_MASK (0xf)
197 #define RX_L2_EN (1<<7)
198 #define RX_IPV6_EN (1<<6)
199 #define RX_IPV4_EN (1<<5)
200 #define RX_PTP_VER_SHIFT (1)
201 #define RX_PTP_VER_MASK (0xf)
202 #define RX_TS_EN (1<<0)
205 #define BYTE0_MASK_SHIFT (8)
206 #define BYTE0_MASK_MASK (0xff)
207 #define BYTE0_DATA_SHIFT (0)
208 #define BYTE0_DATA_MASK (0xff)
211 #define TS_MIN_IFG_SHIFT (12)
212 #define TS_MIN_IFG_MASK (0xf)
213 #define ACC_UDP (1<<11)
214 #define ACC_CRC (1<<10)
215 #define TS_APPEND (1<<9)
216 #define TS_INSERT (1<<8)
217 #define PTP_DOMAIN_SHIFT (0)
218 #define PTP_DOMAIN_MASK (0xff)
221 #define IPV4_UDP_MOD (1<<15)
222 #define TS_SEC_EN (1<<14)
223 #define TS_SEC_LEN_SHIFT (12)
224 #define TS_SEC_LEN_MASK (0x3)
225 #define RXTS_NS_OFF_SHIFT (6)
226 #define RXTS_NS_OFF_MASK (0x3f)
227 #define RXTS_SEC_OFF_SHIFT (0)
228 #define RXTS_SEC_OFF_MASK (0x3f)
231 #define PTP_CLKOUT_EN (1<<15)
232 #define PTP_CLKOUT_SEL (1<<14)
233 #define PTP_CLKOUT_SPEEDSEL (1<<13)
234 #define PTP_CLKDIV_SHIFT (0)
235 #define PTP_CLKDIV_MASK (0xff)
238 #define PTPRESERVED_SHIFT (12)
239 #define PTPRESERVED_MASK (0xf)
240 #define VERSIONPTP_SHIFT (8)
241 #define VERSIONPTP_MASK (0xf)
242 #define TRANSPORT_SPECIFIC_SHIFT (4)
243 #define TRANSPORT_SPECIFIC_MASK (0xf)
244 #define MESSAGETYPE_SHIFT (0)
245 #define MESSAGETYPE_MASK (0xf)
248 #define TX_SFD_GPIO_SHIFT (4)
249 #define TX_SFD_GPIO_MASK (0xf)
250 #define RX_SFD_GPIO_SHIFT (0)
251 #define RX_SFD_GPIO_MASK (0xf)
254 #define PTP_INT_GPIO_SHIFT (0)
255 #define PTP_INT_GPIO_MASK (0xf)
258 #define CLK_SRC_SHIFT (14)
259 #define CLK_SRC_MASK (0x3)
260 #define CLK_SRC_PER_SHIFT (0)
261 #define CLK_SRC_PER_MASK (0x7f)
264 #define PTP_OFFSET_SHIFT (0)
265 #define PTP_OFFSET_MASK (0xff)