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