0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/soc/rockchip/grf.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Rockchip General Register Files (GRF)
0008
0009 maintainers:
0010 - Heiko Stuebner <heiko@sntech.de>
0011
0012 properties:
0013 compatible:
0014 oneOf:
0015 - items:
0016 - enum:
0017 - rockchip,rk3288-sgrf
0018 - rockchip,rk3566-pipe-grf
0019 - rockchip,rk3568-pipe-grf
0020 - rockchip,rk3568-pipe-phy-grf
0021 - rockchip,rk3568-usb2phy-grf
0022 - rockchip,rv1108-usbgrf
0023 - const: syscon
0024 - items:
0025 - enum:
0026 - rockchip,px30-grf
0027 - rockchip,px30-pmugrf
0028 - rockchip,px30-usb2phy-grf
0029 - rockchip,rk3036-grf
0030 - rockchip,rk3066-grf
0031 - rockchip,rk3188-grf
0032 - rockchip,rk3228-grf
0033 - rockchip,rk3288-grf
0034 - rockchip,rk3308-core-grf
0035 - rockchip,rk3308-detect-grf
0036 - rockchip,rk3308-grf
0037 - rockchip,rk3308-usb2phy-grf
0038 - rockchip,rk3328-grf
0039 - rockchip,rk3328-usb2phy-grf
0040 - rockchip,rk3368-grf
0041 - rockchip,rk3368-pmugrf
0042 - rockchip,rk3399-grf
0043 - rockchip,rk3399-pmugrf
0044 - rockchip,rk3568-grf
0045 - rockchip,rk3568-pmugrf
0046 - rockchip,rv1108-grf
0047 - rockchip,rv1108-pmugrf
0048 - const: syscon
0049 - const: simple-mfd
0050
0051 reg:
0052 maxItems: 1
0053
0054 "#address-cells":
0055 const: 1
0056
0057 "#size-cells":
0058 const: 1
0059
0060 required:
0061 - compatible
0062 - reg
0063
0064 additionalProperties:
0065 type: object
0066
0067 allOf:
0068 - if:
0069 properties:
0070 compatible:
0071 contains:
0072 const: rockchip,px30-grf
0073
0074 then:
0075 properties:
0076 lvds:
0077 description:
0078 Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt
0079
0080 - if:
0081 properties:
0082 compatible:
0083 contains:
0084 const: rockchip,rk3288-grf
0085
0086 then:
0087 properties:
0088 edp-phy:
0089 description:
0090 Documentation/devicetree/bindings/phy/rockchip-dp-phy.txt
0091
0092 - if:
0093 properties:
0094 compatible:
0095 contains:
0096 enum:
0097 - rockchip,rk3066-grf
0098 - rockchip,rk3188-grf
0099 - rockchip,rk3288-grf
0100
0101 then:
0102 properties:
0103 usbphy:
0104 type: object
0105
0106 $ref: "/schemas/phy/rockchip-usb-phy.yaml#"
0107
0108 unevaluatedProperties: false
0109
0110 - if:
0111 properties:
0112 compatible:
0113 contains:
0114 const: rockchip,rk3328-grf
0115
0116 then:
0117 properties:
0118 gpio:
0119 type: object
0120
0121 $ref: "/schemas/gpio/rockchip,rk3328-grf-gpio.yaml#"
0122
0123 unevaluatedProperties: false
0124
0125 power-controller:
0126 type: object
0127
0128 $ref: "/schemas/power/rockchip,power-controller.yaml#"
0129
0130 unevaluatedProperties: false
0131
0132 - if:
0133 properties:
0134 compatible:
0135 contains:
0136 const: rockchip,rk3399-grf
0137
0138 then:
0139 properties:
0140 mipi-dphy-rx0:
0141 type: object
0142
0143 $ref: "/schemas/phy/rockchip-mipi-dphy-rx0.yaml#"
0144
0145 unevaluatedProperties: false
0146
0147 pcie-phy:
0148 description:
0149 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
0150
0151 patternProperties:
0152 "phy@[0-9a-f]+$":
0153 description:
0154 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
0155
0156 - if:
0157 properties:
0158 compatible:
0159 contains:
0160 enum:
0161 - rockchip,px30-pmugrf
0162 - rockchip,rk3036-grf
0163 - rockchip,rk3308-grf
0164 - rockchip,rk3368-pmugrf
0165
0166 then:
0167 properties:
0168 reboot-mode:
0169 type: object
0170
0171 $ref: "/schemas/power/reset/syscon-reboot-mode.yaml#"
0172
0173 unevaluatedProperties: false
0174
0175 - if:
0176 properties:
0177 compatible:
0178 contains:
0179 enum:
0180 - rockchip,px30-usb2phy-grf
0181 - rockchip,rk3228-grf
0182 - rockchip,rk3308-usb2phy-grf
0183 - rockchip,rk3328-usb2phy-grf
0184 - rockchip,rk3399-grf
0185 - rockchip,rv1108-grf
0186
0187 then:
0188 required:
0189 - "#address-cells"
0190 - "#size-cells"
0191
0192 patternProperties:
0193 "usb2phy@[0-9a-f]+$":
0194 type: object
0195
0196 $ref: "/schemas/phy/phy-rockchip-inno-usb2.yaml#"
0197
0198 unevaluatedProperties: false
0199
0200 - if:
0201 properties:
0202 compatible:
0203 contains:
0204 enum:
0205 - rockchip,px30-grf
0206 - rockchip,px30-pmugrf
0207 - rockchip,rk3188-grf
0208 - rockchip,rk3228-grf
0209 - rockchip,rk3288-grf
0210 - rockchip,rk3328-grf
0211 - rockchip,rk3368-grf
0212 - rockchip,rk3368-pmugrf
0213 - rockchip,rk3399-grf
0214 - rockchip,rk3399-pmugrf
0215 - rockchip,rk3568-pmugrf
0216 - rockchip,rv1108-grf
0217 - rockchip,rv1108-pmugrf
0218
0219 then:
0220 properties:
0221 io-domains:
0222 type: object
0223
0224 $ref: "/schemas/power/rockchip-io-domain.yaml#"
0225
0226 unevaluatedProperties: false
0227
0228 examples:
0229 - |
0230 #include <dt-bindings/clock/rk3399-cru.h>
0231 #include <dt-bindings/interrupt-controller/arm-gic.h>
0232 #include <dt-bindings/power/rk3399-power.h>
0233 grf: syscon@ff770000 {
0234 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
0235 reg = <0xff770000 0x10000>;
0236 #address-cells = <1>;
0237 #size-cells = <1>;
0238
0239 mipi_dphy_rx0: mipi-dphy-rx0 {
0240 compatible = "rockchip,rk3399-mipi-dphy-rx0";
0241 clocks = <&cru SCLK_MIPIDPHY_REF>,
0242 <&cru SCLK_DPHY_RX0_CFG>,
0243 <&cru PCLK_VIO_GRF>;
0244 clock-names = "dphy-ref", "dphy-cfg", "grf";
0245 power-domains = <&power RK3399_PD_VIO>;
0246 #phy-cells = <0>;
0247 };
0248
0249 u2phy0: usb2phy@e450 {
0250 compatible = "rockchip,rk3399-usb2phy";
0251 reg = <0xe450 0x10>;
0252 clocks = <&cru SCLK_USB2PHY0_REF>;
0253 clock-names = "phyclk";
0254 #clock-cells = <0>;
0255 clock-output-names = "clk_usbphy0_480m";
0256
0257 u2phy0_host: host-port {
0258 #phy-cells = <0>;
0259 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
0260 interrupt-names = "linestate";
0261 };
0262
0263 u2phy0_otg: otg-port {
0264 #phy-cells = <0>;
0265 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
0266 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
0267 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
0268 interrupt-names = "otg-bvalid", "otg-id",
0269 "linestate";
0270 };
0271 };
0272 };