bt462reg.h revision 1.1 1 1.1 macallan /* $NetBSD: bt462reg.h,v 1.1 2010/06/24 03:30:36 macallan Exp $ */
2 1.1 macallan
3 1.1 macallan /*-
4 1.1 macallan * Copyright (c) 2010 Michael Lorenz
5 1.1 macallan * All rights reserved.
6 1.1 macallan *
7 1.1 macallan * Redistribution and use in source and binary forms, with or without
8 1.1 macallan * modification, are permitted provided that the following conditions
9 1.1 macallan * are met:
10 1.1 macallan * 1. Redistributions of source code must retain the above copyright
11 1.1 macallan * notice, this list of conditions and the following disclaimer.
12 1.1 macallan * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 macallan * notice, this list of conditions and the following disclaimer in the
14 1.1 macallan * documentation and/or other materials provided with the distribution.
15 1.1 macallan *
16 1.1 macallan * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 1.1 macallan * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.1 macallan * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.1 macallan * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 1.1 macallan * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.1 macallan * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.1 macallan * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.1 macallan * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.1 macallan * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.1 macallan * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 macallan * POSSIBILITY OF SUCH DAMAGE.
27 1.1 macallan */
28 1.1 macallan
29 1.1 macallan /*
30 1.1 macallan * register definitions for the Bt461/Bt462 RAMDAC
31 1.1 macallan *
32 1.1 macallan * There are four registers, how exactly to access them depends on the host so
33 1.1 macallan * we don't provide constants for them. All registers are 8 bit wide:
34 1.1 macallan * - register 0 provides the lower 8 index bits
35 1.1 macallan * - register 1 provides the upper 2 index bits
36 1.1 macallan * - register 2 accesses the alternate colour map ( 256 entries ), overlay
37 1.1 macallan * colour map ( 32 enttries ) and control registers
38 1.1 macallan * - register 3 accesses the main colour map ( 1024 entries )
39 1.1 macallan */
40 1.1 macallan
41 1.1 macallan #ifndef BT462REG_H
42 1.1 macallan #define BT462REG_H
43 1.1 macallan
44 1.1 macallan /* offsets for register 2 */
45 1.1 macallan #define BT462_ALT_CMAP 0x0000
46 1.1 macallan #define BT462_OVL_CMAP 0x0100
47 1.1 macallan #define BT462_ID 0x0200
48 1.1 macallan #define ID_BT461 0x4d
49 1.1 macallan #define ID_BT462 0x4c
50 1.1 macallan
51 1.1 macallan #define BT462_CMD_0 0x0201
52 1.1 macallan #define BT462_C0_BLINK_16_48 0x00
53 1.1 macallan #define BT462_C0_BLINK_16_16 0x04
54 1.1 macallan #define BT462_C0_BLINK_32_32 0x08
55 1.1 macallan #define BT462_C0_BLINK_64_64 0x0c
56 1.1 macallan #define BT462_C0_ALT_ENABLE 0x10
57 1.1 macallan #define BT462_C0_OVL_OPAQUE 0x20 /* use ovl 0, not cmap */
58 1.1 macallan #define BT462_C0_MULT_3_1 0x00
59 1.1 macallan #define BT462_C0_MULT_4_1 0x40
60 1.1 macallan #define BT462_C0_MULT_5_1 0xc0
61 1.1 macallan
62 1.1 macallan #define BT462_CMD_1 0x0202
63 1.1 macallan #define BT462_C1_PAN_0 0x00
64 1.1 macallan #define BT462_C1_PAN_1 0x20
65 1.1 macallan #define BT462_C1_PAN_2 0x40
66 1.1 macallan #define BT462_C1_PAN_3 0x80
67 1.1 macallan #define BT462_C1_PAN_4 0xa0
68 1.1 macallan
69 1.1 macallan #define BT462_CMD_2 0x0203
70 1.1 macallan #define BT462_C2_TEST_ENABLE 0x01
71 1.1 macallan #define BT462_C2_UNDERLAY_EN 0x04 /* Bt462 only */
72 1.1 macallan #define BT462_C2_PLL_USE_BLANK 0x08 /* SYNC otherwise */
73 1.1 macallan #define BT462_C2_LOAD_ALWAYS 0x00
74 1.1 macallan #define BT462_C2_LOAD_ON_RED 0x10
75 1.1 macallan #define BT462_C2_LOAD_ON_GREEN 0x20
76 1.1 macallan #define BT462_C2_LOAD_ON_BLUE 0x30
77 1.1 macallan #define BT462_C2_PEDESTAL_EN 0x40
78 1.1 macallan #define BT462_C2_SYNC_ENABLE 0x80
79 1.1 macallan
80 1.1 macallan #define BT462_PIXEL_READ_MSK_L 0x0204
81 1.1 macallan #define BT462_PIXEL_READ_MSK_H 0x0205
82 1.1 macallan #define BT462_PIXEL_BLNK_MSK_L 0x0206
83 1.1 macallan #define BT462_PIXEL_BLNK_MSK_H 0x0207
84 1.1 macallan #define BT462_OVL_READ_MSK 0x0208
85 1.1 macallan #define BT462_OVL_BLNK_MSK 0x0209
86 1.1 macallan #define BT462_TEST 0x020c
87 1.1 macallan
88 1.1 macallan #endif /* BT462REG_H */
89