summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/ufs/ufs-common.yaml
blob: cc32e1189d508a418daefb9bc9e1be756b8fd88e (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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/ufs/ufs-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common properties for Universal Flash Storage (UFS) Host Controllers

maintainers:
  - Alim Akhtar <alim.akhtar@samsung.com>
  - Avri Altman <avri.altman@wdc.com>

properties:
  clocks: true

  clock-names: true

  freq-table-hz:
    items:
      items:
        - description: Minimum frequency for given clock in Hz
        - description: Maximum frequency for given clock in Hz
    deprecated: true
    description: |
      Preferred is operating-points-v2.

      Array of <min max> operating frequencies in Hz stored in the same order
      as the clocks property. If either this property or operating-points-v2 is
      not defined or a value in the array is "0" then it is assumed that the
      frequency is set by the parent clock or a fixed rate clock source.

  operating-points-v2:
    description:
      Preferred over freq-table-hz.
      If present, each OPP must contain array of frequencies stored in the same
      order for each clock.  If clock frequency in the array is "0" then it is
      assumed that the frequency is set by the parent clock or a fixed rate
      clock source.

  opp-table:
    type: object

  interrupts:
    maxItems: 1

  lanes-per-direction:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2]
    default: 2
    description:
      Number of lanes available per direction.  Note that it is assumed that
      the same number of lanes are used in both directions at once.

  vdd-hba-supply:
    description:
      Phandle to UFS host controller supply regulator node.

  vcc-supply:
    description:
      Phandle to VCC supply regulator node.

  vccq-supply:
    description:
      Phandle to VCCQ supply regulator node.

  vccq2-supply:
    description:
      Phandle to VCCQ2 supply regulator node.

  vcc-supply-1p8:
    type: boolean
    description:
      For embedded UFS devices, valid VCC range is 1.7-1.95V or 2.7-3.6V. This
      boolean property when set, specifies to use low voltage range of
      1.7-1.95V. Note for external UFS cards this property is invalid and valid
      VCC range is always 2.7-3.6V.

  vcc-max-microamp:
    description:
      Specifies max. load that can be drawn from VCC supply.

  vccq-max-microamp:
    description:
      Specifies max. load that can be drawn from VCCQ supply.

  vccq2-max-microamp:
    description:
      Specifies max. load that can be drawn from VCCQ2 supply.

  msi-parent: true

  limit-hs-gear:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 1
    maximum: 6
    default: 6
    description:
      Restricts the maximum HS gear used in both TX and RX directions.

  limit-gear-rate:
    $ref: /schemas/types.yaml#/definitions/string
    enum: [rate-a, rate-b]
    default: rate-b
    description:
      Restricts the UFS controller to rate-a or rate-b for both TX and
      RX directions.

  tx-precode-enable-g6:
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    minItems: 1
    items:
      - items:
          - description: Host_Lane0 precode
            enum: [0, 1]
          - description: Device_Lane0 precode
            enum: [0, 1]
      - items:
          - description: Host_Lane1 precode
            enum: [0, 1]
          - description: Device_Lane1 precode
            enum: [0, 1]
    description:
      Static TX Precode enable values for HS-G6 only.

patternProperties:
  "^txeq-preshoot-g[1-6]$":
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    minItems: 1
    items:
      - items:
          - description: Host_Lane0 Preshoot value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
          - description: Device_Lane0 Preshoot value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
      - items:
          - description: Host_Lane1 Preshoot value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
          - description: Device_Lane1 Preshoot value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
    description: |
      Static TX Equalization PreShoot settings for High Speed Gears. These
      values are programmed to the corresponding UniPro PA layer attribute
      PA_TxEQG[1-6]Setting. Each value selects a Pre-Shoot level as defined
      by the MIPI M-PHY specification (TX_HS_PreShoot_Setting).

  "^txeq-deemphasis-g[1-6]$":
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    minItems: 1
    items:
      - items:
          - description: Host_Lane0 DeEmphasis value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
          - description: Device_Lane0 DeEmphasis value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
      - items:
          - description: Host_Lane1 DeEmphasis value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
          - description: Device_Lane1 DeEmphasis value
            enum: [0, 1, 2, 3, 4, 5, 6, 7]
    description: |
      Static TX Equalization DeEmphasis settings for High Speed Gears. These
      values are programmed to the corresponding UniPro PA layer attribute
      PA_TxEQG[1-6]Setting. Each value selects a De-Emphasis level as defined
      by the MIPI M-PHY specification (TX_HS_DeEmphasis_Setting).

dependencies:
  freq-table-hz: [ clocks ]
  operating-points-v2: [ clocks, clock-names ]

required:
  - interrupts

allOf:
  - if:
      required:
        - freq-table-hz
    then:
      properties:
        operating-points-v2: false
  - if:
      required:
        - operating-points-v2
    then:
      properties:
        freq-table-hz: false

additionalProperties: true