In the past I've seen (and contributed to) hacks that model the chips as phy or even (really!) clock drivers. Since the chip usually sits between a signal that is (almost) HDMI and a HDMI connector, I decided to stop lying and write it as a DRM bridge driver.
Our experience with these chips is that they work best under manual control enabling them only once the signal is active. At low resolutions (under 4k), the optimal setting is usually to only use redriver mode. Setting the termination to 150-300 Ohms improves EMC performance at lower resolutions, hence the driver enables 75-150 Ohms for HDMI2 modes and defaults to 150-300 Ohm termination for other modes. Changes in v2: Document driver specific bindings like slew-rate and threshold Use atomic_enable/disable Use #defines for bit fields in registers Allow HDMI 2 compliance Filter modes on clock range Use cross-over pixel frequency instead of manual overides Devicetree bindings according to standards Mike Looijmans (2): dt-bindings: drm/bridge: ti-tmds181: Add TI TMDS181 and SN65DP159 bindings drm: bridge: Add TI tmds181 and sn65dp159 driver .../bindings/display/bridge/ti,tmds181.yaml | 143 +++++ drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ti-tmds181.c | 561 ++++++++++++++++++ 4 files changed, 716 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ti,tmds181.yaml create mode 100644 drivers/gpu/drm/bridge/ti-tmds181.c -- 2.43.0 base-commit: 53e760d8949895390e256e723e7ee46618310361 branch: drm-ti-tmds181 Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topic.nl W: www.topic.nl Please consider the environment before printing this e-mail