0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/spi/omap-spi.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: SPI controller bindings for OMAP and K3 SoCs
0008
0009 maintainers:
0010 - Aswath Govindraju <a-govindraju@ti.com>
0011
0012 allOf:
0013 - $ref: spi-controller.yaml#
0014
0015 properties:
0016 compatible:
0017 oneOf:
0018 - items:
0019 - enum:
0020 - ti,am654-mcspi
0021 - ti,am4372-mcspi
0022 - const: ti,omap4-mcspi
0023 - items:
0024 - enum:
0025 - ti,omap2-mcspi
0026 - ti,omap4-mcspi
0027
0028 reg:
0029 maxItems: 1
0030
0031 interrupts:
0032 maxItems: 1
0033
0034 clocks:
0035 maxItems: 1
0036
0037 power-domains:
0038 maxItems: 1
0039
0040 ti,spi-num-cs:
0041 $ref: /schemas/types.yaml#/definitions/uint32
0042 description: Number of chipselect supported by the instance.
0043 minimum: 1
0044 maximum: 4
0045
0046 ti,hwmods:
0047 $ref: /schemas/types.yaml#/definitions/string
0048 description:
0049 Must be "mcspi<n>", n being the instance number (1-based).
0050 This property is applicable only on legacy platforms mainly omap2/3
0051 and ti81xx and should not be used on other platforms.
0052 deprecated: true
0053
0054 ti,pindir-d0-out-d1-in:
0055 description:
0056 Select the D0 pin as output and D1 as input. The default is D0
0057 as input and D1 as output.
0058 type: boolean
0059
0060 dmas:
0061 description:
0062 List of DMA specifiers with the controller specific format as
0063 described in the generic DMA client binding. A tx and rx
0064 specifier is required for each chip select.
0065 minItems: 1
0066 maxItems: 8
0067
0068 dma-names:
0069 description:
0070 List of DMA request names. These strings correspond 1:1 with
0071 the DMA sepecifiers listed in dmas. The string names is to be
0072 "rxN" and "txN" for RX and TX requests, respectively. Where N
0073 is the chip select number.
0074 minItems: 1
0075 maxItems: 8
0076
0077 required:
0078 - compatible
0079 - reg
0080 - interrupts
0081
0082 unevaluatedProperties: false
0083
0084 if:
0085 properties:
0086 compatible:
0087 enum:
0088 - ti,omap2-mcspi
0089 - ti,omap4-mcspi
0090
0091 then:
0092 properties:
0093 ti,hwmods:
0094 items:
0095 - pattern: "^mcspi([1-9])$"
0096
0097 else:
0098 properties:
0099 ti,hwmods: false
0100
0101 examples:
0102 - |
0103 #include <dt-bindings/interrupt-controller/irq.h>
0104 #include <dt-bindings/interrupt-controller/arm-gic.h>
0105 #include <dt-bindings/soc/ti,sci_pm_domain.h>
0106
0107 spi@2100000 {
0108 compatible = "ti,am654-mcspi","ti,omap4-mcspi";
0109 reg = <0x2100000 0x400>;
0110 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
0111 clocks = <&k3_clks 137 1>;
0112 power-domains = <&k3_pds 137 TI_SCI_PD_EXCLUSIVE>;
0113 #address-cells = <1>;
0114 #size-cells = <0>;
0115 dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
0116 dma-names = "tx0", "rx0";
0117 };