All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prabhakar <prabhakar.csengg@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Brandt <chris.brandt@renesas.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: [PATCH 5/5] i2c: riic: Add support for R9A09G057 SoC
Date: Fri,  8 Mar 2024 17:27:26 +0000	[thread overview]
Message-ID: <20240308172726.225357-6-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20240308172726.225357-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Extend the RIIC driver to support the RZ/V2H ("R9A09G057") SoC. It
accomplishes this by appending the compatible string list and passing
the RZ/V2H-specific OF data.

Additionally, this patch introduces an riic_family enum for SoC variants,
replacing macro previously used.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
---
 drivers/i2c/busses/i2c-riic.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 3398d639b754..fc814a4f06a6 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -75,7 +75,10 @@
 
 #define RIIC_INIT_MSG	-1
 
-#define RIIC_RZ_A_TYPE	0
+enum riic_family {
+	RIIC_RZ_A_TYPE = 0,
+	RIIC_RZ_V2H_TYPE,
+};
 
 struct riic_of_data {
 	u8 family;
@@ -526,8 +529,26 @@ static const struct riic_of_data riic_rz_a_info = {
 	},
 };
 
+static const struct riic_of_data riic_rz_v2h_info = {
+	.family = RIIC_RZ_V2H_TYPE,
+	.regs = {
+		[RIIC_ICCR1] = 0x00,
+		[RIIC_ICCR2] = 0x01,
+		[RIIC_ICMR1] = 0x02,
+		[RIIC_ICMR3] = 0x04,
+		[RIIC_ICSER] = 0x06,
+		[RIIC_ICIER] = 0x07,
+		[RIIC_ICSR2] = 0x09,
+		[RIIC_ICBRL] = 0x10,
+		[RIIC_ICBRH] = 0x11,
+		[RIIC_ICDRT] = 0x12,
+		[RIIC_ICDRR] = 0x13,
+	},
+};
+
 static const struct of_device_id riic_i2c_dt_ids[] = {
 	{ .compatible = "renesas,riic-rz", .data = &riic_rz_a_info },
+	{ .compatible = "renesas,riic-r9a09g057", .data = &riic_rz_v2h_info },
 	{ /* Sentinel */ },
 };
 
-- 
2.34.1


      parent reply	other threads:[~2024-03-08 17:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 17:27 [PATCH 0/5] Add RIIC support for Renesas RZ/V2H SoC Prabhakar
2024-03-08 17:27 ` [PATCH 1/5] dt-bindings: i2c: renesas,riic: Update comment for fallback string Prabhakar
2024-03-09 11:58   ` Krzysztof Kozlowski
2024-03-09 23:05     ` Lad, Prabhakar
2024-03-19 21:19       ` Andi Shyti
2024-03-20  9:40         ` Krzysztof Kozlowski
2024-03-14 14:33   ` Geert Uytterhoeven
2024-03-08 17:27 ` [PATCH 2/5] dt-bindings: i2c: renesas,riic: Document R9A09G057 support Prabhakar
2024-03-09 12:00   ` Krzysztof Kozlowski
2024-03-09 23:28     ` Lad, Prabhakar
2024-03-10  8:10       ` Krzysztof Kozlowski
2024-03-11  9:00         ` Geert Uytterhoeven
2024-03-12 11:04           ` Krzysztof Kozlowski
2024-03-12 14:06             ` Geert Uytterhoeven
2024-03-12 15:05               ` Krzysztof Kozlowski
2024-03-10  8:05   ` Biju Das
2024-03-08 17:27 ` [PATCH 3/5] i2c: riic: Introduce helper functions for I2C read/write operations Prabhakar
2024-03-08 19:47   ` Geert Uytterhoeven
2024-03-08 21:00     ` Lad, Prabhakar
2024-03-08 17:27 ` [PATCH 4/5] i2c: riic: Pass register offsets and chip details as OF data Prabhakar
2024-03-08 17:36   ` Biju Das
2024-03-08 18:03     ` Lad, Prabhakar
2024-03-08 18:15       ` Biju Das
2024-03-08 20:59         ` Lad, Prabhakar
2024-03-08 17:27 ` Prabhakar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240308172726.225357-6-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=chris.brandt@renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.