xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/atmel,sama5d2-flexcom.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/mfd/atmel,sama5d2-flexcom.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: Microchip Flexcom (Flexible Serial Communication Unit)
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription:
13*01950c46SEmmanuel Vadot  The Microchip Flexcom is just a wrapper which embeds a SPI controller,
14*01950c46SEmmanuel Vadot  an I2C controller and an USART. Only one function can be used at a
15*01950c46SEmmanuel Vadot  time and is chosen at boot time according to the device tree.
16*01950c46SEmmanuel Vadot
17*01950c46SEmmanuel Vadotproperties:
18*01950c46SEmmanuel Vadot  compatible:
19*01950c46SEmmanuel Vadot    oneOf:
20*01950c46SEmmanuel Vadot      - const: atmel,sama5d2-flexcom
21*01950c46SEmmanuel Vadot      - items:
22*01950c46SEmmanuel Vadot          - const: microchip,sam9x7-flexcom
23*01950c46SEmmanuel Vadot          - const: atmel,sama5d2-flexcom
24*01950c46SEmmanuel Vadot      - items:
25*01950c46SEmmanuel Vadot          - const: microchip,sama7g5-flexcom
26*01950c46SEmmanuel Vadot          - const: atmel,sama5d2-flexcom
27*01950c46SEmmanuel Vadot
28*01950c46SEmmanuel Vadot
29*01950c46SEmmanuel Vadot  reg:
30*01950c46SEmmanuel Vadot    maxItems: 1
31*01950c46SEmmanuel Vadot
32*01950c46SEmmanuel Vadot  clocks:
33*01950c46SEmmanuel Vadot    maxItems: 1
34*01950c46SEmmanuel Vadot
35*01950c46SEmmanuel Vadot  "#address-cells":
36*01950c46SEmmanuel Vadot    const: 1
37*01950c46SEmmanuel Vadot
38*01950c46SEmmanuel Vadot  "#size-cells":
39*01950c46SEmmanuel Vadot    const: 1
40*01950c46SEmmanuel Vadot
41*01950c46SEmmanuel Vadot  ranges:
42*01950c46SEmmanuel Vadot    description:
43*01950c46SEmmanuel Vadot      One range for the full I/O register region. (including USART,
44*01950c46SEmmanuel Vadot      TWI and SPI registers).
45*01950c46SEmmanuel Vadot    items:
46*01950c46SEmmanuel Vadot      maxItems: 3
47*01950c46SEmmanuel Vadot
48*01950c46SEmmanuel Vadot  atmel,flexcom-mode:
49*01950c46SEmmanuel Vadot    description: |
50*01950c46SEmmanuel Vadot      Specifies the flexcom mode as follows:
51*01950c46SEmmanuel Vadot      1: USART
52*01950c46SEmmanuel Vadot      2: SPI
53*01950c46SEmmanuel Vadot      3: I2C.
54*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
55*01950c46SEmmanuel Vadot    enum: [1, 2, 3]
56*01950c46SEmmanuel Vadot
57*01950c46SEmmanuel VadotpatternProperties:
58*01950c46SEmmanuel Vadot  "^serial@[0-9a-f]+$":
59*01950c46SEmmanuel Vadot    type: object
60*01950c46SEmmanuel Vadot    description:
61*01950c46SEmmanuel Vadot      Child node describing USART. See atmel-usart.txt for details
62*01950c46SEmmanuel Vadot      of USART bindings.
63*01950c46SEmmanuel Vadot
64*01950c46SEmmanuel Vadot  "^spi@[0-9a-f]+$":
65*01950c46SEmmanuel Vadot    type: object
66*01950c46SEmmanuel Vadot    description:
67*01950c46SEmmanuel Vadot      Child node describing SPI. See ../spi/spi_atmel.txt for details
68*01950c46SEmmanuel Vadot      of SPI bindings.
69*01950c46SEmmanuel Vadot
70*01950c46SEmmanuel Vadot  "^i2c@[0-9a-f]+$":
71*01950c46SEmmanuel Vadot    $ref: /schemas/i2c/atmel,at91sam-i2c.yaml
72*01950c46SEmmanuel Vadot    description:
73*01950c46SEmmanuel Vadot      Child node describing I2C.
74*01950c46SEmmanuel Vadot
75*01950c46SEmmanuel Vadotrequired:
76*01950c46SEmmanuel Vadot  - compatible
77*01950c46SEmmanuel Vadot  - reg
78*01950c46SEmmanuel Vadot  - clocks
79*01950c46SEmmanuel Vadot  - "#address-cells"
80*01950c46SEmmanuel Vadot  - "#size-cells"
81*01950c46SEmmanuel Vadot  - ranges
82*01950c46SEmmanuel Vadot  - atmel,flexcom-mode
83*01950c46SEmmanuel Vadot
84*01950c46SEmmanuel VadotadditionalProperties: false
85*01950c46SEmmanuel Vadot
86*01950c46SEmmanuel Vadotexamples:
87*01950c46SEmmanuel Vadot  - |
88*01950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
89*01950c46SEmmanuel Vadot
90*01950c46SEmmanuel Vadot    flx0: flexcom@f8034000 {
91*01950c46SEmmanuel Vadot        compatible = "atmel,sama5d2-flexcom";
92*01950c46SEmmanuel Vadot        reg = <0xf8034000 0x200>;
93*01950c46SEmmanuel Vadot        clocks = <&flx0_clk>;
94*01950c46SEmmanuel Vadot        #address-cells = <1>;
95*01950c46SEmmanuel Vadot        #size-cells = <1>;
96*01950c46SEmmanuel Vadot        ranges = <0x0 0xf8034000 0x800>;
97*01950c46SEmmanuel Vadot        atmel,flexcom-mode = <2>;
98*01950c46SEmmanuel Vadot    };
99*01950c46SEmmanuel Vadot...
100