1*54e231b3SDenis Bodor.\" 2*54e231b3SDenis Bodor.\" SPDX-License-Identifier: BSD-2-Clause 3*54e231b3SDenis Bodor.\" 4*54e231b3SDenis Bodor.\" Copyright (c) 2024 Denis Bodor <dbodor@rollmops.ninja> 5*54e231b3SDenis Bodor.\" 6*54e231b3SDenis Bodor.\" Redistribution and use in source and binary forms, with or without 7*54e231b3SDenis Bodor.\" modification, are permitted provided that the following conditions 8*54e231b3SDenis Bodor.\" are met: 9*54e231b3SDenis Bodor.\" 1. Redistributions of source code must retain the above copyright 10*54e231b3SDenis Bodor.\" notice, this list of conditions and the following disclaimer. 11*54e231b3SDenis Bodor.\" 2. Redistributions in binary form must reproduce the above copyright 12*54e231b3SDenis Bodor.\" notice, this list of conditions and the following disclaimer in the 13*54e231b3SDenis Bodor.\" documentation and/or other materials provided with the distribution. 14*54e231b3SDenis Bodor.\" 15*54e231b3SDenis Bodor.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*54e231b3SDenis Bodor.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*54e231b3SDenis Bodor.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*54e231b3SDenis Bodor.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*54e231b3SDenis Bodor.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*54e231b3SDenis Bodor.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*54e231b3SDenis Bodor.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*54e231b3SDenis Bodor.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*54e231b3SDenis Bodor.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*54e231b3SDenis Bodor.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*54e231b3SDenis Bodor.\" SUCH DAMAGE. 26*54e231b3SDenis Bodor.\" 27*54e231b3SDenis Bodor.Dd February 18, 2024 28*54e231b3SDenis Bodor.Dt I2CTINYUSB 4 29*54e231b3SDenis Bodor.Os 30*54e231b3SDenis Bodor.Sh NAME 31*54e231b3SDenis Bodor.Nm i2ctinyusb 32*54e231b3SDenis Bodor.Nd driver for a USB / I2C bridge device 33*54e231b3SDenis Bodor.Sh SYNOPSIS 34*54e231b3SDenis BodorTo compile this driver into the kernel, 35*54e231b3SDenis Bodorplace the following lines in your 36*54e231b3SDenis Bodorkernel configuration file: 37*54e231b3SDenis Bodor.Bd -ragged -offset indent 38*54e231b3SDenis Bodor.Cd "device i2ctinyusb" 39*54e231b3SDenis Bodor.Cd "device usb" 40*54e231b3SDenis Bodor.Cd "device iicbus" 41*54e231b3SDenis Bodor.Ed 42*54e231b3SDenis Bodor.Pp 43*54e231b3SDenis BodorAlternatively, to load the driver as a 44*54e231b3SDenis Bodormodule at boot time, place the following line in 45*54e231b3SDenis Bodor.Xr loader.conf 5 : 46*54e231b3SDenis Bodor.Bd -literal -offset indent 47*54e231b3SDenis Bodori2ctinyusb_load="YES" 48*54e231b3SDenis Bodor.Ed 49*54e231b3SDenis Bodor.Sh DESCRIPTION 50*54e231b3SDenis BodorThe 51*54e231b3SDenis Bodor.Nm 52*54e231b3SDenis Bodordriver provides support for the device designed by Till Harbaum known 53*54e231b3SDenis Bodoras i2c-tiny-usb. This is initially a very simple circuit built with 54*54e231b3SDenis Bodoran Atmel AVR ATtiny45, but a Raspberry Pi Pico (RP2040) implementation 55*54e231b3SDenis Bodoralso exists. 56*54e231b3SDenis Bodor.Pp 57*54e231b3SDenis BodorThe 58*54e231b3SDenis Bodor.Nm 59*54e231b3SDenis Bodordriver creates a 60*54e231b3SDenis Bodor.Xr iicbus 4 61*54e231b3SDenis Bodorchild bus to expose the iic functions, enabling I2C sensors, converters 62*54e231b3SDenis Bodorand displays to be connected to any computer with a USB port. 63*54e231b3SDenis Bodor.Pp 64*54e231b3SDenis BodorMore information about this device can be found at: 65*54e231b3SDenis Bodor.Bd -literal -offset indent 66*54e231b3SDenis Bodorhttps://github.com/harbaum/I2C-Tiny-USB 67*54e231b3SDenis Bodor.Ed 68*54e231b3SDenis Bodor.Pp 69*54e231b3SDenis Bodorand (for the Raspberry Pi Pico version): 70*54e231b3SDenis Bodor.Bd -literal -offset indent 71*54e231b3SDenis Bodorhttps://github.com/Nicolai-Electronics/rp2040-i2c-interface 72*54e231b3SDenis Bodor.Ed 73*54e231b3SDenis Bodor.Pp 74*54e231b3SDenis BodorThe I2C controller supports read and write transactions with up to 1024 75*54e231b3SDenis Bodorbytes of data, and a write followed by the repeated start followed by a 76*54e231b3SDenis Bodorread transactions up to 1024 bytes. 77*54e231b3SDenis BodorZero length transfers are not supported. 78*54e231b3SDenis Bodor.Sh SEE ALSO 79*54e231b3SDenis Bodor.Xr iicbus 4 , 80*54e231b3SDenis Bodor.Xr usb 4 81*54e231b3SDenis Bodor.Sh HISTORY 82*54e231b3SDenis BodorThe 83*54e231b3SDenis Bodor.Nm 84*54e231b3SDenis Bodordriver and this manual page was written by 85*54e231b3SDenis Bodor.An Denis Bodor Aq Mt dbodor@rollmops.ninja . 86