18c2ecf20Sopenharmony_ciNVIDIA Tegra20/Tegra30/Tegra114 I2C controller driver.
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible : For Tegra20, must be one of "nvidia,tegra20-i2c-dvc" or
58c2ecf20Sopenharmony_ci  "nvidia,tegra20-i2c".  For Tegra30, must be "nvidia,tegra30-i2c".
68c2ecf20Sopenharmony_ci  For Tegra114, must be "nvidia,tegra114-i2c".  Otherwise, must be
78c2ecf20Sopenharmony_ci  "nvidia,<chip>-i2c", plus at least one of the above, where <chip> is
88c2ecf20Sopenharmony_ci  tegra124, tegra132, or tegra210.
98c2ecf20Sopenharmony_ci  Details of compatible are as follows:
108c2ecf20Sopenharmony_ci  nvidia,tegra20-i2c-dvc: Tegra20 has specific I2C controller called as DVC I2C
118c2ecf20Sopenharmony_ci	controller. This only support master mode of I2C communication. Register
128c2ecf20Sopenharmony_ci	interface/offset and interrupts handling are different than generic I2C
138c2ecf20Sopenharmony_ci	controller. Driver of DVC I2C controller is only compatible with
148c2ecf20Sopenharmony_ci	"nvidia,tegra20-i2c-dvc".
158c2ecf20Sopenharmony_ci  nvidia,tegra20-i2c: Tegra20 has 4 generic I2C controller. This can support
168c2ecf20Sopenharmony_ci	master and slave mode of I2C communication. The i2c-tegra driver only
178c2ecf20Sopenharmony_ci	support master mode of I2C communication. Driver of I2C controller is
188c2ecf20Sopenharmony_ci	only compatible with "nvidia,tegra20-i2c".
198c2ecf20Sopenharmony_ci  nvidia,tegra30-i2c: Tegra30 has 5 generic I2C controller. This controller is
208c2ecf20Sopenharmony_ci	very much similar to Tegra20 I2C controller with additional feature:
218c2ecf20Sopenharmony_ci	Continue Transfer Support. This feature helps to implement M_NO_START
228c2ecf20Sopenharmony_ci	as per I2C core API transfer flags. Driver of I2C controller is
238c2ecf20Sopenharmony_ci	compatible with "nvidia,tegra30-i2c" to enable the continue transfer
248c2ecf20Sopenharmony_ci	support. This is also compatible with "nvidia,tegra20-i2c" without
258c2ecf20Sopenharmony_ci	continue transfer support.
268c2ecf20Sopenharmony_ci  nvidia,tegra114-i2c: Tegra114 has 5 generic I2C controller. This controller is
278c2ecf20Sopenharmony_ci	very much similar to Tegra30 I2C controller with some hardware
288c2ecf20Sopenharmony_ci	modification:
298c2ecf20Sopenharmony_ci	 - Tegra30/Tegra20 I2C controller has 2 clock source called div-clk and
308c2ecf20Sopenharmony_ci	   fast-clk. Tegra114 has only one clock source called as div-clk and
318c2ecf20Sopenharmony_ci	   hence clock mechanism is changed in I2C controller.
328c2ecf20Sopenharmony_ci	 - Tegra30/Tegra20 I2C controller has enabled per packet transfer by
338c2ecf20Sopenharmony_ci	   default and there is no way to disable it. Tegra114 has this
348c2ecf20Sopenharmony_ci	   interrupt disable by default and SW need to enable explicitly.
358c2ecf20Sopenharmony_ci	Due to above changes, Tegra114 I2C driver makes incompatible with
368c2ecf20Sopenharmony_ci	previous hardware driver. Hence, tegra114 I2C controller is compatible
378c2ecf20Sopenharmony_ci	with "nvidia,tegra114-i2c".
388c2ecf20Sopenharmony_ci  nvidia,tegra210-i2c-vi: Tegra210 has one I2C controller that is on host1x bus
398c2ecf20Sopenharmony_ci	and is part of VE power domain and typically used for camera use-cases.
408c2ecf20Sopenharmony_ci	This VI I2C controller is mostly compatible with the programming model
418c2ecf20Sopenharmony_ci	of the regular I2C controllers with a few exceptions. The I2C registers
428c2ecf20Sopenharmony_ci	start at an offset of 0xc00 (instead of 0), registers are 16 bytes
438c2ecf20Sopenharmony_ci	apart (rather than 4) and the controller does not support slave mode.
448c2ecf20Sopenharmony_ci- reg: Should contain I2C controller registers physical address and length.
458c2ecf20Sopenharmony_ci- interrupts: Should contain I2C controller interrupts.
468c2ecf20Sopenharmony_ci- address-cells: Address cells for I2C device address.
478c2ecf20Sopenharmony_ci- size-cells: Size of the I2C device address.
488c2ecf20Sopenharmony_ci- clocks: Must contain an entry for each entry in clock-names.
498c2ecf20Sopenharmony_ci  See ../clocks/clock-bindings.txt for details.
508c2ecf20Sopenharmony_ci- clock-names: Must include the following entries:
518c2ecf20Sopenharmony_ci  Tegra20/Tegra30:
528c2ecf20Sopenharmony_ci  - div-clk
538c2ecf20Sopenharmony_ci  - fast-clk
548c2ecf20Sopenharmony_ci  Tegra114:
558c2ecf20Sopenharmony_ci  - div-clk
568c2ecf20Sopenharmony_ci  Tegra210:
578c2ecf20Sopenharmony_ci  - div-clk
588c2ecf20Sopenharmony_ci  - slow (only for nvidia,tegra210-i2c-vi compatible node)
598c2ecf20Sopenharmony_ci- resets: Must contain an entry for each entry in reset-names.
608c2ecf20Sopenharmony_ci  See ../reset/reset.txt for details.
618c2ecf20Sopenharmony_ci- reset-names: Must include the following entries:
628c2ecf20Sopenharmony_ci  - i2c
638c2ecf20Sopenharmony_ci- power-domains: Only for nvidia,tegra210-i2c-vi compatible node and must
648c2ecf20Sopenharmony_ci  include venc powergate node as vi i2c is part of VE power domain.
658c2ecf20Sopenharmony_ci  tegra210-i2c-vi:
668c2ecf20Sopenharmony_ci  - pd_venc
678c2ecf20Sopenharmony_ci- dmas: Must contain an entry for each entry in clock-names.
688c2ecf20Sopenharmony_ci  See ../dma/dma.txt for details.
698c2ecf20Sopenharmony_ci- dma-names: Must include the following entries:
708c2ecf20Sopenharmony_ci  - rx
718c2ecf20Sopenharmony_ci  - tx
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciExample:
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	i2c@7000c000 {
768c2ecf20Sopenharmony_ci		compatible = "nvidia,tegra20-i2c";
778c2ecf20Sopenharmony_ci		reg = <0x7000c000 0x100>;
788c2ecf20Sopenharmony_ci		interrupts = <0 38 0x04>;
798c2ecf20Sopenharmony_ci		#address-cells = <1>;
808c2ecf20Sopenharmony_ci		#size-cells = <0>;
818c2ecf20Sopenharmony_ci		clocks = <&tegra_car 12>, <&tegra_car 124>;
828c2ecf20Sopenharmony_ci		clock-names = "div-clk", "fast-clk";
838c2ecf20Sopenharmony_ci		resets = <&tegra_car 12>;
848c2ecf20Sopenharmony_ci		reset-names = "i2c";
858c2ecf20Sopenharmony_ci		dmas = <&apbdma 16>, <&apbdma 16>;
868c2ecf20Sopenharmony_ci		dma-names = "rx", "tx";
878c2ecf20Sopenharmony_ci	};
88