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