xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/renesas,rzg3e-xspi.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2ae5de77eSEmmanuel Vadot%YAML 1.2
3ae5de77eSEmmanuel Vadot---
4ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/renesas,rzg3e-xspi.yaml#
5ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6ae5de77eSEmmanuel Vadot
7ae5de77eSEmmanuel Vadottitle: Renesas Expanded Serial Peripheral Interface (xSPI)
8ae5de77eSEmmanuel Vadot
9ae5de77eSEmmanuel Vadotmaintainers:
10ae5de77eSEmmanuel Vadot  - Biju Das <biju.das.jz@bp.renesas.com>
11ae5de77eSEmmanuel Vadot
12ae5de77eSEmmanuel Vadotdescription: |
13ae5de77eSEmmanuel Vadot  Renesas xSPI allows a SPI flash connected to the SoC to be accessed via
14ae5de77eSEmmanuel Vadot  the memory-mapping or the manual command mode.
15ae5de77eSEmmanuel Vadot
16ae5de77eSEmmanuel Vadot  The flash chip itself should be represented by a subnode of the XSPI node.
17ae5de77eSEmmanuel Vadot  The flash interface is selected based on the "compatible" property of this
18ae5de77eSEmmanuel Vadot  subnode:
19ae5de77eSEmmanuel Vadot  -  "jedec,spi-nor";
20ae5de77eSEmmanuel Vadot
21ae5de77eSEmmanuel VadotallOf:
22ae5de77eSEmmanuel Vadot  - $ref: /schemas/spi/spi-controller.yaml#
23ae5de77eSEmmanuel Vadot
24ae5de77eSEmmanuel Vadotproperties:
25ae5de77eSEmmanuel Vadot  compatible:
26*833e5d42SEmmanuel Vadot    oneOf:
27*833e5d42SEmmanuel Vadot      - const: renesas,r9a09g047-xspi  # RZ/G3E
28*833e5d42SEmmanuel Vadot
29*833e5d42SEmmanuel Vadot      - items:
30*833e5d42SEmmanuel Vadot          - enum:
31*833e5d42SEmmanuel Vadot              - renesas,r9a09g056-xspi  # RZ/V2N
32*833e5d42SEmmanuel Vadot              - renesas,r9a09g057-xspi  # RZ/V2H(P)
33*833e5d42SEmmanuel Vadot          - const: renesas,r9a09g047-xspi
34ae5de77eSEmmanuel Vadot
35ae5de77eSEmmanuel Vadot  reg:
36ae5de77eSEmmanuel Vadot    items:
37ae5de77eSEmmanuel Vadot      - description: xSPI registers
38ae5de77eSEmmanuel Vadot      - description: direct mapping area
39ae5de77eSEmmanuel Vadot
40ae5de77eSEmmanuel Vadot  reg-names:
41ae5de77eSEmmanuel Vadot    items:
42ae5de77eSEmmanuel Vadot      - const: regs
43ae5de77eSEmmanuel Vadot      - const: dirmap
44ae5de77eSEmmanuel Vadot
45ae5de77eSEmmanuel Vadot  interrupts:
46ae5de77eSEmmanuel Vadot    items:
47ae5de77eSEmmanuel Vadot      - description: Interrupt pulse signal by factors excluding errors
48ae5de77eSEmmanuel Vadot      - description: Interrupt pulse signal by error factors
49ae5de77eSEmmanuel Vadot
50ae5de77eSEmmanuel Vadot  interrupt-names:
51ae5de77eSEmmanuel Vadot    items:
52ae5de77eSEmmanuel Vadot      - const: pulse
53ae5de77eSEmmanuel Vadot      - const: err_pulse
54ae5de77eSEmmanuel Vadot
55ae5de77eSEmmanuel Vadot  clocks:
56ae5de77eSEmmanuel Vadot    items:
57ae5de77eSEmmanuel Vadot      - description: AHB clock
58ae5de77eSEmmanuel Vadot      - description: AXI clock
59ae5de77eSEmmanuel Vadot      - description: SPI clock
60ae5de77eSEmmanuel Vadot      - description: Double speed SPI clock
61ae5de77eSEmmanuel Vadot
62ae5de77eSEmmanuel Vadot  clock-names:
63ae5de77eSEmmanuel Vadot    items:
64ae5de77eSEmmanuel Vadot      - const: ahb
65ae5de77eSEmmanuel Vadot      - const: axi
66ae5de77eSEmmanuel Vadot      - const: spi
67ae5de77eSEmmanuel Vadot      - const: spix2
68ae5de77eSEmmanuel Vadot
69ae5de77eSEmmanuel Vadot  power-domains:
70ae5de77eSEmmanuel Vadot    maxItems: 1
71ae5de77eSEmmanuel Vadot
72ae5de77eSEmmanuel Vadot  resets:
73ae5de77eSEmmanuel Vadot    items:
74ae5de77eSEmmanuel Vadot      - description: Hardware reset
75ae5de77eSEmmanuel Vadot      - description: AXI reset
76ae5de77eSEmmanuel Vadot
77ae5de77eSEmmanuel Vadot  reset-names:
78ae5de77eSEmmanuel Vadot    items:
79ae5de77eSEmmanuel Vadot      - const: hresetn
80ae5de77eSEmmanuel Vadot      - const: aresetn
81ae5de77eSEmmanuel Vadot
82ae5de77eSEmmanuel Vadot  renesas,xspi-cs-addr-sys:
83ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
84ae5de77eSEmmanuel Vadot    description: |
85ae5de77eSEmmanuel Vadot      Phandle to the system controller (sys) that allows to configure
86ae5de77eSEmmanuel Vadot      xSPI CS0 and CS1 addresses.
87ae5de77eSEmmanuel Vadot
88ae5de77eSEmmanuel VadotpatternProperties:
89ae5de77eSEmmanuel Vadot  "flash@[0-9a-f]+$":
90ae5de77eSEmmanuel Vadot    type: object
91ae5de77eSEmmanuel Vadot    additionalProperties: true
92ae5de77eSEmmanuel Vadot
93ae5de77eSEmmanuel Vadot    properties:
94ae5de77eSEmmanuel Vadot      compatible:
95ae5de77eSEmmanuel Vadot        contains:
96ae5de77eSEmmanuel Vadot          const: jedec,spi-nor
97ae5de77eSEmmanuel Vadot
98ae5de77eSEmmanuel Vadotrequired:
99ae5de77eSEmmanuel Vadot  - compatible
100ae5de77eSEmmanuel Vadot  - reg
101ae5de77eSEmmanuel Vadot  - reg-names
102ae5de77eSEmmanuel Vadot  - interrupts
103ae5de77eSEmmanuel Vadot  - interrupt-names
104ae5de77eSEmmanuel Vadot  - clocks
105ae5de77eSEmmanuel Vadot  - clock-names
106ae5de77eSEmmanuel Vadot  - power-domains
107ae5de77eSEmmanuel Vadot  - resets
108ae5de77eSEmmanuel Vadot  - reset-names
109ae5de77eSEmmanuel Vadot  - '#address-cells'
110ae5de77eSEmmanuel Vadot  - '#size-cells'
111ae5de77eSEmmanuel Vadot
112ae5de77eSEmmanuel VadotunevaluatedProperties: false
113ae5de77eSEmmanuel Vadot
114ae5de77eSEmmanuel Vadotexamples:
115ae5de77eSEmmanuel Vadot  - |
116ae5de77eSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
117ae5de77eSEmmanuel Vadot    #include <dt-bindings/clock/renesas,r9a09g047-cpg.h>
118ae5de77eSEmmanuel Vadot
119ae5de77eSEmmanuel Vadot    spi@11030000 {
120ae5de77eSEmmanuel Vadot        compatible = "renesas,r9a09g047-xspi";
121ae5de77eSEmmanuel Vadot        reg = <0x11030000 0x10000>, <0x20000000 0x10000000>;
122ae5de77eSEmmanuel Vadot        reg-names = "regs", "dirmap";
123ae5de77eSEmmanuel Vadot        interrupts = <GIC_SPI 228 IRQ_TYPE_EDGE_RISING>,
124ae5de77eSEmmanuel Vadot                     <GIC_SPI 229 IRQ_TYPE_EDGE_RISING>;
125ae5de77eSEmmanuel Vadot        interrupt-names = "pulse", "err_pulse";
126ae5de77eSEmmanuel Vadot        clocks = <&cpg CPG_MOD 0x9f>, <&cpg CPG_MOD 0xa0>,
127ae5de77eSEmmanuel Vadot                 <&cpg CPG_CORE 9>, <&cpg CPG_MOD 0xa1>;
128ae5de77eSEmmanuel Vadot        clock-names = "ahb", "axi", "spi", "spix2";
129ae5de77eSEmmanuel Vadot        power-domains = <&cpg>;
130ae5de77eSEmmanuel Vadot        resets = <&cpg 0xa3>, <&cpg 0xa4>;
131ae5de77eSEmmanuel Vadot        reset-names = "hresetn", "aresetn";
132ae5de77eSEmmanuel Vadot        #address-cells = <1>;
133ae5de77eSEmmanuel Vadot        #size-cells = <0>;
134ae5de77eSEmmanuel Vadot
135ae5de77eSEmmanuel Vadot        flash@0 {
136ae5de77eSEmmanuel Vadot          compatible = "jedec,spi-nor";
137ae5de77eSEmmanuel Vadot          reg = <0>;
138ae5de77eSEmmanuel Vadot          spi-max-frequency = <40000000>;
139ae5de77eSEmmanuel Vadot          spi-tx-bus-width = <1>;
140ae5de77eSEmmanuel Vadot          spi-rx-bus-width = <1>;
141ae5de77eSEmmanuel Vadot        };
142ae5de77eSEmmanuel Vadot    };
143