Re: [PATCH v3 04/17] dt-bindings: soc: mobileye: add EyeQ5 OLB system controller

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

 



On Tue, Jan 23, 2024 at 07:46:49PM +0100, Théo Lebrun wrote:
> Add documentation to describe the "Other Logic Block" syscon.
> 
> Signed-off-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
> ---
>  .../bindings/soc/mobileye/mobileye,eyeq5-olb.yaml  | 77 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 78 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
> new file mode 100644
> index 000000000000..031ef6a532c1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/mobileye/mobileye,eyeq5-olb.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mobileye EyeQ5 SoC system controller
> +
> +maintainers:
> +  - Grégory Clement <gregory.clement@xxxxxxxxxxx>
> +  - Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
> +  - Vladimir Kondratiev <vladimir.kondratiev@xxxxxxxxxxxx>
> +
> +description:
> +  OLB ("Other Logic Block") is a hardware block grouping smaller blocks. Clocks,
> +  resets, pinctrl are being handled from here.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: mobileye,eyeq5-olb
> +      - const: syscon
> +      - const: simple-mfd
> +
> +  reg:
> +    maxItems: 1
> +
> +  clock-controller:
> +    $ref: /schemas/clock/mobileye,eyeq5-clk.yaml#
> +    type: object
> +
> +  reset-controller:
> +    $ref: /schemas/reset/mobileye,eyeq5-reset.yaml#
> +    type: object
> +
> +  pinctrl-a:
> +    $ref: /schemas/pinctrl/mobileye,eyeq5-pinctrl.yaml#
> +    type: object
> +
> +  pinctrl-b:
> +    $ref: /schemas/pinctrl/mobileye,eyeq5-pinctrl.yaml#
> +    type: object
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    system-controller@e00000 {
> +      compatible = "mobileye,eyeq5-olb", "syscon", "simple-mfd";
> +      reg = <0xe00000 0x400>;
> +
> +      clock-controller {
> +        compatible = "mobileye,eyeq5-clk";
> +        #clock-cells = <1>;
> +        clocks = <&xtal>;
> +        clock-names = "ref";
> +      };
> +
> +      reset-controller {
> +        compatible = "mobileye,eyeq5-reset";
> +        #reset-cells = <2>;
> +      };
> +
> +      pinctrl-a {
> +        compatible = "mobileye,eyeq5-a-pinctrl";
> +        #pinctrl-cells = <1>;

Sure you need this? Generally only pinctrl-single uses this.

> +      };
> +
> +      pinctrl-b {
> +        compatible = "mobileye,eyeq5-b-pinctrl";
> +        #pinctrl-cells = <1>;
> +      };
> +    };

This can all be simplified to:

system-controller@e00000 {
    compatible = "mobileye,eyeq5-olb", "syscon";
    reg = <0xe00000 0x400>;
    #reset-cells = <2>;
    #clock-cells = <1>;
    clocks = <&xtal>;
    clock-names = "ref";

    pins { ... };
};

There is no need for sub nodes unless you have reusable blocks or each 
block has its own resources in DT.

Rob




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux