* [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101
@ 2025-09-26 6:02 Oleksandr Suvorov
2025-10-14 14:53 ` Johan Hovold
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Suvorov @ 2025-09-26 6:02 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman, linux-usb, linux-kernel
Cc: Oleksandr Suvorov
The U-Blox has a USB Type-C port that presents itself as a USB device
(1546:0506) [1] with four attached FTDI serial ports, connected to:
- EVK-M101 current sensors
- EVK-M101 I2C
- EVK-M101 UART
- EVK-M101 port D
This commit registers U-Blox's VID/PID of this device so that FTDI SIO driver
successfully registers these 4 serial ports.
[1]
usb 5-1.3: new high-speed USB device number 11 using xhci_hcd
usb 5-1.3: New USB device found, idVendor=1546, idProduct=0506, bcdDevice= 8.00
usb 5-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-1.3: Product: EVK-M101
usb 5-1.3: Manufacturer: u-blox AG
Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
---
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 49666c33b41f..5fc9266c1cb3 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1074,6 +1074,7 @@ static const struct usb_device_id id_table_combined[] = {
/* U-Blox devices */
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
+ { USB_DEVICE(UBLOX_VID, UBLOX_EVK_M101_PID) },
/* FreeCalypso USB adapters */
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 4cc1fae8acb9..2539b9e2f712 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1614,6 +1614,7 @@
#define UBLOX_VID 0x1546
#define UBLOX_C099F9P_ZED_PID 0x0502
#define UBLOX_C099F9P_ODIN_PID 0x0503
+#define UBLOX_EVK_M101_PID 0x0506
/*
* GMC devices
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101
2025-09-26 6:02 [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101 Oleksandr Suvorov
@ 2025-10-14 14:53 ` Johan Hovold
2025-10-30 7:39 ` Oleksandr Suvorov
2025-10-30 9:00 ` [PATCH v2] usb: serial: ftdi_sio: add support for u-blox EVK-M101 Oleksandr Suvorov
0 siblings, 2 replies; 7+ messages in thread
From: Johan Hovold @ 2025-10-14 14:53 UTC (permalink / raw)
To: Oleksandr Suvorov; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
On Fri, Sep 26, 2025 at 09:02:35AM +0300, Oleksandr Suvorov wrote:
> The U-Blox
Missing product name?
> has a USB Type-C port that presents itself as a USB device
> (1546:0506) [1] with four attached FTDI serial ports, connected to:
> - EVK-M101 current sensors
> - EVK-M101 I2C
> - EVK-M101 UART
> - EVK-M101 port D
>
> This commit registers U-Blox's VID/PID of this device so that FTDI SIO driver
> successfully registers these 4 serial ports.
Are you sure you should not just register the UART port? Some FTDI chips
support I2C but you'd need a different driver for that.
> [1]
> usb 5-1.3: new high-speed USB device number 11 using xhci_hcd
> usb 5-1.3: New USB device found, idVendor=1546, idProduct=0506, bcdDevice= 8.00
> usb 5-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 5-1.3: Product: EVK-M101
> usb 5-1.3: Manufacturer: u-blox AG
>
> Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
The user guide also says "Do not use this COM port" for all ports but
the UART port.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101
2025-10-14 14:53 ` Johan Hovold
@ 2025-10-30 7:39 ` Oleksandr Suvorov
2025-10-30 9:40 ` Johan Hovold
2025-10-30 9:00 ` [PATCH v2] usb: serial: ftdi_sio: add support for u-blox EVK-M101 Oleksandr Suvorov
1 sibling, 1 reply; 7+ messages in thread
From: Oleksandr Suvorov @ 2025-10-30 7:39 UTC (permalink / raw)
To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
Hi Johan,
On Wed, Oct 15 2025 at 16:36 Johan Hovold <johan@kernel.org> wrote:
>
> On Fri, Sep 26, 2025 at 09:02:35AM +0300, Oleksandr Suvorov wrote:
> > The U-Blox
>
> Missing product name?
Thanks, I'll fix it.
> > has a USB Type-C port that presents itself as a USB device
> > (1546:0506) [1] with four attached FTDI serial ports, connected to:
> > - EVK-M101 current sensors
> > - EVK-M101 I2C
> > - EVK-M101 UART
> > - EVK-M101 port D
> >
> > This commit registers U-Blox's VID/PID of this device so that FTDI SIO driver
> > successfully registers these 4 serial ports.
>
> Are you sure you should not just register the UART port? Some FTDI chips
> support I2C but you'd need a different driver for that.
Thanks for pointing this out, looks like I should add a custom probe()
for this device.
Preparing v2.
> > [1]
> > usb 5-1.3: new high-speed USB device number 11 using xhci_hcd
> > usb 5-1.3: New USB device found, idVendor=1546, idProduct=0506, bcdDevice= 8.00
> > usb 5-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > usb 5-1.3: Product: EVK-M101
> > usb 5-1.3: Manufacturer: u-blox AG
> >
> > Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
>
> The user guide also says "Do not use this COM port" for all ports but
> the UART port.
Yes, you're right, thanks. It's just not that easy hacking the kernel
while defending from russian invaders :)
> Johan
--
Best regards
Oleksandr, sr.soldier in the Armed Forces of Ukraine
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] usb: serial: ftdi_sio: add support for u-blox EVK-M101
2025-10-14 14:53 ` Johan Hovold
2025-10-30 7:39 ` Oleksandr Suvorov
@ 2025-10-30 9:00 ` Oleksandr Suvorov
2025-10-30 15:42 ` [PATCH v3] " Oleksandr Suvorov
1 sibling, 1 reply; 7+ messages in thread
From: Oleksandr Suvorov @ 2025-10-30 9:00 UTC (permalink / raw)
To: linux-usb, linux-kernel, Johan Hovold, Greg Kroah-Hartman
Cc: Oleksandr Suvorov
The U-Blox EVK-M101 enumerates as 1546:0506 [1] with four FTDI interfaces:
- EVK-M101 current sensors
- EVK-M101 I2C
- EVK-M101 UART
- EVK-M101 port D
Only the third USB interface is a UART. This change lets ftdi_sio probe
the VID/PID and registers only interface #3 as a TTY, leaving the rest
available for other drivers.
[1]
usb 5-1.3: new high-speed USB device number 11 using xhci_hcd
usb 5-1.3: New USB device found, idVendor=1546, idProduct=0506, bcdDevice= 8.00
usb 5-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-1.3: Product: EVK-M101
usb 5-1.3: Manufacturer: u-blox AG
Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
Link: https://lore.kernel.org/r/20250926060235.3442748-1-cryosay@gmail.com
Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
---
v2:
- Restrict probing to interface #3 only
- Add a device model to commit message
- Fix grammar in commit message
- Add Link: to v1
---
drivers/usb/serial/ftdi_sio.c | 25 +++++++++++++++++++++++++
drivers/usb/serial/ftdi_sio_ids.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 49666c33b41f..4902b496d6de 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -110,6 +110,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial);
static int ftdi_NDI_device_setup(struct usb_serial *serial);
static int ftdi_stmclite_probe(struct usb_serial *serial);
static int ftdi_8u2232c_probe(struct usb_serial *serial);
+static int ftdi_evkm101_probe(struct usb_serial *serial);
static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
@@ -137,6 +138,10 @@ static const struct ftdi_quirk ftdi_8u2232c_quirk = {
.probe = ftdi_8u2232c_probe,
};
+static const struct ftdi_quirk ftdi_evkm101_quirk = {
+ .probe = ftdi_evkm101_probe,
+};
+
/*
* The 8U232AM has the same API as the sio except for:
* - it can support MUCH higher baudrates; up to:
@@ -1074,6 +1079,8 @@ static const struct usb_device_id id_table_combined[] = {
/* U-Blox devices */
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
+ { USB_DEVICE(UBLOX_VID, UBLOX_EVK_M101_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_evkm101_quirk },
/* FreeCalypso USB adapters */
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
@@ -2362,6 +2369,24 @@ static int ftdi_stmclite_probe(struct usb_serial *serial)
return 0;
}
+/*
+ * 1st, 2nd and 4th ports on U-Blox EVK-M101 using an FTDI FT4232H USB-to-UART
+ * are reserved for non-UART interfaces. The only 3rd port can be used as UART.
+ */
+static int ftdi_evkm101_probe(struct usb_serial *serial)
+{
+ struct usb_interface *intf = serial->interface;
+ int ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
+
+ if (ifnum != 2) {
+ dev_info(&intf->dev,
+ "Ignoring interface reserved as non-UART\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
static void ftdi_port_remove(struct usb_serial_port *port)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 4cc1fae8acb9..2539b9e2f712 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1614,6 +1614,7 @@
#define UBLOX_VID 0x1546
#define UBLOX_C099F9P_ZED_PID 0x0502
#define UBLOX_C099F9P_ODIN_PID 0x0503
+#define UBLOX_EVK_M101_PID 0x0506
/*
* GMC devices
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101
2025-10-30 7:39 ` Oleksandr Suvorov
@ 2025-10-30 9:40 ` Johan Hovold
0 siblings, 0 replies; 7+ messages in thread
From: Johan Hovold @ 2025-10-30 9:40 UTC (permalink / raw)
To: Oleksandr Suvorov; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
On Thu, Oct 30, 2025 at 09:39:36AM +0200, Oleksandr Suvorov wrote:
> On Wed, Oct 15 2025 at 16:36 Johan Hovold <johan@kernel.org> wrote:
> > > has a USB Type-C port that presents itself as a USB device
> > > (1546:0506) [1] with four attached FTDI serial ports, connected to:
> > > - EVK-M101 current sensors
> > > - EVK-M101 I2C
> > > - EVK-M101 UART
> > > - EVK-M101 port D
> > >
> > > This commit registers U-Blox's VID/PID of this device so that FTDI SIO driver
> > > successfully registers these 4 serial ports.
> >
> > Are you sure you should not just register the UART port? Some FTDI chips
> > support I2C but you'd need a different driver for that.
>
> Thanks for pointing this out, looks like I should add a custom probe()
> for this device.
> Preparing v2.
Actually, you can just use USB_DEVICE_INTERFACE_NUMBER() in the match
table, no need for a custom probe function.
> > > Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
> >
> > The user guide also says "Do not use this COM port" for all ports but
> > the UART port.
>
> Yes, you're right, thanks. It's just not that easy hacking the kernel
> while defending from russian invaders :)
I can only imagine.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] usb: serial: ftdi_sio: add support for u-blox EVK-M101
2025-10-30 9:00 ` [PATCH v2] usb: serial: ftdi_sio: add support for u-blox EVK-M101 Oleksandr Suvorov
@ 2025-10-30 15:42 ` Oleksandr Suvorov
2025-10-30 16:49 ` Johan Hovold
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Suvorov @ 2025-10-30 15:42 UTC (permalink / raw)
To: linux-usb, linux-kernel, Johan Hovold, Greg Kroah-Hartman
Cc: Oleksandr Suvorov
The U-Blox EVK-M101 enumerates as 1546:0506 [1] with four FTDI interfaces:
- EVK-M101 current sensors
- EVK-M101 I2C
- EVK-M101 UART
- EVK-M101 port D
Only the third USB interface is a UART. This change lets ftdi_sio probe
the VID/PID and registers only interface #3 as a TTY, leaving the rest
available for other drivers.
[1]
usb 5-1.3: new high-speed USB device number 11 using xhci_hcd
usb 5-1.3: New USB device found, idVendor=1546, idProduct=0506, bcdDevice= 8.00
usb 5-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-1.3: Product: EVK-M101
usb 5-1.3: Manufacturer: u-blox AG
Datasheet: https://content.u-blox.com/sites/default/files/documents/EVK-M10_UserGuide_UBX-21003949.pdf
Link: https://lore.kernel.org/all/20251030090056.3175217-1-cryosay@gmail.com/
Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
---
v3:
- Use USB_DEVICE_INTERFACE_NUMBER instead of custom probe()
v2:
- Restrict probing to interface #3 only
- Add a device model to commit message
- Fix grammar in commit message
- Add Link: to v1
Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
---
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 49666c33b41f..b37fa31f5694 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1074,6 +1074,7 @@ static const struct usb_device_id id_table_combined[] = {
/* U-Blox devices */
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
+ { USB_DEVICE_INTERFACE_NUMBER(UBLOX_VID, UBLOX_EVK_M101_PID, 2) },
/* FreeCalypso USB adapters */
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 4cc1fae8acb9..2539b9e2f712 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1614,6 +1614,7 @@
#define UBLOX_VID 0x1546
#define UBLOX_C099F9P_ZED_PID 0x0502
#define UBLOX_C099F9P_ODIN_PID 0x0503
+#define UBLOX_EVK_M101_PID 0x0506
/*
* GMC devices
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3] usb: serial: ftdi_sio: add support for u-blox EVK-M101
2025-10-30 15:42 ` [PATCH v3] " Oleksandr Suvorov
@ 2025-10-30 16:49 ` Johan Hovold
0 siblings, 0 replies; 7+ messages in thread
From: Johan Hovold @ 2025-10-30 16:49 UTC (permalink / raw)
To: Oleksandr Suvorov; +Cc: linux-usb, linux-kernel, Greg Kroah-Hartman
On Thu, Oct 30, 2025 at 05:42:54PM +0200, Oleksandr Suvorov wrote:
> The U-Blox EVK-M101 enumerates as 1546:0506 [1] with four FTDI interfaces:
> - EVK-M101 current sensors
> - EVK-M101 I2C
> - EVK-M101 UART
> - EVK-M101 port D
>
> Only the third USB interface is a UART. This change lets ftdi_sio probe
> the VID/PID and registers only interface #3 as a TTY, leaving the rest
> available for other drivers.
> ---
> v3:
> - Use USB_DEVICE_INTERFACE_NUMBER instead of custom probe()
> v2:
> - Restrict probing to interface #3 only
> - Add a device model to commit message
> - Fix grammar in commit message
> - Add Link: to v1
Now applied, thanks.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-30 16:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 6:02 [PATCH] USB: serial: ftdi_sio: add device ID for U-Blox EVK-M101 Oleksandr Suvorov
2025-10-14 14:53 ` Johan Hovold
2025-10-30 7:39 ` Oleksandr Suvorov
2025-10-30 9:40 ` Johan Hovold
2025-10-30 9:00 ` [PATCH v2] usb: serial: ftdi_sio: add support for u-blox EVK-M101 Oleksandr Suvorov
2025-10-30 15:42 ` [PATCH v3] " Oleksandr Suvorov
2025-10-30 16:49 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).