foxconn: add subsystem ID support for T99W696

T99W696 is the first Foxconn PCIE modem whick uses Qualcomm's VID/
PID. Driver ref: https://lore.kernel.org/mhi/20250528092232.16111-1-slark_xiao@163.com

This changes include 2 parts:
i:  Add device for foxconn plugin
ii: Show SSVID/SSPID for parameter "--firmware-status". This helps
    the fwupd get the right firmware upgrade method.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
This commit is contained in:
Slark Xiao
2025-06-14 15:23:33 -05:00
committed by Dan Williams
parent 8486641f92
commit bf5458acdd
3 changed files with 27 additions and 11 deletions
@@ -88,6 +88,7 @@ needs_qdu_and_mcfg_apps_version (MMIfaceModemFirmware *self)
{
guint vendor_id;
guint product_id;
guint subsystem_vid;
/* 0x105b is the T99W175 module, T99W175 supports QDU and requires MCFG+APPS version.
* T99W265(0x0489:0xe0da ; 0x0489:0xe0db): supports QDU and requires MCFG+APPS version.
@@ -95,7 +96,8 @@ needs_qdu_and_mcfg_apps_version (MMIfaceModemFirmware *self)
*/
vendor_id = mm_base_modem_get_vendor_id (MM_BASE_MODEM (self));
product_id = mm_base_modem_get_product_id (MM_BASE_MODEM (self));
return (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db)));
subsystem_vid = mm_base_modem_get_subsystem_vendor_id (MM_BASE_MODEM (self));
return (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db)) || subsystem_vid == 0x105b);
}
/*****************************************************************************/
@@ -582,7 +584,9 @@ mm_broadband_modem_mbim_foxconn_new (const gchar *device,
const gchar **drivers,
const gchar *plugin,
guint16 vendor_id,
guint16 product_id)
guint16 product_id,
guint16 subsystem_vendor_id,
guint16 subsystem_device_id)
{
const gchar *carrier_config_mapping = NULL;
@@ -598,6 +602,8 @@ mm_broadband_modem_mbim_foxconn_new (const gchar *device,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
MM_BASE_MODEM_SUBSYSTEM_VENDOR_ID, subsystem_vendor_id,
MM_BASE_MODEM_SUBSYSTEM_DEVICE_ID, subsystem_device_id,
/* MBIM bearer supports NET only */
MM_BASE_MODEM_DATA_NET_SUPPORTED, TRUE,
MM_BASE_MODEM_DATA_TTY_SUPPORTED, FALSE,
@@ -45,6 +45,8 @@ MMBroadbandModemMbimFoxconn *mm_broadband_modem_mbim_foxconn_new (const gchar *
const gchar **driver,
const gchar *plugin,
guint16 vendor_id,
guint16 product_id);
guint16 product_id,
guint16 subsystem_vendor_id,
guint16 subsystem_device_id);
#endif /* MM_BROADBAND_MODEM_MBIM_FOXCONN_H */
+16 -8
View File
@@ -74,7 +74,9 @@ create_modem (MMPlugin *self,
drivers,
mm_plugin_get_name (self),
vendor,
product));
product,
subsystem_vendor,
subsystem_device));
}
#endif
@@ -97,16 +99,22 @@ mm_plugin_create_foxconn (void)
0x0489, /* usb vid */
0x105b, /* pci vid */
0 };
static const mm_uint16_pair subsystem_vendor_ids[] = {
{0x17cb, 0x105b }, /* QC VID, Foxconn Sub-VID*/
{0x105b, 0x105b }, /* Foxconn VID, Foxconn Sub-VID*/
{0, 0 }
};
return MM_PLUGIN (
g_object_new (MM_TYPE_PLUGIN_FOXCONN,
MM_PLUGIN_NAME, MM_MODULE_NAME,
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_ALLOWED_AT, TRUE,
MM_PLUGIN_ALLOWED_QCDM, TRUE,
MM_PLUGIN_ALLOWED_QMI, TRUE,
MM_PLUGIN_ALLOWED_MBIM, TRUE,
MM_PLUGIN_NAME, MM_MODULE_NAME,
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_ALLOWED_SUBSYSTEM_VENDOR_IDS, subsystem_vendor_ids,
MM_PLUGIN_ALLOWED_AT, TRUE,
MM_PLUGIN_ALLOWED_QCDM, TRUE,
MM_PLUGIN_ALLOWED_QMI, TRUE,
MM_PLUGIN_ALLOWED_MBIM, TRUE,
NULL));
}