# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/soc/rockchip/grf.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Rockchip General Register Files (GRF) maintainers: - Heiko Stuebner properties: compatible: oneOf: - items: - enum: - rockchip,rk3288-sgrf - rockchip,rv1108-usbgrf - const: syscon - items: - enum: - rockchip,px30-grf - rockchip,px30-pmugrf - rockchip,px30-usb2phy-grf - rockchip,rk3036-grf - rockchip,rk3066-grf - rockchip,rk3188-grf - rockchip,rk3228-grf - rockchip,rk3288-grf - rockchip,rk3308-core-grf - rockchip,rk3308-detect-grf - rockchip,rk3308-grf - rockchip,rk3308-usb2phy-grf - rockchip,rk3328-grf - rockchip,rk3328-usb2phy-grf - rockchip,rk3368-grf - rockchip,rk3368-pmugrf - rockchip,rk3399-grf - rockchip,rk3399-pmugrf - rockchip,rk3568-grf - rockchip,rk3568-pmugrf - rockchip,rv1108-grf - rockchip,rv1108-pmugrf - const: syscon - const: simple-mfd reg: maxItems: 1 "#address-cells": const: 1 "#size-cells": const: 1 required: - compatible - reg additionalProperties: type: object allOf: - if: properties: compatible: contains: const: rockchip,px30-grf then: properties: lvds: description: Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt - if: properties: compatible: contains: const: rockchip,rk3288-grf then: properties: edp-phy: description: Documentation/devicetree/bindings/phy/rockchip-dp-phy.txt - if: properties: compatible: contains: enum: - rockchip,rk3066-grf - rockchip,rk3188-grf - rockchip,rk3288-grf then: properties: usbphy: type: object $ref: "/schemas/phy/rockchip-usb-phy.yaml#" unevaluatedProperties: false - if: properties: compatible: contains: const: rockchip,rk3328-grf then: properties: gpio: type: object $ref: "/schemas/gpio/rockchip,rk3328-grf-gpio.yaml#" unevaluatedProperties: false power-controller: type: object $ref: "/schemas/power/rockchip,power-controller.yaml#" unevaluatedProperties: false - if: properties: compatible: contains: const: rockchip,rk3399-grf then: properties: mipi-dphy-rx0: type: object $ref: "/schemas/phy/rockchip-mipi-dphy-rx0.yaml#" unevaluatedProperties: false pcie-phy: type: object description: Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt patternProperties: "phy@[0-9a-f]+$": description: Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt - if: properties: compatible: contains: enum: - rockchip,px30-pmugrf - rockchip,rk3036-grf - rockchip,rk3308-grf - rockchip,rk3368-pmugrf then: properties: reboot-mode: type: object $ref: "/schemas/power/reset/syscon-reboot-mode.yaml#" unevaluatedProperties: false - if: properties: compatible: contains: enum: - rockchip,px30-usb2phy-grf - rockchip,rk3228-grf - rockchip,rk3308-usb2phy-grf - rockchip,rk3328-usb2phy-grf - rockchip,rk3399-grf - rockchip,rv1108-grf then: required: - "#address-cells" - "#size-cells" patternProperties: "usb2phy@[0-9a-f]+$": type: object $ref: "/schemas/phy/phy-rockchip-inno-usb2.yaml#" unevaluatedProperties: false - if: properties: compatible: contains: enum: - rockchip,px30-grf - rockchip,px30-pmugrf - rockchip,rk3188-grf - rockchip,rk3228-grf - rockchip,rk3288-grf - rockchip,rk3328-grf - rockchip,rk3368-grf - rockchip,rk3368-pmugrf - rockchip,rk3399-grf - rockchip,rk3399-pmugrf - rockchip,rk3568-pmugrf - rockchip,rv1108-grf - rockchip,rv1108-pmugrf then: properties: io-domains: type: object $ref: "/schemas/power/rockchip-io-domain.yaml#" unevaluatedProperties: false examples: - | #include #include #include grf: syscon@ff770000 { compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd"; reg = <0xff770000 0x10000>; #address-cells = <1>; #size-cells = <1>; mipi_dphy_rx0: mipi-dphy-rx0 { compatible = "rockchip,rk3399-mipi-dphy-rx0"; clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru SCLK_DPHY_RX0_CFG>, <&cru PCLK_VIO_GRF>; clock-names = "dphy-ref", "dphy-cfg", "grf"; power-domains = <&power RK3399_PD_VIO>; #phy-cells = <0>; }; u2phy0: usb2phy@e450 { compatible = "rockchip,rk3399-usb2phy"; reg = <0xe450 0x10>; clocks = <&cru SCLK_USB2PHY0_REF>; clock-names = "phyclk"; #clock-cells = <0>; clock-output-names = "clk_usbphy0_480m"; u2phy0_host: host-port { #phy-cells = <0>; interrupts = ; interrupt-names = "linestate"; }; u2phy0_otg: otg-port { #phy-cells = <0>; interrupts = , , ; interrupt-names = "otg-bvalid", "otg-id", "linestate"; }; }; };