xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/rockchip-dw-mshc.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
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:
17cb7aa33aSEmmanuel 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
42cb7aa33aSEmmanuel Vadot              - rockchip,rk3588-dw-mshc
43c66ec88fSEmmanuel Vadot              - rockchip,rv1108-dw-mshc
44b97ee269SEmmanuel Vadot              - rockchip,rv1126-dw-mshc
45c66ec88fSEmmanuel Vadot          - const: rockchip,rk3288-dw-mshc
46*b2d2a78aSEmmanuel Vadot      # for Rockchip RK3576 with phase tuning inside the controller
47*b2d2a78aSEmmanuel Vadot      - const: rockchip,rk3576-dw-mshc
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  reg:
50c66ec88fSEmmanuel Vadot    maxItems: 1
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot  interrupts:
53c66ec88fSEmmanuel Vadot    maxItems: 1
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot  clocks:
56c66ec88fSEmmanuel Vadot    minItems: 2
57c66ec88fSEmmanuel Vadot    maxItems: 4
58c66ec88fSEmmanuel Vadot    description:
59c66ec88fSEmmanuel Vadot      Handle to "biu" and "ciu" clocks for the bus interface unit clock and
60c66ec88fSEmmanuel Vadot      the card interface unit clock. If "ciu-drive" and "ciu-sample" are
61c66ec88fSEmmanuel Vadot      specified in clock-names, it should also contain
62c66ec88fSEmmanuel Vadot      handles to these clocks.
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  clock-names:
65c66ec88fSEmmanuel Vadot    minItems: 2
66c66ec88fSEmmanuel Vadot    items:
67c66ec88fSEmmanuel Vadot      - const: biu
68c66ec88fSEmmanuel Vadot      - const: ciu
69c66ec88fSEmmanuel Vadot      - const: ciu-drive
70c66ec88fSEmmanuel Vadot      - const: ciu-sample
71c66ec88fSEmmanuel Vadot    description:
72c66ec88fSEmmanuel Vadot      Apart from the clock-names "biu" and "ciu" two more clocks
73c66ec88fSEmmanuel Vadot      "ciu-drive" and "ciu-sample" are supported. They are used
74c66ec88fSEmmanuel Vadot      to control the clock phases, "ciu-sample" is required for tuning
75c66ec88fSEmmanuel Vadot      high speed modes.
76c66ec88fSEmmanuel Vadot
778bab661aSEmmanuel Vadot  power-domains:
788bab661aSEmmanuel Vadot    maxItems: 1
798bab661aSEmmanuel Vadot
80c66ec88fSEmmanuel Vadot  rockchip,default-sample-phase:
81c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
82c66ec88fSEmmanuel Vadot    minimum: 0
83c66ec88fSEmmanuel Vadot    maximum: 360
84c66ec88fSEmmanuel Vadot    default: 0
85c66ec88fSEmmanuel Vadot    description:
86c66ec88fSEmmanuel Vadot      The default phase to set "ciu-sample" at probing,
87c66ec88fSEmmanuel Vadot      low speeds or in case where all phases work at tuning time.
88c66ec88fSEmmanuel Vadot      If not specified 0 deg will be used.
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot  rockchip,desired-num-phases:
91c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
92c66ec88fSEmmanuel Vadot    minimum: 0
93c66ec88fSEmmanuel Vadot    maximum: 360
94c66ec88fSEmmanuel Vadot    default: 360
95c66ec88fSEmmanuel Vadot    description:
96c66ec88fSEmmanuel Vadot      The desired number of times that the host execute tuning when needed.
97c66ec88fSEmmanuel Vadot      If not specified, the host will do tuning for 360 times,
98c66ec88fSEmmanuel Vadot      namely tuning for each degree.
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadotrequired:
101c66ec88fSEmmanuel Vadot  - compatible
102c66ec88fSEmmanuel Vadot  - reg
103c66ec88fSEmmanuel Vadot  - interrupts
104c66ec88fSEmmanuel Vadot  - clocks
105c66ec88fSEmmanuel Vadot  - clock-names
106c66ec88fSEmmanuel Vadot
1076be33864SEmmanuel VadotunevaluatedProperties: false
1086be33864SEmmanuel Vadot
109c66ec88fSEmmanuel Vadotexamples:
110c66ec88fSEmmanuel Vadot  - |
111c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/rk3288-cru.h>
112c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
113c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
114c66ec88fSEmmanuel Vadot    sdmmc: mmc@ff0c0000 {
115c66ec88fSEmmanuel Vadot      compatible = "rockchip,rk3288-dw-mshc";
116c66ec88fSEmmanuel Vadot      reg = <0xff0c0000 0x4000>;
117c66ec88fSEmmanuel Vadot      interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
118c66ec88fSEmmanuel Vadot      clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
119c66ec88fSEmmanuel Vadot               <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
120c66ec88fSEmmanuel Vadot      clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
121c66ec88fSEmmanuel Vadot      resets = <&cru SRST_MMC0>;
122c66ec88fSEmmanuel Vadot      reset-names = "reset";
123c66ec88fSEmmanuel Vadot      fifo-depth = <0x100>;
124c66ec88fSEmmanuel Vadot      max-frequency = <150000000>;
125c66ec88fSEmmanuel Vadot    };
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot...
128