Documentation / devicetree / bindings / spi / omap-spi.yaml


Based on kernel version 6.10. Page generated on 2024-07-16 09:00 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/omap-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SPI Controller on OMAP and K3 SoCs

maintainers:
  - Aswath Govindraju <a-govindraju@ti.com>

allOf:
  - $ref: spi-controller.yaml#

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - ti,am654-mcspi
              - ti,am4372-mcspi
          - const: ti,omap4-mcspi
      - items:
          - enum:
              - ti,omap2-mcspi
              - ti,omap4-mcspi

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  ti,spi-num-cs:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Number of chipselect supported  by the instance.
    minimum: 1
    maximum: 4

  ti,hwmods:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      Must be "mcspi<n>", n being the instance number (1-based).
      This property is applicable only on legacy platforms mainly omap2/3
      and ti81xx and should not be used on other platforms.
    deprecated: true

  ti,pindir-d0-out-d1-in:
    description:
      Select the D0 pin as output and D1 as input. The default is D0
      as input and D1 as output.
    type: boolean

  dmas:
    description:
      List of DMA specifiers with the controller specific format as
      described in the generic DMA client binding. A tx and rx
      specifier is required for each chip select.
    minItems: 1
    maxItems: 8

  dma-names:
    description:
      List of DMA request names. These strings correspond 1:1 with
      the DMA specifiers listed in dmas. The string names is to be
      "rxN" and "txN" for RX and TX requests, respectively. Where N
      is the chip select number.
    minItems: 1
    maxItems: 8

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

if:
  properties:
    compatible:
      enum:
        - ti,omap2-mcspi
        - ti,omap4-mcspi

then:
  properties:
    ti,hwmods:
      items:
        - pattern: "^mcspi([1-9])$"

else:
  properties:
    ti,hwmods: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/soc/ti,sci_pm_domain.h>
 
    spi@2100000 {
      compatible = "ti,am654-mcspi","ti,omap4-mcspi";
      reg = <0x2100000 0x400>;
      interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
      clocks = <&k3_clks 137 1>;
      power-domains = <&k3_pds 137 TI_SCI_PD_EXCLUSIVE>;
      #address-cells = <1>;
      #size-cells = <0>;
      dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
      dma-names = "tx0", "rx0";
    };