Skip to content

Commit

Permalink
i2c: add i2c bus driver for NVIDIA GPU
Browse files Browse the repository at this point in the history
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.

This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.

Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[wsa: kept Makefile sorting]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Ajay Gupta authored and Wolfram Sang committed Nov 9, 2018
1 parent 848bd3f commit c71bcdc
Show file tree
Hide file tree
Showing 5 changed files with 403 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Documentation/i2c/busses/i2c-nvidia-gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Kernel driver i2c-nvidia-gpu

Datasheet: not publicly available.

Authors:
Ajay Gupta <ajayg@nvidia.com>

Description
-----------

i2c-nvidia-gpu is a driver for I2C controller included in NVIDIA Turing
and later GPUs and it is used to communicate with Type-C controller on GPUs.

If your 'lspci -v' listing shows something like the following,

01:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1ad9 (rev a1)

then this driver should support the I2C controller of your GPU.
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6861,6 +6861,13 @@ L: linux-acpi@vger.kernel.org
S: Maintained
F: drivers/i2c/i2c-core-acpi.c

I2C CONTROLLER DRIVER FOR NVIDIA GPU
M: Ajay Gupta <ajayg@nvidia.com>
L: linux-i2c@vger.kernel.org
S: Maintained
F: Documentation/i2c/busses/i2c-nvidia-gpu
F: drivers/i2c/busses/i2c-nvidia-gpu.c

I2C MUXES
M: Peter Rosin <peda@axentia.se>
L: linux-i2c@vger.kernel.org
Expand Down
9 changes: 9 additions & 0 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ config I2C_NFORCE2_S4985
This driver can also be built as a module. If so, the module
will be called i2c-nforce2-s4985.

config I2C_NVIDIA_GPU
tristate "NVIDIA GPU I2C controller"
depends on PCI
help
If you say yes to this option, support will be included for the
NVIDIA GPU I2C controller which is used to communicate with the GPU's
Type-C controller. This driver can also be built as a module called
i2c-nvidia-gpu.

config I2C_SIS5595
tristate "SiS 5595"
depends on PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-$(CONFIG_I2C_ISCH) += i2c-isch.o
obj-$(CONFIG_I2C_ISMT) += i2c-ismt.o
obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o
obj-$(CONFIG_I2C_NFORCE2_S4985) += i2c-nforce2-s4985.o
obj-$(CONFIG_I2C_NVIDIA_GPU) += i2c-nvidia-gpu.o
obj-$(CONFIG_I2C_PIIX4) += i2c-piix4.o
obj-$(CONFIG_I2C_SIS5595) += i2c-sis5595.o
obj-$(CONFIG_I2C_SIS630) += i2c-sis630.o
Expand Down
Loading

0 comments on commit c71bcdc

Please sign in to comment.