summaryrefslogtreecommitdiff
path: root/nvreg.h
blob: 44f2ed5158999026c967098b9a2910036c8da609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
 * Copyright 1996-1997 David J. McKay
 * Copyright 2010 Francisco Jerez.
 * All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#ifndef __NVREG_H__
#define __NVREG_H__

#include <stdint.h>

#define NV_PEXTDEV_BOOT_0		0x101000

#define NV_PRMVIO_SRX			0xc03c4
#define NV_PRMVIO_SR			0xc03c5
#define NV_PRMVIO_MISC__READ		0xc03cc

#define NV_VIO_SR_CLOCK			0x01

#define NV_PRMCIO_CRX__COLOR		0x6013d4
#define NV_PRMCIO_CR__COLOR		0x6013d5

#define NV_CIO_CR_HDT			0x00
#define NV_CIO_CR_HDE			0x01
#define NV_CIO_CR_HBS			0x02
#define NV_CIO_CR_HBE			0x03
#define NV_CIO_CR_HRS			0x04
#define NV_CIO_CR_HRE			0x05
#define NV_CIO_CR_VDT			0x06
#define NV_CIO_CR_OVL			0x07
#define NV_CIO_CR_CELL_HT		0x09
#define NV_CIO_CR_VRS			0x10
#define NV_CIO_CR_VRE			0x11
#define NV_CIO_CR_VDE			0x12
#define NV_CIO_CR_VBS			0x15
#define NV_CIO_CR_VBE			0x16
#define NV_CIO_SR_LOCK			0x1f
#define NV_CIO_CRE_LSR			0x25
#define NV_CIO_CRE_HEB			0x2d
#define NV_CIO_CRE_ILACE		0x39
#define NV_CIO_CRE_EBR			0x41

#define NV_PRAMDAC_NVPLL		0x680500
#define NV_PRAMDAC_MPLL			0x680504
#define NV_PRAMDAC_VPLL1		0x680508
#define NV_PRAMDAC_VPLL2		0x680520

struct reg {
	uint64_t class;
	uint32_t offset;
	const char *name;
};

extern struct reg pmc_block[];
extern struct reg pbus_block[];
extern struct reg pfb_block[];
extern struct reg pcrtc_block[];
extern struct reg vga_crtc_block[];
extern struct reg pramdac_block[];
extern struct reg ptv_block[];
extern struct reg itv_block[];
extern struct reg tmds_block[];
extern struct reg pvideo_block[];

#endif