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