-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathcommon_dvi_pin_configs.h
120 lines (102 loc) · 3.17 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
#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.
#include "dvi_serialiser.h"
#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 = pio0,
.sm_tmds = {0, 1, 2},
.pins_tmds = {18, 20, 22},
.pins_clk = 16,
.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
};
#endif