On 9/2/25 16:41, Mike Looijmans wrote:
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.
Hmm, apparently one cannot "add" properties in the "if:" block? The
opposite approach, disallowing properties, works, e.g.:
if:
properties:
compatible:
contains:
const: ti,sn65dp159
then:
properties:
ti,source-mode: false
else:
properties:
ti,sink-mode: false
ti,dvi-mode: false
slew-rate: false
This produces the wanted behavior, though it looks counter-intuitive to me.
--
Mike Looijmans