imx51_dpllreg.h revision 1.1.4.2 1 1.1.4.2 yamt /* $NetBSD: imx51_dpllreg.h,v 1.1.4.2 2012/05/23 10:07:41 yamt Exp $ */
2 1.1.4.2 yamt /*
3 1.1.4.2 yamt * Copyright (c) 2012 Genetec Corporation. All rights reserved.
4 1.1.4.2 yamt * Written by Hashimoto Kenichi for Genetec Corporation.
5 1.1.4.2 yamt *
6 1.1.4.2 yamt * Redistribution and use in source and binary forms, with or without
7 1.1.4.2 yamt * modification, are permitted provided that the following conditions
8 1.1.4.2 yamt * are met:
9 1.1.4.2 yamt * 1. Redistributions of source code must retain the above copyright
10 1.1.4.2 yamt * notice, this list of conditions and the following disclaimer.
11 1.1.4.2 yamt * 2. Redistributions in binary form must reproduce the above copyright
12 1.1.4.2 yamt * notice, this list of conditions and the following disclaimer in the
13 1.1.4.2 yamt * documentation and/or other materials provided with the distribution.
14 1.1.4.2 yamt *
15 1.1.4.2 yamt * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
16 1.1.4.2 yamt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 1.1.4.2 yamt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 1.1.4.2 yamt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
19 1.1.4.2 yamt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 1.1.4.2 yamt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 1.1.4.2 yamt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 1.1.4.2 yamt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 1.1.4.2 yamt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 1.1.4.2 yamt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 1.1.4.2 yamt * POSSIBILITY OF SUCH DAMAGE.
26 1.1.4.2 yamt */
27 1.1.4.2 yamt #ifndef _IMX51_DPLLREG_H
28 1.1.4.2 yamt #define _IMX51_DPLLREG_H
29 1.1.4.2 yamt
30 1.1.4.2 yamt #include <sys/cdefs.h>
31 1.1.4.2 yamt
32 1.1.4.2 yamt /* register offset address */
33 1.1.4.2 yamt
34 1.1.4.2 yamt #define IMX51_N_DPLLS 3 /* 1..3 */
35 1.1.4.2 yamt
36 1.1.4.2 yamt #define DPLL_BASE(n) (0x83F80000 + (0x4000 * ((n)-1)))
37 1.1.4.2 yamt #define DPLL_SIZE 0x100
38 1.1.4.2 yamt
39 1.1.4.2 yamt #define DPLL_DP_CTL 0x0000
40 1.1.4.2 yamt #define DP_CTL_HFSM __BIT(7)
41 1.1.4.2 yamt #define DP_CTL_REF_CLK_SEL_MASK __BITS(8,9)
42 1.1.4.2 yamt #define DP_CTL_REF_CLK_SEL_COSC (__BIT(9)|0)
43 1.1.4.2 yamt #define DP_CTL_REF_CLK_SEL_FPM (__BIT(9)|__BIT(8))
44 1.1.4.2 yamt #define DP_CTL_REF_CLK_DIV __BIT(10)
45 1.1.4.2 yamt #define DP_CTL_DPDCK0_2_EN __BIT(12)
46 1.1.4.2 yamt #define DPLL_DP_CONFIG 0x0004
47 1.1.4.2 yamt #define DPLL_DP_OP 0x0008
48 1.1.4.2 yamt #define DP_OP_PDF_SHIFT 0
49 1.1.4.2 yamt #define DP_OP_PDF_MASK (0xf << DP_OP_PDF_SHIFT)
50 1.1.4.2 yamt #define DP_OP_MFI_SHIFT 4
51 1.1.4.2 yamt #define DP_OP_MFI_MASK (0xf << DP_OP_MFI_SHIFT)
52 1.1.4.2 yamt #define DPLL_DP_MFD 0x000C
53 1.1.4.2 yamt #define DPLL_DP_MFN 0x0010
54 1.1.4.2 yamt #define DPLL_DP_MFNMINUS 0x0014
55 1.1.4.2 yamt #define DPLL_DP_MFNPLUS 0x0018
56 1.1.4.2 yamt #define DPLL_DP_HFS_OP 0x001C
57 1.1.4.2 yamt #define DPLL_DP_HFS_MFD 0x0020
58 1.1.4.2 yamt #define DPLL_DP_HFS_MFN 0x0024
59 1.1.4.2 yamt #define DPLL_DP_TOGC 0x0028
60 1.1.4.2 yamt #define DPLL_DP_DESTAT 0x002C
61 1.1.4.2 yamt
62 1.1.4.2 yamt #endif /* _IMX51_DPLLREG_H */
63