imx51_dpllreg.h revision 331722
1/*	$NetBSD: imx51_dpllreg.h,v 1.1 2012/04/17 09:33:31 bsh Exp $	*/
2/*
3 * Copyright (c) 2012  Genetec Corporation.  All rights reserved.
4 * Written by Hashimoto Kenichi for Genetec Corporation.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 *    notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 *    notice, this list of conditions and the following disclaimer in the
13 *    documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL GENETEC CORPORATION
19 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28/*-
29 * Copyright (c) 2012, 2013 The FreeBSD Foundation
30 * All rights reserved.
31 *
32 * Portions of this software were developed by Oleksandr Rybalko
33 * under sponsorship from the FreeBSD Foundation.
34 *
35 * Redistribution and use in source and binary forms, with or without
36 * modification, are permitted provided that the following conditions
37 * are met:
38 * 1.	Redistributions of source code must retain the above copyright
39 *	notice, this list of conditions and the following disclaimer.
40 * 2.	Redistributions in binary form must reproduce the above copyright
41 *	notice, this list of conditions and the following disclaimer in the
42 *	documentation and/or other materials provided with the distribution.
43 *
44 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * SUCH DAMAGE.
55 *
56 * $FreeBSD: stable/11/sys/arm/freescale/imx/imx51_dpllreg.h 331722 2018-03-29 02:50:57Z eadler $
57 */
58
59#ifndef	_IMX51_DPLLREG_H
60#define	_IMX51_DPLLREG_H
61
62#include <sys/cdefs.h>
63
64/* register offset address */
65
66#define	IMX51_N_DPLLS		3		/* 1..3 */
67
68#define	DPLL_BASE(n)	      	(0x83F80000 + (0x4000 * ((n)-1)))
69#define	DPLL_SIZE		0x100
70
71#define	DPLL_DP_CTL		0x0000		/* 0x1223 */
72#define	 DP_CTL_LRF		0x00000001
73#define	 DP_CTL_BRM		0x00000002
74#define	 DP_CTL_PLM		0x00000004
75#define	 DP_CTL_RCP		0x00000008
76#define	 DP_CTL_RST		0x00000010
77#define	 DP_CTL_UPEN		0x00000020
78#define	 DP_CTL_PRE		0x00000040
79#define	 DP_CTL_HFSM		0x00000080
80#define	 DP_CTL_REF_CLK_SEL_MASK	0x00000300
81#define	 DP_CTL_REF_CLK_SEL_COSC	0x00000200
82#define	 DP_CTL_REF_CLK_SEL_FPM 	0x00000300
83#define	 DP_CTL_REF_CLK_DIV	0x00000400
84#define	 DP_CTL_DPDCK0_2_EN	0x00001000
85#define	 DP_CTL_HIGHCLK_EN	DP_CTL_DPDCK0_2_EN
86#define	 DP_CTL_MULCTRL		0x00002000
87#define	DPLL_DP_CONFIG		0x0004		/* 2 */
88#define	 DPLL_DP_CONFIG_APEN	0x00000002
89#define	 DPLL_DP_CONFIG_LDREQ	0x00000001
90#define	DPLL_DP_OP		0x0008		/* 0x80 */
91#define	 DP_OP_PDF_SHIFT	0
92#define	 DP_OP_PDF_MASK		(0xf << DP_OP_PDF_SHIFT)
93#define	 DP_OP_MFI_SHIFT	4
94#define	 DP_OP_MFI_MASK		(0xf << DP_OP_MFI_SHIFT)
95#define	DPLL_DP_MFD		0x000C		/* 2 */
96#define	DPLL_DP_MFN		0x0010		/* 1 */
97#define	DPLL_DP_MFNMINUS	0x0014		/* 0 */
98#define	DPLL_DP_MFNPLUS		0x0018		/* 0 */
99#define	DPLL_DP_HFS_OP		0x001C		/* 0x80 */
100#define	DPLL_DP_HFS_MFD		0x0020		/* 2 */
101#define	DPLL_DP_HFS_MFN		0x0024		/* 1 */
102#define	DPLL_DP_TOGC		0x0028		/* 0x20000 */
103#define	DPLL_DP_DESTAT		0x002C		/* 1 */
104
105#endif /* _IMX51_DPLLREG_H */
106