[PATCH 1/2] dt-bindings: rng: mtk-rng: add SMC-based TRNG variants

Krzysztof Kozlowski krzk at kernel.org
Wed Mar 4 03:34:45 PST 2026


On Wed, Mar 04, 2026 at 12:55:27AM +0000, Daniel Golle wrote:
> diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.yaml b/Documentation/devicetree/bindings/rng/mtk-rng.yaml
> index 7e8dc62e5d3a6..6074758552ac3 100644
> --- a/Documentation/devicetree/bindings/rng/mtk-rng.yaml
> +++ b/Documentation/devicetree/bindings/rng/mtk-rng.yaml
> @@ -11,12 +11,15 @@ maintainers:
>  
>  properties:
>    $nodename:
> -    pattern: "^rng@[0-9a-f]+$"
> +    pattern: "^rng(@[0-9a-f]+)?$"
>  
>    compatible:
>      oneOf:
>        - enum:
>            - mediatek,mt7623-rng
> +          - mediatek,mt7981-rng
> +          - mediatek,mt7987-rng
> +          - mediatek,mt7988-rng

Not compatible with each other?

>        - items:
>            - enum:
>                - mediatek,mt7622-rng
> @@ -38,9 +41,22 @@ properties:
>  
>  required:
>    - compatible
> -  - reg
> -  - clocks
> -  - clock-names
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          not:

Use rather positive list, so drop "not:" and use cntains for only one
compatible - mediatek,mt7623-rng.

> +            contains:
> +              enum:
> +                - mediatek,mt7981-rng
> +                - mediatek,mt7987-rng
> +                - mediatek,mt7988-rng
> +    then:
> +      required:
> +        - reg
> +        - clocks
> +        - clock-names
>  
>  additionalProperties: false
>  
> @@ -53,3 +69,7 @@ examples:
>              clocks = <&infracfg CLK_INFRA_TRNG>;
>              clock-names = "rng";
>      };
> +  - |
> +    rng {
> +            compatible = "mediatek,mt7981-rng";

Use four spaces for indentation.

> +    };
> -- 
> 2.53.0



More information about the Linux-mediatek mailing list