dt-bindings: serial: Add label property for pl011
Subsystems (2)
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
@@ -34,6 +34,9 @@ properties: reg: maxItems: 1 + label: + maxItems: 1 + interrupts: maxItems: 1
Signature · 1 line
2.26.0.106.g9fadedd
Rob Herring
maintainerQuoted 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_checkwarnings 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
Signed-off-by Zhen Lei <[email protected]>--- Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/serial/pl011.yaml +0
-0
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: 1Signature · 1 line
2.26.0.106.g9fadedd
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_checkwarnings 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.yamlI think this should go into
serial.yamlinstead.
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
Signed-off-by Zhen Lei <[email protected]>--- Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/serial/pl011.yaml +0
-0@@ -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: 1label 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: 1Signature · 1 line
2.26.0.106.g9fadedd.
Rob Herring
maintainerQuoted 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_checkwarnings 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.yamlinstead.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
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_checkwarnings 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.yamlinstead.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
.
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_checkwarnings 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.yamlQuoted 5 lines
Quoted 3 lines
Quoted 1 line
I think this should go into
serial.yamlinstead.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
.