linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support
@ 2025-08-13 20:41 Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 1/3] dt-bindings: display: bridge: it66121: Add compatible string for IT66122 Nishanth Menon
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Nishanth Menon @ 2025-08-13 20:41 UTC (permalink / raw)
  To: Conor Dooley, Krzysztof Kozlowski, Rob Herring, David Airlie,
	Maxime Ripard, Laurent Pinchart, Neil Armstrong
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Jason Kridner,
	afd, Nishanth Menon

Hi,

Add support for IT66122, which for all practical purposes is
drop in replacement for IT66121 except for the ID register
definition.

BeagleY-AI uses this new part as the old part is no longer in production
as far as I understand.

Now, BeaglePlay uses it66121 at the moment, but at some point, it might
end up flipping over to the new part.

Quick boot log on BeaglePlay for compatibility check:
https://gist.github.com/nmenon/6cb8b8a00bcce1755628d131df878840

Changes since V1:
* Picked up Krystoff's binding ack
* Switched over to a vid/pid list

V1: https://lore.kernel.org/all/20250813190835.344563-1-nm@ti.com/

Nishanth Menon (3):
  dt-bindings: display: bridge: it66121: Add compatible string for
    IT66122
  drm/bridge: it66121: Convert the vid/pid entries into a list
  drm/bridge: it66121: Add it66122 support

 .../bindings/display/bridge/ite,it66121.yaml  |  1 +
 drivers/gpu/drm/bridge/ite-it66121.c          | 32 ++++++++++++++-----
 2 files changed, 25 insertions(+), 8 deletions(-)

-- 
2.47.0


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

