xref: /linux/Documentation/devicetree/bindings/ufs/ufs-common.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/ufs/ufs-common.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Common properties for Universal Flash Storage (UFS) Host Controllers
8
9maintainers:
10  - Alim Akhtar <alim.akhtar@samsung.com>
11  - Avri Altman <avri.altman@wdc.com>
12
13properties:
14  clocks: true
15
16  clock-names: true
17
18  freq-table-hz:
19    items:
20      items:
21        - description: Minimum frequency for given clock in Hz
22        - description: Maximum frequency for given clock in Hz
23    deprecated: true
24    description: |
25      Preferred is operating-points-v2.
26
27      Array of <min max> operating frequencies in Hz stored in the same order
28      as the clocks property. If either this property or operating-points-v2 is
29      not defined or a value in the array is "0" then it is assumed that the
30      frequency is set by the parent clock or a fixed rate clock source.
31
32  operating-points-v2:
33    description:
34      Preferred over freq-table-hz.
35      If present, each OPP must contain array of frequencies stored in the same
36      order for each clock.  If clock frequency in the array is "0" then it is
37      assumed that the frequency is set by the parent clock or a fixed rate
38      clock source.
39
40  opp-table:
41    type: object
42
43  interrupts:
44    maxItems: 1
45
46  lanes-per-direction:
47    $ref: /schemas/types.yaml#/definitions/uint32
48    enum: [1, 2]
49    default: 2
50    description:
51      Number of lanes available per direction.  Note that it is assumed that
52      the same number of lanes are used in both directions at once.
53
54  vdd-hba-supply:
55    description:
56      Phandle to UFS host controller supply regulator node.
57
58  vcc-supply:
59    description:
60      Phandle to VCC supply regulator node.
61
62  vccq-supply:
63    description:
64      Phandle to VCCQ supply regulator node.
65
66  vccq2-supply:
67    description:
68      Phandle to VCCQ2 supply regulator node.
69
70  vcc-supply-1p8:
71    type: boolean
72    description:
73      For embedded UFS devices, valid VCC range is 1.7-1.95V or 2.7-3.6V. This
74      boolean property when set, specifies to use low voltage range of
75      1.7-1.95V. Note for external UFS cards this property is invalid and valid
76      VCC range is always 2.7-3.6V.
77
78  vcc-max-microamp:
79    description:
80      Specifies max. load that can be drawn from VCC supply.
81
82  vccq-max-microamp:
83    description:
84      Specifies max. load that can be drawn from VCCQ supply.
85
86  vccq2-max-microamp:
87    description:
88      Specifies max. load that can be drawn from VCCQ2 supply.
89
90  msi-parent: true
91
92  limit-hs-gear:
93    $ref: /schemas/types.yaml#/definitions/uint32
94    minimum: 1
95    maximum: 6
96    default: 6
97    description:
98      Restricts the maximum HS gear used in both TX and RX directions.
99
100  limit-gear-rate:
101    $ref: /schemas/types.yaml#/definitions/string
102    enum: [rate-a, rate-b]
103    default: rate-b
104    description:
105      Restricts the UFS controller to rate-a or rate-b for both TX and
106      RX directions.
107
108  tx-precode-enable-g6:
109    $ref: /schemas/types.yaml#/definitions/uint32-matrix
110    minItems: 1
111    items:
112      - items:
113          - description: Host_Lane0 precode
114            enum: [0, 1]
115          - description: Device_Lane0 precode
116            enum: [0, 1]
117      - items:
118          - description: Host_Lane1 precode
119            enum: [0, 1]
120          - description: Device_Lane1 precode
121            enum: [0, 1]
122    description:
123      Static TX Precode enable values for HS-G6 only.
124
125patternProperties:
126  "^txeq-preshoot-g[1-6]$":
127    $ref: /schemas/types.yaml#/definitions/uint32-matrix
128    minItems: 1
129    items:
130      - items:
131          - description: Host_Lane0 Preshoot value
132            enum: [0, 1, 2, 3, 4, 5, 6, 7]
133          - description: Device_Lane0 Preshoot value
134            enum: [0, 1, 2, 3, 4, 5, 6, 7]
135      - items:
136          - description: Host_Lane1 Preshoot value
137            enum: [0, 1, 2, 3, 4, 5, 6, 7]
138          - description: Device_Lane1 Preshoot value
139            enum: [0, 1, 2, 3, 4, 5, 6, 7]
140    description: |
141      Static TX Equalization PreShoot settings for High Speed Gears. These
142      values are programmed to the corresponding UniPro PA layer attribute
143      PA_TxEQG[1-6]Setting. Each value selects a Pre-Shoot level as defined
144      by the MIPI M-PHY specification (TX_HS_PreShoot_Setting).
145
146  "^txeq-deemphasis-g[1-6]$":
147    $ref: /schemas/types.yaml#/definitions/uint32-matrix
148    minItems: 1
149    items:
150      - items:
151          - description: Host_Lane0 DeEmphasis value
152            enum: [0, 1, 2, 3, 4, 5, 6, 7]
153          - description: Device_Lane0 DeEmphasis value
154            enum: [0, 1, 2, 3, 4, 5, 6, 7]
155      - items:
156          - description: Host_Lane1 DeEmphasis value
157            enum: [0, 1, 2, 3, 4, 5, 6, 7]
158          - description: Device_Lane1 DeEmphasis value
159            enum: [0, 1, 2, 3, 4, 5, 6, 7]
160    description: |
161      Static TX Equalization DeEmphasis settings for High Speed Gears. These
162      values are programmed to the corresponding UniPro PA layer attribute
163      PA_TxEQG[1-6]Setting. Each value selects a De-Emphasis level as defined
164      by the MIPI M-PHY specification (TX_HS_DeEmphasis_Setting).
165
166dependencies:
167  freq-table-hz: [ clocks ]
168  operating-points-v2: [ clocks, clock-names ]
169
170required:
171  - interrupts
172
173allOf:
174  - if:
175      required:
176        - freq-table-hz
177    then:
178      properties:
179        operating-points-v2: false
180  - if:
181      required:
182        - operating-points-v2
183    then:
184      properties:
185        freq-table-hz: false
186
187additionalProperties: true
188