summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
blob: 58c3ef8004ad83d0b3d6f70b61730681344ccfe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/phy/brcm,sata-phy.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Broadcom SATA3 PHY

maintainers:
  - Florian Fainelli <f.fainelli@gmail.com>

properties:
  $nodename:
    pattern: "^sata[-|_]phy(@.*)?$"

  compatible:
    oneOf:
      - items:
          - enum:
              - brcm,bcm7216-sata-phy
              - brcm,bcm7425-sata-phy
              - brcm,bcm7445-sata-phy
              - brcm,bcm63138-sata-phy
          - const: brcm,phy-sata3
      - items:
          - const: brcm,iproc-nsp-sata-phy
      - items:
          - const: brcm,iproc-ns2-sata-phy
      - items:
          - const: brcm,iproc-sr-sata-phy

  reg:
    minItems: 1
    maxItems: 2

  reg-names:
    minItems: 1
    maxItems: 2
    items:
      - const: phy
      - const: phy-ctrl

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^sata-phy@[0-9]+$":
    type: object
    description: |
      Each port's PHY should be represented as a sub-node.

    properties:
      reg:
        description: The SATA PHY port number
        maxItems: 1

      "#phy-cells":
        const: 0

      "brcm,enable-ssc":
        $ref: /schemas/types.yaml#/definitions/flag
        description: |
          Use spread spectrum clocking (SSC) on this port
          This property is not applicable for "brcm,iproc-ns2-sata-phy",
          "brcm,iproc-nsp-sata-phy" and "brcm,iproc-sr-sata-phy".

      "brcm,rxaeq-mode":
        $ref: /schemas/types.yaml#/definitions/string
        description:
          String that indicates the desired RX equalizer mode.
        enum:
          - off
          - auto
          - manual

      "brcm,rxaeq-value":
        $ref: /schemas/types.yaml#/definitions/uint32
        description: |
            When 'brcm,rxaeq-mode' is set to "manual", provides the RX
            equalizer value that should be used.
        minimum: 0
        maximum: 63

      "brcm,tx-amplitude-millivolt":
        description: |
            Transmit amplitude voltage in millivolt.
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [400, 500, 600, 800]

    required:
      - reg
      - "#phy-cells"

    additionalProperties: false

if:
  properties:
    compatible:
      items:
        const: brcm,iproc-ns2-sata-phy
then:
  properties:
    reg:
      maxItems: 2
    reg-names:
      items:
        - const: "phy"
        - const: "phy-ctrl"
else:
  properties:
    reg:
      maxItems: 1
    reg-names:
      maxItems: 1
      items:
        - const: "phy"

required:
  - compatible
  - "#address-cells"
  - "#size-cells"
  - reg
  - reg-names

additionalProperties: false

examples:
  - |
    sata_phy@f0458100 {
        compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
        reg = <0xf0458100 0x1e00>;
        reg-names = "phy";
        #address-cells = <1>;
        #size-cells = <0>;

        sata-phy@0 {
                reg = <0>;
                #phy-cells = <0>;
        };

        sata-phy@1 {
                reg = <1>;
                #phy-cells = <0>;
        };
    };