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: |
Krzysztof Kozlowski | 2fd92c7 | 2022-08-11 09:38:26 +0300 | [diff] [blame] | 19 | - Mark Brown <broonie@kernel.org> |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 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 | |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 32 | spi-cs-high: |
| 33 | $ref: /schemas/types.yaml#/definitions/flag |
| 34 | description: |
| 35 | The device requires the chip select active high. |
| 36 | |
| 37 | spi-lsb-first: |
| 38 | $ref: /schemas/types.yaml#/definitions/flag |
| 39 | description: |
| 40 | The device requires the LSB first mode. |
| 41 | |
| 42 | spi-max-frequency: |
| 43 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 44 | description: |
| 45 | Maximum SPI clocking speed of the device in Hz. |
| 46 | |
Tudor Ambarus | f6c911f | 2022-11-17 12:52:42 +0200 | [diff] [blame] | 47 | spi-cs-setup-ns: |
| 48 | description: |
| 49 | Delay in nanosecods to be introduced by the controller after CS is |
| 50 | asserted. |
| 51 | |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 52 | spi-rx-bus-width: |
| 53 | description: |
| 54 | Bus width to the SPI bus used for read transfers. |
| 55 | If 0 is provided, then no RX will be possible on this device. |
| 56 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 57 | enum: [0, 1, 2, 4, 8] |
| 58 | default: 1 |
| 59 | |
| 60 | spi-rx-delay-us: |
| 61 | description: |
| 62 | Delay, in microseconds, after a read transfer. |
| 63 | |
Rob Herring | b658be5 | 2022-05-25 16:00:53 -0500 | [diff] [blame] | 64 | rx-sample-delay-ns: |
| 65 | description: SPI Rx sample delay offset, unit is nanoseconds. |
| 66 | The delay from the default sample time before the actual |
| 67 | sample of the rxd input signal occurs. |
| 68 | |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 69 | spi-tx-bus-width: |
| 70 | description: |
| 71 | Bus width to the SPI bus used for write transfers. |
| 72 | If 0 is provided, then no TX will be possible on this device. |
| 73 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 74 | enum: [0, 1, 2, 4, 8] |
| 75 | default: 1 |
| 76 | |
| 77 | spi-tx-delay-us: |
| 78 | description: |
| 79 | Delay, in microseconds, after a write transfer. |
| 80 | |
Miquel Raynal | e2edd1b | 2022-01-26 12:26:06 +0100 | [diff] [blame] | 81 | stacked-memories: |
| 82 | description: Several SPI memories can be wired in stacked mode. |
| 83 | This basically means that either a device features several chip |
| 84 | selects, or that different devices must be seen as a single |
| 85 | bigger chip. This basically doubles (or more) the total address |
| 86 | space with only a single additional wire, while still needing |
| 87 | to repeat the commands when crossing a chip boundary. The size of |
| 88 | each chip should be provided as members of the array. |
| 89 | $ref: /schemas/types.yaml#/definitions/uint64-array |
| 90 | minItems: 2 |
| 91 | maxItems: 4 |
| 92 | |
| 93 | parallel-memories: |
| 94 | description: Several SPI memories can be wired in parallel mode. |
| 95 | The devices are physically on a different buses but will always |
| 96 | act synchronously as each data word is spread across the |
| 97 | different memories (eg. even bits are stored in one memory, odd |
| 98 | bits in the other). This basically doubles the address space and |
| 99 | the throughput while greatly complexifying the wiring because as |
| 100 | many busses as devices must be wired. The size of each chip should |
| 101 | be provided as members of the array. |
| 102 | $ref: /schemas/types.yaml#/definitions/uint64-array |
| 103 | minItems: 2 |
| 104 | maxItems: 4 |
| 105 | |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 106 | # The controller specific properties go here. |
Pratyush Yadav | b6bdc6e | 2021-11-09 23:49:10 +0530 | [diff] [blame] | 107 | allOf: |
| 108 | - $ref: cdns,qspi-nor-peripheral-props.yaml# |
Krzysztof Kozlowski | 0ff4827 | 2022-01-24 09:23:44 +0100 | [diff] [blame] | 109 | - $ref: samsung,spi-peripheral-props.yaml# |
Krishna Yarlagadda | e239178 | 2022-06-07 17:16:58 +0530 | [diff] [blame] | 110 | - $ref: nvidia,tegra210-quad-peripheral-props.yaml# |
Pratyush Yadav | 8762b07 | 2021-11-09 23:49:09 +0530 | [diff] [blame] | 111 | |
| 112 | additionalProperties: true |