1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mmc/fsl-imx-esdhc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale Enhanced Secure Digital Host Controller (eSDHC) for i.MX
8
9maintainers:
10  - Shawn Guo <shawnguo@kernel.org>
11
12allOf:
13  - $ref: "mmc-controller.yaml"
14
15description: |
16  The Enhanced Secure Digital Host Controller on Freescale i.MX family
17  provides an interface for MMC, SD, and SDIO types of memory cards.
18
19  This file documents differences between the core properties described
20  by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
21
22properties:
23  compatible:
24    oneOf:
25      - enum:
26          - fsl,imx25-esdhc
27          - fsl,imx35-esdhc
28          - fsl,imx51-esdhc
29          - fsl,imx53-esdhc
30          - fsl,imx6q-usdhc
31          - fsl,imx6sl-usdhc
32          - fsl,imx6sll-usdhc
33          - fsl,imx6sx-usdhc
34          - fsl,imx6ull-usdhc
35          - fsl,imx7d-usdhc
36          - fsl,imx7ulp-usdhc
37          - nxp,s32g2-usdhc
38      - items:
39          - enum:
40              - fsl,imx8mm-usdhc
41              - fsl,imx8mn-usdhc
42              - fsl,imx8mp-usdhc
43              - fsl,imx8mq-usdhc
44              - fsl,imx8qm-usdhc
45              - fsl,imx8qxp-usdhc
46          - const: fsl,imx7d-usdhc
47
48  reg:
49    maxItems: 1
50
51  interrupts:
52    maxItems: 1
53
54  fsl,wp-controller:
55    description: |
56      boolean, if present, indicate to use controller internal write protection.
57    type: boolean
58
59  fsl,delay-line:
60    $ref: /schemas/types.yaml#/definitions/uint32
61    description: |
62      Specify the number of delay cells for override mode.
63      This is used to set the clock delay for DLL(Delay Line) on override mode
64      to select a proper data sampling window in case the clock quality is not good
65      due to signal path is too long on the board. Please refer to eSDHC/uSDHC
66      chapter, DLL (Delay Line) section in RM for details.
67    default: 0
68
69  voltage-ranges:
70    $ref: '/schemas/types.yaml#/definitions/uint32-matrix'
71    description: |
72      Specify the voltage range in case there are software transparent level
73      shifters on the outputs of the controller. Two cells are required, first
74      cell specifies minimum slot voltage (mV), second cell specifies maximum
75      slot voltage (mV).
76    items:
77      items:
78        - description: value for minimum slot voltage
79        - description: value for maximum slot voltage
80    maxItems: 1
81
82  fsl,tuning-start-tap:
83    $ref: /schemas/types.yaml#/definitions/uint32
84    description: |
85      Specify the start delay cell point when send first CMD19 in tuning procedure.
86    default: 0
87
88  fsl,tuning-step:
89    $ref: /schemas/types.yaml#/definitions/uint32
90    description: |
91      Specify the increasing delay cell steps in tuning procedure.
92      The uSDHC use one delay cell as default increasing step to do tuning process.
93      This property allows user to change the tuning step to more than one delay
94      cells which is useful for some special boards or cards when the default
95      tuning step can't find the proper delay window within limited tuning retries.
96    default: 0
97
98  fsl,strobe-dll-delay-target:
99    $ref: /schemas/types.yaml#/definitions/uint32
100    description: |
101      Specify the strobe dll control slave delay target.
102      This delay target programming host controller loopback read clock, and this
103      property allows user to change the delay target for the strobe input read clock.
104      If not use this property, driver default set the delay target to value 7.
105      Only eMMC HS400 mode need to take care of this property.
106    default: 0
107
108  clocks:
109    maxItems: 3
110    description:
111      Handle clocks for the sdhc controller.
112
113  clock-names:
114    items:
115      - const: ipg
116      - const: ahb
117      - const: per
118
119  pinctrl-names:
120    oneOf:
121      - minItems: 3
122        items:
123          - const: default
124          - const: state_100mhz
125          - const: state_200mhz
126          - const: sleep
127      - minItems: 1
128        items:
129          - const: default
130          - const: sleep
131
132required:
133  - compatible
134  - reg
135  - interrupts
136
137unevaluatedProperties: false
138
139examples:
140  - |
141    mmc@70004000 {
142        compatible = "fsl,imx51-esdhc";
143        reg = <0x70004000 0x4000>;
144        interrupts = <1>;
145        fsl,wp-controller;
146    };
147
148    mmc@70008000 {
149        compatible = "fsl,imx51-esdhc";
150        reg = <0x70008000 0x4000>;
151        interrupts = <2>;
152        cd-gpios = <&gpio1 6 0>; /* GPIO1_6 */
153        wp-gpios = <&gpio1 5 0>; /* GPIO1_5 */
154    };
155