Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/spi/spi-peripheral-props.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Peripheral-specific properties for a SPI bus. |
| 8 | |
| 9 | description: |
| 10 | Many SPI controllers need to add properties to peripheral devices. They could |
| 11 | be common properties like spi-max-frequency, spi-cpha, etc. or they could be |
| 12 | controller specific like delay in clock or data lines, etc. These properties |
| 13 | need to be defined in the peripheral node because they are per-peripheral and |
| 14 | there can be multiple peripherals attached to a controller. All those |
| 15 | properties are listed here. The controller specific properties should go in |
| 16 | their own separate schema that should be referenced from here. |
| 17 | |
| 18 | maintainers: |
| 19 | - Pratyush Yadav <p.yadav@ti.com> |
| 20 | |
| 21 | properties: |
| 22 | reg: |
| 23 | minItems: 1 |
| 24 | maxItems: 256 |
| 25 | items: |
Rob Herring | 60b1e97 | 2022-01-26 17:13:26 -0600 | [diff] [blame] | 26 | items: |
| 27 | - minimum: 0 |
| 28 | maximum: 256 |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 29 | description: |
| 30 | Chip select used by the device. |
| 31 | |
| 32 | spi-3wire: |
| 33 | $ref: /schemas/types.yaml#/definitions/flag |
| 34 | description: |
| 35 | The device requires 3-wire mode. |
| 36 | |
| 37 | spi-cpha: |
| 38 | $ref: /schemas/types.yaml#/definitions/flag |
| 39 | description: |
| 40 | The device requires shifted clock phase (CPHA) mode. |
| 41 | |
| 42 | spi-cpol: |
| 43 | $ref: /schemas/types.yaml#/definitions/flag |
| 44 | description: |
| 45 | The device requires inverse clock polarity (CPOL) mode. |
| 46 | |
| 47 | spi-cs-high: |
| 48 | $ref: /schemas/types.yaml#/definitions/flag |
| 49 | description: |
| 50 | The device requires the chip select active high. |
| 51 | |
| 52 | spi-lsb-first: |
| 53 | $ref: /schemas/types.yaml#/definitions/flag |
| 54 | description: |
| 55 | The device requires the LSB first mode. |
| 56 | |
| 57 | spi-max-frequency: |
| 58 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 59 | description: |
| 60 | Maximum SPI clocking speed of the device in Hz. |
| 61 | |
| 62 | spi-rx-bus-width: |
| 63 | description: |
| 64 | Bus width to the SPI bus used for read transfers. |
| 65 | If 0 is provided, then no RX will be possible on this device. |
| 66 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 67 | enum: [0, 1, 2, 4, 8] |
| 68 | default: 1 |
| 69 | |
| 70 | spi-rx-delay-us: |
| 71 | description: |
| 72 | Delay, in microseconds, after a read transfer. |
| 73 | |
| 74 | spi-tx-bus-width: |
| 75 | description: |
| 76 | Bus width to the SPI bus used for write transfers. |
| 77 | If 0 is provided, then no TX will be possible on this device. |
| 78 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 79 | enum: [0, 1, 2, 4, 8] |
| 80 | default: 1 |
| 81 | |
| 82 | spi-tx-delay-us: |
| 83 | description: |
| 84 | Delay, in microseconds, after a write transfer. |
| 85 | |
| 86 | # The controller specific properties go here. |
Pratyush Yadav | b6bdc6e | 2021-11-09 23:49:10 +0530 | [diff] [blame] | 87 | allOf: |
| 88 | - $ref: cdns,qspi-nor-peripheral-props.yaml# |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 89 | |
| 90 | additionalProperties: true |