Documentation / devicetree / bindings / soc / rockchip


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 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 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/rockchip/grf.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip General Register Files (GRF)

maintainers:
  - Heiko Stuebner <heiko@sntech.de>

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - rockchip,rk3288-sgrf
              - rockchip,rk3566-pipe-grf
              - rockchip,rk3568-pcie3-phy-grf
              - rockchip,rk3568-pipe-grf
              - rockchip,rk3568-pipe-phy-grf
              - rockchip,rk3568-usb2phy-grf
              - rockchip,rk3588-bigcore0-grf
              - rockchip,rk3588-bigcore1-grf
              - rockchip,rk3588-ioc
              - rockchip,rk3588-php-grf
              - rockchip,rk3588-pipe-phy-grf
              - rockchip,rk3588-sys-grf
              - rockchip,rk3588-pcie3-phy-grf
              - rockchip,rk3588-pcie3-pipe-grf
              - rockchip,rk3588-vo-grf
              - rockchip,rk3588-vop-grf
              - rockchip,rv1108-usbgrf
          - const: syscon
      - items:
          - enum:
              - rockchip,px30-grf
              - rockchip,px30-pmugrf
              - rockchip,px30-usb2phy-grf
              - rockchip,rk3036-grf
              - rockchip,rk3066-grf
              - rockchip,rk3128-grf
              - rockchip,rk3188-grf
              - rockchip,rk3228-grf
              - rockchip,rk3288-grf
              - rockchip,rk3308-core-grf
              - rockchip,rk3308-detect-grf
              - rockchip,rk3308-grf
              - rockchip,rk3308-usb2phy-grf
              - rockchip,rk3328-grf
              - rockchip,rk3328-usb2phy-grf
              - rockchip,rk3368-grf
              - rockchip,rk3368-pmugrf
              - rockchip,rk3399-grf
              - rockchip,rk3399-pmugrf
              - rockchip,rk3568-grf
              - rockchip,rk3568-pmugrf
              - rockchip,rk3588-usb2phy-grf
              - rockchip,rv1108-grf
              - rockchip,rv1108-pmugrf
              - rockchip,rv1126-grf
              - rockchip,rv1126-pmugrf
          - const: syscon
          - const: simple-mfd

  reg:
    maxItems: 1
 
  "#address-cells":
    const: 1
 
  "#size-cells":
    const: 1

required:
  - compatible
  - reg

additionalProperties:
  type: object

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,px30-grf

    then:
      properties:
        lvds:
          type: object

          $ref: /schemas/display/rockchip/rockchip,lvds.yaml#

          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3288-grf

    then:
      properties:
        edp-phy:
          type: object
          $ref: /schemas/phy/rockchip,rk3288-dp-phy.yaml#
          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,rk3066-grf
              - rockchip,rk3188-grf
              - rockchip,rk3288-grf

    then:
      properties:
        usbphy:
          type: object

          $ref: /schemas/phy/rockchip-usb-phy.yaml#

          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3328-grf

    then:
      properties:
        gpio:
          type: object

          $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml#

          unevaluatedProperties: false

        power-controller:
          type: object

          $ref: /schemas/power/rockchip,power-controller.yaml#

          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3399-grf

    then:
      properties:
        mipi-dphy-rx0:
          type: object

          $ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml#

          unevaluatedProperties: false

        pcie-phy:
          description:
            Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt

      patternProperties:
        "phy@[0-9a-f]+$":
          description:
            Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt

  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,px30-pmugrf
              - rockchip,rk3036-grf
              - rockchip,rk3308-grf
              - rockchip,rk3368-pmugrf

    then:
      properties:
        reboot-mode:
          type: object

          $ref: /schemas/power/reset/syscon-reboot-mode.yaml#

          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,px30-usb2phy-grf
              - rockchip,rk3128-grf
              - rockchip,rk3228-grf
              - rockchip,rk3308-usb2phy-grf
              - rockchip,rk3328-usb2phy-grf
              - rockchip,rk3399-grf
              - rockchip,rk3588-usb2phy-grf
              - rockchip,rv1108-grf

    then:
      required:
        - "#address-cells"
        - "#size-cells"

      patternProperties:
        "usb2phy@[0-9a-f]+$":
          type: object

          $ref: /schemas/phy/rockchip,inno-usb2phy.yaml#

          unevaluatedProperties: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,px30-grf
              - rockchip,px30-pmugrf
              - rockchip,rk3188-grf
              - rockchip,rk3228-grf
              - rockchip,rk3288-grf
              - rockchip,rk3328-grf
              - rockchip,rk3368-grf
              - rockchip,rk3368-pmugrf
              - rockchip,rk3399-grf
              - rockchip,rk3399-pmugrf
              - rockchip,rk3568-pmugrf
              - rockchip,rk3588-pmugrf
              - rockchip,rv1108-grf
              - rockchip,rv1108-pmugrf

    then:
      properties:
        io-domains:
          type: object

          $ref: /schemas/power/rockchip-io-domain.yaml#

          unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/rk3399-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/rk3399-power.h>
    grf: syscon@ff770000 {
      compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
      reg = <0xff770000 0x10000>;
      #address-cells = <1>;
      #size-cells = <1>;
 
      mipi_dphy_rx0: mipi-dphy-rx0 {
        compatible = "rockchip,rk3399-mipi-dphy-rx0";
        clocks = <&cru SCLK_MIPIDPHY_REF>,
                 <&cru SCLK_DPHY_RX0_CFG>,
                 <&cru PCLK_VIO_GRF>;
        clock-names = "dphy-ref", "dphy-cfg", "grf";
        power-domains = <&power RK3399_PD_VIO>;
        #phy-cells = <0>;
      };
 
      u2phy0: usb2phy@e450 {
        compatible = "rockchip,rk3399-usb2phy";
        reg = <0xe450 0x10>;
        clocks = <&cru SCLK_USB2PHY0_REF>;
        clock-names = "phyclk";
        #clock-cells = <0>;
        clock-output-names = "clk_usbphy0_480m";
 
        u2phy0_host: host-port {
          #phy-cells = <0>;
          interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
          interrupt-names = "linestate";
         };
 
        u2phy0_otg: otg-port {
          #phy-cells = <0>;
          interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
                       <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
                       <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
          interrupt-names = "otg-bvalid", "otg-id",
                            "linestate";
        };
      };
    };