1ba2bf1f0SSwapnil Jakhade# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2ba2bf1f0SSwapnil Jakhade%YAML 1.2
3ba2bf1f0SSwapnil Jakhade---
4ba2bf1f0SSwapnil Jakhade$id: "http://devicetree.org/schemas/phy/phy-cadence-sierra.yaml#"
5ba2bf1f0SSwapnil Jakhade$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6ba2bf1f0SSwapnil Jakhade
7*84e85359SKrzysztof 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
64db7a3464SKishon Vijay Abraham I  assigned-clocks:
65db7a3464SKishon Vijay Abraham I    minItems: 1
66db7a3464SKishon Vijay Abraham I    maxItems: 2
67db7a3464SKishon Vijay Abraham I
68db7a3464SKishon Vijay Abraham I  assigned-clock-parents:
69db7a3464SKishon Vijay Abraham I    minItems: 1
70db7a3464SKishon Vijay Abraham I    maxItems: 2
71ba2bf1f0SSwapnil Jakhade
72ba2bf1f0SSwapnil Jakhade  cdns,autoconf:
73ba2bf1f0SSwapnil Jakhade    type: boolean
74ba2bf1f0SSwapnil Jakhade    description:
75ba2bf1f0SSwapnil Jakhade      A boolean property whose presence indicates that the PHY registers will be
76ba2bf1f0SSwapnil Jakhade      configured by hardware. If not present, all sub-node optional properties
77ba2bf1f0SSwapnil Jakhade      must be provided.
78ba2bf1f0SSwapnil Jakhade
79ba2bf1f0SSwapnil JakhadepatternProperties:
80ba2bf1f0SSwapnil Jakhade  '^phy@[0-9a-f]$':
81ba2bf1f0SSwapnil Jakhade    type: object
82ba2bf1f0SSwapnil Jakhade    description:
83ba2bf1f0SSwapnil Jakhade      Each group of PHY lanes with a single master lane should be represented as
84ba2bf1f0SSwapnil Jakhade      a sub-node. Note that the actual configuration of each lane is determined
85ba2bf1f0SSwapnil Jakhade      by hardware strapping, and must match the configuration specified here.
86ba2bf1f0SSwapnil Jakhade    properties:
87ba2bf1f0SSwapnil Jakhade      reg:
88ba2bf1f0SSwapnil Jakhade        description:
89ba2bf1f0SSwapnil Jakhade          The master lane number. This is the lowest numbered lane in the lane group.
90ba2bf1f0SSwapnil Jakhade        minimum: 0
91ba2bf1f0SSwapnil Jakhade        maximum: 15
92ba2bf1f0SSwapnil Jakhade
93ba2bf1f0SSwapnil Jakhade      resets:
94ba2bf1f0SSwapnil Jakhade        minItems: 1
95ba2bf1f0SSwapnil Jakhade        maxItems: 4
96ba2bf1f0SSwapnil Jakhade        description:
97ba2bf1f0SSwapnil Jakhade          Contains list of resets, one per lane, to get all the link lanes out of reset.
98ba2bf1f0SSwapnil Jakhade
99ba2bf1f0SSwapnil Jakhade      "#phy-cells":
100ba2bf1f0SSwapnil Jakhade        const: 0
101ba2bf1f0SSwapnil Jakhade
102ba2bf1f0SSwapnil Jakhade      cdns,phy-type:
103ba2bf1f0SSwapnil Jakhade        description:
104ba2bf1f0SSwapnil Jakhade          Specifies the type of PHY for which the group of PHY lanes is used.
105ba2bf1f0SSwapnil Jakhade          Refer include/dt-bindings/phy/phy.h. Constants from the header should be used.
106ba2bf1f0SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
107ba2bf1f0SSwapnil Jakhade        enum: [2, 4]
108ba2bf1f0SSwapnil Jakhade
109ba2bf1f0SSwapnil Jakhade      cdns,num-lanes:
110ba2bf1f0SSwapnil Jakhade        description:
111ba2bf1f0SSwapnil Jakhade          Number of lanes in this group. The group is made up of consecutive lanes.
112ba2bf1f0SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
113ba2bf1f0SSwapnil Jakhade        minimum: 1
114ba2bf1f0SSwapnil Jakhade        maximum: 16
115ba2bf1f0SSwapnil Jakhade
116262303b9SSwapnil Jakhade      cdns,ssc-mode:
117262303b9SSwapnil Jakhade        description:
118262303b9SSwapnil Jakhade          Specifies the Spread Spectrum Clocking mode used. It can be NO_SSC,
119262303b9SSwapnil Jakhade          EXTERNAL_SSC or INTERNAL_SSC.
120262303b9SSwapnil Jakhade          Refer include/dt-bindings/phy/phy-cadence.h for the constants to be used.
121262303b9SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
122262303b9SSwapnil Jakhade        enum: [0, 1, 2]
123262303b9SSwapnil Jakhade        default: 1
124262303b9SSwapnil Jakhade
125ba2bf1f0SSwapnil Jakhade    required:
126ba2bf1f0SSwapnil Jakhade      - reg
127ba2bf1f0SSwapnil Jakhade      - resets
128ba2bf1f0SSwapnil Jakhade      - "#phy-cells"
129ba2bf1f0SSwapnil Jakhade
130ba2bf1f0SSwapnil Jakhade    additionalProperties: false
131ba2bf1f0SSwapnil Jakhade
132ba2bf1f0SSwapnil Jakhaderequired:
133ba2bf1f0SSwapnil Jakhade  - compatible
134ba2bf1f0SSwapnil Jakhade  - "#address-cells"
135ba2bf1f0SSwapnil Jakhade  - "#size-cells"
136ba2bf1f0SSwapnil Jakhade  - reg
137ba2bf1f0SSwapnil Jakhade  - resets
138ba2bf1f0SSwapnil Jakhade  - reset-names
139ba2bf1f0SSwapnil Jakhade
140ba2bf1f0SSwapnil JakhadeadditionalProperties: false
141ba2bf1f0SSwapnil Jakhade
142ba2bf1f0SSwapnil Jakhadeexamples:
143ba2bf1f0SSwapnil Jakhade  - |
144ba2bf1f0SSwapnil Jakhade    #include <dt-bindings/phy/phy.h>
145ba2bf1f0SSwapnil Jakhade
146ba2bf1f0SSwapnil Jakhade    bus {
147ba2bf1f0SSwapnil Jakhade        #address-cells = <2>;
148ba2bf1f0SSwapnil Jakhade        #size-cells = <2>;
149ba2bf1f0SSwapnil Jakhade
150ba2bf1f0SSwapnil Jakhade        sierra-phy@fd240000 {
151ba2bf1f0SSwapnil Jakhade            compatible = "cdns,sierra-phy-t0";
152ba2bf1f0SSwapnil Jakhade            reg = <0x0 0xfd240000 0x0 0x40000>;
153ba2bf1f0SSwapnil Jakhade            resets = <&phyrst 0>, <&phyrst 1>;
154ba2bf1f0SSwapnil Jakhade            reset-names = "sierra_reset", "sierra_apb";
155ba2bf1f0SSwapnil Jakhade            clocks = <&cmn_refclk_dig_div>, <&cmn_refclk1_dig_div>;
156ba2bf1f0SSwapnil Jakhade            clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div";
157ba2bf1f0SSwapnil Jakhade            #address-cells = <1>;
158ba2bf1f0SSwapnil Jakhade            #size-cells = <0>;
159ba2bf1f0SSwapnil Jakhade            pcie0_phy0: phy@0 {
160ba2bf1f0SSwapnil Jakhade                reg = <0>;
161ba2bf1f0SSwapnil Jakhade                resets = <&phyrst 2>;
162ba2bf1f0SSwapnil Jakhade                cdns,num-lanes = <2>;
163ba2bf1f0SSwapnil Jakhade                #phy-cells = <0>;
164ba2bf1f0SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_PCIE>;
165ba2bf1f0SSwapnil Jakhade            };
166ba2bf1f0SSwapnil Jakhade            pcie0_phy1: phy@2 {
167ba2bf1f0SSwapnil Jakhade                reg = <2>;
168ba2bf1f0SSwapnil Jakhade                resets = <&phyrst 4>;
169ba2bf1f0SSwapnil Jakhade                cdns,num-lanes = <1>;
170ba2bf1f0SSwapnil Jakhade                #phy-cells = <0>;
171ba2bf1f0SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_PCIE>;
172ba2bf1f0SSwapnil Jakhade            };
173ba2bf1f0SSwapnil Jakhade        };
174ba2bf1f0SSwapnil Jakhade    };
175