Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/soc/rockchip/grf.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Rockchip General Register Files (GRF) |
| 8 | |
| 9 | maintainers: |
| 10 | - Heiko Stuebner <heiko@sntech.de> |
| 11 | |
| 12 | properties: |
| 13 | compatible: |
| 14 | oneOf: |
| 15 | - items: |
| 16 | - enum: |
| 17 | - rockchip,rk3288-sgrf |
| 18 | - rockchip,rk3566-pipe-grf |
| 19 | - rockchip,rk3568-pcie3-phy-grf |
| 20 | - rockchip,rk3568-pipe-grf |
| 21 | - rockchip,rk3568-pipe-phy-grf |
| 22 | - rockchip,rk3568-usb2phy-grf |
| 23 | - rockchip,rk3588-bigcore0-grf |
| 24 | - rockchip,rk3588-bigcore1-grf |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 25 | - rockchip,rk3588-hdptxphy-grf |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 26 | - rockchip,rk3588-ioc |
| 27 | - rockchip,rk3588-php-grf |
| 28 | - rockchip,rk3588-pipe-phy-grf |
| 29 | - rockchip,rk3588-sys-grf |
| 30 | - rockchip,rk3588-pcie3-phy-grf |
| 31 | - rockchip,rk3588-pcie3-pipe-grf |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 32 | - rockchip,rk3588-usb-grf |
| 33 | - rockchip,rk3588-usbdpphy-grf |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 34 | - rockchip,rk3588-vo-grf |
| 35 | - rockchip,rk3588-vop-grf |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 36 | - rockchip,rv1108-usbgrf |
| 37 | - const: syscon |
| 38 | - items: |
| 39 | - enum: |
| 40 | - rockchip,px30-grf |
| 41 | - rockchip,px30-pmugrf |
| 42 | - rockchip,px30-usb2phy-grf |
| 43 | - rockchip,rk3036-grf |
| 44 | - rockchip,rk3066-grf |
| 45 | - rockchip,rk3128-grf |
| 46 | - rockchip,rk3188-grf |
| 47 | - rockchip,rk3228-grf |
| 48 | - rockchip,rk3288-grf |
| 49 | - rockchip,rk3308-core-grf |
| 50 | - rockchip,rk3308-detect-grf |
| 51 | - rockchip,rk3308-grf |
| 52 | - rockchip,rk3308-usb2phy-grf |
| 53 | - rockchip,rk3328-grf |
| 54 | - rockchip,rk3328-usb2phy-grf |
| 55 | - rockchip,rk3368-grf |
| 56 | - rockchip,rk3368-pmugrf |
| 57 | - rockchip,rk3399-grf |
| 58 | - rockchip,rk3399-pmugrf |
| 59 | - rockchip,rk3568-grf |
| 60 | - rockchip,rk3568-pmugrf |
| 61 | - rockchip,rk3588-usb2phy-grf |
| 62 | - rockchip,rv1108-grf |
| 63 | - rockchip,rv1108-pmugrf |
| 64 | - rockchip,rv1126-grf |
| 65 | - rockchip,rv1126-pmugrf |
| 66 | - const: syscon |
| 67 | - const: simple-mfd |
| 68 | |
| 69 | reg: |
| 70 | maxItems: 1 |
| 71 | |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 72 | clocks: |
| 73 | maxItems: 1 |
| 74 | |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 75 | "#address-cells": |
| 76 | const: 1 |
| 77 | |
| 78 | "#size-cells": |
| 79 | const: 1 |
| 80 | |
| 81 | required: |
| 82 | - compatible |
| 83 | - reg |
| 84 | |
| 85 | additionalProperties: |
| 86 | type: object |
| 87 | |
| 88 | allOf: |
| 89 | - if: |
| 90 | properties: |
| 91 | compatible: |
| 92 | contains: |
| 93 | enum: |
| 94 | - rockchip,px30-grf |
| 95 | |
| 96 | then: |
| 97 | properties: |
| 98 | lvds: |
| 99 | type: object |
| 100 | |
| 101 | $ref: /schemas/display/rockchip/rockchip,lvds.yaml# |
| 102 | |
| 103 | unevaluatedProperties: false |
| 104 | |
| 105 | - if: |
| 106 | properties: |
| 107 | compatible: |
| 108 | contains: |
| 109 | const: rockchip,rk3288-grf |
| 110 | |
| 111 | then: |
| 112 | properties: |
| 113 | edp-phy: |
| 114 | type: object |
| 115 | $ref: /schemas/phy/rockchip,rk3288-dp-phy.yaml# |
| 116 | unevaluatedProperties: false |
| 117 | |
| 118 | - if: |
| 119 | properties: |
| 120 | compatible: |
| 121 | contains: |
| 122 | enum: |
| 123 | - rockchip,rk3066-grf |
| 124 | - rockchip,rk3188-grf |
| 125 | - rockchip,rk3288-grf |
| 126 | |
| 127 | then: |
| 128 | properties: |
| 129 | usbphy: |
| 130 | type: object |
| 131 | |
| 132 | $ref: /schemas/phy/rockchip-usb-phy.yaml# |
| 133 | |
| 134 | unevaluatedProperties: false |
| 135 | |
| 136 | - if: |
| 137 | properties: |
| 138 | compatible: |
| 139 | contains: |
| 140 | const: rockchip,rk3328-grf |
| 141 | |
| 142 | then: |
| 143 | properties: |
| 144 | gpio: |
| 145 | type: object |
| 146 | |
| 147 | $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml# |
| 148 | |
| 149 | unevaluatedProperties: false |
| 150 | |
| 151 | power-controller: |
| 152 | type: object |
| 153 | |
| 154 | $ref: /schemas/power/rockchip,power-controller.yaml# |
| 155 | |
| 156 | unevaluatedProperties: false |
| 157 | |
| 158 | - if: |
| 159 | properties: |
| 160 | compatible: |
| 161 | contains: |
| 162 | const: rockchip,rk3399-grf |
| 163 | |
| 164 | then: |
| 165 | properties: |
| 166 | mipi-dphy-rx0: |
| 167 | type: object |
| 168 | |
| 169 | $ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml# |
| 170 | |
| 171 | unevaluatedProperties: false |
| 172 | |
| 173 | pcie-phy: |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 174 | type: object |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 175 | description: |
| 176 | Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt |
| 177 | |
| 178 | patternProperties: |
| 179 | "phy@[0-9a-f]+$": |
| 180 | description: |
| 181 | Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt |
| 182 | |
| 183 | - if: |
| 184 | properties: |
| 185 | compatible: |
| 186 | contains: |
| 187 | enum: |
| 188 | - rockchip,px30-pmugrf |
| 189 | - rockchip,rk3036-grf |
| 190 | - rockchip,rk3308-grf |
| 191 | - rockchip,rk3368-pmugrf |
| 192 | |
| 193 | then: |
| 194 | properties: |
| 195 | reboot-mode: |
| 196 | type: object |
| 197 | |
| 198 | $ref: /schemas/power/reset/syscon-reboot-mode.yaml# |
| 199 | |
| 200 | unevaluatedProperties: false |
| 201 | |
| 202 | - if: |
| 203 | properties: |
| 204 | compatible: |
| 205 | contains: |
| 206 | enum: |
| 207 | - rockchip,px30-usb2phy-grf |
| 208 | - rockchip,rk3128-grf |
| 209 | - rockchip,rk3228-grf |
| 210 | - rockchip,rk3308-usb2phy-grf |
| 211 | - rockchip,rk3328-usb2phy-grf |
| 212 | - rockchip,rk3399-grf |
| 213 | - rockchip,rk3588-usb2phy-grf |
| 214 | - rockchip,rv1108-grf |
| 215 | |
| 216 | then: |
| 217 | required: |
| 218 | - "#address-cells" |
| 219 | - "#size-cells" |
| 220 | |
| 221 | patternProperties: |
| 222 | "usb2phy@[0-9a-f]+$": |
| 223 | type: object |
| 224 | |
| 225 | $ref: /schemas/phy/rockchip,inno-usb2phy.yaml# |
| 226 | |
| 227 | unevaluatedProperties: false |
| 228 | |
| 229 | - if: |
| 230 | properties: |
| 231 | compatible: |
| 232 | contains: |
| 233 | enum: |
| 234 | - rockchip,px30-grf |
| 235 | - rockchip,px30-pmugrf |
| 236 | - rockchip,rk3188-grf |
| 237 | - rockchip,rk3228-grf |
| 238 | - rockchip,rk3288-grf |
| 239 | - rockchip,rk3328-grf |
| 240 | - rockchip,rk3368-grf |
| 241 | - rockchip,rk3368-pmugrf |
| 242 | - rockchip,rk3399-grf |
| 243 | - rockchip,rk3399-pmugrf |
| 244 | - rockchip,rk3568-pmugrf |
| 245 | - rockchip,rk3588-pmugrf |
| 246 | - rockchip,rv1108-grf |
| 247 | - rockchip,rv1108-pmugrf |
| 248 | |
| 249 | then: |
| 250 | properties: |
| 251 | io-domains: |
| 252 | type: object |
| 253 | |
| 254 | $ref: /schemas/power/rockchip-io-domain.yaml# |
| 255 | |
| 256 | unevaluatedProperties: false |
| 257 | |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 258 | - if: |
| 259 | properties: |
| 260 | compatible: |
| 261 | contains: |
| 262 | enum: |
| 263 | - rockchip,rk3588-vo-grf |
| 264 | |
| 265 | then: |
| 266 | required: |
| 267 | - clocks |
| 268 | |
| 269 | else: |
| 270 | properties: |
| 271 | clocks: false |
| 272 | |
| 273 | |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 274 | examples: |
| 275 | - | |
| 276 | #include <dt-bindings/clock/rk3399-cru.h> |
| 277 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 278 | #include <dt-bindings/power/rk3399-power.h> |
| 279 | grf: syscon@ff770000 { |
| 280 | compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; |
| 281 | reg = <0xff770000 0x10000>; |
| 282 | #address-cells = <1>; |
| 283 | #size-cells = <1>; |
| 284 | |
| 285 | mipi_dphy_rx0: mipi-dphy-rx0 { |
| 286 | compatible = "rockchip,rk3399-mipi-dphy-rx0"; |
| 287 | clocks = <&cru SCLK_MIPIDPHY_REF>, |
| 288 | <&cru SCLK_DPHY_RX0_CFG>, |
| 289 | <&cru PCLK_VIO_GRF>; |
| 290 | clock-names = "dphy-ref", "dphy-cfg", "grf"; |
| 291 | power-domains = <&power RK3399_PD_VIO>; |
| 292 | #phy-cells = <0>; |
| 293 | }; |
| 294 | |
| 295 | u2phy0: usb2phy@e450 { |
| 296 | compatible = "rockchip,rk3399-usb2phy"; |
| 297 | reg = <0xe450 0x10>; |
| 298 | clocks = <&cru SCLK_USB2PHY0_REF>; |
| 299 | clock-names = "phyclk"; |
| 300 | #clock-cells = <0>; |
| 301 | clock-output-names = "clk_usbphy0_480m"; |
| 302 | |
| 303 | u2phy0_host: host-port { |
| 304 | #phy-cells = <0>; |
| 305 | interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>; |
| 306 | interrupt-names = "linestate"; |
| 307 | }; |
| 308 | |
| 309 | u2phy0_otg: otg-port { |
| 310 | #phy-cells = <0>; |
| 311 | interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>, |
| 312 | <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>, |
| 313 | <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>; |
| 314 | interrupt-names = "otg-bvalid", "otg-id", |
| 315 | "linestate"; |
| 316 | }; |
| 317 | }; |
| 318 | }; |