forked from Wren6991/PicoDVI
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcommon_dvi_pin_configs.h
152 lines (129 loc) · 3.91 KB
/
common_dvi_pin_configs.h
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#ifndef _COMMON_DVI_PIN_CONFIGS_H
#define _COMMON_DVI_PIN_CONFIGS_H
// This file defines the TMDS pair layouts on a handful of boards I have been
// developing on. It's not a particularly important file -- just saves some
// copy + paste.
#if defined(ARDUINO)
#include "../libdvi/dvi_serialiser.h"
#else
#include "dvi_serialiser.h"
#endif
#ifndef DVI_DEFAULT_SERIAL_CONFIG
#define DVI_DEFAULT_SERIAL_CONFIG pico_sock_cfg
#endif
#ifndef DVI_DEFAULT_PIO_INST
#define DVI_DEFAULT_PIO_INST pio0
#endif
// ----------------------------------------------------------------------------
// PicoDVI boards
// Legacy pin mapping for Rev A PicoDVI boards -- I think just Graham and I
// have these :)
static const struct dvi_serialiser_cfg picodvi_reva_dvi_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {24, 26, 28},
.pins_clk = 22,
.invert_diffpairs = true
};
// AMY-DVI board, for getting HDMI from the RP2350 FPGA development platform,
// again a cursed board that only a couple of people in the world possess:
static const struct dvi_serialiser_cfg amy_dvi_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {14, 16, 18},
.pins_clk = 12,
.invert_diffpairs = true
};
// The not-HDMI socket on Rev C PicoDVI boards
// (we don't talk about Rev B)
static const struct dvi_serialiser_cfg picodvi_dvi_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {10, 12, 14},
.pins_clk = 8,
.invert_diffpairs = true
};
// You can jam an adapter board into either of the PMOD sockets on a PicoDVI!
static const struct dvi_serialiser_cfg picodvi_pmod0_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {2, 4, 0},
.pins_clk = 6,
.invert_diffpairs = false
};
// ----------------------------------------------------------------------------
// Other boards
// The not-HDMI socket on SparkX HDMI carrier board with RP2040 MicroMod
// inserted.
static const struct dvi_serialiser_cfg micromod_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {18, 20, 22},
.pins_clk = 16,
.invert_diffpairs = true
};
// Pico DVI Sock (small hat on the bottom) which solders to the end of a Pico
static const struct dvi_serialiser_cfg pico_sock_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {12, 18, 16},
.pins_clk = 14,
.invert_diffpairs = false
};
// The HDMI socket on Pimoroni Pico Demo HDMI
// (we would talk about rev B if we had a rev B...)
static const struct dvi_serialiser_cfg pimoroni_demo_hdmi_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {8, 10, 12},
.pins_clk = 6,
.invert_diffpairs = true
};
// Not HDMI Featherwing
static const struct dvi_serialiser_cfg not_hdmi_featherwing_cfg = {
.pio = pio0,
.sm_tmds = {0, 1, 2},
.pins_tmds = {11, 9, 7},
.pins_clk = 24,
.invert_diffpairs = true
};
// Adafruit Feather RP2040 DVI
static const struct dvi_serialiser_cfg adafruit_feather_dvi_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {18, 20, 22},
.pins_clk = 16,
.invert_diffpairs = true
};
static const struct dvi_serialiser_cfg adafruit_dvibell_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {10, 8, 6},
.pins_clk = 12,
.invert_diffpairs = false,
};
// Adafruit 'Fruit Jam' computer board
static const struct dvi_serialiser_cfg adafruit_fruitjam_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {14, 16, 18},
.pins_clk = 12,
.invert_diffpairs = true,
};
// Waveshare RP2040-PiZero
static const struct dvi_serialiser_cfg waveshare_rp2040_pizero = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {26, 24, 22},
.pins_clk = 28,
.invert_diffpairs = false
};
// Olimex RP2040PC, RP2040-Pico-PC, Neo6502,
static struct dvi_serialiser_cfg olimex_rp2040_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {14, 18, 16},
.pins_clk = 12,
.invert_diffpairs = true
};
#endif