Skip to content

Commit 7105fdd

Browse files
robherringbroonie
authored andcommitted
spi: dt-bindings: Convert marvell,orion-spi to DT schema
Convert the Marvell Orion SPI binding to schema. Update compatible strings to what is in use. Generally, "marvell,orion-spi" is a fallback compatible, but newer variants only use "marvell,armada-380-spi". Mark cell-index as deprecated and not required as some instances don't use it already. Signed-off-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent d2c0e95 commit 7105fdd

File tree

2 files changed

+102
-79
lines changed

2 files changed

+102
-79
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/marvell,orion-spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Orion SPI controller
8+
9+
maintainers:
10+
- Andrew Lunn <[email protected]>
11+
- Gregory CLEMENT <[email protected]>
12+
13+
allOf:
14+
- $ref: /schemas/spi/spi-controller.yaml#
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- enum:
20+
- marvell,orion-spi
21+
- marvell,armada-380-spi # For ap80x and cp11x
22+
- items:
23+
- enum:
24+
- marvell,armada-370-spi
25+
- marvell,armada-375-spi
26+
- marvell,armada-380-spi
27+
- marvell,armada-390-spi
28+
- marvell,armada-xp-spi
29+
- const: marvell,orion-spi
30+
31+
cell-index:
32+
description: Instance id for the SPI controller
33+
deprecated: true
34+
35+
reg:
36+
minItems: 1
37+
items:
38+
- description: control registers
39+
- description: CS0 MBUS target/attribute registers for direct mode
40+
- description: CS1 MBUS target/attribute registers for direct mode
41+
- description: CS2 MBUS target/attribute registers for direct mode
42+
- description: CS3 MBUS target/attribute registers for direct mode
43+
- description: CS4 MBUS target/attribute registers for direct mode
44+
- description: CS5 MBUS target/attribute registers for direct mode
45+
- description: CS6 MBUS target/attribute registers for direct mode
46+
- description: CS7 MBUS target/attribute registers for direct mode
47+
48+
clocks:
49+
minItems: 1
50+
maxItems: 2
51+
52+
clock-names:
53+
items:
54+
- const: core
55+
- const: axi
56+
57+
interrupts:
58+
maxItems: 1
59+
60+
required:
61+
- compatible
62+
- reg
63+
- clocks
64+
65+
unevaluatedProperties: false
66+
67+
examples:
68+
- |
69+
spi@10600 {
70+
compatible = "marvell,orion-spi";
71+
#address-cells = <1>;
72+
#size-cells = <0>;
73+
cell-index = <0>;
74+
reg = <0x10600 0x28>;
75+
clocks = <&coreclk 0>;
76+
interrupts = <23>;
77+
};
78+
- |
79+
#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
80+
81+
bus {
82+
#address-cells = <2>;
83+
#size-cells = <1>;
84+
85+
spi@10600 {
86+
compatible = "marvell,orion-spi";
87+
#address-cells = <1>;
88+
#size-cells = <0>;
89+
cell-index = <0>;
90+
reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */
91+
<MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */
92+
<MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */
93+
<MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */
94+
<MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */
95+
<MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */
96+
<MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */
97+
<MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */
98+
<MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */
99+
clocks = <&coreclk 0>;
100+
interrupts = <23>;
101+
};
102+
};

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

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

0 commit comments

Comments
 (0)