* [PATCH V2 1/3] dt-bindings: display: bridge: it66121: Add compatible string for IT66122
  2025-08-13 20:41 [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
@ 2025-08-13 20:41 ` Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 2/3] drm/bridge: it66121: Convert the vid/pid entries into a list Nishanth Menon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Nishanth Menon @ 2025-08-13 20:41 UTC (permalink / raw)
  To: Conor Dooley, Krzysztof Kozlowski, Rob Herring, David Airlie,
	Maxime Ripard, Laurent Pinchart, Neil Armstrong
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Jason Kridner,
	afd, Nishanth Menon, Krzysztof Kozlowski

Add a new ite,it66122 compatible string to the IT66121 binding
documentation, since the two chips are practically same except for id
register difference.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes Since v1:
* just picked up Krzysztof's Ack

V1: https://lore.kernel.org/all/f75e0372-6a45-4d27-a74a-0a41c5674987@kernel.org/
 .../devicetree/bindings/display/bridge/ite,it66121.yaml          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml
index a7eb2603691f..c99b67f0bb73 100644
--- a/Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml
@@ -19,6 +19,7 @@ properties:
   compatible:
     enum:
       - ite,it66121
+      - ite,it66122
       - ite,it6610
 
   reg:
-- 
2.47.0


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

* [PATCH V2 2/3] drm/bridge: it66121: Convert the vid/pid entries into a list
  2025-08-13 20:41 [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 1/3] dt-bindings: display: bridge: it66121: Add compatible string for IT66122 Nishanth Menon
@ 2025-08-13 20:41 ` Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
  2025-08-13 22:41 ` [PATCH V2 0/3] " Andrew Davis
  3 siblings, 0 replies; 7+ messages in thread
From: Nishanth Menon @ 2025-08-13 20:41 UTC (permalink / raw)
  To: Conor Dooley, Krzysztof Kozlowski, Rob Herring, David Airlie,
	Maxime Ripard, Laurent Pinchart, Neil Armstrong
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Jason Kridner,
	afd, Nishanth Menon

The IT66122 is a drop in replacement for the IT66122. The part is
register compatible with what we use of the IT66121. The only relevant
change being the PID is now 0x0622 vs 0x0612. Add this extra PID so
probe does not fail during the PID check with these new parts.

Since production flow can result in multiple devices as the part gets
replaced, prepare for a match list that allows introducing additional
vid/pid matches for the same device profile.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
New Patch
- This sets up the stage for introducing it66122 support

 drivers/gpu/drm/bridge/ite-it66121.c | 29 ++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index aa7b1dcc5d70..208e118df0e2 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -289,9 +289,13 @@ enum chip_id {
 	ID_IT66121,
 };
 
+struct it66121_device_id {
+	u16 vid, pid;
+};
+
 struct it66121_chip_info {
 	enum chip_id id;
-	u16 vid, pid;
+	struct it66121_device_id device_id[]; /* NULL terminated List */
 };
 
 struct it66121_ctx {
@@ -1511,6 +1515,7 @@ static int it66121_probe(struct i2c_client *client)
 	int ret;
 	struct it66121_ctx *ctx;
 	struct device *dev = &client->dev;
+	const struct it66121_device_id *device_id;
 
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
 		dev_err(dev, "I2C check functionality failed.\n");
@@ -1574,11 +1579,15 @@ static int it66121_probe(struct i2c_client *client)
 	revision_id = FIELD_GET(IT66121_REVISION_MASK, device_ids[1]);
 	device_ids[1] &= IT66121_DEVICE_ID1_MASK;
 
-	if ((vendor_ids[1] << 8 | vendor_ids[0]) != ctx->info->vid ||
-	    (device_ids[1] << 8 | device_ids[0]) != ctx->info->pid) {
-		return -ENODEV;
+	for (device_id = ctx->info->device_id; device_id->vid; device_id++) {
+		if ((vendor_ids[1] << 8 | vendor_ids[0]) == device_id->vid &&
+		    (device_ids[1] << 8 | device_ids[0]) == device_id->pid)
+			break;
 	}
 
+	if (!device_id->vid)
+		return -ENODEV;
+
 	ctx->bridge.of_node = dev->of_node;
 	ctx->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
 	ctx->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
@@ -1614,14 +1623,18 @@ static void it66121_remove(struct i2c_client *client)
 
 static const struct it66121_chip_info it66121_chip_info = {
 	.id = ID_IT66121,
-	.vid = 0x4954,
-	.pid = 0x0612,
+	.device_id = {
+		{.vid = 0x4954, .pid = 0x0612 },
+		{ }
+	},
 };
 
 static const struct it66121_chip_info it6610_chip_info = {
 	.id = ID_IT6610,
-	.vid = 0xca00,
-	.pid = 0x0611,
+	.device_id = {
+		{ .vid = 0xca00, .pid = 0x0611},
+		{ }
+	},
 };
 
 static const struct of_device_id it66121_dt_match[] = {
-- 
2.47.0


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

* [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support
  2025-08-13 20:41 [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 1/3] dt-bindings: display: bridge: it66121: Add compatible string for IT66122 Nishanth Menon
  2025-08-13 20:41 ` [PATCH V2 2/3] drm/bridge: it66121: Convert the vid/pid entries into a list Nishanth Menon
@ 2025-08-13 20:41 ` Nishanth Menon
  2025-08-14 10:32   ` Tomi Valkeinen
  2025-08-13 22:41 ` [PATCH V2 0/3] " Andrew Davis
  3 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2025-08-13 20:41 UTC (permalink / raw)
  To: Conor Dooley, Krzysztof Kozlowski, Rob Herring, David Airlie,
	Maxime Ripard, Laurent Pinchart, Neil Armstrong
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Jason Kridner,
	afd, Nishanth Menon

The IT66122 is a drop in replacement for the IT66122. The part is
register compatible with what we use of the IT66121. The only relevant
change being the PID is now 0x0622 vs 0x0612. Add this extra PID so
probe does not fail during the PID check with these new parts.

For new platforms that do explicitly use IT66122, they can use the
appropriate compatible as well.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
Changes since V1:
- I think this is a more pragmatic approach with both compatibles
  functional and the option of being able to split this up at a later
  point if required in driver.

NOTE: I still retain the checkpatch --strict warning as v1 here.

V1: https://lore.kernel.org/all/20250813190835.344563-3-nm@ti.com/

 drivers/gpu/drm/bridge/ite-it66121.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 208e118df0e2..dcbbf7578046 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -1625,6 +1625,7 @@ static const struct it66121_chip_info it66121_chip_info = {
 	.id = ID_IT66121,
 	.device_id = {
 		{.vid = 0x4954, .pid = 0x0612 },
+		{.vid = 0x4954, .pid = 0x0622 },
 		{ }
 	},
 };
@@ -1639,6 +1640,7 @@ static const struct it66121_chip_info it6610_chip_info = {
 
 static const struct of_device_id it66121_dt_match[] = {
 	{ .compatible = "ite,it66121", &it66121_chip_info },
+	{ .compatible = "ite,it66122", &it66121_chip_info },
 	{ .compatible = "ite,it6610", &it6610_chip_info },
 	{ }
 };
@@ -1646,6 +1648,7 @@ MODULE_DEVICE_TABLE(of, it66121_dt_match);
 
 static const struct i2c_device_id it66121_id[] = {
 	{ "it66121", (kernel_ulong_t) &it66121_chip_info },
+	{ "it66122", (kernel_ulong_t) &it66121_chip_info },
 	{ "it6610", (kernel_ulong_t) &it6610_chip_info },
 	{ }
 };
-- 
2.47.0


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

* Re: [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support
  2025-08-13 20:41 [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
                   ` (2 preceding siblings ...)
  2025-08-13 20:41 ` [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
@ 2025-08-13 22:41 ` Andrew Davis
  3 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2025-08-13 22:41 UTC (permalink / raw)
  To: Nishanth Menon, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
	David Airlie, Maxime Ripard, Laurent Pinchart, Neil Armstrong
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Jason Kridner

On 8/13/25 3:41 PM, Nishanth Menon wrote:
> Hi,
> 
> Add support for IT66122, which for all practical purposes is
> drop in replacement for IT66121 except for the ID register
> definition.
> 
> BeagleY-AI uses this new part as the old part is no longer in production
> as far as I understand.
> 
> Now, BeaglePlay uses it66121 at the moment, but at some point, it might
> end up flipping over to the new part.
> 
> Quick boot log on BeaglePlay for compatibility check:
> https://gist.github.com/nmenon/6cb8b8a00bcce1755628d131df878840
> 
> Changes since V1:
> * Picked up Krystoff's binding ack
> * Switched over to a vid/pid list

Best of both, looks good to me,

Reviewed-by: Andrew Davis <afd@ti.com>

> 
> V1: https://lore.kernel.org/all/20250813190835.344563-1-nm@ti.com/
> 
> Nishanth Menon (3):
>    dt-bindings: display: bridge: it66121: Add compatible string for
>      IT66122
>    drm/bridge: it66121: Convert the vid/pid entries into a list
>    drm/bridge: it66121: Add it66122 support
> 
>   .../bindings/display/bridge/ite,it66121.yaml  |  1 +
>   drivers/gpu/drm/bridge/ite-it66121.c          | 32 ++++++++++++++-----
>   2 files changed, 25 insertions(+), 8 deletions(-)
> 


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

* Re: [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support
  2025-08-13 20:41 ` [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
@ 2025-08-14 10:32   ` Tomi Valkeinen
  2025-08-14 11:06     ` Nishanth Menon
  0 siblings, 1 reply; 7+ messages in thread
From: Tomi Valkeinen @ 2025-08-14 10:32 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Conor Dooley,
	Krzysztof Kozlowski, Rob Herring, David Airlie, Maxime Ripard,
	Laurent Pinchart, Neil Armstrong, Jason Kridner, afd

Hi,

On 13/08/2025 23:41, Nishanth Menon wrote:
> The IT66122 is a drop in replacement for the IT66122. The part is
> register compatible with what we use of the IT66121. The only relevant

The intro letter said "practical purposes is drop in replacement for
IT66121". Here you say "with what we use of the IT66121".

What does that mean? Are they identical, except the IDs? Or are they
different, but the features and registers this driver uses are
identical? Or different, but only identical wrt. the driver's features
TI uses?

Assuming the first one of those, for the series:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

 Tomi

> change being the PID is now 0x0622 vs 0x0612. Add this extra PID so
> probe does not fail during the PID check with these new parts.
> 
> For new platforms that do explicitly use IT66122, they can use the
> appropriate compatible as well.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> Changes since V1:
> - I think this is a more pragmatic approach with both compatibles
>   functional and the option of being able to split this up at a later
>   point if required in driver.
> 
> NOTE: I still retain the checkpatch --strict warning as v1 here.
> 
> V1: https://lore.kernel.org/all/20250813190835.344563-3-nm@ti.com/
> 
>  drivers/gpu/drm/bridge/ite-it66121.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
> index 208e118df0e2..dcbbf7578046 100644
> --- a/drivers/gpu/drm/bridge/ite-it66121.c
> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
> @@ -1625,6 +1625,7 @@ static const struct it66121_chip_info it66121_chip_info = {
>  	.id = ID_IT66121,
>  	.device_id = {
>  		{.vid = 0x4954, .pid = 0x0612 },
> +		{.vid = 0x4954, .pid = 0x0622 },
>  		{ }
>  	},
>  };
> @@ -1639,6 +1640,7 @@ static const struct it66121_chip_info it6610_chip_info = {
>  
>  static const struct of_device_id it66121_dt_match[] = {
>  	{ .compatible = "ite,it66121", &it66121_chip_info },
> +	{ .compatible = "ite,it66122", &it66121_chip_info },
>  	{ .compatible = "ite,it6610", &it6610_chip_info },
>  	{ }
>  };
> @@ -1646,6 +1648,7 @@ MODULE_DEVICE_TABLE(of, it66121_dt_match);
>  
>  static const struct i2c_device_id it66121_id[] = {
>  	{ "it66121", (kernel_ulong_t) &it66121_chip_info },
> +	{ "it66122", (kernel_ulong_t) &it66121_chip_info },
>  	{ "it6610", (kernel_ulong_t) &it6610_chip_info },
>  	{ }
>  };


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

* Re: [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support
  2025-08-14 10:32   ` Tomi Valkeinen
@ 2025-08-14 11:06     ` Nishanth Menon
  0 siblings, 0 replies; 7+ messages in thread
From: Nishanth Menon @ 2025-08-14 11:06 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-kernel, devicetree, dri-devel, Robert Nelson, Conor Dooley,
	Krzysztof Kozlowski, Rob Herring, David Airlie, Maxime Ripard,
	Laurent Pinchart, Neil Armstrong, Jason Kridner, afd

On 13:32-20250814, Tomi Valkeinen wrote:

Thanks for looking at this closer, Tomi.

> 
> On 13/08/2025 23:41, Nishanth Menon wrote:
> > The IT66122 is a drop in replacement for the IT66122. The part is
                                                      ^^

Uggh.. I just realized I made a typo here -> should have stated: "
"The IT66122 is a drop in replacement for the IT66121."

> > register compatible with what we use of the IT66121. The only relevant
> 
> The intro letter said "practical purposes is drop in replacement for
> IT66121". Here you say "with what we use of the IT66121".
> 
> What does that mean? Are they identical, except the IDs? Or are they

The only difference we had been told at the time about is that they are
identical from operation perspective except for the ID register (I
understand it is some sort of manufacturing change or something that is
not visible to s/w - Robert/Jason could add more).

> different, but the features and registers this driver uses are
> identical? Or different, but only identical wrt. the driver's features
> TI uses?

Minor clarification: This is used on BeagleBoard.org foundation boards
BeagleY-AI to be specific and not on Texas Instruments EVMs/SK.

Personally, I have just looked at the features that BeagleY-AI platform
uses. Though, searching via llms tells me there may be additional
features, but I don't have the specific details to confirm beyond what
the BeagleY-AI platform does.

I am hoping BeagleBoard.org Foundation folks OR anyone on the list who
have contacts with ITE Tech. INC. could probably add information.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource

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

end of thread, other threads:[~2025-08-14 11:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 20:41 [PATCH V2 0/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
2025-08-13 20:41 ` [PATCH V2 1/3] dt-bindings: display: bridge: it66121: Add compatible string for IT66122 Nishanth Menon
2025-08-13 20:41 ` [PATCH V2 2/3] drm/bridge: it66121: Convert the vid/pid entries into a list Nishanth Menon
2025-08-13 20:41 ` [PATCH V2 3/3] drm/bridge: it66121: Add it66122 support Nishanth Menon
2025-08-14 10:32   ` Tomi Valkeinen
2025-08-14 11:06     ` Nishanth Menon
2025-08-13 22:41 ` [PATCH V2 0/3] " Andrew Davis

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).