Skip to content

Commit 8ce9a2e

Browse files
prajnarkbroonie
authored andcommitted
spi: dt-binding: document Microchip CoreSPI
Add device tree bindings for Microchip's CoreSPI controller. CoreSPI is a "soft" IP core intended for FPGA implementations. Its configurations are set in Libero. These properties represent non-discoverable configurations determined by Verilog parameters to the IP. Signed-off-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20251114104545.284765-3-prajna.rajendrakumar@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 71c814e commit 8ce9a2e

1 file changed

Lines changed: 68 additions & 2 deletions

File tree

Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ properties:
2121
- microchip,mpfs-qspi
2222
- microchip,pic64gx-qspi
2323
- const: microchip,coreqspi-rtl-v2
24-
- const: microchip,coreqspi-rtl-v2 # FPGA QSPI
24+
- enum:
25+
- microchip,coreqspi-rtl-v2 # FPGA QSPI
26+
- microchip,corespi-rtl-v5 # FPGA CoreSPI
27+
- microchip,mpfs-spi
2528
- items:
2629
- const: microchip,pic64gx-spi
2730
- const: microchip,mpfs-spi
28-
- const: microchip,mpfs-spi
2931

3032
reg:
3133
maxItems: 1
@@ -39,6 +41,45 @@ properties:
3941
clocks:
4042
maxItems: 1
4143

44+
microchip,apb-datawidth:
45+
description: APB bus data width in bits.
46+
$ref: /schemas/types.yaml#/definitions/uint32
47+
enum: [8, 16, 32]
48+
default: 8
49+
50+
microchip,frame-size:
51+
description: |
52+
Number of bits per SPI frame, as configured in Libero.
53+
In Motorola and TI modes, this corresponds directly
54+
to the requested frame size. For NSC mode this is set
55+
to 9 + the required data frame size.
56+
$ref: /schemas/types.yaml#/definitions/uint32
57+
minimum: 4
58+
maximum: 32
59+
default: 8
60+
61+
microchip,protocol-configuration:
62+
description: CoreSPI protocol selection. Determines operating mode
63+
$ref: /schemas/types.yaml#/definitions/string
64+
enum:
65+
- motorola
66+
- ti
67+
- nsc
68+
default: motorola
69+
70+
microchip,motorola-mode:
71+
description: Motorola SPI mode selection
72+
$ref: /schemas/types.yaml#/definitions/uint32
73+
enum: [0, 1, 2, 3]
74+
default: 3
75+
76+
microchip,ssel-active:
77+
description: |
78+
Keep SSEL asserted between frames when using the Motorola protocol.
79+
When present, the controller keeps SSEL active across contiguous
80+
transfers and deasserts only when the overall transfer completes.
81+
type: boolean
82+
4283
required:
4384
- compatible
4485
- reg
@@ -71,6 +112,31 @@ allOf:
71112
num-cs:
72113
maximum: 1
73114

115+
- if:
116+
properties:
117+
compatible:
118+
contains:
119+
const: microchip,corespi-rtl-v5
120+
then:
121+
properties:
122+
num-cs:
123+
minimum: 1
124+
maximum: 8
125+
default: 8
126+
127+
fifo-depth:
128+
minimum: 1
129+
maximum: 32
130+
default: 4
131+
132+
else:
133+
properties:
134+
microchip,apb-datawidth: false
135+
microchip,frame-size: false
136+
microchip,protocol-configuration: false
137+
microchip,motorola-mode: false
138+
microchip,ssel-active: false
139+
74140
unevaluatedProperties: false
75141

76142
examples:

0 commit comments

Comments
 (0)