1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (c) 2022, Google LLC 4 */ 5 6 #ifndef _USB_MISC_ONBOARD_USB_DEV_H 7 #define _USB_MISC_ONBOARD_USB_DEV_H 8 9 #define MAX_SUPPLIES 2 10 11 struct onboard_dev_pdata { 12 unsigned long reset_us; /* reset pulse width in us */ 13 unsigned long power_on_delay_us; /* power on delay in us */ 14 unsigned int num_supplies; /* number of supplies */ 15 const char * const supply_names[MAX_SUPPLIES]; 16 bool is_hub; 17 }; 18 19 static const struct onboard_dev_pdata microchip_usb424_data = { 20 .reset_us = 1, 21 .num_supplies = 1, 22 .supply_names = { "vdd" }, 23 .is_hub = true, 24 }; 25 26 static const struct onboard_dev_pdata microchip_usb5744_data = { 27 .reset_us = 0, 28 .power_on_delay_us = 10000, 29 .num_supplies = 2, 30 .supply_names = { "vdd", "vdd2" }, 31 .is_hub = true, 32 }; 33 34 static const struct onboard_dev_pdata realtek_rts5411_data = { 35 .reset_us = 0, 36 .num_supplies = 1, 37 .supply_names = { "vdd" }, 38 .is_hub = true, 39 }; 40 41 static const struct onboard_dev_pdata ti_tusb8020b_data = { 42 .reset_us = 3000, 43 .num_supplies = 1, 44 .supply_names = { "vdd" }, 45 .is_hub = true, 46 }; 47 48 static const struct onboard_dev_pdata ti_tusb8041_data = { 49 .reset_us = 3000, 50 .num_supplies = 1, 51 .supply_names = { "vdd" }, 52 .is_hub = true, 53 }; 54 55 static const struct onboard_dev_pdata cypress_hx3_data = { 56 .reset_us = 10000, 57 .num_supplies = 2, 58 .supply_names = { "vdd", "vdd2" }, 59 .is_hub = true, 60 }; 61 62 static const struct onboard_dev_pdata cypress_hx2vl_data = { 63 .reset_us = 1, 64 .num_supplies = 1, 65 .supply_names = { "vdd" }, 66 .is_hub = true, 67 }; 68 69 static const struct onboard_dev_pdata genesys_gl850g_data = { 70 .reset_us = 3, 71 .num_supplies = 1, 72 .supply_names = { "vdd" }, 73 .is_hub = true, 74 }; 75 76 static const struct onboard_dev_pdata genesys_gl852g_data = { 77 .reset_us = 50, 78 .num_supplies = 1, 79 .supply_names = { "vdd" }, 80 .is_hub = true, 81 }; 82 83 static const struct onboard_dev_pdata vialab_vl817_data = { 84 .reset_us = 10, 85 .num_supplies = 1, 86 .supply_names = { "vdd" }, 87 .is_hub = true, 88 }; 89 90 static const struct onboard_dev_pdata xmos_xvf3500_data = { 91 .reset_us = 1, 92 .num_supplies = 2, 93 .supply_names = { "vdd", "vddio" }, 94 .is_hub = false, 95 }; 96 97 static const struct of_device_id onboard_dev_match[] = { 98 { .compatible = "usb424,2412", .data = µchip_usb424_data, }, 99 { .compatible = "usb424,2514", .data = µchip_usb424_data, }, 100 { .compatible = "usb424,2517", .data = µchip_usb424_data, }, 101 { .compatible = "usb424,2744", .data = µchip_usb5744_data, }, 102 { .compatible = "usb424,5744", .data = µchip_usb5744_data, }, 103 { .compatible = "usb451,8025", .data = &ti_tusb8020b_data, }, 104 { .compatible = "usb451,8027", .data = &ti_tusb8020b_data, }, 105 { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, 106 { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, 107 { .compatible = "usb4b4,6504", .data = &cypress_hx3_data, }, 108 { .compatible = "usb4b4,6506", .data = &cypress_hx3_data, }, 109 { .compatible = "usb4b4,6570", .data = &cypress_hx2vl_data, }, 110 { .compatible = "usb5e3,608", .data = &genesys_gl850g_data, }, 111 { .compatible = "usb5e3,610", .data = &genesys_gl852g_data, }, 112 { .compatible = "usb5e3,620", .data = &genesys_gl852g_data, }, 113 { .compatible = "usb5e3,626", .data = &genesys_gl852g_data, }, 114 { .compatible = "usbbda,411", .data = &realtek_rts5411_data, }, 115 { .compatible = "usbbda,5411", .data = &realtek_rts5411_data, }, 116 { .compatible = "usbbda,414", .data = &realtek_rts5411_data, }, 117 { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, 118 { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, 119 { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, 120 { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, 121 {} 122 }; 123 124 #endif /* _USB_MISC_ONBOARD_USB_DEV_H */ 125