Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 | |
| 7 | title: Rockchip General Register Files (GRF) |
| 8 | |
| 9 | maintainers: |
| 10 | - Heiko Stuebner <heiko@sntech.de> |
| 11 | |
| 12 | properties: |
| 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 | |
| 73 | required: |
| 74 | - compatible |
| 75 | - reg |
| 76 | |
| 77 | additionalProperties: |
| 78 | type: object |
| 79 | |
| 80 | allOf: |
| 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 | description: |
| 167 | Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt |
| 168 | |
| 169 | patternProperties: |
| 170 | "phy@[0-9a-f]+$": |
| 171 | description: |
| 172 | Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt |
| 173 | |
| 174 | - if: |
| 175 | properties: |
| 176 | compatible: |
| 177 | contains: |
| 178 | enum: |
| 179 | - rockchip,px30-pmugrf |
| 180 | - rockchip,rk3036-grf |
| 181 | - rockchip,rk3308-grf |
| 182 | - rockchip,rk3368-pmugrf |
| 183 | |
| 184 | then: |
| 185 | properties: |
| 186 | reboot-mode: |
| 187 | type: object |
| 188 | |
| 189 | $ref: /schemas/power/reset/syscon-reboot-mode.yaml# |
| 190 | |
| 191 | unevaluatedProperties: false |
| 192 | |
| 193 | - if: |
| 194 | properties: |
| 195 | compatible: |
| 196 | contains: |
| 197 | enum: |
| 198 | - rockchip,px30-usb2phy-grf |
| 199 | - rockchip,rk3128-grf |
| 200 | - rockchip,rk3228-grf |
| 201 | - rockchip,rk3308-usb2phy-grf |
| 202 | - rockchip,rk3328-usb2phy-grf |
| 203 | - rockchip,rk3399-grf |
| 204 | - rockchip,rk3588-usb2phy-grf |
| 205 | - rockchip,rv1108-grf |
| 206 | |
| 207 | then: |
| 208 | required: |
| 209 | - "#address-cells" |
| 210 | - "#size-cells" |
| 211 | |
| 212 | patternProperties: |
| 213 | "usb2phy@[0-9a-f]+$": |
| 214 | type: object |
| 215 | |
| 216 | $ref: /schemas/phy/rockchip,inno-usb2phy.yaml# |
| 217 | |
| 218 | unevaluatedProperties: false |
| 219 | |
| 220 | - if: |
| 221 | properties: |
| 222 | compatible: |
| 223 | contains: |
| 224 | enum: |
| 225 | - rockchip,px30-grf |
| 226 | - rockchip,px30-pmugrf |
| 227 | - rockchip,rk3188-grf |
| 228 | - rockchip,rk3228-grf |
| 229 | - rockchip,rk3288-grf |
| 230 | - rockchip,rk3328-grf |
| 231 | - rockchip,rk3368-grf |
| 232 | - rockchip,rk3368-pmugrf |
| 233 | - rockchip,rk3399-grf |
| 234 | - rockchip,rk3399-pmugrf |
| 235 | - rockchip,rk3568-pmugrf |
| 236 | - rockchip,rk3588-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 | |
| 249 | examples: |
| 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 | }; |