Lines Matching +full:disable +full:- +full:port +full:- +full:power +full:- +full:control
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
48 #define MCS7840_DEV_REG_CONTROL1 0x01 /* Control bits for UART 1,
50 #define MCS7840_DEV_REG_PINPONGHIGH 0x02 /* High bits of ping-pong
52 #define MCS7840_DEV_REG_PINPONGLOW 0x03 /* Low bits of ping-pong
59 #define MCS7840_DEV_REG_CONTROL2 0x09 /* Control bits for UART 2,
62 #define MCS7840_DEV_REG_CONTROL3 0x0b /* Control bits for UART 3,
65 #define MCS7840_DEV_REG_CONTROL4 0x0d /* Control bits for UART 4,
67 #define MCS7840_DEV_REG_PLL_DIV_M 0x0e /* Pre-diviedr for PLL, R/W */
71 * endpoint control, R/W */
78 /* DCRx_2-DCRx_4 Registers goes here (see below, they are documented) */
94 * configuration for Port 1,
97 * configuration for Port 2,
100 * configuration for Port 3,
103 * configuration for Port 4,
109 #define MCS7840_DEV_REG_BI_FIFO_STAT1 0x32 /* Bulk-In FIFO Stat for Port
112 #define MCS7840_DEV_REG_BO_FIFO_STAT1 0x33 /* Bulk-out FIFO Stat for Port
115 #define MCS7840_DEV_REG_BI_FIFO_STAT2 0x34 /* Bulk-In FIFO Stat for Port
118 #define MCS7840_DEV_REG_BO_FIFO_STAT2 0x35 /* Bulk-out FIFO Stat for Port
121 #define MCS7840_DEV_REG_BI_FIFO_STAT3 0x36 /* Bulk-In FIFO Stat for Port
124 #define MCS7840_DEV_REG_BO_FIFO_STAT3 0x37 /* Bulk-out FIFO Stat for Port
127 #define MCS7840_DEV_REG_BI_FIFO_STAT4 0x38 /* Bulk-In FIFO Stat for Port
130 #define MCS7840_DEV_REG_BO_FIFO_STAT4 0x39 /* Bulk-out FIFO Stat for Port
134 * frames for Port 1, R/W */
136 * frames for Port 1, R/W */
138 * frames for Port 1, R/W */
140 * frames for Port 1, R/W */
141 #define MCS7840_DEV_REG_ZERO_ENABLE 0x3e /* Enable/disable of zero out
144 * value for Bulk-Out for Port
147 * value for Bulk-Out and
148 * enable flag for Port 1, R/W */
150 * value for Bulk-Out for Port
153 * value for Bulk-Out and
154 * enable flag for Port 2, R/W */
156 * value for Bulk-Out for Port
159 * value for Bulk-Out and
160 * enable flag for Port 3, R/W */
162 * value for Bulk-Out for Port
165 * value for Bulk-Out and
166 * enable flag for Port 4, R/W */
169 #define MCS7840_DEV_SPx_LOOP_PIPES 0x01 /* Loop Bulk-Out FIFO to the
170 * Bulk-In FIFO, default = 0 */
174 #define MCS7840_DEV_SPx_RESET_OUT_FIFO 0x04 /* Reset Bulk-Out FIFO */
175 #define MCS7840_DEV_SPx_RESET_IN_FIFO 0x08 /* Reset Bulk-In FIFO */
200 * control (when power
217 #define MCS7840_DEV_CONTROLx_RX_DISABLE 0x20 /* Disable RX logic,
219 * RS-232/RS-485 mode,
221 #define MCS7840_DEV_CONTROLx_FSM_CONTROL 0x40 /* Disable RX FSM when
229 * These registers control how often two input buffers
230 * for Bulk-In FIFOs are swapped. One of buffers is used
240 * THIS ONE IS UNDOCUMENTED IN FULL DATASHEET, but e-mail from tech support
243 * authors as "number of port" indicator, grounded (0) for two-port
244 * devices and pulled-up to 1 for 4-port devices.
255 * Default PLL input frequency Fin is 12Mhz (on-chip).
276 #define MCS7840_DEV_CLOCK_MUX_INEXTRN 0x01 /* External (device-depended)
281 * 20MHz-100MHz (default), 1 =
282 * 100MHz-300MHz range */
293 #define MCS7840_DEV_CLOCK_SELECT1_MASK 0x07 /* Bits for port 1 in
295 #define MCS7840_DEV_CLOCK_SELECT1_SHIFT 0 /* Shift for port 1in
297 #define MCS7840_DEV_CLOCK_SELECT2_MASK 0x38 /* Bits for port 2 in
299 #define MCS7840_DEV_CLOCK_SELECT2_SHIFT 3 /* Shift for port 2 in
301 #define MCS7840_DEV_CLOCK_SELECT3_MASK 0x07 /* Bits for port 3 in
303 #define MCS7840_DEV_CLOCK_SELECT3_SHIFT 0 /* Shift for port 3 in
305 #define MCS7840_DEV_CLOCK_SELECT4_MASK 0x38 /* Bits for port 4 in
307 #define MCS7840_DEV_CLOCK_SELECT4_SHIFT 3 /* Shift for port 4 in
318 * (device-dependend) */
331 #define MCS7840_DEV_MODE_PORBYPASS 0x10 /* 1: Power-On Reset is
349 * These registers control when bit value will be sampled within
353 #define MCS7840_DEV_RX_SAMPLING1_MASK 0x0f /* Bits for port 1 in
355 #define MCS7840_DEV_RX_SAMPLING1_SHIFT 0 /* Shift for port 1in
357 #define MCS7840_DEV_RX_SAMPLING2_MASK 0xf0 /* Bits for port 2 in
359 #define MCS7840_DEV_RX_SAMPLING2_SHIFT 4 /* Shift for port 2 in
361 #define MCS7840_DEV_RX_SAMPLING3_MASK 0x0f /* Bits for port 3 in
363 #define MCS7840_DEV_RX_SAMPLING3_SHIFT 0 /* Shift for port 3 in
365 #define MCS7840_DEV_RX_SAMPLING4_MASK 0xf0 /* Bits for port 4 in
367 #define MCS7840_DEV_RX_SAMPLING4_SHIFT 4 /* Shift for port 4 in
375 #define MCS7840_DEV_ZERO_PERIODx_DEF 20 /* Number of Bulk-in requests
376 * befor sending zero-sized
381 * zero-sized replies for port
384 * zero-sized replies for port
387 * zero-sized replies for port
390 * zero-sized replies for port
400 #define MCS7840_DEV_REG_DCR0_1 0x04 /* Device contol register 0 for Port
402 #define MCS7840_DEV_REG_DCR1_1 0x05 /* Device contol register 1 for Port
404 #define MCS7840_DEV_REG_DCR2_1 0x06 /* Device contol register 2 for Port
406 #define MCS7840_DEV_REG_DCR0_2 0x16 /* Device contol register 0 for Port
408 #define MCS7840_DEV_REG_DCR1_2 0x17 /* Device contol register 1 for Port
410 #define MCS7840_DEV_REG_DCR2_2 0x18 /* Device contol register 2 for Port
412 #define MCS7840_DEV_REG_DCR0_3 0x19 /* Device contol register 0 for Port
414 #define MCS7840_DEV_REG_DCR1_3 0x1a /* Device contol register 1 for Port
416 #define MCS7840_DEV_REG_DCR2_3 0x1b /* Device contol register 2 for Port
418 #define MCS7840_DEV_REG_DCR0_4 0x1c /* Device contol register 0 for Port
420 #define MCS7840_DEV_REG_DCR1_4 0x1d /* Device contol register 1 for Port
422 #define MCS7840_DEV_REG_DCR2_4 0x1e /* Device contol register 2 for Port
431 * ONLY FOR PORT 1 */
432 #define MCS7840_DEV_DCR0_GPIO_MODE_IN 0x00 /* GPIO Mode - Input
434 * FOR PORT 1 */
435 #define MCS7840_DEV_DCR0_GPIO_MODE_OUT 0x08 /* GPIO Mode - Input
437 * FOR PORT 1 */
450 * ONLY FOR PORT 1 */
453 * PORT 1 */
456 * ONLY FOR PORT 1 */
459 * PORT 1 */
462 * PORT 1 */
473 #define MCS7840_DEV_DCR1_WAKEUP_DISABLE 0x10 /* Disable Remote USB
475 #define MCS7840_DEV_DCR1_PLLPWRDOWN_DISABLE 0x20 /* Disable PLL power
477 * WORKS ONLY FOR PORT 1 */
481 * WORKS ONLY FOR PORT 1 */
486 * Wakeup will work only if DCR0_IRDA = 0 (RS-xxx mode) and
510 * Thesse can be calculated as "1 << portnumber" for Bulk-out and
511 * "1 << (portnumber+1)" for Bulk-in
527 #define MCS7840_UART_REG_IER 0x01 /* Interrupt enable register -
529 #define MCS7840_UART_REG_FCR 0x02 /* FIFO Control register -
533 #define MCS7840_UART_REG_LCR 0x03 /* Line control register R/W */
534 #define MCS7840_UART_REG_MCR 0x04 /* Modem control register R/W */
581 #define MCS7840_UART_LCR_STOPB2 0x04 /* 1.5-2 stop bits depends on
585 #define MCS7840_UART_LCR_PARITYON 0x08 /* Parity ON/OFF - ON */
614 #define MCS7840_UART_MCR_CTSRTS 0x20 /* Enable CTS/RTS flow control
616 #define MCS7840_UART_MCR_DTRDSR 0x40 /* Enable DTR/DSR flow control
618 #define MCS7840_UART_MCR_DCD 0x80 /* Enable DCD flow control in
636 #define MCS7840_UART_SCRATCHPAD_RS232 0x00 /* RS-485 disabled */
637 #define MCS7840_UART_SCRATCHPAD_RS485_DTRRX 0x80 /* RS-485 mode, DTR High
639 #define MCS7840_UART_SCRATCHPAD_RS485_DTRTX 0xc0 /* RS-485 mode, DTR High