Documentation / devicetree / bindings / soc / amlogic / amlogic,meson-gx-hhi-sysctrl.yaml


Based on kernel version 6.9. Page generated on 2024-05-14 10:02 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
# 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@linaro.org>

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:
      properties:
        clock-controller:
          $ref: /schemas/clock/amlogic,gxbb-clkc.yaml#

      required:
        - power-controller

  - if:
      properties:
        compatible:
          enum:
            - amlogic,meson-gx-ao-sysctrl
            - amlogic,meson-axg-ao-sysctrl
    then:
      properties:
        clock-controller:
          $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml#

        power-controller: false
        phy: false

  - if:
      properties:
        compatible:
          enum:
            - amlogic,meson-gx-hhi-sysctrl
    then:
      properties:
        phy: false

  - 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

required:
  - compatible
  - reg
  - clock-controller

additionalProperties: false

examples:
  - |
    bus@c883c000 {
        compatible = "simple-bus";
        reg = <0xc883c000 0x2000>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x0 0xc883c000 0x2000>;
 
        sysctrl: system-controller@0 {
            compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
            reg = <0 0x400>;
 
            clock-controller {
                compatible = "amlogic,gxbb-clkc";
                #clock-cells = <1>;
                clocks = <&xtal>;
                clock-names = "xtal";
            };
 
            power-controller {
                compatible = "amlogic,meson-gxbb-pwrc";
                #power-domain-cells = <1>;
                amlogic,ao-sysctrl = <&sysctrl_AO>;
 
                resets = <&reset_viu>,
                         <&reset_venc>,
                         <&reset_vcbus>,
                         <&reset_bt656>,
                         <&reset_dvin>,
                         <&reset_rdma>,
                         <&reset_venci>,
                         <&reset_vencp>,
                         <&reset_vdac>,
                         <&reset_vdi6>,
                         <&reset_vencl>,
                         <&reset_vid_lock>;
                reset-names = "viu", "venc", "vcbus", "bt656", "dvin",
                              "rdma", "venci", "vencp", "vdac", "vdi6",
                              "vencl", "vid_lock";
                clocks = <&clk_vpu>, <&clk_vapb>;
                clock-names = "vpu", "vapb";
            };
        };
    };
 
    bus@c8100000 {
        compatible = "simple-bus";
        reg = <0xc8100000 0x100000>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x0 0xc8100000 0x100000>;
 
        sysctrl_AO: system-controller@0 {
            compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
            reg = <0 0x100>;
 
            clock-controller {
                compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
                #clock-cells = <1>;
                #reset-cells = <1>;
                clocks = <&xtal>, <&clk81>;
                clock-names = "xtal", "mpeg-clk";
            };
        };
    };

  - |
    system-controller@ff63c000 {
        compatible = "amlogic,meson-axg-hhi-sysctrl", "simple-mfd", "syscon";
        reg = <0xff63c000 0x400>;
 
        clock-controller {
            compatible = "amlogic,axg-clkc";
            #clock-cells = <1>;
            clocks = <&xtal>;
            clock-names = "xtal";
        };
 
        power-controller {
           compatible = "amlogic,meson-axg-pwrc";
           #power-domain-cells = <1>;
           amlogic,ao-sysctrl = <&sysctrl_AO>;
 
           resets = <&reset_viu>,
                    <&reset_venc>,
                    <&reset_vcbus>,
                    <&reset_vencl>,
                    <&reset_vid_lock>;
           reset-names = "viu", "venc", "vcbus", "vencl", "vid_lock";
           clocks = <&clk_vpu>, <&clk_vapb>;
           clock-names = "vpu", "vapb";
        };
 
        phy {
           compatible = "amlogic,axg-mipi-pcie-analog-phy";
           #phy-cells = <0>;
        };
    };