Commit 80a38bfb authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Mark Brown

spi: dt-bindings: introduce FIFO depth properties

There are SPI IPs that can be configured by the integrator with a
specific FIFO depth depending on the system's capabilities. For example,
the samsung USI SPI IP can be configured by the integrator with a TX/RX
FIFO from 8 byte to 256 bytes.

Introduce the ``fifo-depth`` property for such instances of IPs where the
same FIFO depth is used for both RX and TX. Introduce ``rx-fifo-depth``
and ``tx-fifo-depth`` properties for cases where the RX FIFO depth is
different from the TX FIFO depth.

Make the dedicated RX/TX properties dependent on each other and mutual
exclusive with the other.
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://msgid.link/r/20240216070555.2483977-2-tudor.ambarus@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0f1a277b
......@@ -69,6 +69,21 @@ properties:
Should be generally avoided and be replaced by
spi-cs-high + ACTIVE_HIGH.
fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Size of the RX and TX data FIFOs in bytes.
rx-fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Size of the RX data FIFO in bytes.
tx-fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Size of the TX data FIFO in bytes.
num-cs:
$ref: /schemas/types.yaml#/definitions/uint32
description:
......@@ -116,6 +131,10 @@ patternProperties:
- compatible
- reg
dependencies:
rx-fifo-depth: [ tx-fifo-depth ]
tx-fifo-depth: [ rx-fifo-depth ]
allOf:
- if:
not:
......@@ -129,6 +148,14 @@ allOf:
properties:
"#address-cells":
const: 0
- not:
required:
- fifo-depth
- rx-fifo-depth
- not:
required:
- fifo-depth
- tx-fifo-depth
additionalProperties: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment