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
7title: Broadcom SATA3 PHY
8
9maintainers:
10  - Florian Fainelli <f.fainelli@gmail.com>
11
12properties:
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    maxItems: 2
39    items:
40      - const: phy
41      - const: phy-ctrl
42
43  "#address-cells":
44    const: 1
45
46  "#size-cells":
47    const: 0
48
49patternProperties:
50  "^sata-phy@[0-9]+$":
51    type: object
52    description: |
53      Each port's PHY should be represented as a sub-node.
54
55    properties:
56      reg:
57        description: The SATA PHY port number
58        maxItems: 1
59
60      "#phy-cells":
61        const: 0
62
63      "brcm,enable-ssc":
64        $ref: /schemas/types.yaml#/definitions/flag
65        description: |
66          Use spread spectrum clocking (SSC) on this port
67          This property is not applicable for "brcm,iproc-ns2-sata-phy",
68          "brcm,iproc-nsp-sata-phy" and "brcm,iproc-sr-sata-phy".
69
70      "brcm,rxaeq-mode":
71        $ref: /schemas/types.yaml#/definitions/string
72        description:
73          String that indicates the desired RX equalizer mode.
74        enum:
75          - off
76          - auto
77          - manual
78
79      "brcm,rxaeq-value":
80        $ref: /schemas/types.yaml#/definitions/uint32
81        description: |
82            When 'brcm,rxaeq-mode' is set to "manual", provides the RX
83            equalizer value that should be used.
84        minimum: 0
85        maximum: 63
86
87      "brcm,tx-amplitude-millivolt":
88        description: |
89            Transmit amplitude voltage in millivolt.
90        $ref: /schemas/types.yaml#/definitions/uint32
91        enum: [400, 500, 600, 800]
92
93    required:
94      - reg
95      - "#phy-cells"
96
97    additionalProperties: false
98
99if:
100  properties:
101    compatible:
102      const: brcm,iproc-ns2-sata-phy
103then:
104  properties:
105    reg:
106      maxItems: 2
107    reg-names:
108      items:
109        - const: "phy"
110        - const: "phy-ctrl"
111else:
112  properties:
113    reg:
114      maxItems: 1
115    reg-names:
116      maxItems: 1
117      items:
118        - const: "phy"
119
120required:
121  - compatible
122  - "#address-cells"
123  - "#size-cells"
124  - reg
125  - reg-names
126
127additionalProperties: false
128
129examples:
130  - |
131    sata_phy@f0458100 {
132        compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
133        reg = <0xf0458100 0x1e00>;
134        reg-names = "phy";
135        #address-cells = <1>;
136        #size-cells = <0>;
137
138        sata-phy@0 {
139                reg = <0>;
140                #phy-cells = <0>;
141        };
142
143        sata-phy@1 {
144                reg = <1>;
145                #phy-cells = <0>;
146        };
147    };
148