Skip to contentSkip to conversation

i2c: tiny-usb: add Zephyr Project VID/PID pair

PATCH In review Benjamin Cabé 2 participants 2 messages Aug 20 – Sep 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: tiny-usb: add Zephyr Project VID/PID pair

The Zephyr Project ships an i2c-tiny-usb sample with its USB device stack, which turns any supported board into a USB-to-I2C bridge. The sample implements the same vendor request protocol as the original i2c-tiny-usb firmware, exposing a single vendor-specific interface with no endpoints, so it can be driven by this driver as-is.

Zephyr in-tree samples must use the project's own USB vendor ID (0x2fe3) rather than a donated or third-party one, and product ID 0x0013 is reserved for this sample in the project's VID/PID list. Without an entry here, users have to bind the device by hand through the driver's dynamic ID sysfs attribute.

---
 drivers/i2c/busses/i2c-tiny-usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-tiny-usb.c +3 -1
index 73355a56aabf..113af96728dd 100644
@@ -157,11 +157,13 @@ static const struct i2c_algorithm usb_algorithm = {
 /*
  * Initially the usb i2c interface uses a vid/pid pair donated by
  * Future Technology Devices International Ltd., later a pair was
- * bought from EZPrototypes
+ * bought from EZPrototypes. The Zephyr Project reserved a pid from
+ * its own vid for the i2c-tiny-usb sample of its USB device stack.
  */
 static const struct usb_device_id i2c_tiny_usb_table[] = {
 	{ USB_DEVICE(0x0403, 0xc631) },   /* FTDI */
 	{ USB_DEVICE(0x1c40, 0x0534) },   /* EZPrototypes */
+	{ USB_DEVICE(0x2fe3, 0x0013) },   /* Zephyr Project */
 	{ }                               /* Terminating entry */
 };
 
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw

Heya,

Quoted 27 lines · Benjamin Cabé

The Zephyr Project ships an i2c-tiny-usb sample with its USB device stack, which turns any supported board into a USB-to-I2C bridge. The sample implements the same vendor request protocol as the original i2c-tiny-usb firmware, exposing a single vendor-specific interface with no endpoints, so it can be driven by this driver as-is.

Zephyr in-tree samples must use the project's own USB vendor ID (0x2fe3) rather than a donated or third-party one, and product ID 0x0013 is reserved for this sample in the project's VID/PID list. Without an entry here, users have to bind the device by hand through the driver's dynamic ID sysfs attribute.

---
 drivers/i2c/busses/i2c-tiny-usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-tiny-usb.c +0 -0
index 73355a56aabf..113af96728dd 100644
@@ -157,11 +157,13 @@ static const struct i2c_algorithm usb_algorithm = {
 /*
  * Initially the usb i2c interface uses a vid/pid pair donated by
  * Future Technology Devices International Ltd., later a pair was

drivers/i2c/busses/i2c-tiny-usb.c static const struct i2c_algorithm usb_algorithm = { · line 168

Quoted 10 lines
drivers/i2c/busses/i2c-tiny-usb.c +3 -1
- * bought from EZPrototypes
+ * bought from EZPrototypes. The Zephyr Project reserved a pid from
+ * its own vid for the i2c-tiny-usb sample of its USB device stack.
  */
 static const struct usb_device_id i2c_tiny_usb_table[] = {
 	{ USB_DEVICE(0x0403, 0xc631) },   /* FTDI */
 	{ USB_DEVICE(0x1c40, 0x0534) },   /* EZPrototypes */
+	{ USB_DEVICE(0x2fe3, 0x0013) },   /* Zephyr Project */
 	{ }                               /* Terminating entry */
 };

Thanks this makes the Zephyr side sample way easier to use.

Cheers,
Fabio