xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/hisilicon,hi3798cv200-dw-mshc.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: Hisilicon HiSTB SoCs specific extensions to the Synopsys DWMMC controller
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Yang Xiwen <forbidden405@outlook.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotproperties:
13*01950c46SEmmanuel Vadot  compatible:
14*01950c46SEmmanuel Vadot    enum:
15*01950c46SEmmanuel Vadot      - hisilicon,hi3798cv200-dw-mshc
16*01950c46SEmmanuel Vadot      - hisilicon,hi3798mv200-dw-mshc
17*01950c46SEmmanuel Vadot
18*01950c46SEmmanuel Vadot  reg:
19*01950c46SEmmanuel Vadot    maxItems: 1
20*01950c46SEmmanuel Vadot
21*01950c46SEmmanuel Vadot  interrupts:
22*01950c46SEmmanuel Vadot    maxItems: 1
23*01950c46SEmmanuel Vadot
24*01950c46SEmmanuel Vadot  clocks:
25*01950c46SEmmanuel Vadot    items:
26*01950c46SEmmanuel Vadot      - description: bus interface unit clock
27*01950c46SEmmanuel Vadot      - description: card interface unit clock
28*01950c46SEmmanuel Vadot      - description: card input sample phase clock
29*01950c46SEmmanuel Vadot      - description: controller output drive phase clock
30*01950c46SEmmanuel Vadot
31*01950c46SEmmanuel Vadot  clock-names:
32*01950c46SEmmanuel Vadot    items:
33*01950c46SEmmanuel Vadot      - const: ciu
34*01950c46SEmmanuel Vadot      - const: biu
35*01950c46SEmmanuel Vadot      - const: ciu-sample
36*01950c46SEmmanuel Vadot      - const: ciu-drive
37*01950c46SEmmanuel Vadot
38*01950c46SEmmanuel Vadot  hisilicon,sap-dll-reg:
39*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
40*01950c46SEmmanuel Vadot    description: |
41*01950c46SEmmanuel Vadot      DWMMC core on Hi3798MV2x SoCs has a delay-locked-loop(DLL) attached to card data input path.
42*01950c46SEmmanuel Vadot      It is integrated into CRG core on the SoC and has to be controlled during tuning.
43*01950c46SEmmanuel Vadot    items:
44*01950c46SEmmanuel Vadot      - description: A phandle pointed to the CRG syscon node
45*01950c46SEmmanuel Vadot      - description: Sample DLL register offset in CRG address space
46*01950c46SEmmanuel Vadot
47*01950c46SEmmanuel Vadotrequired:
48*01950c46SEmmanuel Vadot  - compatible
49*01950c46SEmmanuel Vadot  - reg
50*01950c46SEmmanuel Vadot  - interrupts
51*01950c46SEmmanuel Vadot  - clocks
52*01950c46SEmmanuel Vadot  - clock-names
53*01950c46SEmmanuel Vadot
54*01950c46SEmmanuel VadotallOf:
55*01950c46SEmmanuel Vadot  - $ref: synopsys-dw-mshc-common.yaml#
56*01950c46SEmmanuel Vadot
57*01950c46SEmmanuel Vadot  - if:
58*01950c46SEmmanuel Vadot      properties:
59*01950c46SEmmanuel Vadot        compatible:
60*01950c46SEmmanuel Vadot          contains:
61*01950c46SEmmanuel Vadot            const: hisilicon,hi3798mv200-dw-mshc
62*01950c46SEmmanuel Vadot    then:
63*01950c46SEmmanuel Vadot      required:
64*01950c46SEmmanuel Vadot        - hisilicon,sap-dll-reg
65*01950c46SEmmanuel Vadot    else:
66*01950c46SEmmanuel Vadot      properties:
67*01950c46SEmmanuel Vadot        hisilicon,sap-dll-reg: false
68*01950c46SEmmanuel Vadot
69*01950c46SEmmanuel VadotunevaluatedProperties: false
70*01950c46SEmmanuel Vadot
71*01950c46SEmmanuel Vadotexamples:
72*01950c46SEmmanuel Vadot  - |
73*01950c46SEmmanuel Vadot    #include <dt-bindings/clock/histb-clock.h>
74*01950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
75*01950c46SEmmanuel Vadot
76*01950c46SEmmanuel Vadot    mmc@9830000 {
77*01950c46SEmmanuel Vadot        compatible = "hisilicon,hi3798cv200-dw-mshc";
78*01950c46SEmmanuel Vadot        reg = <0x9830000 0x10000>;
79*01950c46SEmmanuel Vadot        interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
80*01950c46SEmmanuel Vadot        clocks = <&crg HISTB_MMC_CIU_CLK>,
81*01950c46SEmmanuel Vadot                 <&crg HISTB_MMC_BIU_CLK>,
82*01950c46SEmmanuel Vadot                 <&crg HISTB_MMC_SAMPLE_CLK>,
83*01950c46SEmmanuel Vadot                 <&crg HISTB_MMC_DRV_CLK>;
84*01950c46SEmmanuel Vadot        clock-names = "ciu", "biu", "ciu-sample", "ciu-drive";
85*01950c46SEmmanuel Vadot        resets = <&crg 0xa0 4>;
86*01950c46SEmmanuel Vadot        reset-names = "reset";
87*01950c46SEmmanuel Vadot        pinctrl-names = "default";
88*01950c46SEmmanuel Vadot        pinctrl-0 = <&emmc_pins_1 &emmc_pins_2
89*01950c46SEmmanuel Vadot                     &emmc_pins_3 &emmc_pins_4>;
90*01950c46SEmmanuel Vadot        fifo-depth = <256>;
91*01950c46SEmmanuel Vadot        clock-frequency = <200000000>;
92*01950c46SEmmanuel Vadot        cap-mmc-highspeed;
93*01950c46SEmmanuel Vadot        mmc-ddr-1_8v;
94*01950c46SEmmanuel Vadot        mmc-hs200-1_8v;
95*01950c46SEmmanuel Vadot        non-removable;
96*01950c46SEmmanuel Vadot        bus-width = <8>;
97*01950c46SEmmanuel Vadot    };
98