Skip to contentSkip to conversation

dt-bindings: serial: Add label property for pl011

PATCH In review Zhen Lei 2 participants 6 messages Apr 15, 2021 – Apr 22, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 dt-bindings: serial: Add label property for pl011

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

---
 Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/serial/pl011.yaml +3 -0
index 1f8e9f2644b6b80..303c7746423f503 100644
@@ -34,6 +34,9 @@ properties:
   reg:
     maxItems: 1
 
+  label:
+    maxItems: 1
+
   interrupts:
     maxItems: 1
 
Signature · 1 line
2.26.0.106.g9fadedd
maintainer
#1 lore raw
Quoted 9 lines · Zhen Lei

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

I think this should go into serial.yaml instead.

Quoted 11 lines
---
 Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/serial/pl011.yaml +0 -0
index 1f8e9f2644b6b80..303c7746423f503 100644

Documentation/devicetree/bindings/serial/pl011.yaml properties: · line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/pl011.yaml +2 -0
@@ -34,6 +34,9 @@ properties:
   reg:
     maxItems: 1
 
+  label:
+    maxItems: 1

label is always a single string and so 'maxItems' is always 1. Just need:

label: true

Quoted 8 lines
Documentation/devicetree/bindings/serial/pl011.yaml +1 -0
+
   interrupts:
     maxItems: 1
 
Signature · 1 line
2.26.0.106.g9fadedd
#2 lore raw
Quoted 5 lines · Rob Herring
Quoted 4 lines · Zhen Lei

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Quoted 7 lines
Quoted 5 lines

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

I think this should go into serial.yaml instead.

Yes,But if I add "label: true" into serial.yaml, it doesn't work. I haven't figured out why.

By the way, should "$ref: /schemas/serial.yaml#" be replaced with "$ref: /schemas/serial/serial.yaml#"?

Quoted 15 lines
Quoted 15 lines
---
 Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/serial/pl011.yaml +0 -0
index 1f8e9f2644b6b80..303c7746423f503 100644
@@ -34,6 +34,9 @@ properties:
   reg:
     maxItems: 1
 
Quoted 7 lines

Documentation/devicetree/bindings/serial/pl011.yaml properties: · line 38

Quoted 2 lines
Documentation/devicetree/bindings/serial/pl011.yaml +2 -0
+  label:
+    maxItems: 1

label is always a single string and so 'maxItems' is always 1. Just need:

label: true

OK

Quoted 12 lines
Quoted 9 lines
Documentation/devicetree/bindings/serial/pl011.yaml +1 -0
+
   interrupts:
     maxItems: 1
 
Signature · 1 line
2.26.0.106.g9fadedd

.

maintainer
#3 lore raw
Quoted 15 lines · Leizhen (ThunderTown)
Quoted 11 lines · Rob Herring
Quoted 9 lines · Zhen Lei

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

Quoted 3 lines
Quoted 1 line

I think this should go into serial.yaml instead.

Yes,But if I add "label: true" into serial.yaml, it doesn't work. I haven't figured out why.

Change the 'additionalProperties: false' to 'unevaluatedProperties: false'.

Quoted 1 line

By the way, should "$ref: /schemas/serial.yaml#" be replaced with "$ref: /schemas/serial/serial.yaml#"?

Oh, yes! Looks like it should be fixed for the other serial schemas too. There is a /schemas/serial.yaml schema from dt-schema which predates the kernel one, but it just has the $nodename. The kernel one is much more complete.

Rob

#4 lore raw
Quoted 17 lines · Rob Herring
Quoted 15 lines · Leizhen (ThunderTown)
Quoted 11 lines · Rob Herring
Quoted 9 lines · Zhen Lei

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I think this should go into serial.yaml instead.

Yes,But if I add "label: true" into serial.yaml, it doesn't work. I haven't figured out why.

Change the 'additionalProperties: false' to 'unevaluatedProperties: false'.

Wow, it works. I admire you so much. You're a master.

Quoted 7 lines
Quoted 2 lines

By the way, should "$ref: /schemas/serial.yaml#" be replaced with "$ref: /schemas/serial/serial.yaml#"?

Oh, yes! Looks like it should be fixed for the other serial schemas too. There is a /schemas/serial.yaml schema from dt-schema which predates the kernel one, but it just has the $nodename. The kernel one is much more complete.

All right, I'll fix them all.

Quoted 5 lines

Rob

.

#5 lore raw
Quoted 29 lines · Leizhen (ThunderTown)
Quoted 17 lines · Rob Herring
Quoted 15 lines · Leizhen (ThunderTown)
Quoted 11 lines · Rob Herring
Quoted 9 lines · Zhen Lei

When there is more than one pl011 serial port present, the label property allows a custom name to be used for briefly describe the usage or position of each serial port.

Without this "label" property, many dtbs_check warnings similar to the following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
From schema: Documentation/devicetree/bindings/serial/pl011.yaml

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I think this should go into serial.yaml instead.

Yes,But if I add "label: true" into serial.yaml, it doesn't work. I haven't figured out why.

Change the 'additionalProperties: false' to 'unevaluatedProperties: false'.

Wow, it works. I admire you so much. You're a master.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

By the way, should "$ref: /schemas/serial.yaml#" be replaced with "$ref: /schemas/serial/serial.yaml#"?

Oh, yes! Looks like it should be fixed for the other serial schemas too. There is a /schemas/serial.yaml schema from dt-schema which predates the kernel one, but it just has the $nodename. The kernel one is much more complete.

All right, I'll fix them all.

I checked all YAML files in directory Documentation/devicetree/bindings/serial/, except pl011.yaml, all that need to be modified are modified. No similar ('xxx' was unexpected) warnings are reported.

Quoted 6 lines
Quoted 6 lines

Rob

.