12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 22eb4d8dcSEmmanuel Vadot%YAML 1.2 32eb4d8dcSEmmanuel Vadot--- 42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml# 52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 62eb4d8dcSEmmanuel Vadot 72eb4d8dcSEmmanuel Vadottitle: Broadcom SPI controller 82eb4d8dcSEmmanuel Vadot 92eb4d8dcSEmmanuel Vadotmaintainers: 102eb4d8dcSEmmanuel Vadot - Kamal Dasu <kdasu.kdev@gmail.com> 112eb4d8dcSEmmanuel Vadot - Rafał Miłecki <rafal@milecki.pl> 122eb4d8dcSEmmanuel Vadot 132eb4d8dcSEmmanuel Vadotdescription: | 142eb4d8dcSEmmanuel Vadot The Broadcom SPI controller is a SPI master found on various SOCs, including 15*aa1a8ff2SEmmanuel Vadot BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consists 162eb4d8dcSEmmanuel Vadot of: 172eb4d8dcSEmmanuel Vadot MSPI : SPI master controller can read and write to a SPI slave device 182eb4d8dcSEmmanuel Vadot BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration 192eb4d8dcSEmmanuel Vadot for flash reads and be configured to do single, double, quad lane 202eb4d8dcSEmmanuel Vadot io with 3-byte and 4-byte addressing support. 212eb4d8dcSEmmanuel Vadot 222eb4d8dcSEmmanuel Vadot Supported Broadcom SoCs have one instance of MSPI+BSPI controller IP. 23*aa1a8ff2SEmmanuel Vadot MSPI master can be used without BSPI. BRCMSTB SoCs have an additional instance 242eb4d8dcSEmmanuel Vadot of a MSPI master without the BSPI to use with non flash slave devices that 252eb4d8dcSEmmanuel Vadot use SPI protocol. 262eb4d8dcSEmmanuel Vadot 272eb4d8dcSEmmanuel VadotallOf: 282eb4d8dcSEmmanuel Vadot - $ref: spi-controller.yaml# 292eb4d8dcSEmmanuel Vadot 302eb4d8dcSEmmanuel Vadotproperties: 312eb4d8dcSEmmanuel Vadot compatible: 322eb4d8dcSEmmanuel Vadot oneOf: 332eb4d8dcSEmmanuel Vadot - description: Second Instance of MSPI BRCMSTB SoCs 342eb4d8dcSEmmanuel Vadot items: 352eb4d8dcSEmmanuel Vadot - enum: 362eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7425-qspi 372eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7429-qspi 382eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7435-qspi 392eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7445-qspi 402eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7216-qspi 412eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7278-qspi 422eb4d8dcSEmmanuel Vadot - const: brcm,spi-bcm-qspi 432eb4d8dcSEmmanuel Vadot - const: brcm,spi-brcmstb-mspi 442eb4d8dcSEmmanuel Vadot - description: Second Instance of MSPI BRCMSTB SoCs 452eb4d8dcSEmmanuel Vadot items: 462eb4d8dcSEmmanuel Vadot - enum: 472eb4d8dcSEmmanuel Vadot - brcm,spi-brcmstb-qspi 482eb4d8dcSEmmanuel Vadot - brcm,spi-brcmstb-mspi 492eb4d8dcSEmmanuel Vadot - brcm,spi-nsp-qspi 502eb4d8dcSEmmanuel Vadot - brcm,spi-ns2-qspi 512eb4d8dcSEmmanuel Vadot - const: brcm,spi-bcm-qspi 522eb4d8dcSEmmanuel Vadot 532eb4d8dcSEmmanuel Vadot reg: 542eb4d8dcSEmmanuel Vadot minItems: 1 552eb4d8dcSEmmanuel Vadot maxItems: 5 562eb4d8dcSEmmanuel Vadot 572eb4d8dcSEmmanuel Vadot reg-names: 582eb4d8dcSEmmanuel Vadot minItems: 1 592eb4d8dcSEmmanuel Vadot items: 602eb4d8dcSEmmanuel Vadot - const: mspi 612eb4d8dcSEmmanuel Vadot - const: bspi 622eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 632eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 642eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 652eb4d8dcSEmmanuel Vadot 662eb4d8dcSEmmanuel Vadot interrupts: 672eb4d8dcSEmmanuel Vadot minItems: 1 682eb4d8dcSEmmanuel Vadot maxItems: 7 692eb4d8dcSEmmanuel Vadot 702eb4d8dcSEmmanuel Vadot interrupt-names: 712eb4d8dcSEmmanuel Vadot oneOf: 722eb4d8dcSEmmanuel Vadot - minItems: 1 732eb4d8dcSEmmanuel Vadot items: 742eb4d8dcSEmmanuel Vadot - const: mspi_done 752eb4d8dcSEmmanuel Vadot - const: mspi_halted 762eb4d8dcSEmmanuel Vadot - const: spi_lr_fullness_reached 772eb4d8dcSEmmanuel Vadot - const: spi_lr_session_aborted 782eb4d8dcSEmmanuel Vadot - const: spi_lr_impatient 792eb4d8dcSEmmanuel Vadot - const: spi_lr_session_done 802eb4d8dcSEmmanuel Vadot - const: spi_lr_overread 812eb4d8dcSEmmanuel Vadot - const: spi_l1_intr 822eb4d8dcSEmmanuel Vadot 832eb4d8dcSEmmanuel Vadot clocks: 842eb4d8dcSEmmanuel Vadot maxItems: 1 852eb4d8dcSEmmanuel Vadot description: reference clock for this block 862eb4d8dcSEmmanuel Vadot 872eb4d8dcSEmmanuel Vadot native-endian: 882eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 892eb4d8dcSEmmanuel Vadot description: Defined when using BE SoC and device uses BE register read/write 902eb4d8dcSEmmanuel Vadot 912eb4d8dcSEmmanuel VadotunevaluatedProperties: false 922eb4d8dcSEmmanuel Vadot 932eb4d8dcSEmmanuel Vadotrequired: 942eb4d8dcSEmmanuel Vadot - reg 952eb4d8dcSEmmanuel Vadot - reg-names 962eb4d8dcSEmmanuel Vadot - interrupts 972eb4d8dcSEmmanuel Vadot - interrupt-names 982eb4d8dcSEmmanuel Vadot 992eb4d8dcSEmmanuel Vadotexamples: 1002eb4d8dcSEmmanuel Vadot - | # BRCMSTB SoC: SPI Master (MSPI+BSPI) for SPI-NOR access 1012eb4d8dcSEmmanuel Vadot spi@f03e3400 { 1022eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-bcm-qspi"; 1032eb4d8dcSEmmanuel Vadot reg = <0xf03e3400 0x188>, <0xf03e3200 0x50>, <0xf03e0920 0x4>; 1042eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "cs_reg"; 1052eb4d8dcSEmmanuel Vadot interrupts = <0x5>, <0x6>, <0x1>, <0x2>, <0x3>, <0x4>, <0x0>; 1062eb4d8dcSEmmanuel Vadot interrupt-parent = <&gic>; 1072eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done", 1082eb4d8dcSEmmanuel Vadot "mspi_halted", 1092eb4d8dcSEmmanuel Vadot "spi_lr_fullness_reached", 1102eb4d8dcSEmmanuel Vadot "spi_lr_session_aborted", 1112eb4d8dcSEmmanuel Vadot "spi_lr_impatient", 1122eb4d8dcSEmmanuel Vadot "spi_lr_session_done", 1132eb4d8dcSEmmanuel Vadot "spi_lr_overread"; 1142eb4d8dcSEmmanuel Vadot clocks = <&hif_spi>; 1152eb4d8dcSEmmanuel Vadot #address-cells = <0x1>; 1162eb4d8dcSEmmanuel Vadot #size-cells = <0x0>; 1172eb4d8dcSEmmanuel Vadot 1182eb4d8dcSEmmanuel Vadot flash@0 { 1192eb4d8dcSEmmanuel Vadot #size-cells = <0x2>; 1202eb4d8dcSEmmanuel Vadot #address-cells = <0x2>; 1212eb4d8dcSEmmanuel Vadot compatible = "m25p80"; 1222eb4d8dcSEmmanuel Vadot reg = <0x0>; 1232eb4d8dcSEmmanuel Vadot spi-max-frequency = <0x2625a00>; 1242eb4d8dcSEmmanuel Vadot spi-cpol; 1252eb4d8dcSEmmanuel Vadot spi-cpha; 1262eb4d8dcSEmmanuel Vadot }; 1272eb4d8dcSEmmanuel Vadot }; 1282eb4d8dcSEmmanuel Vadot - | # BRCMSTB SoC: MSPI master for any SPI device 1292eb4d8dcSEmmanuel Vadot spi@f0416000 { 1302eb4d8dcSEmmanuel Vadot clocks = <&upg_fixed>; 1312eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-brcmstb-mspi", "brcm,spi-bcm-qspi"; 1322eb4d8dcSEmmanuel Vadot reg = <0xf0416000 0x180>; 1332eb4d8dcSEmmanuel Vadot reg-names = "mspi"; 1342eb4d8dcSEmmanuel Vadot interrupts = <0x14>; 1352eb4d8dcSEmmanuel Vadot interrupt-parent = <&irq0_aon_intc>; 1362eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done"; 1372eb4d8dcSEmmanuel Vadot #address-cells = <1>; 1382eb4d8dcSEmmanuel Vadot #size-cells = <0>; 1392eb4d8dcSEmmanuel Vadot }; 1402eb4d8dcSEmmanuel Vadot - | # iProc SoC 1412eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1422eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1432eb4d8dcSEmmanuel Vadot 1442eb4d8dcSEmmanuel Vadot spi@18027200 { 1452eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"; 1462eb4d8dcSEmmanuel Vadot reg = <0x18027200 0x184>, 1472eb4d8dcSEmmanuel Vadot <0x18027000 0x124>, 1482eb4d8dcSEmmanuel Vadot <0x1811c408 0x004>, 1492eb4d8dcSEmmanuel Vadot <0x180273a0 0x01c>; 1502eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; 1512eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, 1522eb4d8dcSEmmanuel Vadot <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>, 1532eb4d8dcSEmmanuel Vadot <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, 1542eb4d8dcSEmmanuel Vadot <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, 1552eb4d8dcSEmmanuel Vadot <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>, 1562eb4d8dcSEmmanuel Vadot <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>, 1572eb4d8dcSEmmanuel Vadot <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 1582eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done", 1592eb4d8dcSEmmanuel Vadot "mspi_halted", 1602eb4d8dcSEmmanuel Vadot "spi_lr_fullness_reached", 1612eb4d8dcSEmmanuel Vadot "spi_lr_session_aborted", 1622eb4d8dcSEmmanuel Vadot "spi_lr_impatient", 1632eb4d8dcSEmmanuel Vadot "spi_lr_session_done"; 1642eb4d8dcSEmmanuel Vadot clocks = <&iprocmed>; 1652eb4d8dcSEmmanuel Vadot num-cs = <2>; 1662eb4d8dcSEmmanuel Vadot #address-cells = <1>; 1672eb4d8dcSEmmanuel Vadot #size-cells = <0>; 1682eb4d8dcSEmmanuel Vadot }; 1692eb4d8dcSEmmanuel Vadot - | # NS2 SoC 1702eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1712eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1722eb4d8dcSEmmanuel Vadot 1732eb4d8dcSEmmanuel Vadot spi@66470200 { 1742eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi"; 1752eb4d8dcSEmmanuel Vadot reg = <0x66470200 0x184>, 1762eb4d8dcSEmmanuel Vadot <0x66470000 0x124>, 1772eb4d8dcSEmmanuel Vadot <0x67017408 0x004>, 1782eb4d8dcSEmmanuel Vadot <0x664703a0 0x01c>; 1792eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; 1802eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>; 1812eb4d8dcSEmmanuel Vadot interrupt-names = "spi_l1_intr"; 1822eb4d8dcSEmmanuel Vadot clocks = <&iprocmed>; 1832eb4d8dcSEmmanuel Vadot num-cs = <2>; 1842eb4d8dcSEmmanuel Vadot #address-cells = <1>; 1852eb4d8dcSEmmanuel Vadot #size-cells = <0>; 1862eb4d8dcSEmmanuel Vadot 1872eb4d8dcSEmmanuel Vadot flash@0 { 1882eb4d8dcSEmmanuel Vadot #address-cells = <1>; 1892eb4d8dcSEmmanuel Vadot #size-cells = <1>; 1902eb4d8dcSEmmanuel Vadot compatible = "m25p80"; 1912eb4d8dcSEmmanuel Vadot reg = <0x0>; 1922eb4d8dcSEmmanuel Vadot spi-max-frequency = <12500000>; 1932eb4d8dcSEmmanuel Vadot spi-cpol; 1942eb4d8dcSEmmanuel Vadot spi-cpha; 1952eb4d8dcSEmmanuel Vadot }; 1962eb4d8dcSEmmanuel Vadot }; 197