xref: /openbmc/linux/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1e522ae91SSam Protsenko# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e522ae91SSam Protsenko%YAML 1.2
3e522ae91SSam Protsenko---
4e522ae91SSam Protsenko$id: http://devicetree.org/schemas/soc/samsung/exynos-usi.yaml#
5e522ae91SSam Protsenko$schema: http://devicetree.org/meta-schemas/core.yaml#
6e522ae91SSam Protsenko
7*84e85359SKrzysztof Kozlowskititle: Samsung's Exynos USI (Universal Serial Interface)
8e522ae91SSam Protsenko
9e522ae91SSam Protsenkomaintainers:
10e522ae91SSam Protsenko  - Sam Protsenko <semen.protsenko@linaro.org>
118a1e6bb3SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
12e522ae91SSam Protsenko
13e522ae91SSam Protsenkodescription: |
14e522ae91SSam Protsenko  USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
15e522ae91SSam Protsenko  USI shares almost all internal circuits within each protocol, so only one
16e522ae91SSam Protsenko  protocol can be chosen at a time. USI is modeled as a node with zero or more
17e522ae91SSam Protsenko  child nodes, each representing a serial sub-node device. The mode setting
18e522ae91SSam Protsenko  selects which particular function will be used.
19e522ae91SSam Protsenko
20e522ae91SSam Protsenkoproperties:
21e522ae91SSam Protsenko  $nodename:
22e522ae91SSam Protsenko    pattern: "^usi@[0-9a-f]+$"
23e522ae91SSam Protsenko
24e522ae91SSam Protsenko  compatible:
254e112c7bSChanho Park    oneOf:
264e112c7bSChanho Park      - items:
274e112c7bSChanho Park          - const: samsung,exynosautov9-usi
284e112c7bSChanho Park          - const: samsung,exynos850-usi
294e112c7bSChanho Park      - enum:
304e112c7bSChanho Park          - samsung,exynos850-usi
31e522ae91SSam Protsenko
32e522ae91SSam Protsenko  reg: true
33e522ae91SSam Protsenko
34e522ae91SSam Protsenko  clocks: true
35e522ae91SSam Protsenko
36e522ae91SSam Protsenko  clock-names: true
37e522ae91SSam Protsenko
38e522ae91SSam Protsenko  ranges: true
39e522ae91SSam Protsenko
40e522ae91SSam Protsenko  "#address-cells":
41e522ae91SSam Protsenko    const: 1
42e522ae91SSam Protsenko
43e522ae91SSam Protsenko  "#size-cells":
44e522ae91SSam Protsenko    const: 1
45e522ae91SSam Protsenko
46e522ae91SSam Protsenko  samsung,sysreg:
47e522ae91SSam Protsenko    $ref: /schemas/types.yaml#/definitions/phandle-array
4839bd2b6aSRob Herring    items:
4939bd2b6aSRob Herring      - items:
5039bd2b6aSRob Herring          - description: phandle to System Register syscon node
5139bd2b6aSRob Herring          - description: offset of SW_CONF register for this USI controller
52e522ae91SSam Protsenko    description:
53e522ae91SSam Protsenko      Should be phandle/offset pair. The phandle to System Register syscon node
54e522ae91SSam Protsenko      (for the same domain where this USI controller resides) and the offset
55e522ae91SSam Protsenko      of SW_CONF register for this USI controller.
56e522ae91SSam Protsenko
57e522ae91SSam Protsenko  samsung,mode:
58e522ae91SSam Protsenko    $ref: /schemas/types.yaml#/definitions/uint32
59e522ae91SSam Protsenko    description:
60e522ae91SSam Protsenko      Selects USI function (which serial protocol to use). Refer to
61e522ae91SSam Protsenko      <include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.
62e522ae91SSam Protsenko
63e522ae91SSam Protsenko  samsung,clkreq-on:
64e522ae91SSam Protsenko    type: boolean
65e522ae91SSam Protsenko    description:
66e522ae91SSam Protsenko      Enable this property if underlying protocol requires the clock to be
67e522ae91SSam Protsenko      continuously provided without automatic gating. As suggested by SoC
68e522ae91SSam Protsenko      manual, it should be set in case of SPI/I2C slave, UART Rx and I2C
69e522ae91SSam Protsenko      multi-master mode. Usually this property is needed if USI mode is set
70e522ae91SSam Protsenko      to "UART".
71e522ae91SSam Protsenko
72e522ae91SSam Protsenko      This property is optional.
73e522ae91SSam Protsenko
74e522ae91SSam ProtsenkopatternProperties:
75e465ea5cSKrzysztof Kozlowski  "^i2c@[0-9a-f]+$":
76e465ea5cSKrzysztof Kozlowski    $ref: /schemas/i2c/i2c-exynos5.yaml
77e465ea5cSKrzysztof Kozlowski    description: Child node describing underlying I2C
78e465ea5cSKrzysztof Kozlowski
79e465ea5cSKrzysztof Kozlowski  "^serial@[0-9a-f]+$":
80e465ea5cSKrzysztof Kozlowski    $ref: /schemas/serial/samsung_uart.yaml
81e465ea5cSKrzysztof Kozlowski    description: Child node describing underlying UART/serial
82e465ea5cSKrzysztof Kozlowski
83e465ea5cSKrzysztof Kozlowski  "^spi@[0-9a-f]+$":
84db854745SKrzysztof Kozlowski    $ref: /schemas/spi/samsung,spi.yaml
85e465ea5cSKrzysztof Kozlowski    description: Child node describing underlying SPI
86e522ae91SSam Protsenko
87e522ae91SSam Protsenkorequired:
88e522ae91SSam Protsenko  - compatible
89e522ae91SSam Protsenko  - ranges
90e522ae91SSam Protsenko  - "#address-cells"
91e522ae91SSam Protsenko  - "#size-cells"
92e522ae91SSam Protsenko  - samsung,sysreg
93e522ae91SSam Protsenko  - samsung,mode
94e522ae91SSam Protsenko
95e522ae91SSam Protsenkoif:
96e522ae91SSam Protsenko  properties:
97e522ae91SSam Protsenko    compatible:
98e522ae91SSam Protsenko      contains:
99e522ae91SSam Protsenko        enum:
100e522ae91SSam Protsenko          - samsung,exynos850-usi
101e522ae91SSam Protsenko
102e522ae91SSam Protsenkothen:
103e522ae91SSam Protsenko  properties:
104e522ae91SSam Protsenko    reg:
105e522ae91SSam Protsenko      maxItems: 1
106e522ae91SSam Protsenko
107e522ae91SSam Protsenko    clocks:
108e522ae91SSam Protsenko      items:
109e522ae91SSam Protsenko        - description: Bus (APB) clock
110e522ae91SSam Protsenko        - description: Operating clock for UART/SPI/I2C protocol
111e522ae91SSam Protsenko
112e522ae91SSam Protsenko    clock-names:
113e522ae91SSam Protsenko      items:
114e522ae91SSam Protsenko        - const: pclk
115e522ae91SSam Protsenko        - const: ipclk
116e522ae91SSam Protsenko
117e522ae91SSam Protsenko  required:
118e522ae91SSam Protsenko    - reg
119e522ae91SSam Protsenko    - clocks
120e522ae91SSam Protsenko    - clock-names
121e522ae91SSam Protsenko
122e522ae91SSam Protsenkoelse:
123e522ae91SSam Protsenko  properties:
124e522ae91SSam Protsenko    reg: false
125e522ae91SSam Protsenko    clocks: false
126e522ae91SSam Protsenko    clock-names: false
127e522ae91SSam Protsenko    samsung,clkreq-on: false
128e522ae91SSam Protsenko
129e522ae91SSam ProtsenkoadditionalProperties: false
130e522ae91SSam Protsenko
131e522ae91SSam Protsenkoexamples:
132e522ae91SSam Protsenko  - |
133e522ae91SSam Protsenko    #include <dt-bindings/interrupt-controller/arm-gic.h>
134e522ae91SSam Protsenko    #include <dt-bindings/soc/samsung,exynos-usi.h>
135e522ae91SSam Protsenko
136e522ae91SSam Protsenko    usi0: usi@138200c0 {
137e522ae91SSam Protsenko        compatible = "samsung,exynos850-usi";
138e522ae91SSam Protsenko        reg = <0x138200c0 0x20>;
139e522ae91SSam Protsenko        samsung,sysreg = <&sysreg_peri 0x1010>;
140e522ae91SSam Protsenko        samsung,mode = <USI_V2_UART>;
141e522ae91SSam Protsenko        samsung,clkreq-on; /* needed for UART mode */
142e522ae91SSam Protsenko        #address-cells = <1>;
143e522ae91SSam Protsenko        #size-cells = <1>;
144e522ae91SSam Protsenko        ranges;
145e522ae91SSam Protsenko        clocks = <&cmu_peri 32>, <&cmu_peri 31>;
146e522ae91SSam Protsenko        clock-names = "pclk", "ipclk";
147e522ae91SSam Protsenko
148e522ae91SSam Protsenko        serial_0: serial@13820000 {
149e522ae91SSam Protsenko            compatible = "samsung,exynos850-uart";
150e522ae91SSam Protsenko            reg = <0x13820000 0xc0>;
151e522ae91SSam Protsenko            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
152e522ae91SSam Protsenko            clocks = <&cmu_peri 32>, <&cmu_peri 31>;
153e522ae91SSam Protsenko            clock-names = "uart", "clk_uart_baud0";
154e522ae91SSam Protsenko            status = "disabled";
155e522ae91SSam Protsenko        };
156e522ae91SSam Protsenko
157e522ae91SSam Protsenko        hsi2c_0: i2c@13820000 {
158e522ae91SSam Protsenko            compatible = "samsung,exynosautov9-hsi2c";
159e522ae91SSam Protsenko            reg = <0x13820000 0xc0>;
160e522ae91SSam Protsenko            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
161e522ae91SSam Protsenko            #address-cells = <1>;
162e522ae91SSam Protsenko            #size-cells = <0>;
163d56a8e9cSSam Protsenko            clocks = <&cmu_peri 31>, <&cmu_peri 32>;
164d56a8e9cSSam Protsenko            clock-names = "hsi2c", "hsi2c_pclk";
165e522ae91SSam Protsenko            status = "disabled";
166e522ae91SSam Protsenko        };
167e522ae91SSam Protsenko    };
168