* [PATCH] i2c: tiny-usb: add Zephyr Project VID/PID pair
@ 2026-08-20 21:39 Benjamin Cabé
2026-09-16 10:11 ` Fabio Baltieri
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Cabé @ 2026-08-20 21:39 UTC (permalink / raw)
To: Till Harbaum, Andi Shyti; +Cc: linux-i2c, linux-kernel
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.
Link: https://github.com/zephyrproject-rtos/zephyr/commit/281b5743d183
Assisted-by: Claude:claude-opus-5
Signed-off-by: Benjamin Cabé <kartben@gmail.com>
---
drivers/i2c/busses/i2c-tiny-usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index 73355a56aabf..113af96728dd 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -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 */
};
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] i2c: tiny-usb: add Zephyr Project VID/PID pair
2026-08-20 21:39 [PATCH] i2c: tiny-usb: add Zephyr Project VID/PID pair Benjamin Cabé
@ 2026-09-16 10:11 ` Fabio Baltieri
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Baltieri @ 2026-09-16 10:11 UTC (permalink / raw)
To: Benjamin Cabé, linux-i2c; +Cc: Till Harbaum, Andi Shyti, linux-kernel
Heya,
On Thu, Aug 20, 2026 at 11:39:46PM +0200, Benjamin Cabé wrote:
> 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.
>
> Link: https://github.com/zephyrproject-rtos/zephyr/commit/281b5743d183
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Benjamin Cabé <kartben@gmail.com>
> ---
> drivers/i2c/busses/i2c-tiny-usb.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
> index 73355a56aabf..113af96728dd 100644
> --- a/drivers/i2c/busses/i2c-tiny-usb.c
> +++ b/drivers/i2c/busses/i2c-tiny-usb.c
> @@ -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 */
> };
Thanks this makes the Zephyr side sample way easier to use.
Reviewed-by: Fabio Baltieri <fabiobaltieri@chromium.org>
Cheers,
Fabio
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-16 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 21:39 [PATCH] i2c: tiny-usb: add Zephyr Project VID/PID pair Benjamin Cabé
2026-09-16 10:11 ` Fabio Baltieri
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).