1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 cx25840.h - definition for cx25840/1/2/3 inputs
12 /* Note that the cx25840 driver requires that the bridge driver calls the
13 v4l2_subdev's init operation in order to load the driver's firmware.
14 Without this the audio standard detection will fail and you will
17 Since loading the firmware is often problematic when the driver is
18 compiled into the kernel I recommend postponing calling this function
19 until the first open of the video device. Another reason for
20 postponing it is that loading this firmware takes a long time (seconds)
21 due to the slow i2c bus speed. So it will speed up the boot process if
22 you can avoid loading the fw as long as the video device isn't used. */
24 enum cx25840_video_input {
25 /* Composite video inputs In1-In8 */
26 CX25840_COMPOSITE1 = 1,
35 /* S-Video inputs consist of one luma input (In1-In8) ORed with one
36 chroma input (In5-In8) */
37 CX25840_SVIDEO_LUMA1 = 0x10,
38 CX25840_SVIDEO_LUMA2 = 0x20,
39 CX25840_SVIDEO_LUMA3 = 0x30,
40 CX25840_SVIDEO_LUMA4 = 0x40,
41 CX25840_SVIDEO_LUMA5 = 0x50,
42 CX25840_SVIDEO_LUMA6 = 0x60,
43 CX25840_SVIDEO_LUMA7 = 0x70,
44 CX25840_SVIDEO_LUMA8 = 0x80,
45 CX25840_SVIDEO_CHROMA4 = 0x400,
46 CX25840_SVIDEO_CHROMA5 = 0x500,
47 CX25840_SVIDEO_CHROMA6 = 0x600,
48 CX25840_SVIDEO_CHROMA7 = 0x700,
49 CX25840_SVIDEO_CHROMA8 = 0x800,
51 /* S-Video aliases for common luma/chroma combinations */
52 CX25840_SVIDEO1 = 0x510,
53 CX25840_SVIDEO2 = 0x620,
54 CX25840_SVIDEO3 = 0x730,
55 CX25840_SVIDEO4 = 0x840,
57 /* Allow frames to specify specific input configurations */
58 CX25840_VIN1_CH1 = 0x80000000,
59 CX25840_VIN2_CH1 = 0x80000001,
60 CX25840_VIN3_CH1 = 0x80000002,
61 CX25840_VIN4_CH1 = 0x80000003,
62 CX25840_VIN5_CH1 = 0x80000004,
63 CX25840_VIN6_CH1 = 0x80000005,
64 CX25840_VIN7_CH1 = 0x80000006,
65 CX25840_VIN8_CH1 = 0x80000007,
66 CX25840_VIN4_CH2 = 0x80000000,
67 CX25840_VIN5_CH2 = 0x80000010,
68 CX25840_VIN6_CH2 = 0x80000020,
69 CX25840_NONE_CH2 = 0x80000030,
70 CX25840_VIN7_CH3 = 0x80000000,
71 CX25840_VIN8_CH3 = 0x80000040,
72 CX25840_NONE0_CH3 = 0x80000080,
73 CX25840_NONE1_CH3 = 0x800000c0,
74 CX25840_SVIDEO_ON = 0x80000100,
75 CX25840_COMPONENT_ON = 0x80000200,
76 CX25840_DIF_ON = 0x80000400,
79 enum cx25840_audio_input {
80 /* Audio inputs: serial or In4-In8 */
90 CX25840_PIN_DVALID_PRGM0 = 0,
91 CX25840_PIN_FIELD_PRGM1,
92 CX25840_PIN_HRESET_PRGM2,
93 CX25840_PIN_VRESET_HCTL_PRGM3,
94 CX25840_PIN_IRQ_N_PRGM4,
95 CX25840_PIN_IR_TX_PRGM6,
96 CX25840_PIN_IR_RX_PRGM5,
97 CX25840_PIN_GPIO0_PRGM8,
98 CX25840_PIN_GPIO1_PRGM9,
99 CX25840_PIN_SA_SDIN, /* Alternate GP Input only */
100 CX25840_PIN_SA_SDOUT, /* Alternate GP Input only */
101 CX25840_PIN_PLL_CLK_PRGM7,
102 CX25840_PIN_CHIP_SEL_VIPCLK, /* Output only */
105 enum cx25840_io_pad {
107 CX25840_PAD_DEFAULT = 0,
111 CX25840_PAD_VID_DATA_EXT0,
112 CX25840_PAD_VID_DATA_EXT1,
119 CX25840_PAD_AC_SDOUT,
122 CX25840_PAD_RESERVED,
123 /* Pads for PLL_CLK output only */
124 CX25840_PAD_XTI_X5_DLL,
135 enum cx25840_io_pin_strength {
136 CX25840_PIN_DRIVE_MEDIUM = 0,
137 CX25840_PIN_DRIVE_SLOW,
138 CX25840_PIN_DRIVE_FAST,
141 enum cx23885_io_pin {
142 CX23885_PIN_IR_RX_GPIO19,
143 CX23885_PIN_IR_TX_GPIO20,
144 CX23885_PIN_I2S_SDAT_GPIO21,
145 CX23885_PIN_I2S_WCLK_GPIO22,
146 CX23885_PIN_I2S_BCLK_GPIO23,
147 CX23885_PIN_IRQ_N_GPIO16,
150 enum cx23885_io_pad {
155 CX23885_PAD_I2S_SDAT,
157 CX23885_PAD_I2S_WCLK,
159 CX23885_PAD_I2S_BCLK,
165 /* pvr150_workaround activates a workaround for a hardware bug that is
166 present in Hauppauge PVR-150 (and possibly PVR-500) cards that have
167 certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The
168 audio autodetect fails on some channels for these models and the workaround
169 is to select the audio standard explicitly. Many thanks to Hauppauge for
170 providing this information.
171 This platform data only needs to be supplied by the ivtv driver. */
172 struct cx25840_platform_data {
173 int pvr150_workaround;