summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/phy/phy-common-props.yaml
blob: b2c709cc1b0d2d2f6b3f72224e4f03ec7edfde6e (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
149
150
151
152
153
154
155
156
157
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/phy-common-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common PHY and network PCS properties

description:
  Common PHY and network PCS properties, such as peak-to-peak transmit
  amplitude.

maintainers:
  - Marek Behún <kabel@kernel.org>

$defs:
  protocol-names:
    description:
      Names of the PHY modes. If a value of 'default' is provided, the system
      should use it for any PHY mode that is otherwise not defined here. If
      'default' is not provided, the system should use manufacturer default value.
    minItems: 1
    maxItems: 16
    uniqueItems: true
    items:
      enum:
        - default

        # ethernet modes
        - sgmii
        - qsgmii
        - xgmii
        - 1000base-x
        - 2500base-x
        - 5gbase-r
        - rxaui
        - xaui
        - 10gbase-kr
        - usxgmii
        - 10gbase-r
        - 25gbase-r

        # PCIe modes
        - pcie
        - pcie1
        - pcie2
        - pcie3
        - pcie4
        - pcie5
        - pcie6

        # USB modes
        - usb
        - usb-ls
        - usb-fs
        - usb-hs
        - usb-ss
        - usb-ss+
        - usb-4

        # storage modes
        - sata
        - ufs-hs
        - ufs-hs-a
        - ufs-hs-b

        # display modes
        - lvds
        - dp
        - dp-rbr
        - dp-hbr
        - dp-hbr2
        - dp-hbr3
        - dp-uhbr-10
        - dp-uhbr-13.5
        - dp-uhbr-20

        # camera modes
        - mipi-dphy
        - mipi-dphy-univ
        - mipi-dphy-v2.5-univ

properties:
  tx-p2p-microvolt:
    description:
      Transmit amplitude voltages in microvolts, peak-to-peak. If this property
      contains multiple values for various PHY modes, the
      'tx-p2p-microvolt-names' property must be provided and contain
      corresponding mode names.

  tx-p2p-microvolt-names:
    description:
      Names of the modes corresponding to voltages in the 'tx-p2p-microvolt'
      property. Required only if multiple voltages are provided.
    $ref: "#/$defs/protocol-names"

  rx-polarity:
    description:
      An array of values indicating whether the differential receiver's
      polarity is inverted. Each value can be one of
      PHY_POL_NORMAL (0) which means the negative signal is decoded from the
      RXN input, and the positive signal from the RXP input;
      PHY_POL_INVERT (1) which means the negative signal is decoded from the
      RXP input, and the positive signal from the RXN input;
      PHY_POL_AUTO (2) which means the receiver performs automatic polarity
      detection and correction, which is a mandatory part of link training for
      some protocols (PCIe, USB SS).

      The values are defined in <dt-bindings/phy/phy.h>. If the property is
      absent, the default value is undefined.

      Note that the RXP and RXN inputs refer to the block that this property is
      under, and do not necessarily directly translate to external pins.

      If this property contains multiple values for various protocols, the
      'rx-polarity-names' property must be provided.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 16
    items:
      enum: [0, 1, 2]

  rx-polarity-names:
    $ref: '#/$defs/protocol-names'

  tx-polarity:
    description:
      Like 'rx-polarity', except it applies to differential transmitters,
      and only the values of PHY_POL_NORMAL and PHY_POL_INVERT are possible.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 16
    items:
      enum: [0, 1]

  tx-polarity-names:
    $ref: '#/$defs/protocol-names'

dependencies:
  tx-p2p-microvolt-names: [ tx-p2p-microvolt ]
  rx-polarity-names: [ rx-polarity ]
  tx-polarity-names: [ tx-polarity ]

additionalProperties: true

examples:
  - |
    #include <dt-bindings/phy/phy.h>

    phy: phy {
      #phy-cells = <1>;
      tx-p2p-microvolt = <915000>, <1100000>, <1200000>;
      tx-p2p-microvolt-names = "2500base-x", "usb-hs", "usb-ss";
      rx-polarity = <PHY_POL_AUTO>, <PHY_POL_NORMAL>;
      rx-polarity-names = "usb-ss", "default";
      tx-polarity = <PHY_POL_INVERT>;
    };