18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci/* 48c2ecf20Sopenharmony_ci * em28xx-reg.h - Register definitions for em28xx driver 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define EM_GPIO_0 ((unsigned char)BIT(0)) 88c2ecf20Sopenharmony_ci#define EM_GPIO_1 ((unsigned char)BIT(1)) 98c2ecf20Sopenharmony_ci#define EM_GPIO_2 ((unsigned char)BIT(2)) 108c2ecf20Sopenharmony_ci#define EM_GPIO_3 ((unsigned char)BIT(3)) 118c2ecf20Sopenharmony_ci#define EM_GPIO_4 ((unsigned char)BIT(4)) 128c2ecf20Sopenharmony_ci#define EM_GPIO_5 ((unsigned char)BIT(5)) 138c2ecf20Sopenharmony_ci#define EM_GPIO_6 ((unsigned char)BIT(6)) 148c2ecf20Sopenharmony_ci#define EM_GPIO_7 ((unsigned char)BIT(7)) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define EM_GPO_0 ((unsigned char)BIT(0)) 178c2ecf20Sopenharmony_ci#define EM_GPO_1 ((unsigned char)BIT(1)) 188c2ecf20Sopenharmony_ci#define EM_GPO_2 ((unsigned char)BIT(2)) 198c2ecf20Sopenharmony_ci#define EM_GPO_3 ((unsigned char)BIT(3)) 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* em28xx endpoints */ 228c2ecf20Sopenharmony_ci/* 0x82: (always ?) analog */ 238c2ecf20Sopenharmony_ci#define EM28XX_EP_AUDIO 0x83 248c2ecf20Sopenharmony_ci/* 0x84: digital or analog */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* em2800 registers */ 278c2ecf20Sopenharmony_ci#define EM2800_R08_AUDIOSRC 0x08 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* em28xx registers */ 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define EM28XX_R00_CHIPCFG 0x00 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* em28xx Chip Configuration 0x00 */ 348c2ecf20Sopenharmony_ci#define EM2860_CHIPCFG_VENDOR_AUDIO 0x80 358c2ecf20Sopenharmony_ci#define EM2860_CHIPCFG_I2S_VOLUME_CAPABLE 0x40 368c2ecf20Sopenharmony_ci#define EM2820_CHIPCFG_I2S_3_SAMPRATES 0x30 378c2ecf20Sopenharmony_ci#define EM2860_CHIPCFG_I2S_5_SAMPRATES 0x30 388c2ecf20Sopenharmony_ci#define EM2820_CHIPCFG_I2S_1_SAMPRATE 0x20 398c2ecf20Sopenharmony_ci#define EM2860_CHIPCFG_I2S_3_SAMPRATES 0x20 408c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG_AC97 0x10 418c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG_AUDIOMASK 0x30 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define EM28XX_R01_CHIPCFG2 0x01 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/* em28xx Chip Configuration 2 0x01 */ 468c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PRESENT 0x10 478c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_REQ_INTERVAL_MASK 0x0c /* bits 3-2 */ 488c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_REQ_INTERVAL_1MF 0x00 498c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_REQ_INTERVAL_2MF 0x04 508c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_REQ_INTERVAL_4MF 0x08 518c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_REQ_INTERVAL_8MF 0x0c 528c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PACKETSIZE_MASK 0x03 /* bits 0-1 */ 538c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PACKETSIZE_188 0x00 548c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PACKETSIZE_376 0x01 558c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PACKETSIZE_564 0x02 568c2ecf20Sopenharmony_ci#define EM28XX_CHIPCFG2_TS_PACKETSIZE_752 0x03 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci/* GPIO/GPO registers */ 598c2ecf20Sopenharmony_ci#define EM2880_R04_GPO 0x04 /* em2880-em2883 only */ 608c2ecf20Sopenharmony_ci#define EM2820_R08_GPIO_CTRL 0x08 /* em2820-em2873/83 only */ 618c2ecf20Sopenharmony_ci#define EM2820_R09_GPIO_STATE 0x09 /* em2820-em2873/83 only */ 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci#define EM28XX_R06_I2C_CLK 0x06 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci/* em28xx I2C Clock Register (0x06) */ 668c2ecf20Sopenharmony_ci#define EM28XX_I2C_CLK_ACK_LAST_READ 0x80 678c2ecf20Sopenharmony_ci#define EM28XX_I2C_CLK_WAIT_ENABLE 0x40 688c2ecf20Sopenharmony_ci#define EM28XX_I2C_EEPROM_ON_BOARD 0x08 698c2ecf20Sopenharmony_ci#define EM28XX_I2C_EEPROM_KEY_VALID 0x04 708c2ecf20Sopenharmony_ci#define EM2874_I2C_SECONDARY_BUS_SELECT 0x04 /* em2874 has two i2c buses */ 718c2ecf20Sopenharmony_ci#define EM28XX_I2C_FREQ_1_5_MHZ 0x03 /* bus frequency (bits [1-0]) */ 728c2ecf20Sopenharmony_ci#define EM28XX_I2C_FREQ_25_KHZ 0x02 738c2ecf20Sopenharmony_ci#define EM28XX_I2C_FREQ_400_KHZ 0x01 748c2ecf20Sopenharmony_ci#define EM28XX_I2C_FREQ_100_KHZ 0x00 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#define EM28XX_R0A_CHIPID 0x0a 778c2ecf20Sopenharmony_ci#define EM28XX_R0C_USBSUSP 0x0c 788c2ecf20Sopenharmony_ci#define EM28XX_R0C_USBSUSP_SNAPSHOT 0x20 /* 1=button pressed, needs reset */ 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#define EM28XX_R0E_AUDIOSRC 0x0e 818c2ecf20Sopenharmony_ci#define EM28XX_R0F_XCLK 0x0f 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci/* em28xx XCLK Register (0x0f) */ 848c2ecf20Sopenharmony_ci#define EM28XX_XCLK_AUDIO_UNMUTE 0x80 /* otherwise audio muted */ 858c2ecf20Sopenharmony_ci#define EM28XX_XCLK_I2S_MSB_TIMING 0x40 /* otherwise standard timing */ 868c2ecf20Sopenharmony_ci#define EM28XX_XCLK_IR_RC5_MODE 0x20 /* otherwise NEC mode */ 878c2ecf20Sopenharmony_ci#define EM28XX_XCLK_IR_NEC_CHK_PARITY 0x10 888c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_30MHZ 0x00 /* Freq. select (bits [3-0]) */ 898c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_15MHZ 0x01 908c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_10MHZ 0x02 918c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_7_5MHZ 0x03 928c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_6MHZ 0x04 938c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_5MHZ 0x05 948c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_4_3MHZ 0x06 958c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_12MHZ 0x07 968c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_20MHZ 0x08 978c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_20MHZ_2 0x09 988c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_48MHZ 0x0a 998c2ecf20Sopenharmony_ci#define EM28XX_XCLK_FREQUENCY_24MHZ 0x0b 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define EM28XX_R10_VINMODE 0x10 1028c2ecf20Sopenharmony_ci /* used by all non-camera devices: */ 1038c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_YUV422_CbYCrY 0x10 1048c2ecf20Sopenharmony_ci /* used by camera devices: */ 1058c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_YUV422_YUYV 0x08 1068c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_YUV422_YVYU 0x09 1078c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_YUV422_UYVY 0x0a 1088c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_YUV422_VYUY 0x0b 1098c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_RGB8_BGGR 0x0c 1108c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_RGB8_GRBG 0x0d 1118c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_RGB8_GBRG 0x0e 1128c2ecf20Sopenharmony_ci#define EM28XX_VINMODE_RGB8_RGGB 0x0f 1138c2ecf20Sopenharmony_ci /* 1148c2ecf20Sopenharmony_ci * apparently: 1158c2ecf20Sopenharmony_ci * bit 0: swap component 1+2 with 3+4 1168c2ecf20Sopenharmony_ci * => e.g.: YUYV => YVYU, BGGR => GRBG 1178c2ecf20Sopenharmony_ci * bit 1: swap component 1 with 2 and 3 with 4 1188c2ecf20Sopenharmony_ci * => e.g.: YUYV => UYVY, BGGR => GBRG 1198c2ecf20Sopenharmony_ci */ 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci#define EM28XX_R11_VINCTRL 0x11 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci/* em28xx Video Input Control Register 0x11 */ 1248c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_VBI_SLICED 0x80 1258c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_VBI_RAW 0x40 1268c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_VOUT_MODE_IN 0x20 /* HREF,VREF,VACT in output */ 1278c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_CCIR656_ENABLE 0x10 1288c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_VBI_16BIT_RAW 0x08 /* otherwise 8-bit raw */ 1298c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_FID_ON_HREF 0x04 1308c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_DUAL_EDGE_STROBE 0x02 1318c2ecf20Sopenharmony_ci#define EM28XX_VINCTRL_INTERLACED 0x01 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci#define EM28XX_R12_VINENABLE 0x12 /* */ 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci#define EM28XX_R14_GAMMA 0x14 1368c2ecf20Sopenharmony_ci#define EM28XX_R15_RGAIN 0x15 1378c2ecf20Sopenharmony_ci#define EM28XX_R16_GGAIN 0x16 1388c2ecf20Sopenharmony_ci#define EM28XX_R17_BGAIN 0x17 1398c2ecf20Sopenharmony_ci#define EM28XX_R18_ROFFSET 0x18 1408c2ecf20Sopenharmony_ci#define EM28XX_R19_GOFFSET 0x19 1418c2ecf20Sopenharmony_ci#define EM28XX_R1A_BOFFSET 0x1a 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci#define EM28XX_R1B_OFLOW 0x1b 1448c2ecf20Sopenharmony_ci#define EM28XX_R1C_HSTART 0x1c 1458c2ecf20Sopenharmony_ci#define EM28XX_R1D_VSTART 0x1d 1468c2ecf20Sopenharmony_ci#define EM28XX_R1E_CWIDTH 0x1e 1478c2ecf20Sopenharmony_ci#define EM28XX_R1F_CHEIGHT 0x1f 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci#define EM28XX_R20_YGAIN 0x20 /* contrast [0:4] */ 1508c2ecf20Sopenharmony_ci#define CONTRAST_DEFAULT 0x10 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci#define EM28XX_R21_YOFFSET 0x21 /* brightness */ /* signed */ 1538c2ecf20Sopenharmony_ci#define BRIGHTNESS_DEFAULT 0x00 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci#define EM28XX_R22_UVGAIN 0x22 /* saturation [0:4] */ 1568c2ecf20Sopenharmony_ci#define SATURATION_DEFAULT 0x10 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci#define EM28XX_R23_UOFFSET 0x23 /* blue balance */ /* signed */ 1598c2ecf20Sopenharmony_ci#define BLUE_BALANCE_DEFAULT 0x00 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define EM28XX_R24_VOFFSET 0x24 /* red balance */ /* signed */ 1628c2ecf20Sopenharmony_ci#define RED_BALANCE_DEFAULT 0x00 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci#define EM28XX_R25_SHARPNESS 0x25 /* sharpness [0:4] */ 1658c2ecf20Sopenharmony_ci#define SHARPNESS_DEFAULT 0x00 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci#define EM28XX_R26_COMPR 0x26 1688c2ecf20Sopenharmony_ci#define EM28XX_R27_OUTFMT 0x27 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci/* em28xx Output Format Register (0x27) */ 1718c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_8_RGRG 0x00 1728c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_8_GRGR 0x01 1738c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_8_GBGB 0x02 1748c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_8_BGBG 0x03 1758c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_16_656 0x04 1768c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_RGB_8_BAYER 0x08 /* Pattern in Reg 0x10[1-0] */ 1778c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_YUV211 0x10 1788c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_YUV422_Y0UY1V 0x14 1798c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_YUV422_Y1UY0V 0x15 1808c2ecf20Sopenharmony_ci#define EM28XX_OUTFMT_YUV411 0x18 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci#define EM28XX_R28_XMIN 0x28 1838c2ecf20Sopenharmony_ci#define EM28XX_R29_XMAX 0x29 1848c2ecf20Sopenharmony_ci#define EM28XX_R2A_YMIN 0x2a 1858c2ecf20Sopenharmony_ci#define EM28XX_R2B_YMAX 0x2b 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci#define EM28XX_R30_HSCALELOW 0x30 1888c2ecf20Sopenharmony_ci#define EM28XX_R31_HSCALEHIGH 0x31 1898c2ecf20Sopenharmony_ci#define EM28XX_R32_VSCALELOW 0x32 1908c2ecf20Sopenharmony_ci#define EM28XX_R33_VSCALEHIGH 0x33 1918c2ecf20Sopenharmony_ci#define EM28XX_HVSCALE_MAX 0x3fff /* => 20% */ 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ci#define EM28XX_R34_VBI_START_H 0x34 1948c2ecf20Sopenharmony_ci#define EM28XX_R35_VBI_START_V 0x35 1958c2ecf20Sopenharmony_ci/* 1968c2ecf20Sopenharmony_ci * NOTE: the EM276x (and EM25xx, EM277x/8x ?) (camera bridges) use these 1978c2ecf20Sopenharmony_ci * registers for a different unknown purpose. 1988c2ecf20Sopenharmony_ci * => register 0x34 is set to capture width / 16 1998c2ecf20Sopenharmony_ci * => register 0x35 is set to capture height / 16 2008c2ecf20Sopenharmony_ci */ 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci#define EM28XX_R36_VBI_WIDTH 0x36 2038c2ecf20Sopenharmony_ci#define EM28XX_R37_VBI_HEIGHT 0x37 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci#define EM28XX_R40_AC97LSB 0x40 2068c2ecf20Sopenharmony_ci#define EM28XX_R41_AC97MSB 0x41 2078c2ecf20Sopenharmony_ci#define EM28XX_R42_AC97ADDR 0x42 2088c2ecf20Sopenharmony_ci#define EM28XX_R43_AC97BUSY 0x43 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci#define EM28XX_R45_IR 0x45 2118c2ecf20Sopenharmony_ci /* 2128c2ecf20Sopenharmony_ci * 0x45 bit 7 - parity bit 2138c2ecf20Sopenharmony_ci * bits 6-0 - count 2148c2ecf20Sopenharmony_ci * 0x46 IR brand 2158c2ecf20Sopenharmony_ci * 0x47 IR data 2168c2ecf20Sopenharmony_ci */ 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci/* em2874 registers */ 2198c2ecf20Sopenharmony_ci#define EM2874_R50_IR_CONFIG 0x50 2208c2ecf20Sopenharmony_ci#define EM2874_R51_IR 0x51 2218c2ecf20Sopenharmony_ci#define EM2874_R5D_TS1_PKT_SIZE 0x5d 2228c2ecf20Sopenharmony_ci#define EM2874_R5E_TS2_PKT_SIZE 0x5e 2238c2ecf20Sopenharmony_ci /* 2248c2ecf20Sopenharmony_ci * For both TS1 and TS2, In isochronous mode: 2258c2ecf20Sopenharmony_ci * 0x01 188 bytes 2268c2ecf20Sopenharmony_ci * 0x02 376 bytes 2278c2ecf20Sopenharmony_ci * 0x03 564 bytes 2288c2ecf20Sopenharmony_ci * 0x04 752 bytes 2298c2ecf20Sopenharmony_ci * 0x05 940 bytes 2308c2ecf20Sopenharmony_ci * In bulk mode: 2318c2ecf20Sopenharmony_ci * 0x01..0xff total packet count in 188-byte 2328c2ecf20Sopenharmony_ci */ 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci#define EM2874_R5F_TS_ENABLE 0x5f 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci/* em2874/174/84, em25xx, em276x/7x/8x GPIO registers */ 2378c2ecf20Sopenharmony_ci/* 2388c2ecf20Sopenharmony_ci * NOTE: not all ports are bonded out; 2398c2ecf20Sopenharmony_ci * Some ports are multiplexed with special function I/O 2408c2ecf20Sopenharmony_ci */ 2418c2ecf20Sopenharmony_ci#define EM2874_R80_GPIO_P0_CTRL 0x80 2428c2ecf20Sopenharmony_ci#define EM2874_R81_GPIO_P1_CTRL 0x81 2438c2ecf20Sopenharmony_ci#define EM2874_R82_GPIO_P2_CTRL 0x82 2448c2ecf20Sopenharmony_ci#define EM2874_R83_GPIO_P3_CTRL 0x83 2458c2ecf20Sopenharmony_ci#define EM2874_R84_GPIO_P0_STATE 0x84 2468c2ecf20Sopenharmony_ci#define EM2874_R85_GPIO_P1_STATE 0x85 2478c2ecf20Sopenharmony_ci#define EM2874_R86_GPIO_P2_STATE 0x86 2488c2ecf20Sopenharmony_ci#define EM2874_R87_GPIO_P3_STATE 0x87 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci/* em2874 IR config register (0x50) */ 2518c2ecf20Sopenharmony_ci#define EM2874_IR_NEC 0x00 2528c2ecf20Sopenharmony_ci#define EM2874_IR_NEC_NO_PARITY 0x01 2538c2ecf20Sopenharmony_ci#define EM2874_IR_RC5 0x04 2548c2ecf20Sopenharmony_ci#define EM2874_IR_RC6_MODE_0 0x08 2558c2ecf20Sopenharmony_ci#define EM2874_IR_RC6_MODE_6A 0x0b 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci/* em2874 Transport Stream Enable Register (0x5f) */ 2588c2ecf20Sopenharmony_ci#define EM2874_TS1_CAPTURE_ENABLE ((unsigned char)BIT(0)) 2598c2ecf20Sopenharmony_ci#define EM2874_TS1_FILTER_ENABLE ((unsigned char)BIT(1)) 2608c2ecf20Sopenharmony_ci#define EM2874_TS1_NULL_DISCARD ((unsigned char)BIT(2)) 2618c2ecf20Sopenharmony_ci#define EM2874_TS2_CAPTURE_ENABLE ((unsigned char)BIT(4)) 2628c2ecf20Sopenharmony_ci#define EM2874_TS2_FILTER_ENABLE ((unsigned char)BIT(5)) 2638c2ecf20Sopenharmony_ci#define EM2874_TS2_NULL_DISCARD ((unsigned char)BIT(6)) 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci/* register settings */ 2668c2ecf20Sopenharmony_ci#define EM2800_AUDIO_SRC_TUNER 0x0d 2678c2ecf20Sopenharmony_ci#define EM2800_AUDIO_SRC_LINE 0x0c 2688c2ecf20Sopenharmony_ci#define EM28XX_AUDIO_SRC_TUNER 0xc0 2698c2ecf20Sopenharmony_ci#define EM28XX_AUDIO_SRC_LINE 0x80 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci/* FIXME: Need to be populated with the other chip ID's */ 2728c2ecf20Sopenharmony_cienum em28xx_chip_id { 2738c2ecf20Sopenharmony_ci CHIP_ID_EM2800 = 7, 2748c2ecf20Sopenharmony_ci CHIP_ID_EM2710 = 17, 2758c2ecf20Sopenharmony_ci CHIP_ID_EM2820 = 18, /* Also used by some em2710 */ 2768c2ecf20Sopenharmony_ci CHIP_ID_EM2840 = 20, 2778c2ecf20Sopenharmony_ci CHIP_ID_EM2750 = 33, 2788c2ecf20Sopenharmony_ci CHIP_ID_EM2860 = 34, 2798c2ecf20Sopenharmony_ci CHIP_ID_EM2870 = 35, 2808c2ecf20Sopenharmony_ci CHIP_ID_EM2883 = 36, 2818c2ecf20Sopenharmony_ci CHIP_ID_EM2765 = 54, 2828c2ecf20Sopenharmony_ci CHIP_ID_EM2874 = 65, 2838c2ecf20Sopenharmony_ci CHIP_ID_EM2884 = 68, 2848c2ecf20Sopenharmony_ci CHIP_ID_EM28174 = 113, 2858c2ecf20Sopenharmony_ci CHIP_ID_EM28178 = 114, 2868c2ecf20Sopenharmony_ci}; 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci/* 2898c2ecf20Sopenharmony_ci * Registers used by em202 2908c2ecf20Sopenharmony_ci */ 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci/* EMP202 vendor registers */ 2938c2ecf20Sopenharmony_ci#define EM202_EXT_MODEM_CTRL 0x3e 2948c2ecf20Sopenharmony_ci#define EM202_GPIO_CONF 0x4c 2958c2ecf20Sopenharmony_ci#define EM202_GPIO_POLARITY 0x4e 2968c2ecf20Sopenharmony_ci#define EM202_GPIO_STICKY 0x50 2978c2ecf20Sopenharmony_ci#define EM202_GPIO_MASK 0x52 2988c2ecf20Sopenharmony_ci#define EM202_GPIO_STATUS 0x54 2998c2ecf20Sopenharmony_ci#define EM202_SPDIF_OUT_SEL 0x6a 3008c2ecf20Sopenharmony_ci#define EM202_ANTIPOP 0x72 3018c2ecf20Sopenharmony_ci#define EM202_EAPD_GPIO_ACCESS 0x74 302