sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / Documentation / devicetree / bindings / spi / brcm,spi-bcm-qspi.txt
blobad7ac80a3841fb06d5b1962d378090a2e24a678a
1 Broadcom SPI controller
3 The Broadcom SPI controller is a SPI master found on various SOCs, including
4 BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consits
5 of :
6  MSPI : SPI master controller can read and write to a SPI slave device
7  BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration
8         for flash reads and be configured to do single, double, quad lane
9         io with 3-byte and 4-byte addressing support.
11  Supported Broadcom SoCs have one instance of MSPI+BSPI controller IP.
12  MSPI master can be used wihout BSPI. BRCMSTB SoCs have an additional instance
13  of a MSPI master without the BSPI to use with non flash slave devices that
14  use SPI protocol.
16 Required properties:
18 - #address-cells:
19     Must be <1>, as required by generic SPI binding.
21 - #size-cells:
22     Must be <0>, also as required by generic SPI binding.
24 - compatible:
25     Must be one of :
26     "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-qspi" : MSPI+BSPI on BRCMSTB SoCs
27     "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
28                                                    BRCMSTB  SoCs
29     "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"     : MSPI+BSPI on Cygnus, NSP
30     "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi"     : NS2 SoCs
32 - reg:
33     Define the bases and ranges of the associated I/O address spaces.
34     The required range is MSPI controller registers.
36 - reg-names:
37     First name does not matter, but must be reserved for the MSPI controller
38     register range as mentioned in 'reg' above, and will typically contain
39     - "bspi_regs": BSPI register range, not required with compatible
40                    "spi-brcmstb-mspi"
41     - "mspi_regs": MSPI register range is required for compatible strings
42     - "intr_regs", "intr_status_reg" : Interrupt and status register for
43       NSP, NS2, Cygnus SoC
45 - interrupts
46     The interrupts used by the MSPI and/or BSPI controller.
48 - interrupt-names:
49     Names of interrupts associated with MSPI
50     - "mspi_halted" :
51     - "mspi_done": Indicates that the requested SPI operation is complete.
52     - "spi_lr_fullness_reached" : Linear read BSPI pipe full
53     - "spi_lr_session_aborted"  : Linear read BSPI pipe aborted
54     - "spi_lr_impatient" : Linear read BSPI requested when pipe empty
55     - "spi_lr_session_done" : Linear read BSPI session done
57 - clocks:
58     A phandle to the reference clock for this block.
60 Optional properties:
63 - native-endian
64     Defined when using BE SoC and device uses BE register read/write
66 Recommended optional m25p80 properties:
67 - spi-rx-bus-width: Definition as per
68                     Documentation/devicetree/bindings/spi/spi-bus.txt
70 Examples:
72 BRCMSTB SoC Example:
74   SPI Master (MSPI+BSPI) for SPI-NOR access:
76     spi@f03e3400 {
77                 #address-cells = <0x1>;
78                 #size-cells = <0x0>;
79                 compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-brcmstb-qspi";
80                 reg = <0xf03e0920 0x4 0xf03e3400 0x188 0xf03e3200 0x50>;
81                 reg-names = "cs_reg", "mspi", "bspi";
82                 interrupts = <0x6 0x5 0x4 0x3 0x2 0x1 0x0>;
83                 interrupt-parent = <0x1c>;
84                 interrupt-names = "mspi_halted",
85                                   "mspi_done",
86                                   "spi_lr_overread",
87                                   "spi_lr_session_done",
88                                   "spi_lr_impatient",
89                                   "spi_lr_session_aborted",
90                                   "spi_lr_fullness_reached";
92                 clocks = <&hif_spi>;
93                 clock-names = "sw_spi";
95                 m25p80@0 {
96                         #size-cells = <0x2>;
97                         #address-cells = <0x2>;
98                         compatible = "m25p80";
99                         reg = <0x0>;
100                         spi-max-frequency = <0x2625a00>;
101                         spi-cpol;
102                         spi-cpha;
103                         m25p,fast-read;
105                         flash0.bolt@0 {
106                                 reg = <0x0 0x0 0x0 0x100000>;
107                         };
109                         flash0.macadr@100000 {
110                                 reg = <0x0 0x100000 0x0 0x10000>;
111                         };
113                         flash0.nvram@110000 {
114                                 reg = <0x0 0x110000 0x0 0x10000>;
115                         };
117                         flash0.kernel@120000 {
118                                 reg = <0x0 0x120000 0x0 0x400000>;
119                         };
121                         flash0.devtree@520000 {
122                                 reg = <0x0 0x520000 0x0 0x10000>;
123                         };
125                         flash0.splash@530000 {
126                                 reg = <0x0 0x530000 0x0 0x80000>;
127                         };
129                         flash0@0 {
130                                 reg = <0x0 0x0 0x0 0x4000000>;
131                         };
132                 };
133         };
136     MSPI master for any SPI device :
138         spi@f0416000 {
139                 #address-cells = <1>;
140                 #size-cells = <0>;
141                 clocks = <&upg_fixed>;
142                 compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-brcmstb-mspi";
143                 reg = <0xf0416000 0x180>;
144                 reg-names = "mspi";
145                 interrupts = <0x14>;
146                 interrupt-parent = <&irq0_aon_intc>;
147                 interrupt-names = "mspi_done";
148         };
150 iProc SoC Example:
152     qspi: spi@18027200 {
153         compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
154         reg = <0x18027200 0x184>,
155               <0x18027000 0x124>,
156               <0x1811c408 0x004>,
157               <0x180273a0 0x01c>;
158         reg-names = "mspi_regs", "bspi_regs", "intr_regs", "intr_status_reg";
159         interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
160                      <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
161                      <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
162                      <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
163                      <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
164                      <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
165                      <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
166         interrupt-names =
167                      "spi_lr_fullness_reached",
168                      "spi_lr_session_aborted",
169                      "spi_lr_impatient",
170                      "spi_lr_session_done",
171                      "mspi_done",
172                      "mspi_halted";
173         clocks = <&iprocmed>;
174         clock-names = "iprocmed";
175         num-cs = <2>;
176         #address-cells = <1>;
177         #size-cells = <0>;
178     };
181  NS2 SoC Example:
183                qspi: spi@66470200 {
184                        compatible = "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi";
185                        reg = <0x66470200 0x184>,
186                              <0x66470000 0x124>,
187                              <0x67017408 0x004>,
188                              <0x664703a0 0x01c>;
189                        reg-names = "mspi", "bspi", "intr_regs",
190                         "intr_status_reg";
191                        interrupts = <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>;
192                        interrupt-names = "spi_l1_intr";
193                         clocks = <&iprocmed>;
194                         clock-names = "iprocmed";
195                         num-cs = <2>;
196                         #address-cells = <1>;
197                         #size-cells = <0>;
198                };
201  m25p80 node for NSP, NS2
203          &qspi {
204                       flash: m25p80@0 {
205                       #address-cells = <1>;
206                       #size-cells = <1>;
207                       compatible = "m25p80";
208                       reg = <0x0>;
209                       spi-max-frequency = <12500000>;
210                       m25p,fast-read;
211                       spi-cpol;
212                       spi-cpha;
214                       partition@0 {
215                                   label = "boot";
216                                   reg = <0x00000000 0x000a0000>;
217                       };
219                       partition@a0000 {
220                                   label = "env";
221                                   reg = <0x000a0000 0x00060000>;
222                       };
224                       partition@100000 {
225                                   label = "system";
226                                   reg = <0x00100000 0x00600000>;
227                       };
229                       partition@700000 {
230                                   label = "rootfs";
231                                   reg = <0x00700000 0x01900000>;
232                       };
233         };