xref: /linux/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml (revision 2bf717b07969b6d9e9ba5bccd3ac778e9aeaab18)
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:
175a17f863SKrzysztof Kozlowski    oneOf:
185a17f863SKrzysztof Kozlowski      - enum:
195a17f863SKrzysztof 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
275a17f863SKrzysztof Kozlowski      - items:
285a17f863SKrzysztof Kozlowski          - enum:
295a17f863SKrzysztof Kozlowski              - samsung,exynos5433-dw-mshc-smu
305a17f863SKrzysztof Kozlowski              - samsung,exynos7885-dw-mshc-smu
315a17f863SKrzysztof Kozlowski              - samsung,exynos850-dw-mshc-smu
32*285035a8SIvaylo Ivanov              - samsung,exynos8895-dw-mshc-smu
335a17f863SKrzysztof Kozlowski          - const: samsung,exynos7-dw-mshc-smu
34354c6d33SKrzysztof Kozlowski
35354c6d33SKrzysztof Kozlowski  reg:
36354c6d33SKrzysztof Kozlowski    maxItems: 1
37354c6d33SKrzysztof Kozlowski
38354c6d33SKrzysztof Kozlowski  interrupts:
39354c6d33SKrzysztof Kozlowski    maxItems: 1
40354c6d33SKrzysztof Kozlowski
41354c6d33SKrzysztof Kozlowski  clocks:
42354c6d33SKrzysztof Kozlowski    maxItems: 2
43354c6d33SKrzysztof Kozlowski    description:
44354c6d33SKrzysztof Kozlowski      Handle to "biu" and "ciu" clocks for the
45354c6d33SKrzysztof Kozlowski      bus interface unit clock and the card interface unit clock.
46354c6d33SKrzysztof Kozlowski
47354c6d33SKrzysztof Kozlowski  clock-names:
48354c6d33SKrzysztof Kozlowski    items:
49354c6d33SKrzysztof Kozlowski      - const: biu
50354c6d33SKrzysztof Kozlowski      - const: ciu
51354c6d33SKrzysztof Kozlowski
52354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-ciu-div:
53354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32
54354c6d33SKrzysztof Kozlowski    minimum: 0
55354c6d33SKrzysztof Kozlowski    maximum: 7
56354c6d33SKrzysztof Kozlowski    description:
57354c6d33SKrzysztof Kozlowski      The divider value for the card interface unit (ciu) clock.
58354c6d33SKrzysztof Kozlowski
59354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-ddr-timing:
60354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
61354c6d33SKrzysztof Kozlowski    items:
62354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
63354c6d33SKrzysztof Kozlowski        minimum: 0
64354c6d33SKrzysztof Kozlowski        maximum: 7
65354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
66354c6d33SKrzysztof Kozlowski        minimum: 0
67354c6d33SKrzysztof Kozlowski        maximum: 7
68354c6d33SKrzysztof Kozlowski    description:
69354c6d33SKrzysztof Kozlowski      The value of CUI clock phase shift value in transmit mode and CIU clock
70354c6d33SKrzysztof Kozlowski      phase shift value in receive mode for double data rate mode operation.
71354c6d33SKrzysztof Kozlowski      See also samsung,dw-mshc-hs400-timing property.
72354c6d33SKrzysztof Kozlowski
73354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-hs400-timing:
74354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
75354c6d33SKrzysztof Kozlowski    items:
76354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
77354c6d33SKrzysztof Kozlowski        minimum: 0
78354c6d33SKrzysztof Kozlowski        maximum: 7
79354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
80354c6d33SKrzysztof Kozlowski        minimum: 0
81354c6d33SKrzysztof Kozlowski        maximum: 7
82354c6d33SKrzysztof Kozlowski    description: |
83354c6d33SKrzysztof Kozlowski      The value of CIU TX and RX clock phase shift value for HS400 mode
84354c6d33SKrzysztof Kozlowski      operation.
85354c6d33SKrzysztof Kozlowski      Valid values for SDR and DDR CIU clock timing::
86354c6d33SKrzysztof Kozlowski        - valid value for tx phase shift and rx phase shift is 0 to 7.
87354c6d33SKrzysztof Kozlowski        - when CIU clock divider value is set to 3, all possible 8 phase shift
88354c6d33SKrzysztof Kozlowski          values can be used.
89354c6d33SKrzysztof Kozlowski        - if CIU clock divider value is 0 (that is divide by 1), both tx and rx
90354c6d33SKrzysztof Kozlowski          phase shift clocks should be 0.
91354c6d33SKrzysztof Kozlowski      If missing, values from samsung,dw-mshc-ddr-timing property are used.
92354c6d33SKrzysztof Kozlowski
93354c6d33SKrzysztof Kozlowski  samsung,dw-mshc-sdr-timing:
94354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32-array
95354c6d33SKrzysztof Kozlowski    items:
96354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for tx mode
97354c6d33SKrzysztof Kozlowski        minimum: 0
98354c6d33SKrzysztof Kozlowski        maximum: 7
99354c6d33SKrzysztof Kozlowski      - description: CIU clock phase shift value for rx mode
100354c6d33SKrzysztof Kozlowski        minimum: 0
101354c6d33SKrzysztof Kozlowski        maximum: 7
102354c6d33SKrzysztof Kozlowski    description:
103354c6d33SKrzysztof Kozlowski      The value of CIU clock phase shift value in transmit mode and CIU clock
104354c6d33SKrzysztof Kozlowski      phase shift value in receive mode for single data rate mode operation.
105354c6d33SKrzysztof Kozlowski      See also samsung,dw-mshc-hs400-timing property.
106354c6d33SKrzysztof Kozlowski
107354c6d33SKrzysztof Kozlowski  samsung,read-strobe-delay:
108354c6d33SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32
109354c6d33SKrzysztof Kozlowski    description:
110354c6d33SKrzysztof Kozlowski      RCLK (Data strobe) delay to control HS400 mode (Latency value for delay
111354c6d33SKrzysztof Kozlowski      line in Read path). If missing, default from hardware is used.
112354c6d33SKrzysztof Kozlowski
113354c6d33SKrzysztof Kozlowskirequired:
114354c6d33SKrzysztof Kozlowski  - compatible
115354c6d33SKrzysztof Kozlowski  - reg
116354c6d33SKrzysztof Kozlowski  - interrupts
117354c6d33SKrzysztof Kozlowski  - clocks
118354c6d33SKrzysztof Kozlowski  - clock-names
119354c6d33SKrzysztof Kozlowski  - samsung,dw-mshc-ddr-timing
120354c6d33SKrzysztof Kozlowski  - samsung,dw-mshc-sdr-timing
121354c6d33SKrzysztof Kozlowski
122354c6d33SKrzysztof KozlowskiallOf:
1231e52a7e6SKrzysztof Kozlowski  - $ref: synopsys-dw-mshc-common.yaml#
124354c6d33SKrzysztof Kozlowski  - if:
125354c6d33SKrzysztof Kozlowski      properties:
126354c6d33SKrzysztof Kozlowski        compatible:
127354c6d33SKrzysztof Kozlowski          contains:
128354c6d33SKrzysztof Kozlowski            enum:
129354c6d33SKrzysztof Kozlowski              - samsung,exynos5250-dw-mshc
130354c6d33SKrzysztof Kozlowski              - samsung,exynos5420-dw-mshc
131354c6d33SKrzysztof Kozlowski              - samsung,exynos7-dw-mshc
132354c6d33SKrzysztof Kozlowski              - samsung,exynos7-dw-mshc-smu
133354c6d33SKrzysztof Kozlowski              - axis,artpec8-dw-mshc
134354c6d33SKrzysztof Kozlowski    then:
135354c6d33SKrzysztof Kozlowski      required:
136354c6d33SKrzysztof Kozlowski        - samsung,dw-mshc-ciu-div
137354c6d33SKrzysztof Kozlowski
138354c6d33SKrzysztof KozlowskiunevaluatedProperties: false
139354c6d33SKrzysztof Kozlowski
140354c6d33SKrzysztof Kozlowskiexamples:
141354c6d33SKrzysztof Kozlowski  - |
142354c6d33SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos5420.h>
143354c6d33SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
144354c6d33SKrzysztof Kozlowski
145354c6d33SKrzysztof Kozlowski    mmc@12220000 {
146354c6d33SKrzysztof Kozlowski        compatible = "samsung,exynos5420-dw-mshc";
147354c6d33SKrzysztof Kozlowski        interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
148354c6d33SKrzysztof Kozlowski        #address-cells = <1>;
149354c6d33SKrzysztof Kozlowski        #size-cells = <0>;
150354c6d33SKrzysztof Kozlowski        reg = <0x12220000 0x1000>;
151354c6d33SKrzysztof Kozlowski        clocks = <&clock CLK_MMC2>, <&clock CLK_SCLK_MMC2>;
152354c6d33SKrzysztof Kozlowski        clock-names = "biu", "ciu";
153354c6d33SKrzysztof Kozlowski        fifo-depth = <0x40>;
154354c6d33SKrzysztof Kozlowski        card-detect-delay = <200>;
155354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-ciu-div = <3>;
156354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-sdr-timing = <0 4>;
157354c6d33SKrzysztof Kozlowski        samsung,dw-mshc-ddr-timing = <0 2>;
158354c6d33SKrzysztof Kozlowski        pinctrl-names = "default";
159354c6d33SKrzysztof Kozlowski        pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_wp &sd2_bus1 &sd2_bus4>;
160354c6d33SKrzysztof Kozlowski        bus-width = <4>;
161354c6d33SKrzysztof Kozlowski        cap-sd-highspeed;
162354c6d33SKrzysztof Kozlowski        max-frequency = <200000000>;
163354c6d33SKrzysztof Kozlowski        vmmc-supply = <&ldo19_reg>;
164354c6d33SKrzysztof Kozlowski        vqmmc-supply = <&ldo13_reg>;
165354c6d33SKrzysztof Kozlowski        sd-uhs-sdr50;
166354c6d33SKrzysztof Kozlowski        sd-uhs-sdr104;
167354c6d33SKrzysztof Kozlowski        sd-uhs-ddr50;
168354c6d33SKrzysztof Kozlowski    };
169