xref: /freebsd/sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/rockchip,pcie3-phy.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Rockchip PCIe v3 phy
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotproperties:
137ef62cebSEmmanuel Vadot  compatible:
147ef62cebSEmmanuel Vadot    enum:
157ef62cebSEmmanuel Vadot      - rockchip,rk3568-pcie3-phy
16*aa1a8ff2SEmmanuel Vadot      - rockchip,rk3588-pcie3-phy
177ef62cebSEmmanuel Vadot
187ef62cebSEmmanuel Vadot  reg:
197ef62cebSEmmanuel Vadot    maxItems: 1
207ef62cebSEmmanuel Vadot
217ef62cebSEmmanuel Vadot  clocks:
22*aa1a8ff2SEmmanuel Vadot    minItems: 1
237ef62cebSEmmanuel Vadot    maxItems: 3
247ef62cebSEmmanuel Vadot
257ef62cebSEmmanuel Vadot  clock-names:
26*aa1a8ff2SEmmanuel Vadot    minItems: 1
27*aa1a8ff2SEmmanuel Vadot    maxItems: 3
287ef62cebSEmmanuel Vadot
297ef62cebSEmmanuel Vadot  data-lanes:
307ef62cebSEmmanuel Vadot    description: which lanes (by position) should be mapped to which
317ef62cebSEmmanuel Vadot      controller (value). 0 means lane disabled, higher value means used.
327ef62cebSEmmanuel Vadot      (controller-number +1 )
337ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
347ef62cebSEmmanuel Vadot    minItems: 2
357ef62cebSEmmanuel Vadot    maxItems: 16
367ef62cebSEmmanuel Vadot    items:
377ef62cebSEmmanuel Vadot      minimum: 0
387ef62cebSEmmanuel Vadot      maximum: 16
397ef62cebSEmmanuel Vadot
407ef62cebSEmmanuel Vadot  "#phy-cells":
417ef62cebSEmmanuel Vadot    const: 0
427ef62cebSEmmanuel Vadot
437ef62cebSEmmanuel Vadot  resets:
447ef62cebSEmmanuel Vadot    maxItems: 1
457ef62cebSEmmanuel Vadot
467ef62cebSEmmanuel Vadot  reset-names:
477ef62cebSEmmanuel Vadot    const: phy
487ef62cebSEmmanuel Vadot
497ef62cebSEmmanuel Vadot  rockchip,phy-grf:
507ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
517ef62cebSEmmanuel Vadot    description: phandle to the syscon managing the phy "general register files"
527ef62cebSEmmanuel Vadot
537ef62cebSEmmanuel Vadot  rockchip,pipe-grf:
547ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
557ef62cebSEmmanuel Vadot    description: phandle to the syscon managing the pipe "general register files"
567ef62cebSEmmanuel Vadot
577ef62cebSEmmanuel Vadotrequired:
587ef62cebSEmmanuel Vadot  - compatible
597ef62cebSEmmanuel Vadot  - reg
607ef62cebSEmmanuel Vadot  - rockchip,phy-grf
617ef62cebSEmmanuel Vadot  - "#phy-cells"
627ef62cebSEmmanuel Vadot
63*aa1a8ff2SEmmanuel VadotallOf:
64*aa1a8ff2SEmmanuel Vadot  - if:
65*aa1a8ff2SEmmanuel Vadot      properties:
66*aa1a8ff2SEmmanuel Vadot        compatible:
67*aa1a8ff2SEmmanuel Vadot          enum:
68*aa1a8ff2SEmmanuel Vadot            - rockchip,rk3588-pcie3-phy
69*aa1a8ff2SEmmanuel Vadot    then:
70*aa1a8ff2SEmmanuel Vadot      properties:
71*aa1a8ff2SEmmanuel Vadot        clocks:
72*aa1a8ff2SEmmanuel Vadot          maxItems: 1
73*aa1a8ff2SEmmanuel Vadot        clock-names:
74*aa1a8ff2SEmmanuel Vadot          items:
75*aa1a8ff2SEmmanuel Vadot            - const: pclk
76*aa1a8ff2SEmmanuel Vadot    else:
77*aa1a8ff2SEmmanuel Vadot      properties:
78*aa1a8ff2SEmmanuel Vadot        clocks:
79*aa1a8ff2SEmmanuel Vadot          minItems: 3
80*aa1a8ff2SEmmanuel Vadot
81*aa1a8ff2SEmmanuel Vadot        clock-names:
82*aa1a8ff2SEmmanuel Vadot          items:
83*aa1a8ff2SEmmanuel Vadot            - const: refclk_m
84*aa1a8ff2SEmmanuel Vadot            - const: refclk_n
85*aa1a8ff2SEmmanuel Vadot            - const: pclk
86*aa1a8ff2SEmmanuel Vadot
877ef62cebSEmmanuel VadotadditionalProperties: false
887ef62cebSEmmanuel Vadot
897ef62cebSEmmanuel Vadotexamples:
907ef62cebSEmmanuel Vadot  - |
917ef62cebSEmmanuel Vadot    #include <dt-bindings/clock/rk3568-cru.h>
927ef62cebSEmmanuel Vadot    pcie30phy: phy@fe8c0000 {
937ef62cebSEmmanuel Vadot      compatible = "rockchip,rk3568-pcie3-phy";
947ef62cebSEmmanuel Vadot      reg = <0xfe8c0000 0x20000>;
957ef62cebSEmmanuel Vadot      #phy-cells = <0>;
967ef62cebSEmmanuel Vadot      clocks = <&pmucru CLK_PCIE30PHY_REF_M>,
977ef62cebSEmmanuel Vadot               <&pmucru CLK_PCIE30PHY_REF_N>,
987ef62cebSEmmanuel Vadot               <&cru PCLK_PCIE30PHY>;
997ef62cebSEmmanuel Vadot      clock-names = "refclk_m", "refclk_n", "pclk";
1007ef62cebSEmmanuel Vadot      resets = <&cru SRST_PCIE30PHY>;
1017ef62cebSEmmanuel Vadot      reset-names = "phy";
1027ef62cebSEmmanuel Vadot      rockchip,phy-grf = <&pcie30_phy_grf>;
1037ef62cebSEmmanuel Vadot    };
104