Re: [PATCH] dt-bindings: can: renesas,rcar-canfd: Fix number of channels for R-Car V3U

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/12/2022 09:22, Geert Uytterhoeven wrote:
> According to the bindings, only two channels are supported.
> However, R-Car V3U supports eight, leading to "make dtbs" failures:
> 
>         arch/arm64/boot/dts/renesas/r8a779a0-falcon.dtb: can@e6660000: Unevaluated properties are not allowed ('channel2', 'channel3', 'channel4', 'channel5', 'channel6', 'channel7' were unexpected)
> 
> Update the number of channels to 8 on R-Car V3U.
> While at it, prevent adding more properties to the channel nodes, as
> they must contain no other properties than a status property.
> 
> Fixes: d6254d52d70de530 ("dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> Is there a way to express this using positive logic (i.e. default to 2
> channels, extend to more where needed)? R-Car V3H_2 (which is not yet
> supported) has 3 channels.
> Or perhaps the check should be dropped completely?
> ---
>  .../bindings/net/can/renesas,rcar-canfd.yaml  | 132 ++++++++++--------
>  1 file changed, 72 insertions(+), 60 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> index 6f71fc96bc4e3156..6a4fb26cfd7b8979 100644
> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> @@ -9,9 +9,6 @@ title: Renesas R-Car CAN FD Controller
>  maintainers:
>    - Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
>  
> -allOf:
> -  - $ref: can-controller.yaml#
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -77,13 +74,15 @@ properties:
>      description: Maximum frequency of the CANFD clock.
>  
>  patternProperties:
> -  "^channel[01]$":
> +  "^channel[0-7]$":
>      type: object
>      description:
> -      The controller supports two channels and each is represented as a child
> -      node.  Each child node supports the "status" property only, which
> +      The controller supports multiple channels and each is represented as a
> +      child node.  Each child node supports the "status" property only, which
>        is used to enable/disable the respective channel.
>  
> +    unevaluatedProperties: false

There are no other properties within a channel, so this should be rather
additionalProperties: false.


Best regards,
Krzysztof




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux