CP2112(4)
β¨ CP2112(4) β¨
okay bestie, welcome to the Kernel Interfaces Manual π this one's about the cp2112 driver β a driver for a USB GPIO and I2C peripheral device. yes, both. it's a multitasker. we love her for that. π«Ά
πΈ NAME πΈ
cp2112 β driver for a USB GPIO and I2C peripheral device
literally what it says on the tin, no notes π
π SYNOPSIS π
so if you wanna bake this driver right into your kernel, you gotta put these lines in your kernel configuration file. all four. no skipping, bestie, this is a full fit not a two-piece π¦
device cp2112
device usb
device gpio
device iicbus
orrr, if you'd rather load it as a module at boot time (iconic, low-commitment, we respect it), drop this single line into loader.conf(5):
cp2112_load="YES"
π DESCRIPTION π
The cp2112 driver provides support for Silicon Labs CP2112 device. π
This little device has 8 general purpose I/O pins and an I2C controller that supports a subset of the I2C protocol. yeah, it does a lot. main character energy fr fr π
okay so about the pins β all pins support both input and output modes. every single one. no pin left behind. π
An output pin can be configured either for open-drain or push-pull operation. pick your fighter β¨
Now, pins 0, 1 and 7 support special functions β they're the overachievers of the group:
- pin
0β I2C transmit indication - pin
1β I2C receive indication - pin
7β clock output
π but here's the sad part: at the moment the cp2112 driver does not provide a way to enable and configure the special functions. so they're just sitting there, gifted and unconfigured. tragic. we're manifesting it for a future release tho π
Now the I2C controller tea, because this is the important part β it supports:
- read transactions with up to
512bytes of data - write transactions with up to
61bytes of data - a write followed by the repeated start followed by a read transaction, where the write can be up to
16bytes and the read can be up to512bytes
and, bestie, listen: zero length transfers are not supported. not a thing. don't try it. it's giving nothing and it will not work π
The cp2112 driver creates a gpio(4) and iicbus(4) child buses to expose the respective functions β so both personalities get to shine β¨
π₯ SEE ALSO π₯
go read those too, iykyk π
π HISTORY π
The cp2112 driver and this manual page was written by Andriy Gapon <avg@FreeBSD.org>. thank you for your service, legend π«‘π
and that's the whole page, bestie! this one came to you courtesy of Debian, dated August 12, 2020, and it's filed under CP2112(4). go forth and blink some pins πΈπ β¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- π the page's license: BSD-2-Clause-FreeBSD
- Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms