forked from Wren6991/PicoDVI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common_dvi_pin_configs.h
100 lines (85 loc) · 2.65 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
#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
};
// 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
// };
// pico-RGB2HDMI
static const struct dvi_serialiser_cfg pico_sock_cfg = {
.pio = pio0,
.sm_tmds = {0, 1, 2},
.pins_tmds = {5, 7, 9},
.pins_clk = 3,
.invert_diffpairs = true
};
// 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
};
#endif