xref: /freebsd-src/sys/contrib/device-tree/Bindings/phy/phy-rockchip-naneng-combphy.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/phy/phy-rockchip-naneng-combphy.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Rockchip SoC Naneng Combo Phy
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotproperties:
13c9ccf3a3SEmmanuel Vadot  compatible:
14c9ccf3a3SEmmanuel Vadot    enum:
15c9ccf3a3SEmmanuel Vadot      - rockchip,rk3568-naneng-combphy
16fac71e4eSEmmanuel Vadot      - rockchip,rk3588-naneng-combphy
17c9ccf3a3SEmmanuel Vadot
18c9ccf3a3SEmmanuel Vadot  reg:
19c9ccf3a3SEmmanuel Vadot    maxItems: 1
20c9ccf3a3SEmmanuel Vadot
21c9ccf3a3SEmmanuel Vadot  clocks:
22c9ccf3a3SEmmanuel Vadot    items:
23c9ccf3a3SEmmanuel Vadot      - description: reference clock
24c9ccf3a3SEmmanuel Vadot      - description: apb clock
25c9ccf3a3SEmmanuel Vadot      - description: pipe clock
26c9ccf3a3SEmmanuel Vadot
27c9ccf3a3SEmmanuel Vadot  clock-names:
28c9ccf3a3SEmmanuel Vadot    items:
29c9ccf3a3SEmmanuel Vadot      - const: ref
30c9ccf3a3SEmmanuel Vadot      - const: apb
31c9ccf3a3SEmmanuel Vadot      - const: pipe
32c9ccf3a3SEmmanuel Vadot
33c9ccf3a3SEmmanuel Vadot  resets:
34*f126890aSEmmanuel Vadot    minItems: 1
35*f126890aSEmmanuel Vadot    maxItems: 2
36*f126890aSEmmanuel Vadot
37*f126890aSEmmanuel Vadot  reset-names:
38*f126890aSEmmanuel Vadot    minItems: 1
39c9ccf3a3SEmmanuel Vadot    items:
40*f126890aSEmmanuel Vadot      - const: phy
41*f126890aSEmmanuel Vadot      - const: apb
42c9ccf3a3SEmmanuel Vadot
43c9ccf3a3SEmmanuel Vadot  rockchip,enable-ssc:
44c9ccf3a3SEmmanuel Vadot    type: boolean
45c9ccf3a3SEmmanuel Vadot    description:
46c9ccf3a3SEmmanuel Vadot      The option SSC can be enabled for U3, SATA and PCIE.
47c9ccf3a3SEmmanuel Vadot      Most commercially available platforms use SSC to reduce EMI.
48c9ccf3a3SEmmanuel Vadot
49c9ccf3a3SEmmanuel Vadot  rockchip,ext-refclk:
50c9ccf3a3SEmmanuel Vadot    type: boolean
51c9ccf3a3SEmmanuel Vadot    description:
52c9ccf3a3SEmmanuel Vadot      Many PCIe connections, especially backplane connections,
53c9ccf3a3SEmmanuel Vadot      require a synchronous reference clock between the two link partners.
54c9ccf3a3SEmmanuel Vadot      To achieve this a common clock source, referred to as REFCLK in
55c9ccf3a3SEmmanuel Vadot      the PCI Express Card Electromechanical Specification,
56c9ccf3a3SEmmanuel Vadot      should be used by both ends of the PCIe link.
57c9ccf3a3SEmmanuel Vadot      In PCIe mode one can choose to use an internal or an external reference
58c9ccf3a3SEmmanuel Vadot      clock.
59c9ccf3a3SEmmanuel Vadot      By default the internal clock is selected. The PCIe PHY provides a 100MHz
60c9ccf3a3SEmmanuel Vadot      differential clock output(optional with SSC) for system applications.
61c9ccf3a3SEmmanuel Vadot      When selecting this option an externally 100MHz differential
62c9ccf3a3SEmmanuel Vadot      reference clock needs to be provided to the PCIe PHY.
63c9ccf3a3SEmmanuel Vadot
64c9ccf3a3SEmmanuel Vadot  rockchip,pipe-grf:
65c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
66c9ccf3a3SEmmanuel Vadot    description:
67c9ccf3a3SEmmanuel Vadot      Some additional phy settings are accessed through GRF regs.
68c9ccf3a3SEmmanuel Vadot
69c9ccf3a3SEmmanuel Vadot  rockchip,pipe-phy-grf:
70c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
71c9ccf3a3SEmmanuel Vadot    description:
72c9ccf3a3SEmmanuel Vadot      Some additional pipe settings are accessed through GRF regs.
73c9ccf3a3SEmmanuel Vadot
74c9ccf3a3SEmmanuel Vadot  "#phy-cells":
75c9ccf3a3SEmmanuel Vadot    const: 1
76c9ccf3a3SEmmanuel Vadot
77c9ccf3a3SEmmanuel Vadotrequired:
78c9ccf3a3SEmmanuel Vadot  - compatible
79c9ccf3a3SEmmanuel Vadot  - reg
80c9ccf3a3SEmmanuel Vadot  - clocks
81c9ccf3a3SEmmanuel Vadot  - clock-names
82c9ccf3a3SEmmanuel Vadot  - resets
83c9ccf3a3SEmmanuel Vadot  - rockchip,pipe-grf
84c9ccf3a3SEmmanuel Vadot  - rockchip,pipe-phy-grf
85c9ccf3a3SEmmanuel Vadot  - "#phy-cells"
86c9ccf3a3SEmmanuel Vadot
87*f126890aSEmmanuel VadotallOf:
88*f126890aSEmmanuel Vadot  - if:
89*f126890aSEmmanuel Vadot      properties:
90*f126890aSEmmanuel Vadot        compatible:
91*f126890aSEmmanuel Vadot          contains:
92*f126890aSEmmanuel Vadot            const: rockchip,rk3568-naneng-combphy
93*f126890aSEmmanuel Vadot    then:
94*f126890aSEmmanuel Vadot      properties:
95*f126890aSEmmanuel Vadot        resets:
96*f126890aSEmmanuel Vadot          maxItems: 1
97*f126890aSEmmanuel Vadot        reset-names:
98*f126890aSEmmanuel Vadot          maxItems: 1
99*f126890aSEmmanuel Vadot  - if:
100*f126890aSEmmanuel Vadot      properties:
101*f126890aSEmmanuel Vadot        compatible:
102*f126890aSEmmanuel Vadot          contains:
103*f126890aSEmmanuel Vadot            const: rockchip,rk3588-naneng-combphy
104*f126890aSEmmanuel Vadot    then:
105*f126890aSEmmanuel Vadot      properties:
106*f126890aSEmmanuel Vadot        resets:
107*f126890aSEmmanuel Vadot          minItems: 2
108*f126890aSEmmanuel Vadot        reset-names:
109*f126890aSEmmanuel Vadot          minItems: 2
110*f126890aSEmmanuel Vadot      required:
111*f126890aSEmmanuel Vadot        - reset-names
112*f126890aSEmmanuel Vadot
113c9ccf3a3SEmmanuel VadotadditionalProperties: false
114c9ccf3a3SEmmanuel Vadot
115c9ccf3a3SEmmanuel Vadotexamples:
116c9ccf3a3SEmmanuel Vadot  - |
117c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/rk3568-cru.h>
118c9ccf3a3SEmmanuel Vadot
119c9ccf3a3SEmmanuel Vadot    pipegrf: syscon@fdc50000 {
120c9ccf3a3SEmmanuel Vadot      compatible = "rockchip,rk3568-pipe-grf", "syscon";
121c9ccf3a3SEmmanuel Vadot      reg = <0xfdc50000 0x1000>;
122c9ccf3a3SEmmanuel Vadot    };
123c9ccf3a3SEmmanuel Vadot
124c9ccf3a3SEmmanuel Vadot    pipe_phy_grf0: syscon@fdc70000 {
125c9ccf3a3SEmmanuel Vadot      compatible = "rockchip,rk3568-pipe-phy-grf", "syscon";
126c9ccf3a3SEmmanuel Vadot      reg = <0xfdc70000 0x1000>;
127c9ccf3a3SEmmanuel Vadot    };
128c9ccf3a3SEmmanuel Vadot
129c9ccf3a3SEmmanuel Vadot    combphy0: phy@fe820000 {
130c9ccf3a3SEmmanuel Vadot      compatible = "rockchip,rk3568-naneng-combphy";
131c9ccf3a3SEmmanuel Vadot      reg = <0xfe820000 0x100>;
132c9ccf3a3SEmmanuel Vadot      clocks = <&pmucru CLK_PCIEPHY0_REF>,
133c9ccf3a3SEmmanuel Vadot               <&cru PCLK_PIPEPHY0>,
134c9ccf3a3SEmmanuel Vadot               <&cru PCLK_PIPE>;
135c9ccf3a3SEmmanuel Vadot      clock-names = "ref", "apb", "pipe";
136c9ccf3a3SEmmanuel Vadot      assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>;
137c9ccf3a3SEmmanuel Vadot      assigned-clock-rates = <100000000>;
138c9ccf3a3SEmmanuel Vadot      resets = <&cru SRST_PIPEPHY0>;
139c9ccf3a3SEmmanuel Vadot      rockchip,pipe-grf = <&pipegrf>;
140c9ccf3a3SEmmanuel Vadot      rockchip,pipe-phy-grf = <&pipe_phy_grf0>;
141c9ccf3a3SEmmanuel Vadot      #phy-cells = <1>;
142c9ccf3a3SEmmanuel Vadot    };
143