devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] dt-bindings: serial: Add label property for pl011
@ 2021-04-15  7:31 Zhen Lei
  2021-04-20 20:02 ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Zhen Lei @ 2021-04-15  7:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, linux-serial, devicetree, linux-kernel
  Cc: 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

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
index 1f8e9f2644b6b80..303c7746423f503 100644
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
@@ -34,6 +34,9 @@ properties:
   reg:
     maxItems: 1
 
+  label:
+    maxItems: 1
+
   interrupts:
     maxItems: 1
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dt-bindings: serial: Add label property for pl011
  2021-04-15  7:31 [PATCH 1/1] dt-bindings: serial: Add label property for pl011 Zhen Lei
@ 2021-04-20 20:02 ` Rob Herring
  2021-04-21  9:38   ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2021-04-20 20:02 UTC (permalink / raw)
  To: Zhen Lei; +Cc: Greg Kroah-Hartman, linux-serial, devicetree, linux-kernel

On Thu, Apr 15, 2021 at 03:31:05PM +0800, Zhen Lei wrote:
> 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.

> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
> index 1f8e9f2644b6b80..303c7746423f503 100644
> --- a/Documentation/devicetree/bindings/serial/pl011.yaml
> +++ b/Documentation/devicetree/bindings/serial/pl011.yaml
> @@ -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

> +
>    interrupts:
>      maxItems: 1
>  
> -- 
> 2.26.0.106.g9fadedd
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dt-bindings: serial: Add label property for pl011
  2021-04-20 20:02 ` Rob Herring
@ 2021-04-21  9:38   ` Leizhen (ThunderTown)
  2021-04-21 13:53     ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Leizhen (ThunderTown) @ 2021-04-21  9:38 UTC (permalink / raw)
  To: Rob Herring; +Cc: Greg Kroah-Hartman, linux-serial, devicetree, linux-kernel



On 2021/4/21 4:02, Rob Herring wrote:
> On Thu, Apr 15, 2021 at 03:31:05PM +0800, Zhen Lei wrote:
>> 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.

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#"?

> 
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>>  Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
>> index 1f8e9f2644b6b80..303c7746423f503 100644
>> --- a/Documentation/devicetree/bindings/serial/pl011.yaml
>> +++ b/Documentation/devicetree/bindings/serial/pl011.yaml
>> @@ -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

OK

> 
>> +
>>    interrupts:
>>      maxItems: 1
>>  
>> -- 
>> 2.26.0.106.g9fadedd
>>
>>
> 
> .
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dt-bindings: serial: Add label property for pl011
  2021-04-21  9:38   ` Leizhen (ThunderTown)
@ 2021-04-21 13:53     ` Rob Herring
  2021-04-22  3:10       ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2021-04-21 13:53 UTC (permalink / raw)
  To: Leizhen (ThunderTown)
  Cc: Greg Kroah-Hartman, linux-serial, devicetree, linux-kernel

On Wed, Apr 21, 2021 at 4:38 AM Leizhen (ThunderTown)
<thunder.leizhen@huawei.com> wrote:
>
>
>
> On 2021/4/21 4:02, Rob Herring wrote:
> > On Thu, Apr 15, 2021 at 03:31:05PM +0800, Zhen Lei wrote:
> >> 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.
>
> 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'.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dt-bindings: serial: Add label property for pl011
  2021-04-21 13:53     ` Rob Herring
@ 2021-04-22  3:10       ` Leizhen (ThunderTown)
  2021-04-22  8:57         ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 6+ messages in thread
From: Leizhen (ThunderTown) @ 2021-04-22  3:10 UTC (permalink / raw)
  To: Rob Herring; +Cc: Greg Kroah-Hartman, linux-serial, devicetree, linux-kernel



On 2021/4/21 21:53, Rob Herring wrote:
> On Wed, Apr 21, 2021 at 4:38 AM Leizhen (ThunderTown)
> <thunder.leizhen@huawei.com> wrote:
>>
>>
>>
>> On 2021/4/21 4:02, Rob Herring wrote:
>>> On Thu, Apr 15, 2021 at 03:31:05PM +0800, Zhen Lei wrote:
>>>> 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.
>>
>> 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.

> 
>> 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.

> 
> Rob
> 
> .
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dt-bindings: serial: Add label property for pl011
  2021-04-22  3:10       ` Leizhen (ThunderTown)
@ 2021-04-22  8:57         ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 6+ messages in thread
From: Leizhen (ThunderTown) @ 2021-04-22  8:57 UTC (permalink / raw)
  To: Rob Herring; +Cc: Greg Kroah-Hartman, linux-serial, devicetree, linux-kernel



On 2021/4/22 11:10, Leizhen (ThunderTown) wrote:
> 
> 
> On 2021/4/21 21:53, Rob Herring wrote:
>> On Wed, Apr 21, 2021 at 4:38 AM Leizhen (ThunderTown)
>> <thunder.leizhen@huawei.com> wrote:
>>>
>>>
>>>
>>> On 2021/4/21 4:02, Rob Herring wrote:
>>>> On Thu, Apr 15, 2021 at 03:31:05PM +0800, Zhen Lei wrote:
>>>>> 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.
>>>
>>> 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.
> 
>>
>>> 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.

> 
>>
>> Rob
>>
>> .
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-22  8:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  7:31 [PATCH 1/1] dt-bindings: serial: Add label property for pl011 Zhen Lei
2021-04-20 20:02 ` Rob Herring
2021-04-21  9:38   ` Leizhen (ThunderTown)
2021-04-21 13:53     ` Rob Herring
2021-04-22  3:10       ` Leizhen (ThunderTown)
2021-04-22  8:57         ` Leizhen (ThunderTown)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).