xref: /freebsd/sys/contrib/device-tree/Bindings/ufs/hisilicon,ufs.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1*c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*c9ccf3a3SEmmanuel Vadot%YAML 1.2
3*c9ccf3a3SEmmanuel Vadot---
4*c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/ufs/hisilicon,ufs.yaml#
5*c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c9ccf3a3SEmmanuel Vadot
7*c9ccf3a3SEmmanuel Vadottitle: HiSilicon Universal Flash Storage (UFS) Controller
8*c9ccf3a3SEmmanuel Vadot
9*c9ccf3a3SEmmanuel Vadotmaintainers:
10*c9ccf3a3SEmmanuel Vadot  - Li Wei <liwei213@huawei.com>
11*c9ccf3a3SEmmanuel Vadot
12*c9ccf3a3SEmmanuel Vadot# Select only our matches, not all jedec,ufs
13*c9ccf3a3SEmmanuel Vadotselect:
14*c9ccf3a3SEmmanuel Vadot  properties:
15*c9ccf3a3SEmmanuel Vadot    compatible:
16*c9ccf3a3SEmmanuel Vadot      contains:
17*c9ccf3a3SEmmanuel Vadot        enum:
18*c9ccf3a3SEmmanuel Vadot          - hisilicon,hi3660-ufs
19*c9ccf3a3SEmmanuel Vadot          - hisilicon,hi3670-ufs
20*c9ccf3a3SEmmanuel Vadot  required:
21*c9ccf3a3SEmmanuel Vadot    - compatible
22*c9ccf3a3SEmmanuel Vadot
23*c9ccf3a3SEmmanuel VadotallOf:
24*c9ccf3a3SEmmanuel Vadot  - $ref: ufs-common.yaml
25*c9ccf3a3SEmmanuel Vadot
26*c9ccf3a3SEmmanuel Vadotproperties:
27*c9ccf3a3SEmmanuel Vadot  compatible:
28*c9ccf3a3SEmmanuel Vadot    oneOf:
29*c9ccf3a3SEmmanuel Vadot      - items:
30*c9ccf3a3SEmmanuel Vadot          - const: hisilicon,hi3660-ufs
31*c9ccf3a3SEmmanuel Vadot          - const: jedec,ufs-1.1
32*c9ccf3a3SEmmanuel Vadot      - items:
33*c9ccf3a3SEmmanuel Vadot          - enum:
34*c9ccf3a3SEmmanuel Vadot              - hisilicon,hi3670-ufs
35*c9ccf3a3SEmmanuel Vadot          - const: jedec,ufs-2.1
36*c9ccf3a3SEmmanuel Vadot
37*c9ccf3a3SEmmanuel Vadot  clocks:
38*c9ccf3a3SEmmanuel Vadot    minItems: 2
39*c9ccf3a3SEmmanuel Vadot    maxItems: 2
40*c9ccf3a3SEmmanuel Vadot
41*c9ccf3a3SEmmanuel Vadot  clock-names:
42*c9ccf3a3SEmmanuel Vadot    items:
43*c9ccf3a3SEmmanuel Vadot      - const: ref_clk
44*c9ccf3a3SEmmanuel Vadot      - const: phy_clk
45*c9ccf3a3SEmmanuel Vadot
46*c9ccf3a3SEmmanuel Vadot  reg:
47*c9ccf3a3SEmmanuel Vadot    items:
48*c9ccf3a3SEmmanuel Vadot      - description: UFS register address space
49*c9ccf3a3SEmmanuel Vadot      - description: UFS SYS CTRL register address space
50*c9ccf3a3SEmmanuel Vadot
51*c9ccf3a3SEmmanuel Vadot  resets:
52*c9ccf3a3SEmmanuel Vadot    maxItems: 1
53*c9ccf3a3SEmmanuel Vadot
54*c9ccf3a3SEmmanuel Vadot  reset-names:
55*c9ccf3a3SEmmanuel Vadot    items:
56*c9ccf3a3SEmmanuel Vadot      - const: rst
57*c9ccf3a3SEmmanuel Vadot
58*c9ccf3a3SEmmanuel Vadotrequired:
59*c9ccf3a3SEmmanuel Vadot  - compatible
60*c9ccf3a3SEmmanuel Vadot  - reg
61*c9ccf3a3SEmmanuel Vadot  - resets
62*c9ccf3a3SEmmanuel Vadot  - reset-names
63*c9ccf3a3SEmmanuel Vadot
64*c9ccf3a3SEmmanuel VadotunevaluatedProperties: false
65*c9ccf3a3SEmmanuel Vadot
66*c9ccf3a3SEmmanuel Vadotexamples:
67*c9ccf3a3SEmmanuel Vadot  - |
68*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/hi3670-clock.h>
69*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
70*c9ccf3a3SEmmanuel Vadot
71*c9ccf3a3SEmmanuel Vadot    soc {
72*c9ccf3a3SEmmanuel Vadot        #address-cells = <2>;
73*c9ccf3a3SEmmanuel Vadot        #size-cells = <2>;
74*c9ccf3a3SEmmanuel Vadot
75*c9ccf3a3SEmmanuel Vadot        ufs@ff3c0000 {
76*c9ccf3a3SEmmanuel Vadot            compatible = "hisilicon,hi3670-ufs", "jedec,ufs-2.1";
77*c9ccf3a3SEmmanuel Vadot            reg = <0x0 0xff3c0000 0x0 0x1000>,
78*c9ccf3a3SEmmanuel Vadot                  <0x0 0xff3e0000 0x0 0x1000>;
79*c9ccf3a3SEmmanuel Vadot            interrupt-parent = <&gic>;
80*c9ccf3a3SEmmanuel Vadot            interrupts = <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>;
81*c9ccf3a3SEmmanuel Vadot            clocks = <&crg_ctrl HI3670_CLK_GATE_UFSIO_REF>,
82*c9ccf3a3SEmmanuel Vadot                     <&crg_ctrl HI3670_CLK_GATE_UFS_SUBSYS>;
83*c9ccf3a3SEmmanuel Vadot            clock-names = "ref_clk", "phy_clk";
84*c9ccf3a3SEmmanuel Vadot            freq-table-hz = <0 0>,
85*c9ccf3a3SEmmanuel Vadot                            <0 0>;
86*c9ccf3a3SEmmanuel Vadot
87*c9ccf3a3SEmmanuel Vadot            resets = <&crg_rst 0x84 12>;
88*c9ccf3a3SEmmanuel Vadot            reset-names = "rst";
89*c9ccf3a3SEmmanuel Vadot        };
90*c9ccf3a3SEmmanuel Vadot    };
91