linux-stable/include/linux/platform_data/usb3503.h
Emanuele Ghidoli b91e610711 usb: misc: usb3503: support usb3803 and bypass mode
Add support for USB3803 and bypass mode, with this change
is also possible to move the component out of bypass mode.

In bypass mode the downstream port 3 is connected to the
upstream port with low switch resistance R_on.

Controlling mode of operations:

| RESET_N | BYPASS_N | Mode    |
--------------------------------
|    0    |    0     | standby |
|    1    |    0     | bypass  |
|    1    |    1     | hub     |

Datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/00001691D.pdf
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20230313165039.255579-4-francesco@dolcini.it
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16 12:18:03 +01:00

23 lines
431 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __USB3503_H__
#define __USB3503_H__
#define USB3503_I2C_NAME "usb3503"
#define USB3503_OFF_PORT1 (1 << 1)
#define USB3503_OFF_PORT2 (1 << 2)
#define USB3503_OFF_PORT3 (1 << 3)
enum usb3503_mode {
USB3503_MODE_UNKNOWN,
USB3503_MODE_HUB,
USB3503_MODE_STANDBY,
USB3503_MODE_BYPASS,
};
struct usb3503_platform_data {
enum usb3503_mode initial_mode;
u8 port_off_mask;
};
#endif