xref: /linux/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1832ff312SYang Xiwen# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2832ff312SYang Xiwen%YAML 1.2
3832ff312SYang Xiwen---
4832ff312SYang Xiwen$id: http://devicetree.org/schemas/mmc/hisilicon,hi3798cv200-dw-mshc.yaml#
5832ff312SYang Xiwen$schema: http://devicetree.org/meta-schemas/core.yaml#
6832ff312SYang Xiwen
7*cddacdceSYang Xiwentitle: Hisilicon HiSTB SoCs specific extensions to the Synopsys DWMMC controller
8832ff312SYang Xiwen
9832ff312SYang Xiwenmaintainers:
10832ff312SYang Xiwen  - Yang Xiwen <forbidden405@outlook.com>
11832ff312SYang Xiwen
12832ff312SYang Xiwenproperties:
13832ff312SYang Xiwen  compatible:
14832ff312SYang Xiwen    enum:
15832ff312SYang Xiwen      - hisilicon,hi3798cv200-dw-mshc
16*cddacdceSYang Xiwen      - hisilicon,hi3798mv200-dw-mshc
17832ff312SYang Xiwen
18832ff312SYang Xiwen  reg:
19832ff312SYang Xiwen    maxItems: 1
20832ff312SYang Xiwen
21832ff312SYang Xiwen  interrupts:
22832ff312SYang Xiwen    maxItems: 1
23832ff312SYang Xiwen
24832ff312SYang Xiwen  clocks:
25832ff312SYang Xiwen    items:
26832ff312SYang Xiwen      - description: bus interface unit clock
27832ff312SYang Xiwen      - description: card interface unit clock
28832ff312SYang Xiwen      - description: card input sample phase clock
29832ff312SYang Xiwen      - description: controller output drive phase clock
30832ff312SYang Xiwen
31832ff312SYang Xiwen  clock-names:
32832ff312SYang Xiwen    items:
33832ff312SYang Xiwen      - const: ciu
34832ff312SYang Xiwen      - const: biu
35832ff312SYang Xiwen      - const: ciu-sample
36832ff312SYang Xiwen      - const: ciu-drive
37832ff312SYang Xiwen
38*cddacdceSYang Xiwen  hisilicon,sap-dll-reg:
39*cddacdceSYang Xiwen    $ref: /schemas/types.yaml#/definitions/phandle-array
40*cddacdceSYang Xiwen    description: |
41*cddacdceSYang Xiwen      DWMMC core on Hi3798MV2x SoCs has a delay-locked-loop(DLL) attached to card data input path.
42*cddacdceSYang Xiwen      It is integrated into CRG core on the SoC and has to be controlled during tuning.
43*cddacdceSYang Xiwen    items:
44*cddacdceSYang Xiwen      - description: A phandle pointed to the CRG syscon node
45*cddacdceSYang Xiwen      - description: Sample DLL register offset in CRG address space
46*cddacdceSYang Xiwen
47832ff312SYang Xiwenrequired:
48832ff312SYang Xiwen  - compatible
49832ff312SYang Xiwen  - reg
50832ff312SYang Xiwen  - interrupts
51832ff312SYang Xiwen  - clocks
52832ff312SYang Xiwen  - clock-names
53832ff312SYang Xiwen
54832ff312SYang XiwenallOf:
55832ff312SYang Xiwen  - $ref: synopsys-dw-mshc-common.yaml#
56832ff312SYang Xiwen
57*cddacdceSYang Xiwen  - if:
58*cddacdceSYang Xiwen      properties:
59*cddacdceSYang Xiwen        compatible:
60*cddacdceSYang Xiwen          contains:
61*cddacdceSYang Xiwen            const: hisilicon,hi3798mv200-dw-mshc
62*cddacdceSYang Xiwen    then:
63*cddacdceSYang Xiwen      required:
64*cddacdceSYang Xiwen        - hisilicon,sap-dll-reg
65*cddacdceSYang Xiwen    else:
66*cddacdceSYang Xiwen      properties:
67*cddacdceSYang Xiwen        hisilicon,sap-dll-reg: false
68*cddacdceSYang Xiwen
69832ff312SYang XiwenunevaluatedProperties: false
70832ff312SYang Xiwen
71832ff312SYang Xiwenexamples:
72832ff312SYang Xiwen  - |
73832ff312SYang Xiwen    #include <dt-bindings/clock/histb-clock.h>
74832ff312SYang Xiwen    #include <dt-bindings/interrupt-controller/arm-gic.h>
75832ff312SYang Xiwen
76832ff312SYang Xiwen    mmc@9830000 {
77832ff312SYang Xiwen        compatible = "hisilicon,hi3798cv200-dw-mshc";
78832ff312SYang Xiwen        reg = <0x9830000 0x10000>;
79832ff312SYang Xiwen        interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
80832ff312SYang Xiwen        clocks = <&crg HISTB_MMC_CIU_CLK>,
81832ff312SYang Xiwen                 <&crg HISTB_MMC_BIU_CLK>,
82832ff312SYang Xiwen                 <&crg HISTB_MMC_SAMPLE_CLK>,
83832ff312SYang Xiwen                 <&crg HISTB_MMC_DRV_CLK>;
84832ff312SYang Xiwen        clock-names = "ciu", "biu", "ciu-sample", "ciu-drive";
85832ff312SYang Xiwen        resets = <&crg 0xa0 4>;
86832ff312SYang Xiwen        reset-names = "reset";
87832ff312SYang Xiwen        pinctrl-names = "default";
88832ff312SYang Xiwen        pinctrl-0 = <&emmc_pins_1 &emmc_pins_2
89832ff312SYang Xiwen                     &emmc_pins_3 &emmc_pins_4>;
90832ff312SYang Xiwen        fifo-depth = <256>;
91832ff312SYang Xiwen        clock-frequency = <200000000>;
92832ff312SYang Xiwen        cap-mmc-highspeed;
93832ff312SYang Xiwen        mmc-ddr-1_8v;
94832ff312SYang Xiwen        mmc-hs200-1_8v;
95832ff312SYang Xiwen        non-removable;
96832ff312SYang Xiwen        bus-width = <8>;
97832ff312SYang Xiwen    };
98