diff mbox series

[2/2] dt-bindings: serial: samsung: include generic dtschema to match bluetooth child

Message ID 20210212163905.70171-2-krzk@kernel.org
State Changes Requested, archived
Headers show
Series [1/2] dt-bindings: serial: samsung: add DMA properties | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 37 lines checked
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

Krzysztof Kozlowski Feb. 12, 2021, 4:39 p.m. UTC
Include the generic serial.yaml dtschema so the child node like
"bluetooh" will be properly matched:

  arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml:
    serial@13800000: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../bindings/serial/samsung_uart.yaml         | 26 ++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

Comments

Rob Herring March 5, 2021, 8:49 p.m. UTC | #1
On Fri, Feb 12, 2021 at 05:39:05PM +0100, Krzysztof Kozlowski wrote:
> Include the generic serial.yaml dtschema so the child node like
> "bluetooh" will be properly matched:
> 
>   arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml:
>     serial@13800000: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../bindings/serial/samsung_uart.yaml         | 26 ++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
> index 3e29b561223d..f4faf32ab00f 100644
> --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
> @@ -78,9 +78,11 @@ required:
>    - interrupts
>    - reg
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  allOf:
> +  - $ref: /schemas/serial.yaml#
> +
>    - if:
>        properties:
>          compatible:
> @@ -134,3 +136,25 @@ examples:
>                   <&clocks SCLK_UART>;
>          samsung,uart-fifosize = <16>;
>      };
> +
> +  - |
> +    #include <dt-bindings/clock/exynos4.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    serial@13800000 {
> +        compatible = "samsung,exynos4210-uart";
> +        reg = <0x13800000 0x100>;
> +        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
> +        clock-names = "uart", "clk_uart_baud0";
> +        dmas = <&pdma0 15>, <&pdma0 16>;
> +        dma-names = "rx", "tx";
> +        pinctrl-0 = <&uart0_data &uart0_fctl>;
> +        pinctrl-names = "default";
> +
> +        bluetooth {
> +            compatible = "brcm,bcm4330-bt";

Do we need a whole new example for this?

I'm also trying to get rid compatibles without a schema so we can turn 
on warnings for that, but fortunately Linus is converting Broadcom BT. 
And looks like it should pass.

Rob
Krzysztof Kozlowski March 7, 2021, 11:42 a.m. UTC | #2
On 05/03/2021 21:49, Rob Herring wrote:
> On Fri, Feb 12, 2021 at 05:39:05PM +0100, Krzysztof Kozlowski wrote:
>> Include the generic serial.yaml dtschema so the child node like
>> "bluetooh" will be properly matched:
>>
>>   arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml:
>>     serial@13800000: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>> ---
>>  .../bindings/serial/samsung_uart.yaml         | 26 ++++++++++++++++++-
>>  1 file changed, 25 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
>> index 3e29b561223d..f4faf32ab00f 100644
>> --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml
>> +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
>> @@ -78,9 +78,11 @@ required:
>>    - interrupts
>>    - reg
>>  
>> -additionalProperties: false
>> +unevaluatedProperties: false
>>  
>>  allOf:
>> +  - $ref: /schemas/serial.yaml#
>> +
>>    - if:
>>        properties:
>>          compatible:
>> @@ -134,3 +136,25 @@ examples:
>>                   <&clocks SCLK_UART>;
>>          samsung,uart-fifosize = <16>;
>>      };
>> +
>> +  - |
>> +    #include <dt-bindings/clock/exynos4.h>
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +
>> +    serial@13800000 {
>> +        compatible = "samsung,exynos4210-uart";
>> +        reg = <0x13800000 0x100>;
>> +        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
>> +        clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
>> +        clock-names = "uart", "clk_uart_baud0";
>> +        dmas = <&pdma0 15>, <&pdma0 16>;
>> +        dma-names = "rx", "tx";
>> +        pinctrl-0 = <&uart0_data &uart0_fctl>;
>> +        pinctrl-names = "default";
>> +
>> +        bluetooth {
>> +            compatible = "brcm,bcm4330-bt";
> 
> Do we need a whole new example for this?

No, we don't need it. I find examples useful but if you prefer to have
them smaller, then I can skip it.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
index 3e29b561223d..f4faf32ab00f 100644
--- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml
+++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
@@ -78,9 +78,11 @@  required:
   - interrupts
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 allOf:
+  - $ref: /schemas/serial.yaml#
+
   - if:
       properties:
         compatible:
@@ -134,3 +136,25 @@  examples:
                  <&clocks SCLK_UART>;
         samsung,uart-fifosize = <16>;
     };
+
+  - |
+    #include <dt-bindings/clock/exynos4.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    serial@13800000 {
+        compatible = "samsung,exynos4210-uart";
+        reg = <0x13800000 0x100>;
+        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
+        clock-names = "uart", "clk_uart_baud0";
+        dmas = <&pdma0 15>, <&pdma0 16>;
+        dma-names = "rx", "tx";
+        pinctrl-0 = <&uart0_data &uart0_fctl>;
+        pinctrl-names = "default";
+
+        bluetooth {
+            compatible = "brcm,bcm4330-bt";
+            pinctrl-0 = <&bt_shutdown &bt_device_wakeup &bt_host_wakeup>;
+            pinctrl-names = "default";
+        };
+    };