1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Rockchip designware mobile storage host controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotdescription:
10c66ec88fSEmmanuel Vadot  Rockchip uses the Synopsys designware mobile storage host controller
11c66ec88fSEmmanuel Vadot  to interface a SoC with storage medium such as eMMC or SD/MMC cards.
12c66ec88fSEmmanuel Vadot  This file documents the combined properties for the core Synopsys dw mshc
13c66ec88fSEmmanuel Vadot  controller that are not already included in the synopsys-dw-mshc-common.yaml
14c66ec88fSEmmanuel Vadot  file and the Rockchip specific extensions.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel VadotallOf:
17*cb7aa33aSEmmanuel Vadot  - $ref: synopsys-dw-mshc-common.yaml#
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadotmaintainers:
20c66ec88fSEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot# Everything else is described in the common file
23c66ec88fSEmmanuel Vadotproperties:
24c66ec88fSEmmanuel Vadot  compatible:
25c66ec88fSEmmanuel Vadot    oneOf:
26c66ec88fSEmmanuel Vadot      # for Rockchip RK2928 and before RK3288
27c66ec88fSEmmanuel Vadot      - const: rockchip,rk2928-dw-mshc
28c66ec88fSEmmanuel Vadot      # for Rockchip RK3288
29c66ec88fSEmmanuel Vadot      - const: rockchip,rk3288-dw-mshc
30c66ec88fSEmmanuel Vadot      - items:
31c66ec88fSEmmanuel Vadot          - enum:
32c66ec88fSEmmanuel Vadot              - rockchip,px30-dw-mshc
335956d97fSEmmanuel Vadot              - rockchip,rk1808-dw-mshc
34c66ec88fSEmmanuel Vadot              - rockchip,rk3036-dw-mshc
357ef62cebSEmmanuel Vadot              - rockchip,rk3128-dw-mshc
36c66ec88fSEmmanuel Vadot              - rockchip,rk3228-dw-mshc
37c66ec88fSEmmanuel Vadot              - rockchip,rk3308-dw-mshc
38c66ec88fSEmmanuel Vadot              - rockchip,rk3328-dw-mshc
39c66ec88fSEmmanuel Vadot              - rockchip,rk3368-dw-mshc
40c66ec88fSEmmanuel Vadot              - rockchip,rk3399-dw-mshc
415956d97fSEmmanuel Vadot              - rockchip,rk3568-dw-mshc
42*cb7aa33aSEmmanuel Vadot              - rockchip,rk3588-dw-mshc
43c66ec88fSEmmanuel Vadot              - rockchip,rv1108-dw-mshc
44b97ee269SEmmanuel Vadot              - rockchip,rv1126-dw-mshc
45c66ec88fSEmmanuel Vadot          - const: rockchip,rk3288-dw-mshc
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot  reg:
48c66ec88fSEmmanuel Vadot    maxItems: 1
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  interrupts:
51c66ec88fSEmmanuel Vadot    maxItems: 1
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot  clocks:
54c66ec88fSEmmanuel Vadot    minItems: 2
55c66ec88fSEmmanuel Vadot    maxItems: 4
56c66ec88fSEmmanuel Vadot    description:
57c66ec88fSEmmanuel Vadot      Handle to "biu" and "ciu" clocks for the bus interface unit clock and
58c66ec88fSEmmanuel Vadot      the card interface unit clock. If "ciu-drive" and "ciu-sample" are
59c66ec88fSEmmanuel Vadot      specified in clock-names, it should also contain
60c66ec88fSEmmanuel Vadot      handles to these clocks.
61c66ec88fSEmmanuel Vadot
62c66ec88fSEmmanuel Vadot  clock-names:
63c66ec88fSEmmanuel Vadot    minItems: 2
64c66ec88fSEmmanuel Vadot    items:
65c66ec88fSEmmanuel Vadot      - const: biu
66c66ec88fSEmmanuel Vadot      - const: ciu
67c66ec88fSEmmanuel Vadot      - const: ciu-drive
68c66ec88fSEmmanuel Vadot      - const: ciu-sample
69c66ec88fSEmmanuel Vadot    description:
70c66ec88fSEmmanuel Vadot      Apart from the clock-names "biu" and "ciu" two more clocks
71c66ec88fSEmmanuel Vadot      "ciu-drive" and "ciu-sample" are supported. They are used
72c66ec88fSEmmanuel Vadot      to control the clock phases, "ciu-sample" is required for tuning
73c66ec88fSEmmanuel Vadot      high speed modes.
74c66ec88fSEmmanuel Vadot
758bab661aSEmmanuel Vadot  power-domains:
768bab661aSEmmanuel Vadot    maxItems: 1
778bab661aSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot  rockchip,default-sample-phase:
79c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
80c66ec88fSEmmanuel Vadot    minimum: 0
81c66ec88fSEmmanuel Vadot    maximum: 360
82c66ec88fSEmmanuel Vadot    default: 0
83c66ec88fSEmmanuel Vadot    description:
84c66ec88fSEmmanuel Vadot      The default phase to set "ciu-sample" at probing,
85c66ec88fSEmmanuel Vadot      low speeds or in case where all phases work at tuning time.
86c66ec88fSEmmanuel Vadot      If not specified 0 deg will be used.
87c66ec88fSEmmanuel Vadot
88c66ec88fSEmmanuel Vadot  rockchip,desired-num-phases:
89c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
90c66ec88fSEmmanuel Vadot    minimum: 0
91c66ec88fSEmmanuel Vadot    maximum: 360
92c66ec88fSEmmanuel Vadot    default: 360
93c66ec88fSEmmanuel Vadot    description:
94c66ec88fSEmmanuel Vadot      The desired number of times that the host execute tuning when needed.
95c66ec88fSEmmanuel Vadot      If not specified, the host will do tuning for 360 times,
96c66ec88fSEmmanuel Vadot      namely tuning for each degree.
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadotrequired:
99c66ec88fSEmmanuel Vadot  - compatible
100c66ec88fSEmmanuel Vadot  - reg
101c66ec88fSEmmanuel Vadot  - interrupts
102c66ec88fSEmmanuel Vadot  - clocks
103c66ec88fSEmmanuel Vadot  - clock-names
104c66ec88fSEmmanuel Vadot
1056be33864SEmmanuel VadotunevaluatedProperties: false
1066be33864SEmmanuel Vadot
107c66ec88fSEmmanuel Vadotexamples:
108c66ec88fSEmmanuel Vadot  - |
109c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/rk3288-cru.h>
110c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
111c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
112c66ec88fSEmmanuel Vadot    sdmmc: mmc@ff0c0000 {
113c66ec88fSEmmanuel Vadot      compatible = "rockchip,rk3288-dw-mshc";
114c66ec88fSEmmanuel Vadot      reg = <0xff0c0000 0x4000>;
115c66ec88fSEmmanuel Vadot      interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
116c66ec88fSEmmanuel Vadot      clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
117c66ec88fSEmmanuel Vadot               <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
118c66ec88fSEmmanuel Vadot      clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
119c66ec88fSEmmanuel Vadot      resets = <&cru SRST_MMC0>;
120c66ec88fSEmmanuel Vadot      reset-names = "reset";
121c66ec88fSEmmanuel Vadot      fifo-depth = <0x100>;
122c66ec88fSEmmanuel Vadot      max-frequency = <150000000>;
123c66ec88fSEmmanuel Vadot    };
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot...
126