Skip to content

Commit

Permalink
cp2112: driver for the namesake GPIO and I2C master gadget
Browse files Browse the repository at this point in the history
Documentation:
- CP2112 Datasheet
  https://www.silabs.com/documents/public/data-sheets/cp2112-datasheet.pdf
- AN495: CP2112 Interface Specification
  https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf
- CP2112 Errata
  https://www.silabs.com/documents/public/errata/cp2112-errata.pdf

The logic is implemented as three sub-drivers.
The parent driver claims the USB device and creates two child devices.
One acts as a GPIO controller and the other is an I2C controller.

Tested with CP2112 revision F02.
Both features seem to work.
HTU21 sensor was used as an I2C slave.

Reviewed by:	adrian, hselasky
MFC after:	2 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D25359
  • Loading branch information
avg-I committed Aug 6, 2020
1 parent 0736ad8 commit c178a7e
Show file tree
Hide file tree
Showing 4 changed files with 1,420 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys/conf/files
Expand Up @@ -3331,6 +3331,7 @@ dev/usb/serial/usb_serial.c optional ucom | u3g | uark | ubsa | ubser | \
#
# USB misc drivers
#
dev/usb/misc/cp2112.c optional cp2112
dev/usb/misc/ufm.c optional ufm
dev/usb/misc/udbp.c optional udbp
dev/usb/misc/ugold.c optional ugold
Expand Down

0 comments on commit c178a7e

Please sign in to comment.