Re: [PATCH v4 1/2] dt-bindings: drm/bridge: ti-tmds181: Add TI TMDS181 and SN65DP159 bindings

From: Mike Looijmans
Date: Tue Sep 02 2025 - 10:44:48 EST


On 9/2/25 15:46, Krzysztof Kozlowski wrote:
On 02/09/2025 10:46, Mike Looijmans wrote:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@1:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: Video port for HDMI output (panel or bridge)
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - port@0
+ - port@1
+
+ ti,source-mode:
+ type: boolean
+ description:
+ Force chip to operate in "source" mode. Allows to use
+ a TMDS181 chip (which defaults to sink) as cable driver.
+
+ ti,sink-mode:
Aren't these two mutually exclusive? Can same device operate in source
and in sink mode simultaneously?
They're exclusive, yes. Will add that.
Then either define constraints per variant in if:then: or maybe better
use string enum. Not sure what applies where, so tricky to say which
choice is better.

Best regards,
Krzysztof

Since there's already going to be an "if" block, it simplifies parsing to keep the booleans. My first attempt was this, but that doesn't work as I'd expect. Adding "slew-rate" to the example dts results in an error, so apparently the "if" block doesn't do what I think it would and I haven't figured out yet what the correct syntax must be:

if:
  properties:
    compatible:
      contains:
        const: ti,sn65dp159
then:
  properties:
    ti,sink-mode:
      type: boolean
      description:
        Force chip to operate in "sink" mode. Allows to use
        a DP159 chip (defaults to source) for incoming signals.
    ti,dvi-mode:
      type: boolean
      description: Makes the DP159 chip operate in DVI mode.
    slew-rate:
      $ref: /schemas/types.yaml#/definitions/uint32
      minimum: 0
      maximum: 3
      default: 3
      description: Set slew rate, 0 is slowest, 3 is fastest.
else:
  properties:
    ti,source-mode:
      type: boolean
      description:
        Force chip to operate in "source" mode. Allows to use
        a TMDS181 chip (which defaults to sink) as cable driver.



--
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.looijmans@xxxxxxxx
W: www.topic.nl