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-ioc 26 - rockchip,rk3588-php-grf 27 - rockchip,rk3588-pipe-phy-grf 28 - rockchip,rk3588-sys-grf 29 - rockchip,rk3588-pcie3-phy-grf 30 - rockchip,rk3588-pcie3-pipe-grf 31 - rockchip,rv1108-usbgrf 32 - const: syscon 33 - items: 34 - enum: 35 - rockchip,px30-grf 36 - rockchip,px30-pmugrf 37 - rockchip,px30-usb2phy-grf 38 - rockchip,rk3036-grf 39 - rockchip,rk3066-grf 40 - rockchip,rk3128-grf 41 - rockchip,rk3188-grf 42 - rockchip,rk3228-grf 43 - rockchip,rk3288-grf 44 - rockchip,rk3308-core-grf 45 - rockchip,rk3308-detect-grf 46 - rockchip,rk3308-grf 47 - rockchip,rk3308-usb2phy-grf 48 - rockchip,rk3328-grf 49 - rockchip,rk3328-usb2phy-grf 50 - rockchip,rk3368-grf 51 - rockchip,rk3368-pmugrf 52 - rockchip,rk3399-grf 53 - rockchip,rk3399-pmugrf 54 - rockchip,rk3568-grf 55 - rockchip,rk3568-pmugrf 56 - rockchip,rk3588-usb2phy-grf 57 - rockchip,rv1108-grf 58 - rockchip,rv1108-pmugrf 59 - rockchip,rv1126-grf 60 - rockchip,rv1126-pmugrf 61 - const: syscon 62 - const: simple-mfd 63 64 reg: 65 maxItems: 1 66 67 "#address-cells": 68 const: 1 69 70 "#size-cells": 71 const: 1 72 73required: 74 - compatible 75 - reg 76 77additionalProperties: 78 type: object 79 80allOf: 81 - if: 82 properties: 83 compatible: 84 contains: 85 enum: 86 - rockchip,px30-grf 87 88 then: 89 properties: 90 lvds: 91 type: object 92 93 $ref: /schemas/display/rockchip/rockchip,lvds.yaml# 94 95 unevaluatedProperties: false 96 97 - if: 98 properties: 99 compatible: 100 contains: 101 const: rockchip,rk3288-grf 102 103 then: 104 properties: 105 edp-phy: 106 type: object 107 $ref: /schemas/phy/rockchip,rk3288-dp-phy.yaml# 108 unevaluatedProperties: false 109 110 - if: 111 properties: 112 compatible: 113 contains: 114 enum: 115 - rockchip,rk3066-grf 116 - rockchip,rk3188-grf 117 - rockchip,rk3288-grf 118 119 then: 120 properties: 121 usbphy: 122 type: object 123 124 $ref: /schemas/phy/rockchip-usb-phy.yaml# 125 126 unevaluatedProperties: false 127 128 - if: 129 properties: 130 compatible: 131 contains: 132 const: rockchip,rk3328-grf 133 134 then: 135 properties: 136 gpio: 137 type: object 138 139 $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml# 140 141 unevaluatedProperties: false 142 143 power-controller: 144 type: object 145 146 $ref: /schemas/power/rockchip,power-controller.yaml# 147 148 unevaluatedProperties: false 149 150 - if: 151 properties: 152 compatible: 153 contains: 154 const: rockchip,rk3399-grf 155 156 then: 157 properties: 158 mipi-dphy-rx0: 159 type: object 160 161 $ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml# 162 163 unevaluatedProperties: false 164 165 pcie-phy: 166 type: object 167 description: 168 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt 169 170 patternProperties: 171 "phy@[0-9a-f]+$": 172 description: 173 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt 174 175 - if: 176 properties: 177 compatible: 178 contains: 179 enum: 180 - rockchip,px30-pmugrf 181 - rockchip,rk3036-grf 182 - rockchip,rk3308-grf 183 - rockchip,rk3368-pmugrf 184 185 then: 186 properties: 187 reboot-mode: 188 type: object 189 190 $ref: /schemas/power/reset/syscon-reboot-mode.yaml# 191 192 unevaluatedProperties: false 193 194 - if: 195 properties: 196 compatible: 197 contains: 198 enum: 199 - rockchip,px30-usb2phy-grf 200 - rockchip,rk3128-grf 201 - rockchip,rk3228-grf 202 - rockchip,rk3308-usb2phy-grf 203 - rockchip,rk3328-usb2phy-grf 204 - rockchip,rk3399-grf 205 - rockchip,rk3588-usb2phy-grf 206 - rockchip,rv1108-grf 207 208 then: 209 required: 210 - "#address-cells" 211 - "#size-cells" 212 213 patternProperties: 214 "usb2phy@[0-9a-f]+$": 215 type: object 216 217 $ref: /schemas/phy/rockchip,inno-usb2phy.yaml# 218 219 unevaluatedProperties: false 220 221 - if: 222 properties: 223 compatible: 224 contains: 225 enum: 226 - rockchip,px30-grf 227 - rockchip,px30-pmugrf 228 - rockchip,rk3188-grf 229 - rockchip,rk3228-grf 230 - rockchip,rk3288-grf 231 - rockchip,rk3328-grf 232 - rockchip,rk3368-grf 233 - rockchip,rk3368-pmugrf 234 - rockchip,rk3399-grf 235 - rockchip,rk3399-pmugrf 236 - rockchip,rk3568-pmugrf 237 - rockchip,rv1108-grf 238 - rockchip,rv1108-pmugrf 239 240 then: 241 properties: 242 io-domains: 243 type: object 244 245 $ref: /schemas/power/rockchip-io-domain.yaml# 246 247 unevaluatedProperties: false 248 249examples: 250 - | 251 #include <dt-bindings/clock/rk3399-cru.h> 252 #include <dt-bindings/interrupt-controller/arm-gic.h> 253 #include <dt-bindings/power/rk3399-power.h> 254 grf: syscon@ff770000 { 255 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; 256 reg = <0xff770000 0x10000>; 257 #address-cells = <1>; 258 #size-cells = <1>; 259 260 mipi_dphy_rx0: mipi-dphy-rx0 { 261 compatible = "rockchip,rk3399-mipi-dphy-rx0"; 262 clocks = <&cru SCLK_MIPIDPHY_REF>, 263 <&cru SCLK_DPHY_RX0_CFG>, 264 <&cru PCLK_VIO_GRF>; 265 clock-names = "dphy-ref", "dphy-cfg", "grf"; 266 power-domains = <&power RK3399_PD_VIO>; 267 #phy-cells = <0>; 268 }; 269 270 u2phy0: usb2phy@e450 { 271 compatible = "rockchip,rk3399-usb2phy"; 272 reg = <0xe450 0x10>; 273 clocks = <&cru SCLK_USB2PHY0_REF>; 274 clock-names = "phyclk"; 275 #clock-cells = <0>; 276 clock-output-names = "clk_usbphy0_480m"; 277 278 u2phy0_host: host-port { 279 #phy-cells = <0>; 280 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>; 281 interrupt-names = "linestate"; 282 }; 283 284 u2phy0_otg: otg-port { 285 #phy-cells = <0>; 286 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>, 287 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>, 288 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>; 289 interrupt-names = "otg-bvalid", "otg-id", 290 "linestate"; 291 }; 292 }; 293 }; 294