1*e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*e67e8565SEmmanuel Vadot%YAML 1.2 3*e67e8565SEmmanuel Vadot--- 4*e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/nvidia,tegra20-i2c.yaml# 5*e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*e67e8565SEmmanuel Vadot 7*e67e8565SEmmanuel Vadotmaintainers: 8*e67e8565SEmmanuel Vadot - Thierry Reding <thierry.reding@gmail.com> 9*e67e8565SEmmanuel Vadot - Jon Hunter <jonathanh@nvidia.com> 10*e67e8565SEmmanuel Vadot 11*e67e8565SEmmanuel Vadottitle: NVIDIA Tegra I2C controller driver 12*e67e8565SEmmanuel Vadot 13*e67e8565SEmmanuel Vadotproperties: 14*e67e8565SEmmanuel Vadot compatible: 15*e67e8565SEmmanuel Vadot oneOf: 16*e67e8565SEmmanuel Vadot - description: Tegra20 has 4 generic I2C controller. This can support 17*e67e8565SEmmanuel Vadot master and slave mode of I2C communication. The i2c-tegra driver 18*e67e8565SEmmanuel Vadot only support master mode of I2C communication. Driver of I2C 19*e67e8565SEmmanuel Vadot controller is only compatible with "nvidia,tegra20-i2c". 20*e67e8565SEmmanuel Vadot const: nvidia,tegra20-i2c 21*e67e8565SEmmanuel Vadot - description: Tegra20 has specific I2C controller called as DVC I2C 22*e67e8565SEmmanuel Vadot controller. This only support master mode of I2C communication. 23*e67e8565SEmmanuel Vadot Register interface/offset and interrupts handling are different than 24*e67e8565SEmmanuel Vadot generic I2C controller. Driver of DVC I2C controller is only 25*e67e8565SEmmanuel Vadot compatible with "nvidia,tegra20-i2c-dvc". 26*e67e8565SEmmanuel Vadot const: nvidia,tegra20-i2c-dvc 27*e67e8565SEmmanuel Vadot - description: | 28*e67e8565SEmmanuel Vadot Tegra30 has 5 generic I2C controller. This controller is very much 29*e67e8565SEmmanuel Vadot similar to Tegra20 I2C controller with additional feature: Continue 30*e67e8565SEmmanuel Vadot Transfer Support. This feature helps to implement M_NO_START as per 31*e67e8565SEmmanuel Vadot I2C core API transfer flags. Driver of I2C controller is compatible 32*e67e8565SEmmanuel Vadot with "nvidia,tegra30-i2c" to enable the continue transfer support. 33*e67e8565SEmmanuel Vadot This is also compatible with "nvidia,tegra20-i2c" without continue 34*e67e8565SEmmanuel Vadot transfer support. 35*e67e8565SEmmanuel Vadot items: 36*e67e8565SEmmanuel Vadot - const: nvidia,tegra30-i2c 37*e67e8565SEmmanuel Vadot - const: nvidia,tegra20-i2c 38*e67e8565SEmmanuel Vadot - description: | 39*e67e8565SEmmanuel Vadot Tegra114 has 5 generic I2C controllers. This controller is very much 40*e67e8565SEmmanuel Vadot similar to Tegra30 I2C controller with some hardware modification: 41*e67e8565SEmmanuel Vadot - Tegra30/Tegra20 I2C controller has 2 clock source called div-clk 42*e67e8565SEmmanuel Vadot and fast-clk. Tegra114 has only one clock source called as 43*e67e8565SEmmanuel Vadot div-clk and hence clock mechanism is changed in I2C controller. 44*e67e8565SEmmanuel Vadot - Tegra30/Tegra20 I2C controller has enabled per packet transfer 45*e67e8565SEmmanuel Vadot by default and there is no way to disable it. Tegra114 has this 46*e67e8565SEmmanuel Vadot interrupt disable by default and SW need to enable explicitly. 47*e67e8565SEmmanuel Vadot Due to above changes, Tegra114 I2C driver makes incompatible with 48*e67e8565SEmmanuel Vadot previous hardware driver. Hence, Tegra114 I2C controller is 49*e67e8565SEmmanuel Vadot compatible with "nvidia,tegra114-i2c". 50*e67e8565SEmmanuel Vadot const: nvidia,tegra114-i2c 51*e67e8565SEmmanuel Vadot - description: | 52*e67e8565SEmmanuel Vadot Tegra124 has 6 generic I2C controllers. These controllers are very 53*e67e8565SEmmanuel Vadot similar to those found on Tegra114 but also contain several hardware 54*e67e8565SEmmanuel Vadot improvements and new registers. 55*e67e8565SEmmanuel Vadot const: nvidia,tegra124-i2c 56*e67e8565SEmmanuel Vadot - description: | 57*e67e8565SEmmanuel Vadot Tegra210 has 6 generic I2C controllers. These controllers are very 58*e67e8565SEmmanuel Vadot similar to those found on Tegra124. 59*e67e8565SEmmanuel Vadot items: 60*e67e8565SEmmanuel Vadot - const: nvidia,tegra210-i2c 61*e67e8565SEmmanuel Vadot - const: nvidia,tegra124-i2c 62*e67e8565SEmmanuel Vadot - description: | 63*e67e8565SEmmanuel Vadot Tegra210 has one I2C controller that is on host1x bus and is part of 64*e67e8565SEmmanuel Vadot the VE power domain and typically used for camera use-cases. This VI 65*e67e8565SEmmanuel Vadot I2C controller is mostly compatible with the programming model of 66*e67e8565SEmmanuel Vadot the regular I2C controllers with a few exceptions. The I2C registers 67*e67e8565SEmmanuel Vadot start at an offset of 0xc00 (instead of 0), registers are 16 bytes 68*e67e8565SEmmanuel Vadot apart (rather than 4) and the controller does not support slave 69*e67e8565SEmmanuel Vadot mode. 70*e67e8565SEmmanuel Vadot const: nvidia,tegra210-i2c-vi 71*e67e8565SEmmanuel Vadot - description: | 72*e67e8565SEmmanuel Vadot Tegra186 has 9 generic I2C controllers, two of which are in the AON 73*e67e8565SEmmanuel Vadot (always-on) partition of the SoC. All of these controllers are very 74*e67e8565SEmmanuel Vadot similar to those found on Tegra210. 75*e67e8565SEmmanuel Vadot const: nvidia,tegra186-i2c 76*e67e8565SEmmanuel Vadot - description: | 77*e67e8565SEmmanuel Vadot Tegra194 has 8 generic I2C controllers, two of which are in the AON 78*e67e8565SEmmanuel Vadot (always-on) partition of the SoC. All of these controllers are very 79*e67e8565SEmmanuel Vadot similar to those found on Tegra186. However, these controllers have 80*e67e8565SEmmanuel Vadot support for 64 KiB transactions whereas earlier chips supported no 81*e67e8565SEmmanuel Vadot more than 4 KiB per transactions. 82*e67e8565SEmmanuel Vadot const: nvidia,tegra194-i2c 83*e67e8565SEmmanuel Vadot 84*e67e8565SEmmanuel Vadot reg: 85*e67e8565SEmmanuel Vadot maxItems: 1 86*e67e8565SEmmanuel Vadot 87*e67e8565SEmmanuel Vadot interrupts: 88*e67e8565SEmmanuel Vadot maxItems: 1 89*e67e8565SEmmanuel Vadot 90*e67e8565SEmmanuel Vadot '#address-cells': 91*e67e8565SEmmanuel Vadot const: 1 92*e67e8565SEmmanuel Vadot 93*e67e8565SEmmanuel Vadot '#size-cells': 94*e67e8565SEmmanuel Vadot const: 0 95*e67e8565SEmmanuel Vadot 96*e67e8565SEmmanuel Vadot clocks: 97*e67e8565SEmmanuel Vadot minItems: 1 98*e67e8565SEmmanuel Vadot maxItems: 2 99*e67e8565SEmmanuel Vadot 100*e67e8565SEmmanuel Vadot clock-names: 101*e67e8565SEmmanuel Vadot minItems: 1 102*e67e8565SEmmanuel Vadot maxItems: 2 103*e67e8565SEmmanuel Vadot 104*e67e8565SEmmanuel Vadot resets: 105*e67e8565SEmmanuel Vadot items: 106*e67e8565SEmmanuel Vadot - description: module reset 107*e67e8565SEmmanuel Vadot 108*e67e8565SEmmanuel Vadot reset-names: 109*e67e8565SEmmanuel Vadot items: 110*e67e8565SEmmanuel Vadot - const: i2c 111*e67e8565SEmmanuel Vadot 112*e67e8565SEmmanuel Vadot dmas: 113*e67e8565SEmmanuel Vadot items: 114*e67e8565SEmmanuel Vadot - description: DMA channel for the reception FIFO 115*e67e8565SEmmanuel Vadot - description: DMA channel for the transmission FIFO 116*e67e8565SEmmanuel Vadot 117*e67e8565SEmmanuel Vadot dma-names: 118*e67e8565SEmmanuel Vadot items: 119*e67e8565SEmmanuel Vadot - const: rx 120*e67e8565SEmmanuel Vadot - const: tx 121*e67e8565SEmmanuel Vadot 122*e67e8565SEmmanuel VadotallOf: 123*e67e8565SEmmanuel Vadot - $ref: /schemas/i2c/i2c-controller.yaml 124*e67e8565SEmmanuel Vadot - if: 125*e67e8565SEmmanuel Vadot properties: 126*e67e8565SEmmanuel Vadot compatible: 127*e67e8565SEmmanuel Vadot contains: 128*e67e8565SEmmanuel Vadot enum: 129*e67e8565SEmmanuel Vadot - nvidia,tegra20-i2c 130*e67e8565SEmmanuel Vadot - nvidia,tegra30-i2c 131*e67e8565SEmmanuel Vadot then: 132*e67e8565SEmmanuel Vadot properties: 133*e67e8565SEmmanuel Vadot clock-names: 134*e67e8565SEmmanuel Vadot items: 135*e67e8565SEmmanuel Vadot - const: div-clk 136*e67e8565SEmmanuel Vadot - const: fast-clk 137*e67e8565SEmmanuel Vadot 138*e67e8565SEmmanuel Vadot - if: 139*e67e8565SEmmanuel Vadot properties: 140*e67e8565SEmmanuel Vadot compatible: 141*e67e8565SEmmanuel Vadot contains: 142*e67e8565SEmmanuel Vadot const: nvidia,tegra114-i2c 143*e67e8565SEmmanuel Vadot then: 144*e67e8565SEmmanuel Vadot properties: 145*e67e8565SEmmanuel Vadot clock-names: 146*e67e8565SEmmanuel Vadot items: 147*e67e8565SEmmanuel Vadot - const: div-clk 148*e67e8565SEmmanuel Vadot 149*e67e8565SEmmanuel Vadot - if: 150*e67e8565SEmmanuel Vadot properties: 151*e67e8565SEmmanuel Vadot compatible: 152*e67e8565SEmmanuel Vadot contains: 153*e67e8565SEmmanuel Vadot const: nvidia,tegra210-i2c 154*e67e8565SEmmanuel Vadot then: 155*e67e8565SEmmanuel Vadot properties: 156*e67e8565SEmmanuel Vadot clock-names: 157*e67e8565SEmmanuel Vadot items: 158*e67e8565SEmmanuel Vadot - const: div-clk 159*e67e8565SEmmanuel Vadot 160*e67e8565SEmmanuel Vadot - if: 161*e67e8565SEmmanuel Vadot properties: 162*e67e8565SEmmanuel Vadot compatible: 163*e67e8565SEmmanuel Vadot contains: 164*e67e8565SEmmanuel Vadot const: nvidia,tegra210-i2c-vi 165*e67e8565SEmmanuel Vadot then: 166*e67e8565SEmmanuel Vadot properties: 167*e67e8565SEmmanuel Vadot clock-names: 168*e67e8565SEmmanuel Vadot items: 169*e67e8565SEmmanuel Vadot - const: div-clk 170*e67e8565SEmmanuel Vadot - const: slow 171*e67e8565SEmmanuel Vadot power-domains: 172*e67e8565SEmmanuel Vadot items: 173*e67e8565SEmmanuel Vadot - description: phandle to the VENC power domain 174*e67e8565SEmmanuel Vadot 175*e67e8565SEmmanuel VadotunevaluatedProperties: false 176*e67e8565SEmmanuel Vadot 177*e67e8565SEmmanuel Vadotexamples: 178*e67e8565SEmmanuel Vadot - | 179*e67e8565SEmmanuel Vadot i2c@7000c000 { 180*e67e8565SEmmanuel Vadot compatible = "nvidia,tegra20-i2c"; 181*e67e8565SEmmanuel Vadot reg = <0x7000c000 0x100>; 182*e67e8565SEmmanuel Vadot interrupts = <0 38 0x04>; 183*e67e8565SEmmanuel Vadot clocks = <&tegra_car 12>, <&tegra_car 124>; 184*e67e8565SEmmanuel Vadot clock-names = "div-clk", "fast-clk"; 185*e67e8565SEmmanuel Vadot resets = <&tegra_car 12>; 186*e67e8565SEmmanuel Vadot reset-names = "i2c"; 187*e67e8565SEmmanuel Vadot dmas = <&apbdma 16>, <&apbdma 16>; 188*e67e8565SEmmanuel Vadot dma-names = "rx", "tx"; 189*e67e8565SEmmanuel Vadot 190*e67e8565SEmmanuel Vadot #address-cells = <1>; 191*e67e8565SEmmanuel Vadot #size-cells = <0>; 192*e67e8565SEmmanuel Vadot }; 193