1*c66ec88fSEmmanuel VadotNVIDIA Tegra20/Tegra30/Tegra114 I2C controller driver. 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot- compatible : For Tegra20, must be one of "nvidia,tegra20-i2c-dvc" or 5*c66ec88fSEmmanuel Vadot "nvidia,tegra20-i2c". For Tegra30, must be "nvidia,tegra30-i2c". 6*c66ec88fSEmmanuel Vadot For Tegra114, must be "nvidia,tegra114-i2c". Otherwise, must be 7*c66ec88fSEmmanuel Vadot "nvidia,<chip>-i2c", plus at least one of the above, where <chip> is 8*c66ec88fSEmmanuel Vadot tegra124, tegra132, or tegra210. 9*c66ec88fSEmmanuel Vadot Details of compatible are as follows: 10*c66ec88fSEmmanuel Vadot nvidia,tegra20-i2c-dvc: Tegra20 has specific I2C controller called as DVC I2C 11*c66ec88fSEmmanuel Vadot controller. This only support master mode of I2C communication. Register 12*c66ec88fSEmmanuel Vadot interface/offset and interrupts handling are different than generic I2C 13*c66ec88fSEmmanuel Vadot controller. Driver of DVC I2C controller is only compatible with 14*c66ec88fSEmmanuel Vadot "nvidia,tegra20-i2c-dvc". 15*c66ec88fSEmmanuel Vadot nvidia,tegra20-i2c: Tegra20 has 4 generic I2C controller. This can support 16*c66ec88fSEmmanuel Vadot master and slave mode of I2C communication. The i2c-tegra driver only 17*c66ec88fSEmmanuel Vadot support master mode of I2C communication. Driver of I2C controller is 18*c66ec88fSEmmanuel Vadot only compatible with "nvidia,tegra20-i2c". 19*c66ec88fSEmmanuel Vadot nvidia,tegra30-i2c: Tegra30 has 5 generic I2C controller. This controller is 20*c66ec88fSEmmanuel Vadot very much similar to Tegra20 I2C controller with additional feature: 21*c66ec88fSEmmanuel Vadot Continue Transfer Support. This feature helps to implement M_NO_START 22*c66ec88fSEmmanuel Vadot as per I2C core API transfer flags. Driver of I2C controller is 23*c66ec88fSEmmanuel Vadot compatible with "nvidia,tegra30-i2c" to enable the continue transfer 24*c66ec88fSEmmanuel Vadot support. This is also compatible with "nvidia,tegra20-i2c" without 25*c66ec88fSEmmanuel Vadot continue transfer support. 26*c66ec88fSEmmanuel Vadot nvidia,tegra114-i2c: Tegra114 has 5 generic I2C controller. This controller is 27*c66ec88fSEmmanuel Vadot very much similar to Tegra30 I2C controller with some hardware 28*c66ec88fSEmmanuel Vadot modification: 29*c66ec88fSEmmanuel Vadot - Tegra30/Tegra20 I2C controller has 2 clock source called div-clk and 30*c66ec88fSEmmanuel Vadot fast-clk. Tegra114 has only one clock source called as div-clk and 31*c66ec88fSEmmanuel Vadot hence clock mechanism is changed in I2C controller. 32*c66ec88fSEmmanuel Vadot - Tegra30/Tegra20 I2C controller has enabled per packet transfer by 33*c66ec88fSEmmanuel Vadot default and there is no way to disable it. Tegra114 has this 34*c66ec88fSEmmanuel Vadot interrupt disable by default and SW need to enable explicitly. 35*c66ec88fSEmmanuel Vadot Due to above changes, Tegra114 I2C driver makes incompatible with 36*c66ec88fSEmmanuel Vadot previous hardware driver. Hence, tegra114 I2C controller is compatible 37*c66ec88fSEmmanuel Vadot with "nvidia,tegra114-i2c". 38*c66ec88fSEmmanuel Vadot nvidia,tegra210-i2c-vi: Tegra210 has one I2C controller that is on host1x bus 39*c66ec88fSEmmanuel Vadot and is part of VE power domain and typically used for camera use-cases. 40*c66ec88fSEmmanuel Vadot This VI I2C controller is mostly compatible with the programming model 41*c66ec88fSEmmanuel Vadot of the regular I2C controllers with a few exceptions. The I2C registers 42*c66ec88fSEmmanuel Vadot start at an offset of 0xc00 (instead of 0), registers are 16 bytes 43*c66ec88fSEmmanuel Vadot apart (rather than 4) and the controller does not support slave mode. 44*c66ec88fSEmmanuel Vadot- reg: Should contain I2C controller registers physical address and length. 45*c66ec88fSEmmanuel Vadot- interrupts: Should contain I2C controller interrupts. 46*c66ec88fSEmmanuel Vadot- address-cells: Address cells for I2C device address. 47*c66ec88fSEmmanuel Vadot- size-cells: Size of the I2C device address. 48*c66ec88fSEmmanuel Vadot- clocks: Must contain an entry for each entry in clock-names. 49*c66ec88fSEmmanuel Vadot See ../clocks/clock-bindings.txt for details. 50*c66ec88fSEmmanuel Vadot- clock-names: Must include the following entries: 51*c66ec88fSEmmanuel Vadot Tegra20/Tegra30: 52*c66ec88fSEmmanuel Vadot - div-clk 53*c66ec88fSEmmanuel Vadot - fast-clk 54*c66ec88fSEmmanuel Vadot Tegra114: 55*c66ec88fSEmmanuel Vadot - div-clk 56*c66ec88fSEmmanuel Vadot Tegra210: 57*c66ec88fSEmmanuel Vadot - div-clk 58*c66ec88fSEmmanuel Vadot - slow (only for nvidia,tegra210-i2c-vi compatible node) 59*c66ec88fSEmmanuel Vadot- resets: Must contain an entry for each entry in reset-names. 60*c66ec88fSEmmanuel Vadot See ../reset/reset.txt for details. 61*c66ec88fSEmmanuel Vadot- reset-names: Must include the following entries: 62*c66ec88fSEmmanuel Vadot - i2c 63*c66ec88fSEmmanuel Vadot- power-domains: Only for nvidia,tegra210-i2c-vi compatible node and must 64*c66ec88fSEmmanuel Vadot include venc powergate node as vi i2c is part of VE power domain. 65*c66ec88fSEmmanuel Vadot tegra210-i2c-vi: 66*c66ec88fSEmmanuel Vadot - pd_venc 67*c66ec88fSEmmanuel Vadot- dmas: Must contain an entry for each entry in clock-names. 68*c66ec88fSEmmanuel Vadot See ../dma/dma.txt for details. 69*c66ec88fSEmmanuel Vadot- dma-names: Must include the following entries: 70*c66ec88fSEmmanuel Vadot - rx 71*c66ec88fSEmmanuel Vadot - tx 72*c66ec88fSEmmanuel Vadot 73*c66ec88fSEmmanuel VadotExample: 74*c66ec88fSEmmanuel Vadot 75*c66ec88fSEmmanuel Vadot i2c@7000c000 { 76*c66ec88fSEmmanuel Vadot compatible = "nvidia,tegra20-i2c"; 77*c66ec88fSEmmanuel Vadot reg = <0x7000c000 0x100>; 78*c66ec88fSEmmanuel Vadot interrupts = <0 38 0x04>; 79*c66ec88fSEmmanuel Vadot #address-cells = <1>; 80*c66ec88fSEmmanuel Vadot #size-cells = <0>; 81*c66ec88fSEmmanuel Vadot clocks = <&tegra_car 12>, <&tegra_car 124>; 82*c66ec88fSEmmanuel Vadot clock-names = "div-clk", "fast-clk"; 83*c66ec88fSEmmanuel Vadot resets = <&tegra_car 12>; 84*c66ec88fSEmmanuel Vadot reset-names = "i2c"; 85*c66ec88fSEmmanuel Vadot dmas = <&apbdma 16>, <&apbdma 16>; 86*c66ec88fSEmmanuel Vadot dma-names = "rx", "tx"; 87*c66ec88fSEmmanuel Vadot }; 88