Skip to content

Commit 94f19d0

Browse files
nxpfranklibroonie
authored andcommitted
spi: dt-bindings: fsl-dspi: Convert to yaml format
Convert dt-binding spi-fsl-dspi.txt to yaml format. Use part Vladimir Oltean's work at of https://lore.kernel.org/linux-spi/[email protected]/ Additional changes during convert: - compatible string "fsl,ls1028a-dspi" can be followed by fsl,ls1021a-v1.0-dspi. - Change "dspi0@4002c000" to "spi@4002c000" in example. - Reorder properties in example. - Use GIC include in example. - Deprecated fsl,spi-cs-sck-delay and fsl,spi-sck-cs-delay by use common SPI property. - Use compatible string 'jedec,spi-nor' in example. - Split peripheral part to fsl,dspi-peripheral-props.yaml. - Remove 'interrupts' and 'pinctrl' from required list. - Update 'bus-num' description. - Update 'spi-num-chipselects' description by add "cs-gpios don't count against this number". - Remove 'big-endian' description. Co-developed-by: Kuldeep Singh <[email protected]> Signed-off-by: Kuldeep Singh <[email protected]> Co-developed-by: Vladimir Oltean <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Frank Li <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 52e7877 commit 94f19d0

File tree

5 files changed

+135
-66
lines changed

5 files changed

+135
-66
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/fsl,dspi-peripheral-props.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Peripheral-specific properties for Freescale DSPI controller
8+
9+
maintainers:
10+
- Vladimir Oltean <[email protected]>
11+
12+
description:
13+
See spi-peripheral-props.yaml for more info.
14+
15+
properties:
16+
fsl,spi-cs-sck-delay:
17+
deprecated: true
18+
description:
19+
Delay in nanoseconds between activating chip select and the start of
20+
clock signal, at the start of a transfer.
21+
$ref: /schemas/types.yaml#/definitions/uint32
22+
23+
fsl,spi-sck-cs-delay:
24+
deprecated: true
25+
description:
26+
Delay in nanoseconds between stopping the clock signal and
27+
deactivating chip select, at the end of a transfer.
28+
$ref: /schemas/types.yaml#/definitions/uint32
29+
30+
additionalProperties: true
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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,dspi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ARM Freescale DSPI controller
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- enum:
16+
- fsl,vf610-dspi
17+
- fsl,ls1021a-v1.0-dspi
18+
- fsl,ls1012a-dspi
19+
- fsl,ls1028a-dspi
20+
- fsl,ls1043a-dspi
21+
- fsl,ls1046a-dspi
22+
- fsl,ls1088a-dspi
23+
- fsl,ls2080a-dspi
24+
- fsl,ls2085a-dspi
25+
- fsl,lx2160a-dspi
26+
- items:
27+
- enum:
28+
- fsl,ls1012a-dspi
29+
- fsl,ls1028a-dspi
30+
- fsl,ls1043a-dspi
31+
- fsl,ls1046a-dspi
32+
- fsl,ls1088a-dspi
33+
- const: fsl,ls1021a-v1.0-dspi
34+
- items:
35+
- const: fsl,ls2080a-dspi
36+
- const: fsl,ls2085a-dspi
37+
38+
reg:
39+
maxItems: 1
40+
41+
interrupts:
42+
maxItems: 1
43+
44+
clocks:
45+
maxItems: 1
46+
47+
clock-names:
48+
items:
49+
- const: dspi
50+
51+
spi-num-chipselects:
52+
$ref: /schemas/types.yaml#/definitions/uint32
53+
description:
54+
The number of the chip native chipselect signals.
55+
cs-gpios don't count against this number.
56+
57+
big-endian: true
58+
59+
bus-num:
60+
$ref: /schemas/types.yaml#/definitions/uint32
61+
description: SoC-specific identifier for the SPI controller.
62+
63+
required:
64+
- compatible
65+
- reg
66+
- clocks
67+
- clock-names
68+
- spi-num-chipselects
69+
70+
allOf:
71+
- $ref: spi-controller.yaml#
72+
73+
unevaluatedProperties: false
74+
75+
examples:
76+
- |
77+
#include <dt-bindings/interrupt-controller/arm-gic.h>
78+
#include <dt-bindings/clock/vf610-clock.h>
79+
80+
spi@4002c000 {
81+
compatible = "fsl,vf610-dspi";
82+
reg = <0x4002c000 0x1000>;
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
86+
clocks = <&clks VF610_CLK_DSPI0>;
87+
clock-names = "dspi";
88+
spi-num-chipselects = <5>;
89+
bus-num = <0>;
90+
pinctrl-names = "default";
91+
pinctrl-0 = <&pinctrl_dspi0_1>;
92+
big-endian;
93+
94+
flash@0 {
95+
compatible = "jedec,spi-nor";
96+
reg = <0>;
97+
spi-max-frequency = <16000000>;
98+
spi-cpol;
99+
spi-cpha;
100+
spi-cs-setup-delay-ns = <100>;
101+
spi-cs-hold-delay-ns = <50>;
102+
};
103+
};

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

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

Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ properties:
122122
allOf:
123123
- $ref: arm,pl022-peripheral-props.yaml#
124124
- $ref: cdns,qspi-nor-peripheral-props.yaml#
125+
- $ref: fsl,dspi-peripheral-props.yaml#
125126
- $ref: samsung,spi-peripheral-props.yaml#
126127
- $ref: nvidia,tegra210-quad-peripheral-props.yaml#
127128

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8708,7 +8708,7 @@ FREESCALE DSPI DRIVER
87088708
M: Vladimir Oltean <[email protected]>
87098709
87108710
S: Maintained
8711-
F: Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
8711+
F: Documentation/devicetree/bindings/spi/fsl,dspi*.yaml
87128712
F: drivers/spi/spi-fsl-dspi.c
87138713
F: include/linux/spi/spi-fsl-dspi.h
87148714

0 commit comments

Comments
 (0)