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