drm/bridge: it66121: Add it66122 support
Subsystems (5)
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.
An alternate implementation could be to drop the revision check or make it66121 check include alternate ID check.. but that seems a little non-standard.. Anyways, I suppose mediatek platforms will face this problem as well at some point.
Nishanth Menon (2):
dt-bindings: display: bridge: it66121: Add compatible string for
IT66122
drm/bridge: it66121: Add it66122 support
.../devicetree/bindings/display/bridge/ite,it66121.yaml | 1 + drivers/gpu/drm/bridge/ite-it66121.c | 8 ++++++++ 2 files changed, 9 insertions(+)
Signature · 1 line
2.47.0
PATCH 1/2 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.
--- .../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
Re: [PATCH 1/2] dt-bindings: display: bridge: it66121: Add compatible string for IT66122
Quoted 6 lines · Nishanth Menon
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 <[email protected]>---
Best regards,
Krzysztof
PATCH 2/2 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.
---
Note: checkpatch --strict reports:
CHECK: No space is necessary after a cast #45: FILE: drivers/gpu/drm/bridge/ite-it66121.c:1643:
+ { "it66122", (kernel_ulong_t) &it66122_chip_info },
I chose to retain existing style - let me know if we want to clean this up as well.
NOTE: .id = ID_IT66121 is explicitly used as indication of reuse of existing it66121 compatibility.
drivers/gpu/drm/bridge/ite-it66121.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/bridge/ite-it66121.c +8 -0
@@ -1618,6 +1618,12 @@ static const struct it66121_chip_info it66121_chip_info = { .pid = 0x0612, }; +static const struct it66121_chip_info it66122_chip_info = { + .id =ID_IT66121 , + .vid =0x4954 , + .pid =0x0622 , +}; +static const struct it66121_chip_info it6610_chip_info = { .id =ID_IT6610 , .vid =0xca00 ,
@@ -1626,6 +1632,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" , &it66122_chip_info }, { .compatible ="ite,it6610" , &it6610_chip_info }, { } };
@@ -1633,6 +1640,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) &it66122_chip_info }, {"it6610" , (kernel_ulong_t) &it6610_chip_info }, { } };
Signature · 1 line
2.47.0
Hi Nishanth,
Thanks for the patch.
Quoted 1 line · Nishanth Menon
The IT66122 is a drop in replacement for the IT66122.
The IT66122 is a drop in replacement for the IT66121
The part is
Quoted 26 lines
register compatible with what we use of the IT66121. The only relevant change being the PID is now
0x0622vs0x0612. Add this extra PID so probe does not fail during the PID check with these new parts.Signed-off-by Nishanth Menon <[email protected]>---
Note: checkpatch --strict reports:
CHECK: No space is necessary after a cast #45: FILE:drivers/gpu/drm/bridge/ite-it66121.c:1643:drivers/gpu/drm/bridge/ite-it66121.c +1
-0+ { "it66122", (kernel_ulong_t) &it66122_chip_info },I chose to retain existing style - let me know if we want to clean this up as well.
NOTE: .id =
ID_IT66121is explicitly used as indication of reuse of existing it66121 compatibility.drivers/gpu/drm/bridge/ite-it66121.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/bridge/ite-it66121.c +0
-0
drivers/gpu/drm/bridge/ite-it66121.c static const struct it66121_chip_info it66121_chip_info = { · line 1622
Quoted 5 lines
drivers/gpu/drm/bridge/ite-it66121.c +2
-0@@ -1618,6 +1618,12 @@ static const struct it66121_chip_info it66121_chip_info = { .pid = 0x0612, }; +static const struct it66121_chip_info it66122_chip_info = { + .id =ID_IT66121 ,
I think better to create separate .id as done for other chip_info structs :
.id = ID_IT66122
Regards
Devarsh
Quoted 23 lines
drivers/gpu/drm/bridge/ite-it66121.c +6
-0+ .vid = 0x4954, + .pid = 0x0622, +}; +static const struct it66121_chip_info it6610_chip_info = { .id =ID_IT6610 , .vid =0xca00 ,@@ -1626,6 +1632,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" , &it66122_chip_info }, { .compatible ="ite,it6610" , &it6610_chip_info }, { } };@@ -1633,6 +1640,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) &it66122_chip_info }, {"it6610" , (kernel_ulong_t) &it6610_chip_info }, { } };
Quoted 9 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.
Quoted 8 lines
Now, BeaglePlay uses it66121 at the moment, but at some point, it might end up flipping over to the new part.
An alternate implementation could be to drop the revision check or make it66121 check include alternate ID check.. but that seems a little non-standard.. Anyways, I suppose mediatek platforms will face this problem as well at some point.
Hmmm, since these boards will probably have to switch parts mid-production it would cause us to need to have a new DT with the updated compatible just for a otherwise transparent revision. Might be better to just loosen the PID check so the alternative part work just the same.
Andrew
Quoted 9 lines
Nishanth Menon (2):
dt-bindings: display: bridge: it66121: Add compatible string for IT66122 drm/bridge: it66121: Add it66122 support.../devicetree/bindings/display/bridge/ite,it66121.yaml | 1 + drivers/gpu/drm/bridge/ite-it66121.c | 8 ++++++++ 2 files changed, 9 insertions(+)
Quoted 19 lines · Andrew Davis
Quoted 9 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.
Quoted 8 lines
Now, BeaglePlay uses it66121 at the moment, but at some point, it might end up flipping over to the new part.
An alternate implementation could be to drop the revision check or make it66121 check include alternate ID check.. but that seems a little non-standard.. Anyways, I suppose mediatek platforms will face this problem as well at some point.
Quoted 4 lines
Hmmm, since these boards will probably have to switch parts mid-production it would cause us to need to have a new DT with the updated compatible just for a otherwise transparent revision. Might be better to just loosen the PID check so the alternative part work just the same.
I think we can get both world.. respinning this up in v2
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource