xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/fsl/fsl,ifc.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1*c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*c9ccf3a3SEmmanuel Vadot%YAML 1.2
3*c9ccf3a3SEmmanuel Vadot---
4*c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/fsl/fsl,ifc.yaml#
5*c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c9ccf3a3SEmmanuel Vadot
7*c9ccf3a3SEmmanuel Vadottitle: FSL/NXP Integrated Flash Controller
8*c9ccf3a3SEmmanuel Vadot
9*c9ccf3a3SEmmanuel Vadotmaintainers:
10*c9ccf3a3SEmmanuel Vadot  - Li Yang <leoyang.li@nxp.com>
11*c9ccf3a3SEmmanuel Vadot
12*c9ccf3a3SEmmanuel Vadotdescription: |
13*c9ccf3a3SEmmanuel Vadot  NXP's integrated flash controller (IFC) is an advanced version of the
14*c9ccf3a3SEmmanuel Vadot  enhanced local bus controller which includes similar programming and signal
15*c9ccf3a3SEmmanuel Vadot  interfaces with an extended feature set. The IFC provides access to multiple
16*c9ccf3a3SEmmanuel Vadot  external memory types, such as NAND flash (SLC and MLC), NOR flash, EPROM,
17*c9ccf3a3SEmmanuel Vadot  SRAM and other memories where address and data are shared on a bus.
18*c9ccf3a3SEmmanuel Vadot
19*c9ccf3a3SEmmanuel Vadotproperties:
20*c9ccf3a3SEmmanuel Vadot  $nodename:
21*c9ccf3a3SEmmanuel Vadot    pattern: "^memory-controller@[0-9a-f]+$"
22*c9ccf3a3SEmmanuel Vadot
23*c9ccf3a3SEmmanuel Vadot  compatible:
24*c9ccf3a3SEmmanuel Vadot    const: fsl,ifc
25*c9ccf3a3SEmmanuel Vadot
26*c9ccf3a3SEmmanuel Vadot  "#address-cells":
27*c9ccf3a3SEmmanuel Vadot    enum: [2, 3]
28*c9ccf3a3SEmmanuel Vadot    description: |
29*c9ccf3a3SEmmanuel Vadot      Should be either two or three.  The first cell is the chipselect
30*c9ccf3a3SEmmanuel Vadot      number, and the remaining cells are the offset into the chipselect.
31*c9ccf3a3SEmmanuel Vadot
32*c9ccf3a3SEmmanuel Vadot  "#size-cells":
33*c9ccf3a3SEmmanuel Vadot    enum: [1, 2]
34*c9ccf3a3SEmmanuel Vadot    description: |
35*c9ccf3a3SEmmanuel Vadot      Either one or two, depending on how large each chipselect can be.
36*c9ccf3a3SEmmanuel Vadot
37*c9ccf3a3SEmmanuel Vadot  reg:
38*c9ccf3a3SEmmanuel Vadot    maxItems: 1
39*c9ccf3a3SEmmanuel Vadot
40*c9ccf3a3SEmmanuel Vadot  interrupts:
41*c9ccf3a3SEmmanuel Vadot    minItems: 1
42*c9ccf3a3SEmmanuel Vadot    maxItems: 2
43*c9ccf3a3SEmmanuel Vadot    description: |
44*c9ccf3a3SEmmanuel Vadot      IFC may have one or two interrupts.  If two interrupt specifiers are
45*c9ccf3a3SEmmanuel Vadot      present, the first is the "common" interrupt (CM_EVTER_STAT), and the
46*c9ccf3a3SEmmanuel Vadot      second is the NAND interrupt (NAND_EVTER_STAT).  If there is only one,
47*c9ccf3a3SEmmanuel Vadot      that interrupt reports both types of event.
48*c9ccf3a3SEmmanuel Vadot
49*c9ccf3a3SEmmanuel Vadot  little-endian:
50*c9ccf3a3SEmmanuel Vadot    type: boolean
51*c9ccf3a3SEmmanuel Vadot    description: |
52*c9ccf3a3SEmmanuel Vadot      If this property is absent, the big-endian mode will be in use as default
53*c9ccf3a3SEmmanuel Vadot      for registers.
54*c9ccf3a3SEmmanuel Vadot
55*c9ccf3a3SEmmanuel Vadot  ranges:
56*c9ccf3a3SEmmanuel Vadot    description: |
57*c9ccf3a3SEmmanuel Vadot      Each range corresponds to a single chipselect, and covers the entire
58*c9ccf3a3SEmmanuel Vadot      access window as configured.
59*c9ccf3a3SEmmanuel Vadot
60*c9ccf3a3SEmmanuel VadotpatternProperties:
61*c9ccf3a3SEmmanuel Vadot  "^.*@[a-f0-9]+(,[a-f0-9]+)+$":
62*c9ccf3a3SEmmanuel Vadot    type: object
63*c9ccf3a3SEmmanuel Vadot    description: |
64*c9ccf3a3SEmmanuel Vadot      Child device nodes describe the devices connected to IFC such as NOR (e.g.
65*c9ccf3a3SEmmanuel Vadot      cfi-flash) and NAND (fsl,ifc-nand). There might be board specific devices
66*c9ccf3a3SEmmanuel Vadot      like FPGAs, CPLDs, etc.
67*c9ccf3a3SEmmanuel Vadot
68*c9ccf3a3SEmmanuel Vadot    required:
69*c9ccf3a3SEmmanuel Vadot      - compatible
70*c9ccf3a3SEmmanuel Vadot      - reg
71*c9ccf3a3SEmmanuel Vadot
72*c9ccf3a3SEmmanuel Vadotrequired:
73*c9ccf3a3SEmmanuel Vadot  - compatible
74*c9ccf3a3SEmmanuel Vadot  - reg
75*c9ccf3a3SEmmanuel Vadot  - interrupts
76*c9ccf3a3SEmmanuel Vadot
77*c9ccf3a3SEmmanuel VadotadditionalProperties: false
78*c9ccf3a3SEmmanuel Vadot
79*c9ccf3a3SEmmanuel Vadotexamples:
80*c9ccf3a3SEmmanuel Vadot  - |
81*c9ccf3a3SEmmanuel Vadot    soc {
82*c9ccf3a3SEmmanuel Vadot        #address-cells = <2>;
83*c9ccf3a3SEmmanuel Vadot        #size-cells = <2>;
84*c9ccf3a3SEmmanuel Vadot
85*c9ccf3a3SEmmanuel Vadot        memory-controller@ffe1e000 {
86*c9ccf3a3SEmmanuel Vadot            compatible = "fsl,ifc";
87*c9ccf3a3SEmmanuel Vadot            #address-cells = <2>;
88*c9ccf3a3SEmmanuel Vadot            #size-cells = <1>;
89*c9ccf3a3SEmmanuel Vadot            reg = <0x0 0xffe1e000 0 0x2000>;
90*c9ccf3a3SEmmanuel Vadot            interrupts = <16 2 19 2>;
91*c9ccf3a3SEmmanuel Vadot            little-endian;
92*c9ccf3a3SEmmanuel Vadot
93*c9ccf3a3SEmmanuel Vadot            /* NOR, NAND Flashes and CPLD on board */
94*c9ccf3a3SEmmanuel Vadot            ranges = <0x0 0x0 0x0 0xee000000 0x02000000>,
95*c9ccf3a3SEmmanuel Vadot                     <0x1 0x0 0x0 0xffa00000 0x00010000>,
96*c9ccf3a3SEmmanuel Vadot                     <0x3 0x0 0x0 0xffb00000 0x00020000>;
97*c9ccf3a3SEmmanuel Vadot
98*c9ccf3a3SEmmanuel Vadot            flash@0,0 {
99*c9ccf3a3SEmmanuel Vadot                #address-cells = <1>;
100*c9ccf3a3SEmmanuel Vadot                #size-cells = <1>;
101*c9ccf3a3SEmmanuel Vadot                compatible = "cfi-flash";
102*c9ccf3a3SEmmanuel Vadot                reg = <0x0 0x0 0x2000000>;
103*c9ccf3a3SEmmanuel Vadot                bank-width = <2>;
104*c9ccf3a3SEmmanuel Vadot                device-width = <1>;
105*c9ccf3a3SEmmanuel Vadot
106*c9ccf3a3SEmmanuel Vadot                partition@0 {
107*c9ccf3a3SEmmanuel Vadot                    /* 32MB for user data */
108*c9ccf3a3SEmmanuel Vadot                    reg = <0x0 0x02000000>;
109*c9ccf3a3SEmmanuel Vadot                    label = "NOR Data";
110*c9ccf3a3SEmmanuel Vadot                };
111*c9ccf3a3SEmmanuel Vadot            };
112*c9ccf3a3SEmmanuel Vadot        };
113*c9ccf3a3SEmmanuel Vadot    };
114