xref: /freebsd-src/sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
22eb4d8dcSEmmanuel Vadot%YAML 1.2
32eb4d8dcSEmmanuel Vadot---
42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml#
52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Cadence Quad SPI controller
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Vaishnav Achath <vaishnav.a@ti.com>
112eb4d8dcSEmmanuel Vadot
122eb4d8dcSEmmanuel VadotallOf:
132eb4d8dcSEmmanuel Vadot  - $ref: spi-controller.yaml#
148cc087a1SEmmanuel Vadot  - if:
158cc087a1SEmmanuel Vadot      properties:
168cc087a1SEmmanuel Vadot        compatible:
178cc087a1SEmmanuel Vadot          contains:
188cc087a1SEmmanuel Vadot            const: xlnx,versal-ospi-1.0
198cc087a1SEmmanuel Vadot    then:
208cc087a1SEmmanuel Vadot      required:
218cc087a1SEmmanuel Vadot        - power-domains
22fac71e4eSEmmanuel Vadot  - if:
23fac71e4eSEmmanuel Vadot      properties:
24fac71e4eSEmmanuel Vadot        compatible:
25fac71e4eSEmmanuel Vadot          contains:
26fac71e4eSEmmanuel Vadot            const: starfive,jh7110-qspi
27fac71e4eSEmmanuel Vadot    then:
28fac71e4eSEmmanuel Vadot      properties:
29fac71e4eSEmmanuel Vadot        resets:
30fac71e4eSEmmanuel Vadot          minItems: 2
31fac71e4eSEmmanuel Vadot          maxItems: 3
32fac71e4eSEmmanuel Vadot
33fac71e4eSEmmanuel Vadot        reset-names:
34fac71e4eSEmmanuel Vadot          minItems: 2
35fac71e4eSEmmanuel Vadot          maxItems: 3
36fac71e4eSEmmanuel Vadot          items:
37fac71e4eSEmmanuel Vadot            enum: [ qspi, qspi-ocp, rstc_ref ]
38fac71e4eSEmmanuel Vadot
39fac71e4eSEmmanuel Vadot    else:
40fac71e4eSEmmanuel Vadot      properties:
41fac71e4eSEmmanuel Vadot        resets:
42fac71e4eSEmmanuel Vadot          maxItems: 2
43fac71e4eSEmmanuel Vadot
44fac71e4eSEmmanuel Vadot        reset-names:
45fac71e4eSEmmanuel Vadot          minItems: 1
46fac71e4eSEmmanuel Vadot          maxItems: 2
47fac71e4eSEmmanuel Vadot          items:
48fac71e4eSEmmanuel Vadot            enum: [ qspi, qspi-ocp ]
49f126890aSEmmanuel Vadot  - if:
50f126890aSEmmanuel Vadot      properties:
51f126890aSEmmanuel Vadot        compatible:
52f126890aSEmmanuel Vadot          contains:
53f126890aSEmmanuel Vadot            const: amd,pensando-elba-qspi
54f126890aSEmmanuel Vadot    then:
55f126890aSEmmanuel Vadot      properties:
56f126890aSEmmanuel Vadot        cdns,fifo-depth:
57f126890aSEmmanuel Vadot          enum: [ 128, 256, 1024 ]
58f126890aSEmmanuel Vadot          default: 1024
59f126890aSEmmanuel Vadot    else:
60f126890aSEmmanuel Vadot      properties:
61f126890aSEmmanuel Vadot        cdns,fifo-depth:
62f126890aSEmmanuel Vadot          enum: [ 128, 256 ]
63f126890aSEmmanuel Vadot          default: 128
642eb4d8dcSEmmanuel Vadot
652eb4d8dcSEmmanuel Vadotproperties:
662eb4d8dcSEmmanuel Vadot  compatible:
672eb4d8dcSEmmanuel Vadot    oneOf:
682eb4d8dcSEmmanuel Vadot      - items:
692eb4d8dcSEmmanuel Vadot          - enum:
70f126890aSEmmanuel Vadot              - amd,pensando-elba-qspi
712eb4d8dcSEmmanuel Vadot              - intel,lgm-qspi
728cc087a1SEmmanuel Vadot              - intel,socfpga-qspi
73*7d0873ebSEmmanuel Vadot              - mobileye,eyeq5-ospi
74fac71e4eSEmmanuel Vadot              - starfive,jh7110-qspi
75*7d0873ebSEmmanuel Vadot              - ti,am654-ospi
76*7d0873ebSEmmanuel Vadot              - ti,k2g-qspi
77*7d0873ebSEmmanuel Vadot              - xlnx,versal-ospi-1.0
782eb4d8dcSEmmanuel Vadot          - const: cdns,qspi-nor
792eb4d8dcSEmmanuel Vadot      - const: cdns,qspi-nor
802eb4d8dcSEmmanuel Vadot
812eb4d8dcSEmmanuel Vadot  reg:
822eb4d8dcSEmmanuel Vadot    items:
832eb4d8dcSEmmanuel Vadot      - description: the controller register set
842eb4d8dcSEmmanuel Vadot      - description: the controller data area
852eb4d8dcSEmmanuel Vadot
862eb4d8dcSEmmanuel Vadot  interrupts:
872eb4d8dcSEmmanuel Vadot    maxItems: 1
882eb4d8dcSEmmanuel Vadot
892eb4d8dcSEmmanuel Vadot  clocks:
90aa1a8ff2SEmmanuel Vadot    minItems: 1
91aa1a8ff2SEmmanuel Vadot    maxItems: 3
92aa1a8ff2SEmmanuel Vadot
93aa1a8ff2SEmmanuel Vadot  clock-names:
94aa1a8ff2SEmmanuel Vadot    oneOf:
95aa1a8ff2SEmmanuel Vadot      - items:
96aa1a8ff2SEmmanuel Vadot          - const: ref
97aa1a8ff2SEmmanuel Vadot      - items:
98aa1a8ff2SEmmanuel Vadot          - const: ref
99aa1a8ff2SEmmanuel Vadot          - const: ahb
100aa1a8ff2SEmmanuel Vadot          - const: apb
1012eb4d8dcSEmmanuel Vadot
1022eb4d8dcSEmmanuel Vadot  cdns,fifo-depth:
1032eb4d8dcSEmmanuel Vadot    description:
1042eb4d8dcSEmmanuel Vadot      Size of the data FIFO in words.
105cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
1062eb4d8dcSEmmanuel Vadot
1072eb4d8dcSEmmanuel Vadot  cdns,fifo-width:
1082eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
1092eb4d8dcSEmmanuel Vadot    description:
1102eb4d8dcSEmmanuel Vadot      Bus width of the data FIFO in bytes.
1112eb4d8dcSEmmanuel Vadot    default: 4
1122eb4d8dcSEmmanuel Vadot
1132eb4d8dcSEmmanuel Vadot  cdns,trigger-address:
1142eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
1152eb4d8dcSEmmanuel Vadot    description:
1162eb4d8dcSEmmanuel Vadot      32-bit indirect AHB trigger address.
1172eb4d8dcSEmmanuel Vadot
1182eb4d8dcSEmmanuel Vadot  cdns,is-decoded-cs:
1192eb4d8dcSEmmanuel Vadot    type: boolean
1202eb4d8dcSEmmanuel Vadot    description:
1212eb4d8dcSEmmanuel Vadot      Flag to indicate whether decoder is used to select different chip select
1222eb4d8dcSEmmanuel Vadot      for different memory regions.
1232eb4d8dcSEmmanuel Vadot
1242eb4d8dcSEmmanuel Vadot  cdns,rclk-en:
1252eb4d8dcSEmmanuel Vadot    type: boolean
1262eb4d8dcSEmmanuel Vadot    description:
1272eb4d8dcSEmmanuel Vadot      Flag to indicate that QSPI return clock is used to latch the read
1282eb4d8dcSEmmanuel Vadot      data rather than the QSPI clock. Make sure that QSPI return clock
1292eb4d8dcSEmmanuel Vadot      is populated on the board before using this property.
1302eb4d8dcSEmmanuel Vadot
1318cc087a1SEmmanuel Vadot  power-domains:
1328cc087a1SEmmanuel Vadot    maxItems: 1
1338cc087a1SEmmanuel Vadot
1342eb4d8dcSEmmanuel Vadot  resets:
135fac71e4eSEmmanuel Vadot    minItems: 2
136fac71e4eSEmmanuel Vadot    maxItems: 3
1372eb4d8dcSEmmanuel Vadot
1382eb4d8dcSEmmanuel Vadot  reset-names:
139fac71e4eSEmmanuel Vadot    minItems: 2
140fac71e4eSEmmanuel Vadot    maxItems: 3
1412eb4d8dcSEmmanuel Vadot    items:
142fac71e4eSEmmanuel Vadot      enum: [ qspi, qspi-ocp, rstc_ref ]
1432eb4d8dcSEmmanuel Vadot
1442eb4d8dcSEmmanuel Vadotrequired:
1452eb4d8dcSEmmanuel Vadot  - compatible
1462eb4d8dcSEmmanuel Vadot  - reg
1472eb4d8dcSEmmanuel Vadot  - interrupts
1482eb4d8dcSEmmanuel Vadot  - clocks
1492eb4d8dcSEmmanuel Vadot  - cdns,fifo-width
1502eb4d8dcSEmmanuel Vadot  - cdns,trigger-address
1512eb4d8dcSEmmanuel Vadot  - '#address-cells'
1522eb4d8dcSEmmanuel Vadot  - '#size-cells'
1532eb4d8dcSEmmanuel Vadot
1542eb4d8dcSEmmanuel VadotunevaluatedProperties: false
1552eb4d8dcSEmmanuel Vadot
1562eb4d8dcSEmmanuel Vadotexamples:
1572eb4d8dcSEmmanuel Vadot  - |
1582eb4d8dcSEmmanuel Vadot    qspi: spi@ff705000 {
1592eb4d8dcSEmmanuel Vadot        compatible = "cdns,qspi-nor";
1602eb4d8dcSEmmanuel Vadot        #address-cells = <1>;
1612eb4d8dcSEmmanuel Vadot        #size-cells = <0>;
1622eb4d8dcSEmmanuel Vadot        reg = <0xff705000 0x1000>,
1632eb4d8dcSEmmanuel Vadot              <0xffa00000 0x1000>;
1642eb4d8dcSEmmanuel Vadot        interrupts = <0 151 4>;
1652eb4d8dcSEmmanuel Vadot        clocks = <&qspi_clk>;
1662eb4d8dcSEmmanuel Vadot        cdns,fifo-depth = <128>;
1672eb4d8dcSEmmanuel Vadot        cdns,fifo-width = <4>;
1682eb4d8dcSEmmanuel Vadot        cdns,trigger-address = <0x00000000>;
1692eb4d8dcSEmmanuel Vadot        resets = <&rst 0x1>, <&rst 0x2>;
1702eb4d8dcSEmmanuel Vadot        reset-names = "qspi", "qspi-ocp";
1712eb4d8dcSEmmanuel Vadot
1722eb4d8dcSEmmanuel Vadot        flash@0 {
1732eb4d8dcSEmmanuel Vadot            compatible = "jedec,spi-nor";
1742eb4d8dcSEmmanuel Vadot            reg = <0x0>;
1752eb4d8dcSEmmanuel Vadot        };
1762eb4d8dcSEmmanuel Vadot    };
177