xref: /freebsd/sys/contrib/device-tree/Bindings/spi/qcom,spi-qpic-snand.yaml (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8ccc0d23SEmmanuel Vadot%YAML 1.2
3*8ccc0d23SEmmanuel Vadot---
4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/qcom,spi-qpic-snand.yaml#
5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8ccc0d23SEmmanuel Vadot
7*8ccc0d23SEmmanuel Vadottitle: Qualcomm QPIC NAND controller
8*8ccc0d23SEmmanuel Vadot
9*8ccc0d23SEmmanuel Vadotmaintainers:
10*8ccc0d23SEmmanuel Vadot  - Md sadre Alam <quic_mdalam@quicinc.com>
11*8ccc0d23SEmmanuel Vadot
12*8ccc0d23SEmmanuel Vadotdescription:
13*8ccc0d23SEmmanuel Vadot  The QCOM QPIC-SPI-NAND flash controller is an extended version of
14*8ccc0d23SEmmanuel Vadot  the QCOM QPIC NAND flash controller. It can work both in serial
15*8ccc0d23SEmmanuel Vadot  and parallel mode. It supports typical SPI-NAND page cache
16*8ccc0d23SEmmanuel Vadot  operations in single, dual or quad IO mode with pipelined ECC
17*8ccc0d23SEmmanuel Vadot  encoding/decoding using the QPIC ECC HW engine.
18*8ccc0d23SEmmanuel Vadot
19*8ccc0d23SEmmanuel VadotallOf:
20*8ccc0d23SEmmanuel Vadot  - $ref: /schemas/spi/spi-controller.yaml#
21*8ccc0d23SEmmanuel Vadot
22*8ccc0d23SEmmanuel Vadotproperties:
23*8ccc0d23SEmmanuel Vadot  compatible:
24*8ccc0d23SEmmanuel Vadot    enum:
25*8ccc0d23SEmmanuel Vadot      - qcom,ipq9574-snand
26*8ccc0d23SEmmanuel Vadot
27*8ccc0d23SEmmanuel Vadot  reg:
28*8ccc0d23SEmmanuel Vadot    maxItems: 1
29*8ccc0d23SEmmanuel Vadot
30*8ccc0d23SEmmanuel Vadot  clocks:
31*8ccc0d23SEmmanuel Vadot    maxItems: 3
32*8ccc0d23SEmmanuel Vadot
33*8ccc0d23SEmmanuel Vadot  clock-names:
34*8ccc0d23SEmmanuel Vadot    items:
35*8ccc0d23SEmmanuel Vadot      - const: core
36*8ccc0d23SEmmanuel Vadot      - const: aon
37*8ccc0d23SEmmanuel Vadot      - const: iom
38*8ccc0d23SEmmanuel Vadot
39*8ccc0d23SEmmanuel Vadot  dmas:
40*8ccc0d23SEmmanuel Vadot    items:
41*8ccc0d23SEmmanuel Vadot      - description: tx DMA channel
42*8ccc0d23SEmmanuel Vadot      - description: rx DMA channel
43*8ccc0d23SEmmanuel Vadot      - description: cmd DMA channel
44*8ccc0d23SEmmanuel Vadot
45*8ccc0d23SEmmanuel Vadot  dma-names:
46*8ccc0d23SEmmanuel Vadot    items:
47*8ccc0d23SEmmanuel Vadot      - const: tx
48*8ccc0d23SEmmanuel Vadot      - const: rx
49*8ccc0d23SEmmanuel Vadot      - const: cmd
50*8ccc0d23SEmmanuel Vadot
51*8ccc0d23SEmmanuel Vadotrequired:
52*8ccc0d23SEmmanuel Vadot  - compatible
53*8ccc0d23SEmmanuel Vadot  - reg
54*8ccc0d23SEmmanuel Vadot  - clocks
55*8ccc0d23SEmmanuel Vadot  - clock-names
56*8ccc0d23SEmmanuel Vadot
57*8ccc0d23SEmmanuel VadotunevaluatedProperties: false
58*8ccc0d23SEmmanuel Vadot
59*8ccc0d23SEmmanuel Vadotexamples:
60*8ccc0d23SEmmanuel Vadot  - |
61*8ccc0d23SEmmanuel Vadot    #include <dt-bindings/clock/qcom,ipq9574-gcc.h>
62*8ccc0d23SEmmanuel Vadot    spi@79b0000 {
63*8ccc0d23SEmmanuel Vadot        compatible = "qcom,ipq9574-snand";
64*8ccc0d23SEmmanuel Vadot        reg = <0x1ac00000 0x800>;
65*8ccc0d23SEmmanuel Vadot
66*8ccc0d23SEmmanuel Vadot        clocks = <&gcc GCC_QPIC_CLK>,
67*8ccc0d23SEmmanuel Vadot                 <&gcc GCC_QPIC_AHB_CLK>,
68*8ccc0d23SEmmanuel Vadot                 <&gcc GCC_QPIC_IO_MACRO_CLK>;
69*8ccc0d23SEmmanuel Vadot        clock-names = "core", "aon", "iom";
70*8ccc0d23SEmmanuel Vadot
71*8ccc0d23SEmmanuel Vadot        #address-cells = <1>;
72*8ccc0d23SEmmanuel Vadot        #size-cells = <0>;
73*8ccc0d23SEmmanuel Vadot
74*8ccc0d23SEmmanuel Vadot        flash@0 {
75*8ccc0d23SEmmanuel Vadot            compatible = "spi-nand";
76*8ccc0d23SEmmanuel Vadot            reg = <0>;
77*8ccc0d23SEmmanuel Vadot            #address-cells = <1>;
78*8ccc0d23SEmmanuel Vadot            #size-cells = <1>;
79*8ccc0d23SEmmanuel Vadot            nand-ecc-engine = <&qpic_nand>;
80*8ccc0d23SEmmanuel Vadot            nand-ecc-strength = <4>;
81*8ccc0d23SEmmanuel Vadot            nand-ecc-step-size = <512>;
82*8ccc0d23SEmmanuel Vadot        };
83*8ccc0d23SEmmanuel Vadot    };
84