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