drm/bridge: it66121: Add it66122 support
Subsystems (5)
v2 cover drm/bridge: it66121: Add it66122 support
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/[email protected]/
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(-)
Signature · 1 line
2.47.0
PATCH v2 1/3 dt-bindings: display: bridge: it66121: Add compatible string for IT66122
Add a new ite,it66122 compatible string to the IT66121 binding documentation, since the two chips are practically same except for id register difference.
---
Changes Since v1:
* just picked up Krzysztof's Ack
V1: https://lore.kernel.org/all/[email protected]/
.../devicetree/bindings/display/bridge/ite,it66121.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml +1 -0
@@ -19,6 +19,7 @@ properties: compatible: enum: - ite,it66121 + - ite,it66122 - ite,it6610 reg:
Signature · 1 line
2.47.0
PATCH v2 2/3 drm/bridge: it66121: Convert the vid/pid entries into a list
In reply to Nishanth MenonThe 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.
---
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(-)
drivers/gpu/drm/bridge/ite-it66121.c +21 -8
@@ -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[] = {
Signature · 1 line
2.47.0
PATCH v2 3/3 drm/bridge: it66121: Add it66122 support
In reply to Nishanth MenonThe 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.
---
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/[email protected]/
drivers/gpu/drm/bridge/ite-it66121.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/bridge/ite-it66121.c +3 -0
@@ -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 }, { } };
Signature · 1 line
2.47.0
Hi,
Quoted 2 lines · 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
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:
Tomi
Quoted 48 lines
change being the PID is now
0x0622vs0x0612. 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 <[email protected]>---
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/[email protected]/
drivers/gpu/drm/bridge/ite-it66121.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/bridge/ite-it66121.c +3
-0@@ -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 }, { } };
On 13:32-20250814, Tomi Valkeinen wrote:
Thanks for looking at this closer, Tomi.
Quoted 3 lines · Nishanth Menon
Quoted 1 line
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."
Quoted 6 lines
Quoted 1 line
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).
Quoted 3 lines
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.
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource
Quoted 12 lines · 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.
Quoted 6 lines
Quick boot log on BeaglePlay for compatibility check:
https://gist.github.com/nmenon/6cb8b8a00bcce1755628d131df878840Changes since V1:
* Picked up Krystoff's binding ack
* Switched over to a vid/pid list
Best of both, looks good to me,
Quoted 13 lines
V1: https://lore.kernel.org/all/[email protected]/
Nishanth Menon (3):
dt-bindings: display: bridge: it66121: Add compatible string forIT66122drm/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(-)