diff mbox series

[v3,9/9] dt-bindings: serial: stm32: add phandle 'bluetooth' to fix dtbs_check warrning

Message ID 1615801436-3016-10-git-send-email-dillon.minfei@gmail.com
State New
Headers show
Series ARM: STM32: add art-pi(stm32h750xbh6) board support | expand

Commit Message

Dillon Min March 15, 2021, 9:43 a.m. UTC
From: dillon min <dillon.minfei@gmail.com>

when run make dtbs_check with 'bluetoothi brcm,bcm43438-bt'
dts enabled on stm32h7, there is a warrning popup:

>> arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth'
   does not match any of the regexes: 'pinctrl-[0-9]+'

to make dtbs_check happy, so add a phandle bluetooth

Fixes: 500cdb23d608 ("ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board")
Signed-off-by: dillon min <dillon.minfei@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
---
 Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alexandre TORGUE March 19, 2021, 8:38 a.m. UTC | #1
Hi Dillon

On 3/19/21 5:28 AM, dillon min wrote:
> No changes, Just loop lkp in.

> 

> 

> Hi lkp,

> 

> Sorry for the late reply, thanks for your report.

> This patch is to fix the build warning message.

> 

> Thanks.

> Regards

> 

> On Mon, Mar 15, 2021 at 5:45 PM <dillon.minfei@gmail.com> wrote:

>>

>> From: dillon min <dillon.minfei@gmail.com>

>>

>> when run make dtbs_check with 'bluetoothi brcm,bcm43438-bt'

>> dts enabled on stm32h7, there is a warrning popup:

>>

>>>> arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth'

>>     does not match any of the regexes: 'pinctrl-[0-9]+'

>>

>> to make dtbs_check happy, so add a phandle bluetooth

>>

>> Fixes: 500cdb23d608 ("ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board")

>> Signed-off-by: dillon min <dillon.minfei@gmail.com>

>> Reported-by: kernel test robot <lkp@intel.com>

>> ---

>>   Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++

>>   1 file changed, 5 insertions(+)

>>

>> diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

>> index 8631678283f9..5e674840e62d 100644

>> --- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

>> +++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

>> @@ -50,6 +50,11 @@ properties:

>>       minItems: 1

>>       maxItems: 2

>>

>> +  bluetooth:

>> +    type: object

>> +    description: |

>> +      phandles to the usart controller and bluetooth

>> +


Do we really need to add this "generic" property here ? You could test 
without the "AditionalProperties:False".

Regards
Alex


>>   # cts-gpios and rts-gpios properties can be used instead of 'uart-has-rtscts'

>>   # or 'st,hw-flow-ctrl' (deprecated) for making use of any gpio pins for flow

>>   # control instead of dedicated pins.

>> --

>> 1.9.1

>>
Dillon Min March 19, 2021, 11:13 a.m. UTC | #2
Hi Alexandre,

Thanks for the reply.

On Fri, Mar 19, 2021 at 4:38 PM Alexandre TORGUE
<alexandre.torgue@foss.st.com> wrote:
>

> Hi Dillon

>

> On 3/19/21 5:28 AM, dillon min wrote:

> > No changes, Just loop lkp in.

> >

> >

> > Hi lkp,

> >

> > Sorry for the late reply, thanks for your report.

> > This patch is to fix the build warning message.

> >

> > Thanks.

> > Regards

> >

> > On Mon, Mar 15, 2021 at 5:45 PM <dillon.minfei@gmail.com> wrote:

> >>

> >> From: dillon min <dillon.minfei@gmail.com>

> >>

> >> when run make dtbs_check with 'bluetoothi brcm,bcm43438-bt'

> >> dts enabled on stm32h7, there is a warrning popup:

> >>

> >>>> arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth'

> >>     does not match any of the regexes: 'pinctrl-[0-9]+'

> >>

> >> to make dtbs_check happy, so add a phandle bluetooth

> >>

> >> Fixes: 500cdb23d608 ("ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board")

> >> Signed-off-by: dillon min <dillon.minfei@gmail.com>

> >> Reported-by: kernel test robot <lkp@intel.com>

> >> ---

> >>   Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++

> >>   1 file changed, 5 insertions(+)

> >>

> >> diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

> >> index 8631678283f9..5e674840e62d 100644

> >> --- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

> >> +++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

> >> @@ -50,6 +50,11 @@ properties:

> >>       minItems: 1

> >>       maxItems: 2

> >>

> >> +  bluetooth:

> >> +    type: object

