1ba2bf1f0SSwapnil Jakhade# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2ba2bf1f0SSwapnil Jakhade%YAML 1.2
3ba2bf1f0SSwapnil Jakhade---
4*e43462c1SRob Herring$id: http://devicetree.org/schemas/phy/phy-cadence-sierra.yaml#
5*e43462c1SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
6ba2bf1f0SSwapnil Jakhade
784e85359SKrzysztof Kozlowskititle: Cadence Sierra PHY
8ba2bf1f0SSwapnil Jakhade
9ba2bf1f0SSwapnil Jakhadedescription:
10ba2bf1f0SSwapnil Jakhade  This binding describes the Cadence Sierra PHY. Sierra PHY supports multilink
11ba2bf1f0SSwapnil Jakhade  multiprotocol combinations including protocols such as PCIe, USB etc.
12ba2bf1f0SSwapnil Jakhade
13ba2bf1f0SSwapnil Jakhademaintainers:
14ba2bf1f0SSwapnil Jakhade  - Swapnil Jakhade <sjakhade@cadence.com>
15ba2bf1f0SSwapnil Jakhade  - Yuti Amonkar <yamonkar@cadence.com>
16ba2bf1f0SSwapnil Jakhade
17ba2bf1f0SSwapnil Jakhadeproperties:
18ba2bf1f0SSwapnil Jakhade  compatible:
19ba2bf1f0SSwapnil Jakhade    enum:
20ba2bf1f0SSwapnil Jakhade      - cdns,sierra-phy-t0
21ba2bf1f0SSwapnil Jakhade      - ti,sierra-phy-t0
22ba2bf1f0SSwapnil Jakhade
23ba2bf1f0SSwapnil Jakhade  '#address-cells':
24ba2bf1f0SSwapnil Jakhade    const: 1
25ba2bf1f0SSwapnil Jakhade
26ba2bf1f0SSwapnil Jakhade  '#size-cells':
27ba2bf1f0SSwapnil Jakhade    const: 0
28ba2bf1f0SSwapnil Jakhade
29db7a3464SKishon Vijay Abraham I  '#clock-cells':
30db7a3464SKishon Vijay Abraham I    const: 1
31db7a3464SKishon Vijay Abraham I
32ba2bf1f0SSwapnil Jakhade  resets:
33ba2bf1f0SSwapnil Jakhade    minItems: 1
34ba2bf1f0SSwapnil Jakhade    items:
35ba2bf1f0SSwapnil Jakhade      - description: Sierra PHY reset.
36ba2bf1f0SSwapnil Jakhade      - description: Sierra APB reset. This is optional.
37ba2bf1f0SSwapnil Jakhade
38ba2bf1f0SSwapnil Jakhade  reset-names:
39ba2bf1f0SSwapnil Jakhade    minItems: 1
40ba2bf1f0SSwapnil Jakhade    items:
41ba2bf1f0SSwapnil Jakhade      - const: sierra_reset
42ba2bf1f0SSwapnil Jakhade      - const: sierra_apb
43ba2bf1f0SSwapnil Jakhade
44ba2bf1f0SSwapnil Jakhade  reg:
45ba2bf1f0SSwapnil Jakhade    maxItems: 1
46ba2bf1f0SSwapnil Jakhade    description:
47ba2bf1f0SSwapnil Jakhade      Offset of the Sierra PHY configuration registers.
48ba2bf1f0SSwapnil Jakhade
49ba2bf1f0SSwapnil Jakhade  reg-names:
50ba2bf1f0SSwapnil Jakhade    const: serdes
51ba2bf1f0SSwapnil Jakhade
52ba2bf1f0SSwapnil Jakhade  clocks:
53db7a3464SKishon Vijay Abraham I    minItems: 2
54db7a3464SKishon Vijay Abraham I    maxItems: 4
55ba2bf1f0SSwapnil Jakhade
56ba2bf1f0SSwapnil Jakhade  clock-names:
57db7a3464SKishon Vijay Abraham I    minItems: 2
58ba2bf1f0SSwapnil Jakhade    items:
59ba2bf1f0SSwapnil Jakhade      - const: cmn_refclk_dig_div
60ba2bf1f0SSwapnil Jakhade      - const: cmn_refclk1_dig_div
61db7a3464SKishon Vijay Abraham I      - const: pll0_refclk
62db7a3464SKishon Vijay Abraham I      - const: pll1_refclk
63db7a3464SKishon Vijay Abraham I
64ba2bf1f0SSwapnil Jakhade  cdns,autoconf:
65ba2bf1f0SSwapnil Jakhade    type: boolean
66ba2bf1f0SSwapnil Jakhade    description:
67ba2bf1f0SSwapnil Jakhade      A boolean property whose presence indicates that the PHY registers will be
68ba2bf1f0SSwapnil Jakhade      configured by hardware. If not present, all sub-node optional properties
69ba2bf1f0SSwapnil Jakhade      must be provided.
70ba2bf1f0SSwapnil Jakhade
71ba2bf1f0SSwapnil JakhadepatternProperties:
72ba2bf1f0SSwapnil Jakhade  '^phy@[0-9a-f]$':
73ba2bf1f0SSwapnil Jakhade    type: object
74ba2bf1f0SSwapnil Jakhade    description:
75ba2bf1f0SSwapnil Jakhade      Each group of PHY lanes with a single master lane should be represented as
76ba2bf1f0SSwapnil Jakhade      a sub-node. Note that the actual configuration of each lane is determined
77ba2bf1f0SSwapnil Jakhade      by hardware strapping, and must match the configuration specified here.
78ba2bf1f0SSwapnil Jakhade    properties:
79ba2bf1f0SSwapnil Jakhade      reg:
80ba2bf1f0SSwapnil Jakhade        description:
81ba2bf1f0SSwapnil Jakhade          The master lane number. This is the lowest numbered lane in the lane group.
82ba2bf1f0SSwapnil Jakhade        minimum: 0
83ba2bf1f0SSwapnil Jakhade        maximum: 15
84ba2bf1f0SSwapnil Jakhade
85ba2bf1f0SSwapnil Jakhade      resets:
86ba2bf1f0SSwapnil Jakhade        minItems: 1
87ba2bf1f0SSwapnil Jakhade        maxItems: 4
88ba2bf1f0SSwapnil Jakhade        description:
89ba2bf1f0SSwapnil Jakhade          Contains list of resets, one per lane, to get all the link lanes out of reset.
90ba2bf1f0SSwapnil Jakhade
91ba2bf1f0SSwapnil Jakhade      "#phy-cells":
92ba2bf1f0SSwapnil Jakhade        const: 0
93ba2bf1f0SSwapnil Jakhade
94ba2bf1f0SSwapnil Jakhade      cdns,phy-type:
95ba2bf1f0SSwapnil Jakhade        description:
96ba2bf1f0SSwapnil Jakhade          Specifies the type of PHY for which the group of PHY lanes is used.
97ba2bf1f0SSwapnil Jakhade          Refer include/dt-bindings/phy/phy.h. Constants from the header should be used.
98ba2bf1f0SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
99ba2bf1f0SSwapnil Jakhade        enum: [2, 4]
100ba2bf1f0SSwapnil Jakhade
101ba2bf1f0SSwapnil Jakhade      cdns,num-lanes:
102ba2bf1f0SSwapnil Jakhade        description:
103ba2bf1f0SSwapnil Jakhade          Number of lanes in this group. The group is made up of consecutive lanes.
104ba2bf1f0SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
105ba2bf1f0SSwapnil Jakhade        minimum: 1
106ba2bf1f0SSwapnil Jakhade        maximum: 16
107ba2bf1f0SSwapnil Jakhade
108262303b9SSwapnil Jakhade      cdns,ssc-mode:
109262303b9SSwapnil Jakhade        description:
110262303b9SSwapnil Jakhade          Specifies the Spread Spectrum Clocking mode used. It can be NO_SSC,
111262303b9SSwapnil Jakhade          EXTERNAL_SSC or INTERNAL_SSC.
112262303b9SSwapnil Jakhade          Refer include/dt-bindings/phy/phy-cadence.h for the constants to be used.
113262303b9SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
114262303b9SSwapnil Jakhade        enum: [0, 1, 2]
115262303b9SSwapnil Jakhade        default: 1
116262303b9SSwapnil Jakhade
117ba2bf1f0SSwapnil Jakhade    required:
118ba2bf1f0SSwapnil Jakhade      - reg
119ba2bf1f0SSwapnil Jakhade      - resets
120ba2bf1f0SSwapnil Jakhade      - "#phy-cells"
121ba2bf1f0SSwapnil Jakhade
122ba2bf1f0SSwapnil Jakhade    additionalProperties: false
123ba2bf1f0SSwapnil Jakhade
124ba2bf1f0SSwapnil Jakhaderequired:
125ba2bf1f0SSwapnil Jakhade  - compatible
126ba2bf1f0SSwapnil Jakhade  - "#address-cells"
127ba2bf1f0SSwapnil Jakhade  - "#size-cells"
128ba2bf1f0SSwapnil Jakhade  - reg
129ba2bf1f0SSwapnil Jakhade  - resets
130ba2bf1f0SSwapnil Jakhade  - reset-names
131ba2bf1f0SSwapnil Jakhade
132ba2bf1f0SSwapnil JakhadeadditionalProperties: false
133ba2bf1f0SSwapnil Jakhade
134ba2bf1f0SSwapnil Jakhadeexamples:
135ba2bf1f0SSwapnil Jakhade  - |
136ba2bf1f0SSwapnil Jakhade    #include <dt-bindings/phy/phy.h>
137ba2bf1f0SSwapnil Jakhade
138ba2bf1f0SSwapnil Jakhade    bus {
139ba2bf1f0SSwapnil Jakhade        #address-cells = <2>;
140ba2bf1f0SSwapnil Jakhade        #size-cells = <2>;
141ba2bf1f0SSwapnil Jakhade
142ba2bf1f0SSwapnil Jakhade        sierra-phy@fd240000 {
143ba2bf1f0SSwapnil Jakhade            compatible = "cdns,sierra-phy-t0";
144ba2bf1f0SSwapnil Jakhade            reg = <0x0 0xfd240000 0x0 0x40000>;
145ba2bf1f0SSwapnil Jakhade            resets = <&phyrst 0>, <&phyrst 1>;
146ba2bf1f0SSwapnil Jakhade            reset-names = "sierra_reset", "sierra_apb";
147ba2bf1f0SSwapnil Jakhade            clocks = <&cmn_refclk_dig_div>, <&cmn_refclk1_dig_div>;
148ba2bf1f0SSwapnil Jakhade            clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div";
149ba2bf1f0SSwapnil Jakhade            #address-cells = <1>;
150ba2bf1f0SSwapnil Jakhade            #size-cells = <0>;
151ba2bf1f0SSwapnil Jakhade            pcie0_phy0: phy@0 {
152ba2bf1f0SSwapnil Jakhade                reg = <0>;
153ba2bf1f0SSwapnil Jakhade                resets = <&phyrst 2>;
154ba2bf1f0SSwapnil Jakhade                cdns,num-lanes = <2>;
155ba2bf1f0SSwapnil Jakhade                #phy-cells = <0>;
156ba2bf1f0SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_PCIE>;
157ba2bf1f0SSwapnil Jakhade            };
158ba2bf1f0SSwapnil Jakhade            pcie0_phy1: phy@2 {
159ba2bf1f0SSwapnil Jakhade                reg = <2>;
160ba2bf1f0SSwapnil Jakhade                resets = <&phyrst 4>;
161ba2bf1f0SSwapnil Jakhade                cdns,num-lanes = <1>;
162ba2bf1f0SSwapnil Jakhade                #phy-cells = <0>;
163ba2bf1f0SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_PCIE>;
164ba2bf1f0SSwapnil Jakhade            };
165ba2bf1f0SSwapnil Jakhade        };
166ba2bf1f0SSwapnil Jakhade    };
167