2022-07-01 03:35:29 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Google LLC
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _USB_MISC_ONBOARD_USB_HUB_H
|
|
|
|
#define _USB_MISC_ONBOARD_USB_HUB_H
|
|
|
|
|
2022-07-27 22:11:16 +08:00
|
|
|
struct onboard_hub_pdata {
|
|
|
|
unsigned long reset_us; /* reset pulse width in us */
|
2023-06-23 15:28:12 +08:00
|
|
|
unsigned int num_supplies; /* number of supplies */
|
2022-07-27 22:11:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct onboard_hub_pdata microchip_usb424_data = {
|
|
|
|
.reset_us = 1,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2022-07-27 22:11:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct onboard_hub_pdata realtek_rts5411_data = {
|
|
|
|
.reset_us = 0,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2022-07-27 22:11:16 +08:00
|
|
|
};
|
|
|
|
|
2022-07-27 22:11:17 +08:00
|
|
|
static const struct onboard_hub_pdata ti_tusb8041_data = {
|
|
|
|
.reset_us = 3000,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2022-07-27 22:11:17 +08:00
|
|
|
};
|
|
|
|
|
2023-06-23 15:28:13 +08:00
|
|
|
static const struct onboard_hub_pdata cypress_hx3_data = {
|
|
|
|
.reset_us = 10000,
|
|
|
|
.num_supplies = 2,
|
|
|
|
};
|
|
|
|
|
2022-12-06 13:52:25 +08:00
|
|
|
static const struct onboard_hub_pdata genesys_gl850g_data = {
|
|
|
|
.reset_us = 3,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2022-12-06 13:52:25 +08:00
|
|
|
};
|
|
|
|
|
2023-01-18 12:44:12 +08:00
|
|
|
static const struct onboard_hub_pdata genesys_gl852g_data = {
|
|
|
|
.reset_us = 50,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2023-01-18 12:44:12 +08:00
|
|
|
};
|
|
|
|
|
2023-01-18 12:44:16 +08:00
|
|
|
static const struct onboard_hub_pdata vialab_vl817_data = {
|
|
|
|
.reset_us = 10,
|
2023-06-23 15:28:12 +08:00
|
|
|
.num_supplies = 1,
|
2023-01-18 12:44:16 +08:00
|
|
|
};
|
|
|
|
|
2022-07-01 03:35:29 +08:00
|
|
|
static const struct of_device_id onboard_hub_match[] = {
|
2022-07-27 22:11:16 +08:00
|
|
|
{ .compatible = "usb424,2514", .data = µchip_usb424_data, },
|
2023-02-23 15:39:20 +08:00
|
|
|
{ .compatible = "usb424,2517", .data = µchip_usb424_data, },
|
2022-07-27 22:11:17 +08:00
|
|
|
{ .compatible = "usb451,8140", .data = &ti_tusb8041_data, },
|
|
|
|
{ .compatible = "usb451,8142", .data = &ti_tusb8041_data, },
|
2023-06-23 15:28:13 +08:00
|
|
|
{ .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },
|
|
|
|
{ .compatible = "usb4b4,6506", .data = &cypress_hx3_data, },
|
2022-12-06 13:52:25 +08:00
|
|
|
{ .compatible = "usb5e3,608", .data = &genesys_gl850g_data, },
|
2023-01-18 12:44:12 +08:00
|
|
|
{ .compatible = "usb5e3,610", .data = &genesys_gl852g_data, },
|
2023-06-23 22:22:28 +08:00
|
|
|
{ .compatible = "usb5e3,620", .data = &genesys_gl852g_data, },
|
2022-07-27 22:11:16 +08:00
|
|
|
{ .compatible = "usbbda,411", .data = &realtek_rts5411_data, },
|
|
|
|
{ .compatible = "usbbda,5411", .data = &realtek_rts5411_data, },
|
|
|
|
{ .compatible = "usbbda,414", .data = &realtek_rts5411_data, },
|
|
|
|
{ .compatible = "usbbda,5414", .data = &realtek_rts5411_data, },
|
2023-01-18 12:44:16 +08:00
|
|
|
{ .compatible = "usb2109,817", .data = &vialab_vl817_data, },
|
|
|
|
{ .compatible = "usb2109,2817", .data = &vialab_vl817_data, },
|
2022-07-01 03:35:29 +08:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _USB_MISC_ONBOARD_USB_HUB_H */
|