xref: /freebsd/sys/contrib/device-tree/Bindings/spi/atmel,at91rm9200-spi.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
3b97ee269SEmmanuel Vadot%YAML 1.2
4b97ee269SEmmanuel Vadot---
5b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/atmel,at91rm9200-spi.yaml#
6b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7b97ee269SEmmanuel Vadot
8b97ee269SEmmanuel Vadottitle: Atmel SPI device
9b97ee269SEmmanuel Vadot
10b97ee269SEmmanuel Vadotmaintainers:
11b97ee269SEmmanuel Vadot  - Tudor Ambarus <tudor.ambarus@microchip.com>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel VadotallOf:
14b97ee269SEmmanuel Vadot  - $ref: spi-controller.yaml#
15b97ee269SEmmanuel Vadot
16b97ee269SEmmanuel Vadotproperties:
17b97ee269SEmmanuel Vadot  compatible:
18b97ee269SEmmanuel Vadot    oneOf:
19b97ee269SEmmanuel Vadot      - const: atmel,at91rm9200-spi
20b97ee269SEmmanuel Vadot      - items:
21b97ee269SEmmanuel Vadot          - const: microchip,sam9x60-spi
22b97ee269SEmmanuel Vadot          - const: atmel,at91rm9200-spi
23b97ee269SEmmanuel Vadot
24b97ee269SEmmanuel Vadot  reg:
25b97ee269SEmmanuel Vadot    maxItems: 1
26b97ee269SEmmanuel Vadot
27b97ee269SEmmanuel Vadot  interrupts:
28b97ee269SEmmanuel Vadot    maxItems: 1
29b97ee269SEmmanuel Vadot
30b97ee269SEmmanuel Vadot  clock-names:
31b97ee269SEmmanuel Vadot    contains:
32b97ee269SEmmanuel Vadot      const: spi_clk
33b97ee269SEmmanuel Vadot
34b97ee269SEmmanuel Vadot  clocks:
35b97ee269SEmmanuel Vadot    maxItems: 1
36b97ee269SEmmanuel Vadot
37*7ef62cebSEmmanuel Vadot  dmas:
38*7ef62cebSEmmanuel Vadot    items:
39*7ef62cebSEmmanuel Vadot      - description: TX DMA Channel
40*7ef62cebSEmmanuel Vadot      - description: RX DMA Channel
41*7ef62cebSEmmanuel Vadot
42*7ef62cebSEmmanuel Vadot  dma-names:
43*7ef62cebSEmmanuel Vadot    items:
44*7ef62cebSEmmanuel Vadot      - const: tx
45*7ef62cebSEmmanuel Vadot      - const: rx
46*7ef62cebSEmmanuel Vadot
47b97ee269SEmmanuel Vadot  atmel,fifo-size:
48b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
49b97ee269SEmmanuel Vadot    description: |
50b97ee269SEmmanuel Vadot      Maximum number of data the RX and TX FIFOs can store for FIFO
51b97ee269SEmmanuel Vadot      capable SPI controllers.
52b97ee269SEmmanuel Vadot    enum: [ 16, 32 ]
53b97ee269SEmmanuel Vadot
54b97ee269SEmmanuel Vadotrequired:
55b97ee269SEmmanuel Vadot  - compatible
56b97ee269SEmmanuel Vadot  - reg
57b97ee269SEmmanuel Vadot  - interrupts
58b97ee269SEmmanuel Vadot  - clock-names
59b97ee269SEmmanuel Vadot  - clocks
60b97ee269SEmmanuel Vadot
61b97ee269SEmmanuel VadotunevaluatedProperties: false
62b97ee269SEmmanuel Vadot
63b97ee269SEmmanuel Vadotexamples:
64b97ee269SEmmanuel Vadot  - |
65b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
66b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
67b97ee269SEmmanuel Vadot
68b97ee269SEmmanuel Vadot    spi1: spi@fffcc000 {
69b97ee269SEmmanuel Vadot        compatible = "atmel,at91rm9200-spi";
70b97ee269SEmmanuel Vadot        reg = <0xfffcc000 0x4000>;
71b97ee269SEmmanuel Vadot        interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>;
72b97ee269SEmmanuel Vadot        #address-cells = <1>;
73b97ee269SEmmanuel Vadot        #size-cells = <0>;
74b97ee269SEmmanuel Vadot        clocks = <&spi1_clk>;
75b97ee269SEmmanuel Vadot        clock-names = "spi_clk";
76b97ee269SEmmanuel Vadot        cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>;
77b97ee269SEmmanuel Vadot        atmel,fifo-size = <32>;
78b97ee269SEmmanuel Vadot
79b97ee269SEmmanuel Vadot        mmc@0 {
80b97ee269SEmmanuel Vadot            compatible = "mmc-spi-slot";
81b97ee269SEmmanuel Vadot            reg = <0>;
82b97ee269SEmmanuel Vadot            gpios = <&pioC 4 GPIO_ACTIVE_HIGH>;    /* CD */
83b97ee269SEmmanuel Vadot            spi-max-frequency = <25000000>;
84b97ee269SEmmanuel Vadot        };
85b97ee269SEmmanuel Vadot    };
86