linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support
@ 2025-08-18  4:33 Akhil R
  2025-08-18  4:33 ` [PATCH RESEND 1/2] dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C compatible Akhil R
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Akhil R @ 2025-08-18  4:33 UTC (permalink / raw)
  To: andi.shyti, conor+dt, devicetree, digetx, jonathanh, krzk+dt,
	linux-i2c, linux-kernel, linux-tegra
  Cc: akhilrajeev, ldewangan, robh, thierry.reding

This series adds support for Tegra256 I2C controllers to the Tegra I2C driver.

Tegra256 consists of 8 generic I2C controllers similar to previous Tegra generations,
but with a different parent clock frequency requiring adjusted timing parameters.

The changes add the "nvidia,tegra256-i2c" compatible string to device tree bindings
and implement the corresponding hardware feature structure with appropriate timing
parameters and clock divisors.

Akhil R (2):
  dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C
  i2c: tegra: Add Tegra256 support

 .../bindings/i2c/nvidia,tegra20-i2c.yaml      |  6 +++++
 drivers/i2c/busses/i2c-tegra.c                | 26 +++++++++++++++++++
 2 files changed, 32 insertions(+)

-- 
2.50.1


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

* [PATCH RESEND 1/2] dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C compatible
  2025-08-18  4:33 [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
@ 2025-08-18  4:33 ` Akhil R
  2025-08-18  4:33 ` [PATCH RESEND 2/2] i2c: tegra: Add Tegra256 support Akhil R
  2025-08-29 10:04 ` [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
  2 siblings, 0 replies; 4+ messages in thread
From: Akhil R @ 2025-08-18  4:33 UTC (permalink / raw)
  To: andi.shyti, conor+dt, devicetree, digetx, jonathanh, krzk+dt,
	linux-i2c, linux-kernel, linux-tegra
  Cc: akhilrajeev, ldewangan, robh, thierry.reding, Thierry Reding

Add compatible for Tegra256 I2C controllers. Tegra256 consists of
8 generic Tegra I2C controllers similar to previous generations.
The parent clock frequency is different in these controllers and
hence the timing parameter values are different from the previous
ones.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>

---
 .../devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml         | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
index 6b6f6762d122..6f58eb79a7b3 100644
--- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
@@ -80,6 +80,11 @@ properties:
           support for 64 KiB transactions whereas earlier chips supported no
           more than 4 KiB per transactions.
         const: nvidia,tegra194-i2c
+      - description: |
+          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.
+        const: nvidia,tegra256-i2c
 
   reg:
     maxItems: 1
@@ -186,6 +191,7 @@ allOf:
             contains:
               enum:
                 - nvidia,tegra194-i2c
+                - nvidia,tegra256-i2c
     then:
       required:
         - resets
-- 
2.50.1


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

* [PATCH RESEND 2/2] i2c: tegra: Add Tegra256 support
  2025-08-18  4:33 [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
  2025-08-18  4:33 ` [PATCH RESEND 1/2] dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C compatible Akhil R
@ 2025-08-18  4:33 ` Akhil R
  2025-08-29 10:04 ` [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
  2 siblings, 0 replies; 4+ messages in thread
From: Akhil R @ 2025-08-18  4:33 UTC (permalink / raw)
  To: andi.shyti, conor+dt, devicetree, digetx, jonathanh, krzk+dt,
	linux-i2c, linux-kernel, linux-tegra
  Cc: akhilrajeev, ldewangan, robh, thierry.reding, Thierry Reding

Add compatible and the hardware struct for Tegra256. Tegra256 controllers
use a different parent clock. Hence the timing parameters are different
from the previous generations to meet the expected frequencies.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>

---
 drivers/i2c/busses/i2c-tegra.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 4eb31b913c1a..e533460bccc3 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -1649,7 +1649,33 @@ static const struct tegra_i2c_hw_feature tegra194_i2c_hw = {
 	.has_interface_timing_reg = true,
 };
 
+static const struct tegra_i2c_hw_feature tegra256_i2c_hw = {
+	.has_continue_xfer_support = true,
+	.has_per_pkt_xfer_complete_irq = true,
+	.clk_divisor_hs_mode = 7,
+	.clk_divisor_std_mode = 0x7a,
+	.clk_divisor_fast_mode = 0x40,
+	.clk_divisor_fast_plus_mode = 0x19,
+	.has_config_load_reg = true,
+	.has_multi_master_mode = true,
+	.has_slcg_override_reg = true,
+	.has_mst_fifo = true,
+	.has_mst_reset = true,
+	.quirks = &tegra194_i2c_quirks,
+	.supports_bus_clear = true,
+	.has_apb_dma = false,
+	.tlow_std_mode = 0x8,
+	.thigh_std_mode = 0x7,
+	.tlow_fast_fastplus_mode = 0x3,
+	.thigh_fast_fastplus_mode = 0x3,
+	.setup_hold_time_std_mode = 0x08080808,
+	.setup_hold_time_fast_fast_plus_mode = 0x02020202,
+	.setup_hold_time_hs_mode = 0x090909,
+	.has_interface_timing_reg = true,
+};
+
 static const struct of_device_id tegra_i2c_of_match[] = {
+	{ .compatible = "nvidia,tegra256-i2c", .data = &tegra256_i2c_hw, },
 	{ .compatible = "nvidia,tegra194-i2c", .data = &tegra194_i2c_hw, },
 	{ .compatible = "nvidia,tegra186-i2c", .data = &tegra186_i2c_hw, },
 #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
-- 
2.50.1


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

* [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support
  2025-08-18  4:33 [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
  2025-08-18  4:33 ` [PATCH RESEND 1/2] dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C compatible Akhil R
  2025-08-18  4:33 ` [PATCH RESEND 2/2] i2c: tegra: Add Tegra256 support Akhil R
@ 2025-08-29 10:04 ` Akhil R
  2 siblings, 0 replies; 4+ messages in thread
From: Akhil R @ 2025-08-29 10:04 UTC (permalink / raw)
  To: andi.shyti
  Cc: akhilrajeev, conor+dt, devicetree, digetx, jonathanh, krzk+dt,
	ldewangan, linux-i2c, linux-kernel, linux-tegra, robh,
	thierry.reding

On Mon, 18 Aug 2025 10:03:43 +0530, Akhil R wrote:

> This series adds support for Tegra256 I2C controllers to the Tegra I2C driver.
>
> Tegra256 consists of 8 generic I2C controllers similar to previous Tegra generations,
> but with a different parent clock frequency requiring adjusted timing parameters.
>
> The changes add the "nvidia,tegra256-i2c" compatible string to device tree bindings
> and implement the corresponding hardware feature structure with appropriate timing
> parameters and clock divisors.
>
> Akhil R (2):
>   dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C
>   i2c: tegra: Add Tegra256 support
>
>  .../bindings/i2c/nvidia,tegra20-i2c.yaml      |  6 +++++
>  drivers/i2c/busses/i2c-tegra.c                | 26 +++++++++++++++++++
>  2 files changed, 32 insertions(+)

Hi Andi,

Did you get a chance to check this patchset, do you see any concerns?

Thanks & Regards,
Akhil

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

end of thread, other threads:[~2025-08-29 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  4:33 [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R
2025-08-18  4:33 ` [PATCH RESEND 1/2] dt-bindings: i2c: nvidia,tegra20-i2c: Add Tegra256 I2C compatible Akhil R
2025-08-18  4:33 ` [PATCH RESEND 2/2] i2c: tegra: Add Tegra256 support Akhil R
2025-08-29 10:04 ` [PATCH RESEND 0/2] i2c: tegra: Add Tegra256 I2C controller support Akhil R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).