> >> +    description: |

> >> +      phandles to the usart controller and bluetooth

> >> +

>

> Do we really need to add this "generic" property here ? You could test

> without the "AditionalProperties:False".

Yes, indeed. we have no reason to add a generic 'bluetooth' property
into specific soc's interface yaml.
I can't just remove "AditionalProperties:False", else make
O=../kernel-art/ dtbs dtbs_check will run into

/home/fmin/linux/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml:
'oneOf' conditional failed, one must be fixed:
'unevaluatedProperties' is a required property
'additionalProperties' is a required property
...

So , i will replace "AditionalProperties:False". with
unevaluatedProperties: false, do you agree with this?
If so, i will send patch v4 later.

Thanks.

Regards
>

> Regards

> Alex

>

>

> >>   # cts-gpios and rts-gpios properties can be used instead of 'uart-has-rtscts'

> >>   # or 'st,hw-flow-ctrl' (deprecated) for making use of any gpio pins for flow

> >>   # control instead of dedicated pins.

> >> --

> >> 1.9.1

> >>
Rob Herring March 24, 2021, 5:45 p.m. UTC | #3
On Fri, Mar 19, 2021 at 07:13:27PM +0800, dillon min wrote:
> Hi Alexandre,
> 
> Thanks for the reply.
> 
> On Fri, Mar 19, 2021 at 4:38 PM Alexandre TORGUE
> <alexandre.torgue@foss.st.com> wrote:
> >
> > Hi Dillon
> >
> > On 3/19/21 5:28 AM, dillon min wrote:
> > > No changes, Just loop lkp in.
> > >
> > >
> > > Hi lkp,
> > >
> > > Sorry for the late reply, thanks for your report.
> > > This patch is to fix the build warning message.
> > >
> > > Thanks.
> > > Regards
> > >
> > > On Mon, Mar 15, 2021 at 5:45 PM <dillon.minfei@gmail.com> wrote:
> > >>
> > >> From: dillon min <dillon.minfei@gmail.com>
> > >>
> > >> when run make dtbs_check with 'bluetoothi brcm,bcm43438-bt'
> > >> dts enabled on stm32h7, there is a warrning popup:
> > >>
> > >>>> arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth'
> > >>     does not match any of the regexes: 'pinctrl-[0-9]+'
> > >>
> > >> to make dtbs_check happy, so add a phandle bluetooth
> > >>
> > >> Fixes: 500cdb23d608 ("ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board")
> > >> Signed-off-by: dillon min <dillon.minfei@gmail.com>
> > >> Reported-by: kernel test robot <lkp@intel.com>
> > >> ---
> > >>   Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++
> > >>   1 file changed, 5 insertions(+)
> > >>
> > >> diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
> > >> index 8631678283f9..5e674840e62d 100644
> > >> --- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
> > >> +++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
> > >> @@ -50,6 +50,11 @@ properties:
> > >>       minItems: 1
> > >>       maxItems: 2
> > >>
> > >> +  bluetooth:
> > >> +    type: object
> > >> +    description: |
> > >> +      phandles to the usart controller and bluetooth
> > >> +
> >
> > Do we really need to add this "generic" property here ? You could test
> > without the "AditionalProperties:False".
> Yes, indeed. we have no reason to add a generic 'bluetooth' property
> into specific soc's interface yaml.
> I can't just remove "AditionalProperties:False", else make
> O=../kernel-art/ dtbs dtbs_check will run into
> 
> /home/fmin/linux/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml:
> 'oneOf' conditional failed, one must be fixed:
> 'unevaluatedProperties' is a required property
> 'additionalProperties' is a required property
> ...
> 
> So , i will replace "AditionalProperties:False". with
> unevaluatedProperties: false, do you agree with this?

This is okay as long as 'serial.yaml' is referenced, but will eventually 
fail if not (unevaluatedProperties isn't actually implemented yet).

> If so, i will send patch v4 later.

Or you can do this:

addtionalProperties:
  type: object

Which means any other property has to be a node.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
index 8631678283f9..5e674840e62d 100644
--- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
@@ -50,6 +50,11 @@  properties:
     minItems: 1
     maxItems: 2
 
+  bluetooth:
+    type: object
+    description: |
+      phandles to the usart controller and bluetooth
+
 # cts-gpios and rts-gpios properties can be used instead of 'uart-has-rtscts'
 # or 'st,hw-flow-ctrl' (deprecated) for making use of any gpio pins for flow
 # control instead of dedicated pins.