Devicetree
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller
@ 2026-11-15 18:26 Marc Dietrich
  2026-11-15 18:26 ` [PATCH 2/2] i2c: tegra20: Add driver for Tegra20 I2C target controller instances Marc Dietrich
  2026-11-15 18:36 ` [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller sashiko-bot
  0 siblings, 2 replies; 7+ messages in thread
From: Marc Dietrich @ 2026-11-15 18:26 UTC (permalink / raw)
  To: linux-tegra
  Cc: devicetree, linux-i2c, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andi Shyti, Thierry Reding, Jonathan Hunter,
	Uwe Kleine-König, Marc Dietrich

Tegra20 SoCs supports 3 instances of an I2C target controller. They share
ressouces with the I2C controller instances and are introduced here via an
additional compatible.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 .../bindings/i2c/nvidia,tegra20-i2c.yaml      | 27 ++++++++++++++++---
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
index 51241c1293e3..2d7ee8e8750d 100644
--- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
@@ -13,11 +13,15 @@ title: NVIDIA Tegra I2C controller driver
 properties:
   compatible:
     oneOf:
-      - description: 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".
+      - description: Tegra20 has 3 instances of a generic I2C controller.
+          It supports controller and target mode of I2C communication.
+          The i2c-tegra driver only supports master mode of I2C communication.
+          Driver of I2C controller is only compatible with "nvidia,tegra20-i2c".
         const: nvidia,tegra20-i2c
+      - description: The i2c-tegra-target driver supports the target mode of
+          the generic Tegra20 I2C controller. Driver of the I2C target
+          controller is only compatible with "nvidia,tegra20-i2c-target".
+        const: nvidia,tegra20-i2c-target
       - description: 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
@@ -222,3 +226,18 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
     };
+
+  - |
+    i2c@7000c500 {
+        compatible = "nvidia,tegra20-i2c-target";
+        reg = <0x7000c500 0x100>;
+        interrupts = <0 92 0x04>;
+        clocks = <&tegra_car 67>, <&tegra_car 124>;
+        clock-names = "div-clk", "fast-clk";
+        clock-frequency = <80000>;
+        resets = <&tegra_car 67>;
+        reset-names = "i2c";
+
+        #address-cells = <1>;
+        #size-cells = <0>;
+    };
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH 0/2] i2c: tegra20: add target controller support
@ 2026-11-08 21:24 Marc Dietrich
  2026-11-08 21:24 ` [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller Marc Dietrich
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Dietrich @ 2026-11-08 21:24 UTC (permalink / raw)
  To: linux-tegra
  Cc: devicetree, linux-i2c, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andi Shyti, Thierry Reding, Jonathan Hunter,
	Marc Dietrich

Hi,

this series adds I2C target mode support to the Tegra20 I2C controller.
The driver is very simple and only support single byte transfers. The goal
is to remove the NVEC driver from staging with which this implentation was also
tested.
I used a separate driver for the target for maintainability and extensibility
reasons, in case support for more Tegra SOCs will be added. The driver was
coded by use of an LLM with a few adaptions by me.

Marc

Marc Dietrich (2):
  dt-bindings: i2c: Add Tegra20 I2C target controller
  i2c: tegra20: Add driver for Tegra20 I2C target controller instances

 .../bindings/i2c/nvidia,tegra20-i2c.yaml      |  27 +-
 MAINTAINERS                                   |   7 +
 drivers/i2c/busses/Kconfig                    |  14 +
 drivers/i2c/busses/Makefile                   |   1 +
 drivers/i2c/busses/i2c-tegra-target.c         | 372 ++++++++++++++++++
 5 files changed, 417 insertions(+), 4 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-tegra-target.c

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-15 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 18:26 [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller Marc Dietrich
2026-11-15 18:26 ` [PATCH 2/2] i2c: tegra20: Add driver for Tegra20 I2C target controller instances Marc Dietrich
2026-11-15 18:48   ` sashiko-bot
2026-11-15 18:36 ` [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller sashiko-bot
  -- strict thread matches above, loose matches on Subject: below --
2026-11-08 21:24 [PATCH 0/2] i2c: tegra20: add target controller support Marc Dietrich
2026-11-08 21:24 ` [PATCH 1/2] dt-bindings: i2c: Add Tegra20 I2C target controller Marc Dietrich
2026-11-08 21:32   ` sashiko-bot
2026-11-14 16:53     ` Marc Dietrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox