Skip to content

Commit f3bfa0f

Browse files
neuschaeferbroonie
authored andcommitted
spi: dt-bindings: Convert Freescale SPI bindings to YAML
fsl-spi.txt contains the bindings for the fsl,spi and fsl,espi contollers. Convert them to YAML. Reviewed-by: "Rob Herring (Arm)" <[email protected]> Signed-off-by: J. Neuschäfer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cb15abd commit f3bfa0f

File tree

3 files changed

+139
-62
lines changed

3 files changed

+139
-62
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/fsl,espi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller
8+
9+
maintainers:
10+
- J. Neuschäfer <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: fsl,mpc8536-espi
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
fsl,espi-num-chipselects:
23+
$ref: /schemas/types.yaml#/definitions/uint32
24+
enum: [ 1, 4 ]
25+
description: The number of the chipselect signals.
26+
27+
fsl,csbef:
28+
$ref: /schemas/types.yaml#/definitions/uint32
29+
minimum: 0
30+
maximum: 15
31+
description: Chip select assertion time in bits before frame starts
32+
33+
fsl,csaft:
34+
$ref: /schemas/types.yaml#/definitions/uint32
35+
minimum: 0
36+
maximum: 15
37+
description: Chip select negation time in bits after frame ends
38+
39+
required:
40+
- compatible
41+
- reg
42+
- interrupts
43+
- fsl,espi-num-chipselects
44+
45+
allOf:
46+
- $ref: spi-controller.yaml#
47+
48+
unevaluatedProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/interrupt-controller/irq.h>
53+
54+
spi@110000 {
55+
compatible = "fsl,mpc8536-espi";
56+
reg = <0x110000 0x1000>;
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
interrupts = <53 IRQ_TYPE_EDGE_FALLING>;
60+
fsl,espi-num-chipselects = <4>;
61+
fsl,csbef = <1>;
62+
fsl,csaft = <1>;
63+
};
64+
65+
...
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/fsl,spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale SPI (Serial Peripheral Interface) controller
8+
9+
maintainers:
10+
- J. Neuschäfer <[email protected]>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- fsl,spi
16+
- aeroflexgaisler,spictrl
17+
18+
reg:
19+
maxItems: 1
20+
21+
cell-index:
22+
$ref: /schemas/types.yaml#/definitions/uint32
23+
description: |
24+
QE SPI subblock index.
25+
0: QE subblock SPI1
26+
1: QE subblock SPI2
27+
28+
mode:
29+
description: SPI operation mode
30+
enum:
31+
- cpu
32+
- cpu-qe
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
clock-frequency:
38+
description: input clock frequency to non FSL_SOC cores
39+
40+
cs-gpios: true
41+
42+
fsl,spisel_boot:
43+
$ref: /schemas/types.yaml#/definitions/flag
44+
description:
45+
For the MPC8306 and MPC8309, specifies that the SPISEL_BOOT signal is used
46+
as chip select for a slave device. Use reg = <number of gpios> in the
47+
corresponding child node, i.e. 0 if the cs-gpios property is not present.
48+
49+
required:
50+
- compatible
51+
- reg
52+
- mode
53+
- interrupts
54+
55+
allOf:
56+
- $ref: spi-controller.yaml#
57+
58+
unevaluatedProperties: false
59+
60+
examples:
61+
- |
62+
#include <dt-bindings/interrupt-controller/irq.h>
63+
64+
spi@4c0 {
65+
compatible = "fsl,spi";
66+
reg = <0x4c0 0x40>;
67+
cell-index = <0>;
68+
interrupts = <82 0>;
69+
mode = "cpu";
70+
cs-gpios = <&gpio 18 IRQ_TYPE_EDGE_RISING // device reg=<0>
71+
&gpio 19 IRQ_TYPE_EDGE_RISING>; // device reg=<1>
72+
};
73+
74+
...

Documentation/devicetree/bindings/spi/fsl-spi.txt

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)