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,rk3588-bigcore0-grf 24 - rockchip,rk3588-bigcore1-grf 25 - rockchip,rk3588-hdptxphy-grf 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 32 - rockchip,rk3588-usb-grf 33 - rockchip,rk3588-usbdpphy-grf 34 - rockchip,rk3588-vo-grf 35 - rockchip,rk3588-vop-grf 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 72 clocks: 73 maxItems: 1 74 75 "#address-cells": 76 const: 1 77 78 "#size-cells": 79 const: 1 80 81required: 82 - compatible 83 - reg 84 85additionalProperties: 86 type: object 87 88allOf: 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: 174 description: 175 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt 176 177 patternProperties: 178 "phy@[0-9a-f]+$": 179 description: 180 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt 181 182 - if: 183 properties: 184 compatible: 185 contains: 186 enum: 187 - rockchip,px30-pmugrf 188 - rockchip,rk3036-grf 189 - rockchip,rk3308-grf 190 - rockchip,rk3368-pmugrf 191 192 then: 193 properties: 194 reboot-mode: 195 type: object 196 197 $ref: /schemas/power/reset/syscon-reboot-mode.yaml# 198 199 unevaluatedProperties: false 200 201 - if: 202 properties: 203 compatible: 204 contains: 205 enum: 206 - rockchip,px30-usb2phy-grf 207 - rockchip,rk3128-grf 208 - rockchip,rk3228-grf 209 - rockchip,rk3308-usb2phy-grf 210 - rockchip,rk3328-usb2phy-grf 211 - rockchip,rk3399-grf 212 - rockchip,rk3588-usb2phy-grf 213 - rockchip,rv1108-grf 214 215 then: 216 required: 217 - "#address-cells" 218 - "#size-cells" 219 220 patternProperties: 221 "usb2phy@[0-9a-f]+$": 222 type: object 223 224 $ref: /schemas/phy/rockchip,inno-usb2phy.yaml# 225 226 unevaluatedProperties: false 227 228 - if: 229 properties: 230 compatible: 231 contains: 232 enum: 233 - rockchip,px30-grf 234 - rockchip,px30-pmugrf 235 - rockchip,rk3188-grf 236 - rockchip,rk3228-grf 237 - rockchip,rk3288-grf 238 - rockchip,rk3328-grf 239 - rockchip,rk3368-grf 240 - rockchip,rk3368-pmugrf 241 - rockchip,rk3399-grf 242 - rockchip,rk3399-pmugrf 243 - rockchip,rk3568-pmugrf 244 - rockchip,rk3588-pmugrf 245 - rockchip,rv1108-grf 246 - rockchip,rv1108-pmugrf 247 248 then: 249 properties: 250 io-domains: 251 type: object 252 253 $ref: /schemas/power/rockchip-io-domain.yaml# 254 255 unevaluatedProperties: false 256 257 - if: 258 properties: 259 compatible: 260 contains: 261 enum: 262 - rockchip,rk3588-vo-grf 263 264 then: 265 required: 266 - clocks 267 268 else: 269 properties: 270 clocks: false 271 272 273examples: 274 - | 275 #include <dt-bindings/clock/rk3399-cru.h> 276 #include <dt-bindings/interrupt-controller/arm-gic.h> 277 #include <dt-bindings/power/rk3399-power.h> 278 grf: syscon@ff770000 { 279 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; 280 reg = <0xff770000 0x10000>; 281 #address-cells = <1>; 282 #size-cells = <1>; 283 284 mipi_dphy_rx0: mipi-dphy-rx0 { 285 compatible = "rockchip,rk3399-mipi-dphy-rx0"; 286 clocks = <&cru SCLK_MIPIDPHY_REF>, 287 <&cru SCLK_DPHY_RX0_CFG>, 288 <&cru PCLK_VIO_GRF>; 289 clock-names = "dphy-ref", "dphy-cfg", "grf"; 290 power-domains = <&power RK3399_PD_VIO>; 291 #phy-cells = <0>; 292 }; 293 294 u2phy0: usb2phy@e450 { 295 compatible = "rockchip,rk3399-usb2phy"; 296 reg = <0xe450 0x10>; 297 clocks = <&cru SCLK_USB2PHY0_REF>; 298 clock-names = "phyclk"; 299 #clock-cells = <0>; 300 clock-output-names = "clk_usbphy0_480m"; 301 302 u2phy0_host: host-port { 303 #phy-cells = <0>; 304 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>; 305 interrupt-names = "linestate"; 306 }; 307 308 u2phy0_otg: otg-port { 309 #phy-cells = <0>; 310 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>, 311 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>, 312 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>; 313 interrupt-names = "otg-bvalid", "otg-id", 314 "linestate"; 315 }; 316 }; 317 }; 318