aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux/cx2341x/fw-memory.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-05-22 09:31:37 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:59:48 -0400
commit447d6fb8ccdc3a581a13fe4b5a62c384dc9fd36a (patch)
tree24163c66d1d1f27241c2a5c640175f3f7f42ce31 /Documentation/video4linux/cx2341x/fw-memory.txt
parentb8d4c235d50f8512bbc9d67730c24da3309b0307 (diff)
V4L/DVB (3809b): Added missing docs at kernel tree
Date: From: Mauro Carvalho Chehab <mchehab@infradead.org> There are some docs at V4L/DVB tree that were never included at kernel. This patch includes those docs. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'Documentation/video4linux/cx2341x/fw-memory.txt')
-rw-r--r--Documentation/video4linux/cx2341x/fw-memory.txt141
1 files changed, 141 insertions, 0 deletions
diff --git a/Documentation/video4linux/cx2341x/fw-memory.txt b/Documentation/video4linux/cx2341x/fw-memory.txt
new file mode 100644
index 000000000000..336d8208ef3b
--- /dev/null
+++ b/Documentation/video4linux/cx2341x/fw-memory.txt
@@ -0,0 +1,141 @@
1This document describes the cx2341x memory map and documents some of the register
2space.
3
4Warning! This information was figured out from searching through the memory and
5registers, this information may not be correct and is certainly not complete, and
6was not derived from anything more than searching through the memory space with
7commands like:
8
9 ivtvctl -O min=0x02000000,max=0x020000ff
10
11So take this as is, I'm always searching for more stuff, it's a large
12register space :-).
13
14Memory Map
15==========
16
17The cx2341x exposes its entire 64M memory space to the PCI host via the PCI BAR0
18(Base Address Register 0). The addresses here are offsets relative to the
19address held in BAR0.
20
210x00000000-0x00ffffff Encoder memory space
220x00000000-0x0003ffff Encode.rom
23 ???-??? MPEG buffer(s)
24 ???-??? Raw video capture buffer(s)
25 ???-??? Raw audio capture buffer(s)
26 ???-??? Display buffers (6 or 9)
27
280x01000000-0x01ffffff Decoder memory space
290x01000000-0x0103ffff Decode.rom
30 ???-??? MPEG buffers(s)
310x0114b000-0x0115afff Audio.rom (deprecated?)
32
330x02000000-0x0200ffff Register Space
34
35Registers
36=========
37
38The registers occupy the 64k space starting at the 0x02000000 offset from BAR0.
39All of these registers are 32 bits wide.
40
41DMA Registers 0x000-0xff:
42
43 0x00 - Control:
44 0=reset/cancel, 1=read, 2=write, 4=stop
45 0x04 - DMA status:
46 1=read busy, 2=write busy, 4=read error, 8=write error, 16=link list error
47 0x08 - pci DMA pointer for read link list
48 0x0c - pci DMA pointer for write link list
49 0x10 - read/write DMA enable:
50 1=read enable, 2=write enable
51 0x14 - always 0xffffffff, if set any lower instability occurs, 0x00 crashes
52 0x18 - ??
53 0x1c - always 0x20 or 32, smaller values slow down DMA transactions
54 0x20 - always value of 0x780a010a
55 0x24-0x3c - usually just random values???
56 0x40 - Interrupt status
57 0x44 - Write a bit here and shows up in Interrupt status 0x40
58 0x48 - Interrupt Mask
59 0x4C - always value of 0xfffdffff,
60 if changed to 0xffffffff DMA write interrupts break.
61 0x50 - always 0xffffffff
62 0x54 - always 0xffffffff (0x4c, 0x50, 0x54 seem like interrupt masks, are
63 3 processors on chip, Java ones, VPU, SPU, APU, maybe these are the
64 interrupt masks???).
65 0x60-0x7C - random values
66 0x80 - first write linked list reg, for Encoder Memory addr
67 0x84 - first write linked list reg, for pci memory addr
68 0x88 - first write linked list reg, for length of buffer in memory addr
69 (|0x80000000 or this for last link)
70 0x8c-0xcc - rest of write linked list reg, 8 sets of 3 total, DMA goes here
71 from linked list addr in reg 0x0c, firmware must push through or
72 something.
73 0xe0 - first (and only) read linked list reg, for pci memory addr
74 0xe4 - first (and only) read linked list reg, for Decoder memory addr
75 0xe8 - first (and only) read linked list reg, for length of buffer
76 0xec-0xff - Nothing seems to be in these registers, 0xec-f4 are 0x00000000.
77
78Memory locations for Encoder Buffers 0x700-0x7ff:
79
80These registers show offsets of memory locations pertaining to each
81buffer area used for encoding, have to shift them by <<1 first.
82
830x07F8: Encoder SDRAM refresh
840x07FC: Encoder SDRAM pre-charge
85
86Memory locations for Decoder Buffers 0x800-0x8ff:
87
88These registers show offsets of memory locations pertaining to each
89buffer area used for decoding, have to shift them by <<1 first.
90
910x08F8: Decoder SDRAM refresh
920x08FC: Decoder SDRAM pre-charge
93
94Other memory locations:
95
960x2800: Video Display Module control
970x2D00: AO (audio output?) control
980x2D24: Bytes Flushed
990x7000: LSB I2C write clock bit (inverted)
1000x7004: LSB I2C write data bit (inverted)
1010x7008: LSB I2C read clock bit
1020x700c: LSB I2C read data bit
1030x9008: GPIO get input state
1040x900c: GPIO set output state
1050x9020: GPIO direction (Bit7 (GPIO 0..7) - 0:input, 1:output)
1060x9050: SPU control
1070x9054: Reset HW blocks
1080x9058: VPU control
1090xA018: Bit6: interrupt pending?
1100xA064: APU command
111
112
113Interrupt Status Register
114=========================
115
116The definition of the bits in the interrupt status register 0x0040, and the
117interrupt mask 0x0048. If a bit is cleared in the mask, then we want our ISR to
118execute.
119
120Bit
12131 Encoder Start Capture
12230 Encoder EOS
12329 Encoder VBI capture
12428 Encoder Video Input Module reset event
12527 Encoder DMA complete
12626
12725 Decoder copy protect detection event
12824 Decoder audio mode change detection event
12923
13022 Decoder data request
13121 Decoder I-Frame? done
13220 Decoder DMA complete
13319 Decoder VBI re-insertion
13418 Decoder DMA err (linked-list bad)
135
136Missing
137Encoder API call completed
138Decoder API call completed
139Encoder API post(?)
140Decoder API post(?)
141Decoder VTRACE event