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