NVIDIA Tegra I2C controller driver

Schema identifier ($id): "http://devicetree.org/schemas/i2c/nvidia,tegra20-i2c.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Thierry Reding <thierry.reding@gmail.com>", "Jon Hunter <jonathanh@nvidia.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Tegra20 has 4 generic I2C controller. This can support master and slave mode of I2C communication. The i2c-tegra driver only support master mode of I2C communication. Driver of I2C controller is only compatible with "nvidia,tegra20-i2c".

Exact value (const): "nvidia,tegra20-i2c"

Rule 2

Tegra20 has specific I2C controller called as DVC I2C controller. This only support master mode of I2C communication. Register interface/offset and interrupts handling are different than generic I2C controller. Driver of DVC I2C controller is only compatible with "nvidia,tegra20-i2c-dvc".

Exact value (const): "nvidia,tegra20-i2c-dvc"

Rule 3

Tegra30 has 5 generic I2C controller. This controller is very much similar to Tegra20 I2C controller with additional feature: Continue Transfer Support. This feature helps to implement M_NO_START as per I2C core API transfer flags. Driver of I2C controller is compatible with "nvidia,tegra30-i2c" to enable the continue transfer support. This is also compatible with "nvidia,tegra20-i2c" without continue transfer support.

Array item rules (items)

Item 1

Exact value (const): "nvidia,tegra30-i2c"

Item 2

Exact value (const): "nvidia,tegra20-i2c"

Rule 4

Tegra114 has 5 generic I2C controllers. This controller is very much
similar to Tegra30 I2C controller with some hardware modification:
  - Tegra30/Tegra20 I2C controller has 2 clock source called div-clk
    and fast-clk. Tegra114 has only one clock source called as
    div-clk and hence clock mechanism is changed in I2C controller.
  - Tegra30/Tegra20 I2C controller has enabled per packet transfer
    by default and there is no way to disable it. Tegra114 has this
    interrupt disable by default and SW need to enable explicitly.
Due to above changes, Tegra114 I2C driver makes incompatible with
previous hardware driver. Hence, Tegra114 I2C controller is
compatible with "nvidia,tegra114-i2c".

Exact value (const): "nvidia,tegra114-i2c"

Rule 5

Tegra124 has 6 generic I2C controllers. These controllers are very similar to those found on Tegra114 but also contain several hardware improvements and new registers.

Exact value (const): "nvidia,tegra124-i2c"

Rule 6

Tegra210 has 6 generic I2C controllers. These controllers are very similar to those found on Tegra124.

Array item rules (items)

Item 1

Exact value (const): "nvidia,tegra210-i2c"

Item 2

Exact value (const): "nvidia,tegra124-i2c"

Rule 7

Tegra210 has one I2C controller that is on host1x bus and is part of the VE power domain and typically used for camera use-cases. This VI I2C controller is mostly compatible with the programming model of the regular I2C controllers with a few exceptions. The I2C registers start at an offset of 0xc00 (instead of 0), registers are 16 bytes apart (rather than 4) and the controller does not support slave mode.

Exact value (const): "nvidia,tegra210-i2c-vi"

Rule 8

Tegra186 has 9 generic I2C controllers, two of which are in the AON (always-on) partition of the SoC. All of these controllers are very similar to those found on Tegra210.

Exact value (const): "nvidia,tegra186-i2c"

Rule 9

Tegra194 has 8 generic I2C controllers, two of which are in the AON (always-on) partition of the SoC. All of these controllers are very similar to those found on Tegra186. However, these controllers have support for 64 KiB transactions whereas earlier chips supported no more than 4 KiB per transactions.

Exact value (const): "nvidia,tegra194-i2c"

Rule 10

Tegra256 has 8 generic I2C controllers. The controllers are similar to the previous generations, but have a different parent clock and hence the timing parameters are configured differently.

Exact value (const): "nvidia,tegra256-i2c"

Rule 11

Tegra264 has 17 generic I2C controllers, two of which are in the AON (always-on) partition of the SoC. In addition to the features from Tegra194, a SW mutex register is added to support use of the same I2C instance across multiple firmwares.

Exact value (const): "nvidia,tegra264-i2c"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

clock-names — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

resets — not listed as required here #

Array item rules (items) #

Item 1

Module reset. This property is optional for controllers in Tegra194, Tegra234 etc where an internal software reset is available as an alternative.

reset-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "i2c"

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

dmas — not listed as required here #

Array item rules (items) #

Item 1

DMA channel for the reception FIFO

Item 2

DMA channel for the transmission FIFO

dma-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "rx"

Item 2

Exact value (const): "tx"

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/i2c/i2c-controller.yaml

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "nvidia,tegra20-i2c", "nvidia,tegra30-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "div-clk"

Item 2

Exact value (const): "fast-clk"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "nvidia,tegra114-i2c", "nvidia,tegra210-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Maximum number of items (maxItems): 1

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "div-clk"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "nvidia,tegra210-i2c-vi"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "div-clk"

Item 2

Exact value (const): "slow"

power-domains — not listed as required here

Array item rules (items)

Item 1

phandle to the VENC power domain

When the condition does not match (else) #

Properties and child nodes (properties)

power-domains — not listed as required here

false — Not permitted by this property rule.

Rule 5 #

Condition (if) #

This rule must not match (not)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "nvidia,tegra194-i2c", "nvidia,tegra256-i2c", "nvidia,tegra264-i2c"

When the condition matches (then) #

Required in this object (required): "resets", "reset-names"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c@7000c000 {
    compatible = "nvidia,tegra20-i2c";
    reg = <0x7000c000 0x100>;
    interrupts = <0 38 0x04>;
    clocks = <&tegra_car 12>, <&tegra_car 124>;
    clock-names = "div-clk", "fast-clk";
    resets = <&tegra_car 12>;
    reset-names = "i2c";
    dmas = <&apbdma 16>, <&apbdma 16>;
    dma-names = "rx", "tx";

    #address-cells = <1>;
    #size-cells = <0>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page