Re: [PATCH 3/6] dt-bindings: soc: amlogic: document System Control registers

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

 



On 09/02/2023 14:41, Neil Armstrong wrote:
> Document the System Control registers regions found on all Amlogic
> SoC families and it's clock, power, pinctrl and phy subnodes.
> 
> The regions has various independent registers tied to other
> hardware devices, thus the syscon compatible.
> 
> Clock controllers and Pinctrl devices are not yet documented, the
> definition of those will be updated in a second time.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
> ---
>  .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 109 +++++++++++++++++++++
>  1 file changed, 109 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
> new file mode 100644
> index 000000000000..672eabd90c09
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
> @@ -0,0 +1,109 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Meson System Control registers
> +
> +maintainers:
> +  - Neil Armstrong <neil.armstrong@xxxxxxxxxx>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - amlogic,meson-gx-hhi-sysctrl
> +          - amlogic,meson-gx-ao-sysctrl
> +          - amlogic,meson-axg-hhi-sysctrl
> +          - amlogic,meson-axg-ao-sysctrl
> +      - const: simple-mfd
> +      - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +  clock-controller:
> +    type: object
> +
> +  power-controller:
> +    $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml
> +
> +  pinctrl:
> +    type: object
> +
> +  phy:
> +    type: object
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gx-hhi-sysctrl
> +            - amlogic,meson-axg-hhi-sysctrl
> +    then:
> +      required:
> +        - power-controller
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gx-ao-sysctrl
> +            - amlogic,meson-axg-ao-sysctrl
> +    then:
> +      required:
> +        - pinctrl
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-axg-hhi-sysctrl
> +    then:
> +      properties:
> +        phy:
> +          oneOf:
> +            - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
> +            - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml

And all other variants? This allows phy/power/pinctrl/clock in any
combination, thus maybe the binding should be just split? Hard to say
without full picture.

> +
> +required:
> +  - compatible
> +  - reg
> +  - clock-controller
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    sysctrl: system-controller@0 {
> +        compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
> +        reg = <0 0x400>;
> +
> +        clock-controller { };

The example should be complete, so empty node does not look correct. If
you wait for other bindings, send them as patchset when all are ready.

Best regards,
Krzysztof




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux