[RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel
Aradhya Bhatia
a-bhatia1 at ti.com
Tue Jan 3 11:02:30 UTC 2023
Hi Krzysztof,
Thank you for reviewing the patches!
On 03-Jan-23 14:02, Krzysztof Kozlowski wrote:
> On 03/01/2023 07:46, Aradhya Bhatia wrote:
>> Dual-link LVDS interfaces have 2 links, with even pixels traveling on
>> one link, and odd pixels on the other. These panels are also generic in
>> nature, with no documented constraints, much like their single-link
>> counterparts, "panel-lvds".
>>
>> Add a new compatible, "panel-dual-lvds", and a dt-binding document for
>> these panels.
>>
>> Signed-off-by: Aradhya Bhatia <a-bhatia1 at ti.com>
>> ---
>> .../display/panel/panel-dual-lvds.yaml | 157 ++++++++++++++++++
>> MAINTAINERS | 1 +
>> 2 files changed, 158 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml
>> new file mode 100644
>> index 000000000000..88a7aa2410be
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml
>> @@ -0,0 +1,157 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/display/panel/panel-dual-lvds.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Generic Dual-Link LVDS Display Panel
>> +
>> +maintainers:
>> + - Aradhya Bhatia <a-bhatia1 at ti.com>
>> + - Thierry Reding <thierry.reding at gmail.com>
>> +
>> +description: |
>> + A dual-LVDS interface is a dual-link connection with the even pixels
>> + traveling on one link, and the odd pixels traveling on the other.
>> +
>> +allOf:
>> + - $ref: panel-common.yaml#
>> + - $ref: /schemas/display/lvds.yaml/#
>
> Drop trailing /
Okay, will do!
>
>> +
>> +properties:
>> + compatible:
>> + oneOf:
>> + - items:
>> + - enum:
>> + - lincolntech,lcd185-101ct
>> + - microtips,13-101hieb0hf0-s
>> + - const: panel-dual-lvds
>> + - const: panel-dual-lvds
>
> You cannot have this compatible alone
Okay, will make the change!
>
>> +
>> + ports:
>> + $ref: /schemas/graph.yaml#/properties/ports
>> +
>> + properties:
>> + port at 0:
>> + $ref: /schemas/graph.yaml#/$defs/port-base
>> + unevaluatedProperties: false
>> + description: The sink for first set of LVDS pixels.
>> +
>> + properties:
>> + dual-lvds-odd-pixels:
>> + type: boolean
>> +
>> + dual-lvds-even-pixels:
>> + type: boolean
>> +
>> + oneOf:
>> + - required: [dual-lvds-odd-pixels]
>> + - required: [dual-lvds-even-pixels]
>> +
>> + port at 1:
>> + $ref: /schemas/graph.yaml#/$defs/port-base
>> + unevaluatedProperties: false
>> + description: The sink for second set of LVDS pixels.
>> +
>> + properties:
>> + dual-lvds-even-pixels:
>> + type: boolean
>> +
>> + dual-lvds-odd-pixels:
>> + type: boolean
>> +
>> + oneOf:
>> + - required: [dual-lvds-even-pixels]
>> + - required: [dual-lvds-odd-pixels]
>> +
>> + allOf:
>> + - if:
>> + properties:
>> + port at 0:
>> + properties:
>> + dual-lvds-odd-pixels: true
>
> That's not correct clause. It has no effect.
The idea behind this is to check the presence of the boolean property.
if (dual-lvds-odd-pixels is present)
then
[..]
I tried implementing this:
[..]
dual-lvds-odd-pixels:
- const: true
[..]
But this is throwing an error. I am confused what else could be done.
Can you please suggest what might be a more accurate check here?
>
>> + required:
>> + - dual-lvds-odd-pixels
>> + then:
>> + properties:
>> + port at 1:
>> + properties:
>> + dual-lvds-even-pixels: true
>> + dual-lvds-odd-pixels: false
>
> Why do you need this? Your oneOf before already solves it.
I agree with your comment here. It makes sense to only have
dual-lvds-even-pixels: true
and have the oneOf condition take care of the other. But, I just tested
this and it was unable to pick-up this intentionally-added error.
I added 'dual-lvds-odd-pixels' property to both the nodes, and
dt_binding_check passes successfully (which it should have not.)
Instead, if I only keep this,
dual-lvds-odd-pixels: false
then the dt_binding_check detects the error as it should.
Regardless, I am curious why the first method doesn't work. Will try to
explore more on that.
>
>> +
>> + - if:
>> + properties:
>> + port at 0:
>> + properties:
>> + dual-lvds-even-pixels: true
>> + required:
>> + - dual-lvds-even-pixels
>> + then:
>> + properties:
>> + port at 1:
>> + properties:
>> + dual-lvds-odd-pixels: true
>> + dual-lvds-even-pixels: false
>> +
>> + required:
>> + - port at 0
>> + - port at 1
>> +
>> + port: false
>> +
>> +unevaluatedProperties: false
>> +
>> +required:
>> + - compatible
>> + - width-mm
>> + - height-mm
>> + - data-mapping
>> + - panel-timing
>> + - ports
>> +
>> +examples:
>> + - |+
>
> Drop +
Okay!
>
>> + panel-dual-lvds {
>
> Just "panel". Node names should be generic.
Alright. Will make the change!
>
>> + compatible = "microtips,13-101hieb0hf0-s", "panel-dual-lvds";
>> +
>> + width-mm = <217>;
>> + height-mm = <136>;
>> +
>
Regards
Aradhya
More information about the dri-devel
mailing list