[PATCH RFC v2 1/5] dt-bindings: display: panel: Fix port binding

Kory Maincent posted 5 patches 7 months, 3 weeks ago
[PATCH RFC v2 1/5] dt-bindings: display: panel: Fix port binding
Posted by Kory Maincent 7 months, 3 weeks ago
Faced a binding error check while adding the data-lanes property in the
ilitek,ili9881c binding. See the next patch for the binding changes.
Here is the error:
Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.example.dtb:
panel@0: port:endpoint: Unevaluated properties are not allowed
('data-lanes' was unexpected)

Change the reference of properties/port to $defs/port-base to makes it
work.
The only difference between port and port-base is the unevaluatedProperty
set to false. I have tried to use properties/port in both panel-common
and ilitek,ili9881c bindings but the error is still there. The only way
to not face the error is to use $defs/port-base reference. I don't
really understand the ins and outs, maybe it is a issue from the binding
check tool.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---

Changes in v2:
- New patch
---
 Documentation/devicetree/bindings/display/panel/panel-common.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
index 087415753d606ce67bceabaa9b0ba7d463282f92..635f67ced0cb7103684a1415ab740d83409a7dbb 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
@@ -76,7 +76,7 @@ properties:
 
   # Connectivity
   port:
-    $ref: /schemas/graph.yaml#/properties/port
+    $ref: /schemas/graph.yaml#/$defs/port-base
 
   ddc-i2c-bus:
     $ref: /schemas/types.yaml#/definitions/phandle

-- 
2.34.1
Re: [PATCH RFC v2 1/5] dt-bindings: display: panel: Fix port binding
Posted by Krzysztof Kozlowski 7 months, 3 weeks ago
On Thu, Apr 24, 2025 at 05:07:39PM GMT, Kory Maincent wrote:
> Faced a binding error check while adding the data-lanes property in the
> ilitek,ili9881c binding. See the next patch for the binding changes.
> Here is the error:
> Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.example.dtb:
> panel@0: port:endpoint: Unevaluated properties are not allowed
> ('data-lanes' was unexpected)

There is no error at this point so your rationale is not correct. You
cannot use possible error as reason to fix something... You can use
instead other arguments that the binding is incomplete or incorrect.

> 
> Change the reference of properties/port to $defs/port-base to makes it
> work.
> The only difference between port and port-base is the unevaluatedProperty
> set to false. I have tried to use properties/port in both panel-common
> and ilitek,ili9881c bindings but the error is still there. The only way
> to not face the error is to use $defs/port-base reference. I don't
> really understand the ins and outs, maybe it is a issue from the binding
> check tool.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> 
> Changes in v2:
> - New patch
> ---
>  Documentation/devicetree/bindings/display/panel/panel-common.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> index 087415753d606ce67bceabaa9b0ba7d463282f92..635f67ced0cb7103684a1415ab740d83409a7dbb 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> @@ -76,7 +76,7 @@ properties:
>  
>    # Connectivity
>    port:
> -    $ref: /schemas/graph.yaml#/properties/port
> +    $ref: /schemas/graph.yaml#/$defs/port-base

This allows anything in the port in every other binding, so is not
correct. You need to fully describe the port here with
additionalProps:false, probably. Just like every other binding with
port-base is doing.


Best regards,
Krzysztof
Re: [PATCH RFC v2 1/5] dt-bindings: display: panel: Fix port binding
Posted by Kory Maincent 7 months, 3 weeks ago
On Mon, 28 Apr 2025 09:32:21 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Thu, Apr 24, 2025 at 05:07:39PM GMT, Kory Maincent wrote:
> > Faced a binding error check while adding the data-lanes property in the
> > ilitek,ili9881c binding. See the next patch for the binding changes.
> > Here is the error:
> > Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.example.dtb:
> > panel@0: port:endpoint: Unevaluated properties are not allowed
> > ('data-lanes' was unexpected)  
> 
> There is no error at this point so your rationale is not correct. You
> cannot use possible error as reason to fix something... You can use
> instead other arguments that the binding is incomplete or incorrect.

As I have said in the cover letter, I faced this error and this patch fixed it
but I didn't get the ins and outs.
Indeed, I didn't understand the conflict between the port definition in
panel-common and the panel binding change from the 2nd patch.

> > Change the reference of properties/port to $defs/port-base to makes it
> > work.
> > The only difference between port and port-base is the unevaluatedProperty
> > set to false. I have tried to use properties/port in both panel-common
> > and ilitek,ili9881c bindings but the error is still there. The only way
> > to not face the error is to use $defs/port-base reference. I don't
> > really understand the ins and outs, maybe it is a issue from the binding
> > check tool.
> > 
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> > 
> > Changes in v2:
> > - New patch
> > ---
> >  Documentation/devicetree/bindings/display/panel/panel-common.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > b/Documentation/devicetree/bindings/display/panel/panel-common.yaml index
> > 087415753d606ce67bceabaa9b0ba7d463282f92..635f67ced0cb7103684a1415ab740d83409a7dbb
> > 100644 ---
> > a/Documentation/devicetree/bindings/display/panel/panel-common.yaml +++
> > b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@
> > -76,7 +76,7 @@ properties: # Connectivity port:
> > -    $ref: /schemas/graph.yaml#/properties/port
> > +    $ref: /schemas/graph.yaml#/$defs/port-base  
> 
> This allows anything in the port in every other binding, so is not
> correct. You need to fully describe the port here with
> additionalProps:false, probably. Just like every other binding with
> port-base is doing.

Yeah that was expected.
As I said I tried with port-base but it throw me this error and I didn't manage
to remove it with only the panel binding change for now.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com