Skip to contentSkip to conversation

drm/bridge: simple-bridge: Add support for TI TDP158

PATCH In review Marc Gonzalez 4 participants 9 messages May 28, 2024 – May 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: simple-bridge: Add support for TI TDP158

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

---
 drivers/gpu/drm/bridge/simple-bridge.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/bridge/simple-bridge.c +5 -0
index 5813a2c4fc5ee..b138279864750 100644
@@ -292,6 +292,11 @@ static const struct of_device_id simple_bridge_match[] = {
 			.timings = &ti_ths8134_bridge_timings,
 			.connector_type = DRM_MODE_CONNECTOR_VGA,
 		},
+	}, {
+		.compatible = "ti,tdp158",
+		.data = &(const struct simple_bridge_info) {
+			.connector_type = DRM_MODE_CONNECTOR_HDMIA,
+		},
 	},
 	{},
 };
Signature · 1 line
2.34.1
maintainer
#1 lore raw

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

So sorry, you need a real driver there.

Quoted 11 lines
---
 drivers/gpu/drm/bridge/simple-bridge.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/bridge/simple-bridge.c +0 -0
index 5813a2c4fc5ee..b138279864750 100644

drivers/gpu/drm/bridge/simple-bridge.c static const struct of_device_id simple_bridge_match[] = { · line 299

Quoted 8 lines
drivers/gpu/drm/bridge/simple-bridge.c +5 -0
@@ -292,6 +292,11 @@ static const struct of_device_id simple_bridge_match[] = {
 			.timings = &ti_ths8134_bridge_timings,
 			.connector_type = DRM_MODE_CONNECTOR_VGA,
 		},
+	}, {
+		.compatible = "ti,tdp158",
+		.data = &(const struct simple_bridge_info) {
+			.connector_type = DRM_MODE_CONNECTOR_HDMIA,
+		},

You'll need a DT binding for that too.

Maxime

#2 lore raw
Quoted 11 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

Quoted 6 lines

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

Dmitry's comment on v2 also indicates a driver is needed to power on the chip properly, so a dedicated driver does seem to be needed anyway.

Quoted 7 lines
Quoted 7 lines
---
  drivers/gpu/drm/bridge/simple-bridge.c | 5 +++++
  1 file changed, 5 insertions(+)
Quoted 16 lines

drivers/gpu/drm/bridge/simple-bridge.c static const struct of_device_id simple_bridge_match[] = { · line 299

Quoted 13 lines
drivers/gpu/drm/bridge/simple-bridge.c +5 -0
index 5813a2c4fc5ee..b138279864750 100644
@@ -292,6 +292,11 @@ static const struct of_device_id simple_bridge_match[] = {
  			.timings = &ti_ths8134_bridge_timings,
  			.connector_type = DRM_MODE_CONNECTOR_VGA,
  		},
+	}, {
+		.compatible = "ti,tdp158",
+		.data = &(const struct simple_bridge_info) {
+			.connector_type = DRM_MODE_CONNECTOR_HDMIA,
+		},

You'll need a DT binding for that too.

Ack.

Thanks,
-Arnaud

maintainer
#3 lore raw
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

Maxime

#4 lore raw
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

That's a use case we can't test and will never use as a device integrator, unfortunately.

To support our simple HDMI redriver use case, would it be ok to write a driver just handling power up with documented bindings with the chip default settings ? Someone with an actual need for more specific setups could then implement the additional code needed to support that. The bindings could be extended without breaking compatibility.

Regards,
-Arnaud

maintainer
#5 lore raw
Quoted 29 lines · Arnaud Vrac
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

Quoted 8 lines

That's a use case we can't test and will never use as a device integrator, unfortunately.

To support our simple HDMI redriver use case, would it be ok to write a driver just handling power up with documented bindings with the chip default settings ? Someone with an actual need for more specific setups could then implement the additional code needed to support that. The bindings could be extended without breaking compatibility.

Sure, that's what I meant. We need to make sure the binding is extensible enough / take all the possibilities into account, but the driver can definitely be minimal.

Maxime

#6 lore raw
In reply to Maxime Ripard
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

If I understand correctly, this chip can work in two modes: dummy and I2C-programmed. In the former case it is fully transparent, including HPD passthrough, it doesn't require any additional programming, just Vcc, Vdd and pin straps, etc. And the second mode is a 'brainy' one, when the chip is fully controlled over I2C.

From the Linux standpoint these two modes will use single compat string, but two distinct drivers: for the former mode is is enough to use simple-bridge (fixed to support two supplies), while the latter one needs a proper I2C driver.

Does that solve your concern?

Signature · 2 lines
With best wishes
Dmitry
maintainer
#7 lore raw
Quoted 28 lines · Dmitry Baryshkov
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

Quoted 5 lines

If I understand correctly, this chip can work in two modes: dummy and I2C-programmed. In the former case it is fully transparent, including HPD passthrough, it doesn't require any additional programming, just Vcc, Vdd and pin straps, etc. And the second mode is a 'brainy' one, when the chip is fully controlled over I2C.

Right, and like I said, the situation is more complicated than "it just does passthrough" like simple-bridge does.

Quoted 6 lines

From the Linux standpoint these two modes will use single compat string, but two distinct drivers: for the former mode is is enough to use simple-bridge (fixed to support two supplies), while the latter one needs a proper I2C driver.

Does that solve your concern?

We need to be careful here: if there's two drivers with the same compatible and bus, both will be probed. So we need to take it into account when designing the binding.

Maxime

#8 lore raw
Quoted 44 lines · Maxime Ripard
Quoted 28 lines · Dmitry Baryshkov
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · Arnaud Vrac
Quoted 16 lines · Maxime Ripard

Hi,

Quoted 7 lines · Marc Gonzalez

From: Arnaud Vrac <[email protected]>

The TI TDP158 is an AC-Coupled HDMI signal to TMDS Redriver supporting DVI 1.0 and HDMI 1.4b and 2.0b output signals.

Since it's an I2C-programmable bridge, it could have a proper driver, but the default settings work fine, thus simple bridge is sufficient.

No it doesn't. That bridge supports HDMI 2.0 which means you'll need to change the TMDS clock ratio when programming a TMDS character rate higher than 340MHz. And you'll need hotplug support to deal with it properly too.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So sorry, you need a real driver there.

Hello, this is an HDMI redriver, which simply cleans up the HDMI signal, so no programming is needed to support HDMI 2.0.

I mean, if I'm to trust the datasheet, it is more complicated than that. It snoops the DDC bus so it can update the TMDS clock ratio bit if it's sent on its input side, but that wouldn't happen with DP for example.

Quoted 5 lines

If I understand correctly, this chip can work in two modes: dummy and I2C-programmed. In the former case it is fully transparent, including HPD passthrough, it doesn't require any additional programming, just Vcc, Vdd and pin straps, etc. And the second mode is a 'brainy' one, when the chip is fully controlled over I2C.

Right, and like I said, the situation is more complicated than "it just does passthrough" like simple-bridge does.

Quoted 5 lines

From the Linux standpoint these two modes will use single compat string, but two distinct drivers: for the former mode is is enough to use simple-bridge (fixed to support two supplies), while the latter one needs a proper I2C driver.

Quoted 4 lines
Quoted 1 line

Does that solve your concern?

We need to be careful here: if there's two drivers with the same compatible and bus, both will be probed.

I was thinking about i2c_driver and platform_driver, so there should have been no conflict. But Arnaud wrote on IRC that on this device the bridge is connected over I2C. This rules out simple-bridge anyway.

Quoted 4 lines

So we need to take it into
account when designing the binding.

Maxime

Signature · 2 lines
With best wishes
Dmitry