xref: /linux/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml (revision 06d07429858317ded2db7986113a9e0129cd599b)
1354c6d33SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2354c6d33SKrzysztof Kozlowski%YAML 1.2
3354c6d33SKrzysztof Kozlowski---
4354c6d33SKrzysztof Kozlowski$id: http://devicetree.org/schemas/mmc/samsung,exynos-dw-mshc.yaml#
5354c6d33SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6354c6d33SKrzysztof Kozlowski
7354c6d33SKrzysztof Kozlowskititle:
8354c6d33SKrzysztof Kozlowski  Samsung Exynos SoC specific extensions to the Synopsys Designware Mobile
9354c6d33SKrzysztof Kozlowski  Storage Host Controller
10354c6d33SKrzysztof Kozlowski
11354c6d33SKrzysztof Kozlowskimaintainers:
12354c6d33SKrzysztof Kozlowski  - Jaehoon Chung <jh80.chung@samsung.com>
13354c6d33SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
14354c6d33SKrzysztof Kozlowski
15354c6d33SKrzysztof Kozlowskiproperties:
16354c6d33SKrzysztof Kozlowski  compatible:
17*5a17f863SKrzysztof Kozlowski    oneOf:
18*5a17f863SKrzysztof Kozlowski      - enum:
19*5a17f863SKrzysztof Kozlowski          - axis,artpec8-dw-mshc
20354c6d33SKrzysztof Kozlowski          - samsung,exynos4210-dw-mshc
21354c6d33SKrzysztof Kozlowski          - samsung,exynos4412-dw-mshc
22354c6d33SKrzysztof Kozlowski          - samsung,exynos5250-dw-mshc
23354c6d33SKrzysztof Kozlowski          - samsung,exynos5420-dw-mshc
24ca812a4eSKrzysztof Kozlowski          - samsung,exynos5420-dw-mshc-smu
25354c6d33SKrzysztof Kozlowski          - samsung,exynos7-dw-mshc
26354c6d33SKrzysztof Kozlowski          - samsung,exynos7-dw-mshc-smu
27*5a17f863SKrzysztof Kozlowski      - items:
28*5a17f863SKrzysztof Kozlowski          - enum:
29*5a17f863SKrzysztof Kozlowski              - samsung,exynos5433-dw-mshc-smu
30*5a17f863SKrzysztof Kozlowski              - samsung,exynos7885-dw-mshc-smu
31*5a17f863SKrzysztof Kozlowski              - samsung,exynos850-dw-mshc-smu
32*5a17f863SKrzysztof Kozlowski          - const: samsung,exynos7-dw-mshc-smu
33354c6d33SKrzysztof Kozlowski
34354c6d33SKrzysztof Kozlowski  reg:
35354c6d33SKrzysztof Kozlowski    maxItems: 1
36354c6d33SKrzysztof Kozlowski
37354c6d33SKrzysztof Kozlowski  interrupts:
38354c6d33SKrzysztof Kozlowski    maxItems: 1
39354c6d33SKrzysztof Kozlowski
40354c6d33SKrzysztof Kozlowski  clocks:
41354c6d33SKrzysztof Kozlowski    maxItems: 2
42354c6d33SKrzysztof Kozlowski    description:
43354c6d33SKrzysztof Kozlowski      Handle to "biu" and "ciu" clocks for the
44354c6d33SKrzysztof Kozlowski      bus interface unit clock and the card interface unit clock.
45354c6d33SKrzysztof Kozlowski
46354c6d33SKrzysztof Kozlowski  clock-names:
47354c6d33SKrzysztof Kozlowski    items:
48354c6d33SKrzysztof Kozlowski      - const: biu
49354c6d33SKrzysztof Kozlowski      - const: ciu
50354c6d33SKrzysztof Kozlowski
51354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-ciu-div:
52354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32
53354c6d33SKrzysztof Kozlowski    minimum: 0
54354c6d33SKrzysztof Kozlowski    maximum: 7
55354c6d33SKrzysztof Kozlowski    description:
56354c6d33SKrzysztof Kozlowski      The divider value for the card interface unit (ciu) clock.
57354c6d33SKrzysztof Kozlowski
58354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-ddr-timing:
59354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
60354c6d33SKrzysztof Kozlowski    items:
61354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
62354c6d33SKrzysztof Kozlowski        minimum: 0
63354c6d33SKrzysztof Kozlowski        maximum: 7
64354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
65354c6d33SKrzysztof Kozlowski        minimum: 0
66354c6d33SKrzysztof Kozlowski        maximum: 7
67354c6d33SKrzysztof Kozlowski    description:
68354c6d33SKrzysztof Kozlowski      The value of CUI clock phase shift value in transmit mode and CIU clock
69354c6d33SKrzysztof Kozlowski      phase shift value in receive mode for double data rate mode operation.
70354c6d33SKrzysztof Kozlowski      See also samsung,dw-mshc-hs400-timing property.
71354c6d33SKrzysztof Kozlowski
72354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-hs400-timing:
73354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
74354c6d33SKrzysztof Kozlowski    items:
75354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
76354c6d33SKrzysztof Kozlowski        minimum: 0
77354c6d33SKrzysztof Kozlowski        maximum: 7
78354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
79354c6d33SKrzysztof Kozlowski        minimum: 0
80354c6d33SKrzysztof Kozlowski        maximum: 7
81354c6d33SKrzysztof Kozlowski    description: |
82354c6d33SKrzysztof Kozlowski      The value of CIU TX and RX clock phase shift value for HS400 mode
83354c6d33SKrzysztof Kozlowski      operation.
84354c6d33SKrzysztof Kozlowski      Valid values for SDR and DDR CIU clock timing::
85354c6d33SKrzysztof Kozlowski        - valid value for tx phase shift and rx phase shift is 0 to 7.
86354c6d33SKrzysztof Kozlowski        - when CIU clock divider value is set to 3, all possible 8 phase shift
87354c6d33SKrzysztof Kozlowski          values can be used.
88354c6d33SKrzysztof Kozlowski        - if CIU clock divider value is 0 (that is divide by 1), both tx and rx
89354c6d33SKrzysztof Kozlowski          phase shift clocks should be 0.
90354c6d33SKrzysztof Kozlowski      If missing, values from samsung,dw-mshc-ddr-timing property are used.
91354c6d33SKrzysztof Kozlowski
92354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-sdr-timing:
93354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
94354c6d33SKrzysztof Kozlowski    items:
95354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
96354c6d33SKrzysztof Kozlowski        minimum: 0
97354c6d33SKrzysztof Kozlowski        maximum: 7
98354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
99354c6d33SKrzysztof Kozlowski        minimum: 0
100354c6d33SKrzysztof Kozlowski        maximum: 7
101354c6d33SKrzysztof Kozlowski    description:
102354c6d33SKrzysztof Kozlowski      The value of CIU clock phase shift value in transmit mode and CIU clock
103354c6d33SKrzysztof Kozlowski      phase shift value in receive mode for single data rate mode operation.
104354c6d33SKrzysztof Kozlowski      See also samsung,dw-mshc-hs400-timing property.
105354c6d33SKrzysztof Kozlowski
106354c6d33SKrzysztof Kozlowski  samsung,read-strobe-delay:
107354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32
108354c6d33SKrzysztof Kozlowski    description:
109354c6d33SKrzysztof Kozlowski      RCLK (Data strobe) delay to control HS400 mode (Latency value for delay
110354c6d33SKrzysztof Kozlowski      line in Read path). If missing, default from hardware is used.
111354c6d33SKrzysztof Kozlowski
112354c6d33SKrzysztof Kozlowskirequired:
113354c6d33SKrzysztof Kozlowski  - compatible
114354c6d33SKrzysztof Kozlowski  - reg
115354c6d33SKrzysztof Kozlowski  - interrupts
116354c6d33SKrzysztof Kozlowski  - clocks
117354c6d33SKrzysztof Kozlowski  - clock-names
118354c6d33SKrzysztof Kozlowski  - samsung,dw-mshc-ddr-timing
119354c6d33SKrzysztof Kozlowski  - samsung,dw-mshc-sdr-timing
120354c6d33SKrzysztof Kozlowski
121354c6d33SKrzysztof KozlowskiallOf:
1221e52a7e6SKrzysztof Kozlowski  - $ref: synopsys-dw-mshc-common.yaml#
123354c6d33SKrzysztof Kozlowski  - if:
124354c6d33SKrzysztof Kozlowski      properties:
125354c6d33SKrzysztof Kozlowski        compatible:
126354c6d33SKrzysztof Kozlowski          contains:
127354c6d33SKrzysztof Kozlowski            enum:
128354c6d33SKrzysztof Kozlowski              - samsung,exynos5250-dw-mshc
129354c6d33SKrzysztof Kozlowski              - samsung,exynos5420-dw-mshc
130354c6d33SKrzysztof Kozlowski              - samsung,exynos7-dw-mshc
131354c6d33SKrzysztof Kozlowski              - samsung,exynos7-dw-mshc-smu
132354c6d33SKrzysztof Kozlowski              - axis,artpec8-dw-mshc
133354c6d33SKrzysztof Kozlowski    then:
134354c6d33SKrzysztof Kozlowski      required:
135354c6d33SKrzysztof Kozlowski        - samsung,dw-mshc-ciu-div
136354c6d33SKrzysztof Kozlowski
137354c6d33SKrzysztof KozlowskiunevaluatedProperties: false
138354c6d33SKrzysztof Kozlowski
139354c6d33SKrzysztof Kozlowskiexamples:
140354c6d33SKrzysztof Kozlowski  - |
141354c6d33SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos5420.h>
142354c6d33SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
143354c6d33SKrzysztof Kozlowski
144354c6d33SKrzysztof Kozlowski    mmc@12220000 {
145354c6d33SKrzysztof Kozlowski        compatible = "samsung,exynos5420-dw-mshc";
146354c6d33SKrzysztof Kozlowski        interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
147354c6d33SKrzysztof Kozlowski        #address-cells = <1>;
148354c6d33SKrzysztof Kozlowski        #size-cells = <0>;
149354c6d33SKrzysztof Kozlowski        reg = <0x12220000 0x1000>;
150354c6d33SKrzysztof Kozlowski        clocks = <&clock CLK_MMC2>, <&clock CLK_SCLK_MMC2>;
151354c6d33SKrzysztof Kozlowski        clock-names = "biu", "ciu";
152354c6d33SKrzysztof Kozlowski        fifo-depth = <0x40>;
153354c6d33SKrzysztof Kozlowski        card-detect-delay = <200>;
154354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-ciu-div = <3>;
155354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-sdr-timing = <0 4>;
156354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-ddr-timing = <0 2>;
157354c6d33SKrzysztof Kozlowski        pinctrl-names = "default";
158354c6d33SKrzysztof Kozlowski        pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_wp &sd2_bus1 &sd2_bus4>;
159354c6d33SKrzysztof Kozlowski        bus-width = <4>;
160354c6d33SKrzysztof Kozlowski        cap-sd-highspeed;
161354c6d33SKrzysztof Kozlowski        max-frequency = <200000000>;
162354c6d33SKrzysztof Kozlowski        vmmc-supply = <&ldo19_reg>;
163354c6d33SKrzysztof Kozlowski        vqmmc-supply = <&ldo13_reg>;
164354c6d33SKrzysztof Kozlowski        sd-uhs-sdr50;
165354c6d33SKrzysztof Kozlowski        sd-uhs-sdr104;
166354c6d33SKrzysztof Kozlowski        sd-uhs-ddr50;
167354c6d33SKrzysztof Kozlowski    };
168