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 7title: Rockchip General Register Files (GRF) 8 9maintainers: 10 - Heiko Stuebner <heiko@sntech.de> 11 12properties: 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,rk3576-bigcore-grf 24 - rockchip,rk3576-cci-grf 25 - rockchip,rk3576-gpu-grf 26 - rockchip,rk3576-litcore-grf 27 - rockchip,rk3576-npu-grf 28 - rockchip,rk3576-php-grf 29 - rockchip,rk3576-pipe-phy-grf 30 - rockchip,rk3576-pmu1-grf 31 - rockchip,rk3576-sdgmac-grf 32 - rockchip,rk3576-sys-grf 33 - rockchip,rk3576-usb-grf 34 - rockchip,rk3576-usbdpphy-grf 35 - rockchip,rk3576-vo0-grf 36 - rockchip,rk3576-vo1-grf 37 - rockchip,rk3576-vop-grf 38 - rockchip,rk3588-bigcore0-grf 39 - rockchip,rk3588-bigcore1-grf 40 - rockchip,rk3588-dcphy-grf 41 - rockchip,rk3588-hdptxphy-grf 42 - rockchip,rk3588-ioc 43 - rockchip,rk3588-php-grf 44 - rockchip,rk3588-pipe-phy-grf 45 - rockchip,rk3588-sys-grf 46 - rockchip,rk3588-pcie3-phy-grf 47 - rockchip,rk3588-pcie3-pipe-grf 48 - rockchip,rk3588-usb-grf 49 - rockchip,rk3588-usbdpphy-grf 50 - rockchip,rk3588-vo0-grf 51 - rockchip,rk3588-vo1-grf 52 - rockchip,rk3588-vop-grf 53 - rockchip,rv1108-usbgrf 54 - const: syscon 55 - items: 56 - const: rockchip,rk3588-vo-grf 57 - const: syscon 58 deprecated: true 59 description: Use rockchip,rk3588-vo{0,1}-grf instead. 60 - items: 61 - enum: 62 - rockchip,px30-grf 63 - rockchip,px30-pmugrf 64 - rockchip,px30-usb2phy-grf 65 - rockchip,rk3036-grf 66 - rockchip,rk3066-grf 67 - rockchip,rk3128-grf 68 - rockchip,rk3188-grf 69 - rockchip,rk3228-grf 70 - rockchip,rk3288-grf 71 - rockchip,rk3308-core-grf 72 - rockchip,rk3308-detect-grf 73 - rockchip,rk3308-grf 74 - rockchip,rk3308-usb2phy-grf 75 - rockchip,rk3328-grf 76 - rockchip,rk3328-usb2phy-grf 77 - rockchip,rk3368-grf 78 - rockchip,rk3368-pmugrf 79 - rockchip,rk3399-grf 80 - rockchip,rk3399-pmugrf 81 - rockchip,rk3568-grf 82 - rockchip,rk3568-pmugrf 83 - rockchip,rk3576-ioc-grf 84 - rockchip,rk3576-pmu0-grf 85 - rockchip,rk3576-usb2phy-grf 86 - rockchip,rk3588-usb2phy-grf 87 - rockchip,rv1108-grf 88 - rockchip,rv1108-pmugrf 89 - rockchip,rv1126-grf 90 - rockchip,rv1126-pmugrf 91 - const: syscon 92 - const: simple-mfd 93 94 reg: 95 maxItems: 1 96 97 clocks: 98 maxItems: 1 99 100 "#address-cells": 101 const: 1 102 103 "#size-cells": 104 const: 1 105 106required: 107 - compatible 108 - reg 109 110additionalProperties: 111 type: object 112 113allOf: 114 - if: 115 properties: 116 compatible: 117 contains: 118 enum: 119 - rockchip,px30-grf 120 121 then: 122 properties: 123 lvds: 124 type: object 125 126 $ref: /schemas/display/rockchip/rockchip,lvds.yaml# 127 128 unevaluatedProperties: false 129 130 - if: 131 properties: 132 compatible: 133 contains: 134 const: rockchip,rk3288-grf 135 136 then: 137 properties: 138 edp-phy: 139 type: object 140 $ref: /schemas/phy/rockchip,rk3288-dp-phy.yaml# 141 unevaluatedProperties: false 142 143 - if: 144 properties: 145 compatible: 146 contains: 147 enum: 148 - rockchip,rk3066-grf 149 - rockchip,rk3188-grf 150 - rockchip,rk3288-grf 151 152 then: 153 properties: 154 usbphy: 155 type: object 156 157 $ref: /schemas/phy/rockchip-usb-phy.yaml# 158 159 unevaluatedProperties: false 160 161 - if: 162 properties: 163 compatible: 164 contains: 165 const: rockchip,rk3328-grf 166 167 then: 168 properties: 169 gpio: 170 type: object 171 172 $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml# 173 174 unevaluatedProperties: false 175 176 power-controller: 177 type: object 178 179 $ref: /schemas/power/rockchip,power-controller.yaml# 180 181 unevaluatedProperties: false 182 183 - if: 184 properties: 185 compatible: 186 contains: 187 const: rockchip,rk3399-grf 188 189 then: 190 properties: 191 mipi-dphy-rx0: 192 type: object 193 194 $ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml# 195 196 unevaluatedProperties: false 197 198 pcie-phy: 199 type: object 200 description: 201 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt 202 203 patternProperties: 204 "^phy@[0-9a-f]+$": 205 type: object 206 $ref: /schemas/phy/rockchip,rk3399-emmc-phy.yaml# 207 unevaluatedProperties: false 208 209 - if: 210 properties: 211 compatible: 212 contains: 213 enum: 214 - rockchip,px30-pmugrf 215 - rockchip,rk3036-grf 216 - rockchip,rk3308-grf 217 - rockchip,rk3368-pmugrf 218 219 then: 220 properties: 221 reboot-mode: 222 type: object 223 224 $ref: /schemas/power/reset/syscon-reboot-mode.yaml# 225 226 unevaluatedProperties: false 227 228 - if: 229 properties: 230 compatible: 231 contains: 232 enum: 233 - rockchip,px30-usb2phy-grf 234 - rockchip,rk3128-grf 235 - rockchip,rk3228-grf 236 - rockchip,rk3308-usb2phy-grf 237 - rockchip,rk3328-usb2phy-grf 238 - rockchip,rk3399-grf 239 - rockchip,rk3576-usb2phy-grf 240 - rockchip,rk3588-usb2phy-grf 241 - rockchip,rv1108-grf 242 243 then: 244 required: 245 - "#address-cells" 246 - "#size-cells" 247 248 patternProperties: 249 "usb2phy@[0-9a-f]+$": 250 type: object 251 252 $ref: /schemas/phy/rockchip,inno-usb2phy.yaml# 253 254 unevaluatedProperties: false 255 256 - if: 257 properties: 258 compatible: 259 contains: 260 enum: 261 - rockchip,px30-grf 262 - rockchip,px30-pmugrf 263 - rockchip,rk3188-grf 264 - rockchip,rk3228-grf 265 - rockchip,rk3288-grf 266 - rockchip,rk3328-grf 267 - rockchip,rk3368-grf 268 - rockchip,rk3368-pmugrf 269 - rockchip,rk3399-grf 270 - rockchip,rk3399-pmugrf 271 - rockchip,rk3568-pmugrf 272 - rockchip,rk3588-pmugrf 273 - rockchip,rv1108-grf 274 - rockchip,rv1108-pmugrf 275 276 then: 277 properties: 278 io-domains: 279 type: object 280 281 $ref: /schemas/power/rockchip-io-domain.yaml# 282 283 unevaluatedProperties: false 284 285 - if: 286 properties: 287 compatible: 288 contains: 289 enum: 290 - rockchip,rk3576-vo1-grf 291 - rockchip,rk3588-vo-grf 292 - rockchip,rk3588-vo0-grf 293 - rockchip,rk3588-vo1-grf 294 295 then: 296 required: 297 - clocks 298 299 else: 300 properties: 301 clocks: false 302 303 304examples: 305 - | 306 #include <dt-bindings/clock/rk3399-cru.h> 307 #include <dt-bindings/interrupt-controller/arm-gic.h> 308 #include <dt-bindings/power/rk3399-power.h> 309 grf: syscon@ff770000 { 310 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; 311 reg = <0xff770000 0x10000>; 312 #address-cells = <1>; 313 #size-cells = <1>; 314 315 mipi_dphy_rx0: mipi-dphy-rx0 { 316 compatible = "rockchip,rk3399-mipi-dphy-rx0"; 317 clocks = <&cru SCLK_MIPIDPHY_REF>, 318 <&cru SCLK_DPHY_RX0_CFG>, 319 <&cru PCLK_VIO_GRF>; 320 clock-names = "dphy-ref", "dphy-cfg", "grf"; 321 power-domains = <&power RK3399_PD_VIO>; 322 #phy-cells = <0>; 323 }; 324 325 phy@f780 { 326 compatible = "rockchip,rk3399-emmc-phy"; 327 reg = <0xf780 0x20>; 328 clocks = <&sdhci>; 329 clock-names = "emmcclk"; 330 drive-impedance-ohm = <50>; 331 #phy-cells = <0>; 332 }; 333 334 u2phy0: usb2phy@e450 { 335 compatible = "rockchip,rk3399-usb2phy"; 336 reg = <0xe450 0x10>; 337 clocks = <&cru SCLK_USB2PHY0_REF>; 338 clock-names = "phyclk"; 339 #clock-cells = <0>; 340 clock-output-names = "clk_usbphy0_480m"; 341 342 u2phy0_host: host-port { 343 #phy-cells = <0>; 344 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>; 345 interrupt-names = "linestate"; 346 }; 347 348 u2phy0_otg: otg-port { 349 #phy-cells = <0>; 350 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>, 351 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>, 352 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>; 353 interrupt-names = "otg-bvalid", "otg-id", 354 "linestate"; 355 }; 356 }; 357 }; 358