common_dvi_pin_configs.h
1 #ifndef _COMMON_DVI_PIN_CONFIGS_H 2 #define _COMMON_DVI_PIN_CONFIGS_H 3 4 // This file defines the TMDS pair layouts on a handful of boards I have been 5 // developing on. It's not a particularly important file -- just saves some 6 // copy + paste. 7 8 #include "dvi_serialiser.h" 9 10 #ifndef DVI_DEFAULT_SERIAL_CONFIG 11 #define DVI_DEFAULT_SERIAL_CONFIG pico_sock_cfg 12 #endif 13 14 #ifndef DVI_DEFAULT_PIO_INST 15 #define DVI_DEFAULT_PIO_INST pio0 16 #endif 17 18 // ---------------------------------------------------------------------------- 19 // PicoDVI boards 20 21 // Legacy pin mapping for Rev A PicoDVI boards -- I think just Graham and I 22 // have these :) 23 static const struct dvi_serialiser_cfg picodvi_reva_dvi_cfg = { 24 .pio = DVI_DEFAULT_PIO_INST, 25 .sm_tmds = {0, 1, 2}, 26 .pins_tmds = {24, 26, 28}, 27 .pins_clk = 22, 28 .invert_diffpairs = true 29 }; 30 31 // The not-HDMI socket on Rev C PicoDVI boards 32 // (we don't talk about Rev B) 33 static const struct dvi_serialiser_cfg picodvi_dvi_cfg = { 34 .pio = DVI_DEFAULT_PIO_INST, 35 .sm_tmds = {0, 1, 2}, 36 .pins_tmds = {10, 12, 14}, 37 .pins_clk = 8, 38 .invert_diffpairs = true 39 }; 40 41 // You can jam an adapter board into either of the PMOD sockets on a PicoDVI! 42 static const struct dvi_serialiser_cfg picodvi_pmod0_cfg = { 43 .pio = DVI_DEFAULT_PIO_INST, 44 .sm_tmds = {0, 1, 2}, 45 .pins_tmds = {2, 4, 0}, 46 .pins_clk = 6, 47 .invert_diffpairs = false 48 }; 49 50 // ---------------------------------------------------------------------------- 51 // Other boards 52 53 // The not-HDMI socket on SparkX HDMI carrier board with RP2040 MicroMod 54 // inserted. 55 static const struct dvi_serialiser_cfg micromod_cfg = { 56 .pio = DVI_DEFAULT_PIO_INST, 57 .sm_tmds = {0, 1, 2}, 58 .pins_tmds = {18, 20, 22}, 59 .pins_clk = 16, 60 .invert_diffpairs = true 61 }; 62 63 // Pico DVI Sock (small hat on the bottom) which solders to the end of a Pico 64 static const struct dvi_serialiser_cfg pico_sock_cfg = { 65 .pio = DVI_DEFAULT_PIO_INST, 66 .sm_tmds = {0, 1, 2}, 67 .pins_tmds = {12, 18, 16}, 68 .pins_clk = 14, 69 .invert_diffpairs = false 70 }; 71 72 // The HDMI socket on Pimoroni Pico Demo HDMI 73 // (we would talk about rev B if we had a rev B...) 74 static const struct dvi_serialiser_cfg pimoroni_demo_hdmi_cfg = { 75 .pio = DVI_DEFAULT_PIO_INST, 76 .sm_tmds = {0, 1, 2}, 77 .pins_tmds = {8, 10, 12}, 78 .pins_clk = 6, 79 .invert_diffpairs = true 80 }; 81 82 // Not HDMI Featherwing 83 static const struct dvi_serialiser_cfg not_hdmi_featherwing_cfg = { 84 .pio = pio0, 85 .sm_tmds = {0, 1, 2}, 86 .pins_tmds = {11, 9, 7}, 87 .pins_clk = 24, 88 .invert_diffpairs = true 89 }; 90 91 #endif