1139749Simp# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2113584Ssimokawa%YAML 1.2
3103285Sikob---
4103285Sikob$id: http://devicetree.org/schemas/ufs/samsung,exynos-ufs.yaml#
5103285Sikob$schema: http://devicetree.org/meta-schemas/core.yaml#
6103285Sikob
7103285Sikobtitle: Samsung SoC series UFS host controller
8103285Sikob
9103285Sikobmaintainers:
10103285Sikob  - Alim Akhtar <alim.akhtar@samsung.com>
11103285Sikob
12103285Sikobdescription: |
13103285Sikob  Each Samsung UFS host controller instance should have its own node.
14103285Sikob
15103285Sikobproperties:
16103285Sikob  compatible:
17103285Sikob    enum:
18103285Sikob      - google,gs101-ufs
19103285Sikob      - samsung,exynos7-ufs
20103285Sikob      - samsung,exynosautov9-ufs
21103285Sikob      - samsung,exynosautov9-ufs-vh
22103285Sikob      - tesla,fsd-ufs
23103285Sikob
24103285Sikob  reg:
25103285Sikob    items:
26103285Sikob      - description: HCI register
27103285Sikob      - description: vendor specific register
28103285Sikob      - description: unipro register
29103285Sikob      - description: UFS protector register
30103285Sikob
31103285Sikob  reg-names:
32103285Sikob    items:
33103285Sikob      - const: hci
34103285Sikob      - const: vs_hci
35103285Sikob      - const: unipro
36127468Ssimokawa      - const: ufsp
37119418Sobrien
38119418Sobrien  clocks:
39127468Ssimokawa    minItems: 2
40119418Sobrien    items:
41103285Sikob      - description: ufs link core clock
42103285Sikob      - description: unipro main clock
43103285Sikob      - description: fmp clock
44103285Sikob      - description: ufs aclk clock
45103285Sikob      - description: ufs pclk clock
46103285Sikob      - description: sysreg clock
47103285Sikob
48103285Sikob  clock-names:
49127468Ssimokawa    minItems: 2
50120660Ssimokawa    items:
51120660Ssimokawa      - const: core_clk
52120660Ssimokawa      - const: sclk_unipro_main
53120660Ssimokawa      - const: fmp
54103285Sikob      - const: aclk
55103285Sikob      - const: pclk
56113584Ssimokawa      - const: sysreg
57103285Sikob
58103285Sikob  phys:
59103285Sikob    maxItems: 1
60103285Sikob
61122228Ssimokawa  phy-names:
62103285Sikob    const: ufs-phy
63127468Ssimokawa
64127468Ssimokawa  samsung,sysreg:
65127468Ssimokawa    $ref: /schemas/types.yaml#/definitions/phandle-array
66127468Ssimokawa    items:
67127468Ssimokawa      - items:
68103285Sikob          - description: phandle to FSYSx sysreg node
69103285Sikob          - description: offset of the control register for UFS io coherency setting
70103285Sikob    description:
71127468Ssimokawa      Phandle and offset to the FSYSx sysreg for UFS io coherency setting.
72103285Sikob
73106810Ssimokawa  dma-coherent: true
74106810Ssimokawa
75103285Sikobrequired:
76248085Smarius  - compatible
77108281Ssimokawa  - reg
78106810Ssimokawa  - phys
79106810Ssimokawa  - phy-names
80110582Ssimokawa  - clocks
81106810Ssimokawa  - clock-names
82103285Sikob
83103285SikoballOf:
84103285Sikob  - $ref: ufs-common.yaml
85103285Sikob  - if:
86103285Sikob      properties:
87249132Smav        compatible:
88124145Ssimokawa          contains:
89120660Ssimokawa            const: google,gs101-ufs
90120660Ssimokawa
91122228Ssimokawa    then:
92122228Ssimokawa      properties:
93170374Ssimokawa        clocks:
94122228Ssimokawa          minItems: 6
95122228Ssimokawa
96122228Ssimokawa        clock-names:
97106816Ssimokawa          minItems: 6
98106816Ssimokawa
99106810Ssimokawa    else:
100106816Ssimokawa      properties:
101106816Ssimokawa        clocks:
102113584Ssimokawa          maxItems: 2
103113584Ssimokawa
104106816Ssimokawa        clock-names:
105103285Sikob          maxItems: 2
106103285Sikob
107103285SikobunevaluatedProperties: false
108124145Ssimokawa
109106804Ssimokawaexamples:
110103285Sikob  - |
111106804Ssimokawa    #include <dt-bindings/interrupt-controller/arm-gic.h>
112106810Ssimokawa    #include <dt-bindings/clock/exynos7-clk.h>
113120660Ssimokawa
114106816Ssimokawa    ufs: ufs@15570000 {
115120660Ssimokawa       compatible = "samsung,exynos7-ufs";
116106816Ssimokawa       reg = <0x15570000 0x100>,
117120660Ssimokawa             <0x15570100 0x100>,
118167632Ssimokawa             <0x15571000 0x200>,
119106816Ssimokawa             <0x15572000 0x300>;
120120660Ssimokawa       reg-names = "hci", "vs_hci", "unipro", "ufsp";
121120660Ssimokawa       interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
122103285Sikob       clocks = <&clock_fsys1 ACLK_UFS20_LINK>,
123106816Ssimokawa                <&clock_fsys1 SCLK_UFSUNIPRO20_USER>;
124106816Ssimokawa       clock-names = "core_clk", "sclk_unipro_main";
125106816Ssimokawa       pinctrl-names = "default";
126106816Ssimokawa       pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>;
127106816Ssimokawa       phys = <&ufs_phy>;
128106816Ssimokawa       phy-names = "ufs-phy";
129106816Ssimokawa    };
130129585Sdfr...
131129585Sdfr