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