summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
blob: 5dd209206e8806a1203928f918f001d72d9447e9 (plain)
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
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/spi-peripheral-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Peripheral-specific properties for a SPI bus.

description:
  Many SPI controllers need to add properties to peripheral devices. They could
  be common properties like spi-max-frequency, spi-cpha, etc. or they could be
  controller specific like delay in clock or data lines, etc. These properties
  need to be defined in the peripheral node because they are per-peripheral and
  there can be multiple peripherals attached to a controller. All those
  properties are listed here. The controller specific properties should go in
  their own separate schema that should be referenced from here.

maintainers:
  - Pratyush Yadav <p.yadav@ti.com>

properties:
  reg:
    minItems: 1
    maxItems: 256
    items:
      minimum: 0
      maximum: 256
    description:
      Chip select used by the device.

  spi-3wire:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The device requires 3-wire mode.

  spi-cpha:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The device requires shifted clock phase (CPHA) mode.

  spi-cpol:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The device requires inverse clock polarity (CPOL) mode.

  spi-cs-high:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The device requires the chip select active high.

  spi-lsb-first:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The device requires the LSB first mode.

  spi-max-frequency:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Maximum SPI clocking speed of the device in Hz.

  spi-rx-bus-width:
    description:
      Bus width to the SPI bus used for read transfers.
      If 0 is provided, then no RX will be possible on this device.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 4, 8]
    default: 1

  spi-rx-delay-us:
    description:
      Delay, in microseconds, after a read transfer.

  spi-tx-bus-width:
    description:
      Bus width to the SPI bus used for write transfers.
      If 0 is provided, then no TX will be possible on this device.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 4, 8]
    default: 1

  spi-tx-delay-us:
    description:
      Delay, in microseconds, after a write transfer.

# The controller specific properties go here.
allOf:
  - $ref: cdns,qspi-nor-peripheral-props.yaml#

additionalProperties: true