Merge commit '81fd23e2b3ccf71c807e671444e8accaba98ca53' of https://git.pengutronix...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / phy / brcm,sata-phy.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: "http://devicetree.org/schemas/phy/brcm,sata-phy.yaml#"
5 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7 title: Broadcom SATA3 PHY
8
9 maintainers:
10   - Florian Fainelli <f.fainelli@gmail.com>
11
12 properties:
13   $nodename:
14     pattern: "^sata[-|_]phy(@.*)?$"
15
16   compatible:
17     oneOf:
18       - items:
19           - enum:
20               - brcm,bcm7216-sata-phy
21               - brcm,bcm7425-sata-phy
22               - brcm,bcm7445-sata-phy
23               - brcm,bcm63138-sata-phy
24           - const: brcm,phy-sata3
25       - items:
26           - const: brcm,iproc-nsp-sata-phy
27       - items:
28           - const: brcm,iproc-ns2-sata-phy
29       - items:
30           - const: brcm,iproc-sr-sata-phy
31
32   reg:
33     minItems: 1
34     maxItems: 2
35
36   reg-names:
37     minItems: 1
38     items:
39       - const: phy
40       - const: phy-ctrl
41
42   "#address-cells":
43     const: 1
44
45   "#size-cells":
46     const: 0
47
48 patternProperties:
49   "^sata-phy@[0-9]+$":
50     type: object
51     description: |
52       Each port's PHY should be represented as a sub-node.
53
54     properties:
55       reg:
56         description: The SATA PHY port number
57         maxItems: 1
58
59       "#phy-cells":
60         const: 0
61
62       "brcm,enable-ssc":
63         $ref: /schemas/types.yaml#/definitions/flag
64         description: |
65           Use spread spectrum clocking (SSC) on this port
66           This property is not applicable for "brcm,iproc-ns2-sata-phy",
67           "brcm,iproc-nsp-sata-phy" and "brcm,iproc-sr-sata-phy".
68
69       "brcm,rxaeq-mode":
70         $ref: /schemas/types.yaml#/definitions/string
71         description:
72           String that indicates the desired RX equalizer mode.
73         enum:
74           - off
75           - auto
76           - manual
77
78       "brcm,rxaeq-value":
79         $ref: /schemas/types.yaml#/definitions/uint32
80         description: |
81             When 'brcm,rxaeq-mode' is set to "manual", provides the RX
82             equalizer value that should be used.
83         minimum: 0
84         maximum: 63
85
86       "brcm,tx-amplitude-millivolt":
87         description: |
88             Transmit amplitude voltage in millivolt.
89         $ref: /schemas/types.yaml#/definitions/uint32
90         enum: [400, 500, 600, 800]
91
92     required:
93       - reg
94       - "#phy-cells"
95
96     additionalProperties: false
97
98 if:
99   properties:
100     compatible:
101       const: brcm,iproc-ns2-sata-phy
102 then:
103   properties:
104     reg:
105       maxItems: 2
106     reg-names:
107       items:
108         - const: "phy"
109         - const: "phy-ctrl"
110 else:
111   properties:
112     reg:
113       maxItems: 1
114     reg-names:
115       maxItems: 1
116       items:
117         - const: "phy"
118
119 required:
120   - compatible
121   - "#address-cells"
122   - "#size-cells"
123   - reg
124   - reg-names
125
126 additionalProperties: false
127
128 examples:
129   - |
130     sata_phy@f0458100 {
131         compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
132         reg = <0xf0458100 0x1e00>;
133         reg-names = "phy";
134         #address-cells = <1>;
135         #size-cells = <0>;
136
137         sata-phy@0 {
138                 reg = <0>;
139                 #phy-cells = <0>;
140         };
141
142         sata-phy@1 {
143                 reg = <1>;
144                 #phy-cells = <0>;
145         };
146     };