Skip to content

Commit 80a38bf

Browse files
ambarusbroonie
authored andcommitted
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: Rob Herring <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0f1a277 commit 80a38bf

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Documentation/devicetree/bindings/spi/spi-controller.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ properties:
6969
Should be generally avoided and be replaced by
7070
spi-cs-high + ACTIVE_HIGH.
7171
72+
fifo-depth:
73+
$ref: /schemas/types.yaml#/definitions/uint32
74+
description:
75+
Size of the RX and TX data FIFOs in bytes.
76+
77+
rx-fifo-depth:
78+
$ref: /schemas/types.yaml#/definitions/uint32
79+
description:
80+
Size of the RX data FIFO in bytes.
81+
82+
tx-fifo-depth:
83+
$ref: /schemas/types.yaml#/definitions/uint32
84+
description:
85+
Size of the TX data FIFO in bytes.
86+
7287
num-cs:
7388
$ref: /schemas/types.yaml#/definitions/uint32
7489
description:
@@ -116,6 +131,10 @@ patternProperties:
116131
- compatible
117132
- reg
118133

134+
dependencies:
135+
rx-fifo-depth: [ tx-fifo-depth ]
136+
tx-fifo-depth: [ rx-fifo-depth ]
137+
119138
allOf:
120139
- if:
121140
not:
@@ -129,6 +148,14 @@ allOf:
129148
properties:
130149
"#address-cells":
131150
const: 0
151+
- not:
152+
required:
153+
- fifo-depth
154+
- rx-fifo-depth
155+
- not:
156+
required:
157+
- fifo-depth
158+
- tx-fifo-depth
132159

133160
additionalProperties: true
134161

0 commit comments

Comments
 (0)