1*2eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*2eb4d8dcSEmmanuel Vadot%YAML 1.2 3*2eb4d8dcSEmmanuel Vadot--- 4*2eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml# 5*2eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*2eb4d8dcSEmmanuel Vadot 7*2eb4d8dcSEmmanuel Vadottitle: Broadcom SPI controller 8*2eb4d8dcSEmmanuel Vadot 9*2eb4d8dcSEmmanuel Vadotmaintainers: 10*2eb4d8dcSEmmanuel Vadot - Kamal Dasu <kdasu.kdev@gmail.com> 11*2eb4d8dcSEmmanuel Vadot - Rafał Miłecki <rafal@milecki.pl> 12*2eb4d8dcSEmmanuel Vadot 13*2eb4d8dcSEmmanuel Vadotdescription: | 14*2eb4d8dcSEmmanuel Vadot The Broadcom SPI controller is a SPI master found on various SOCs, including 15*2eb4d8dcSEmmanuel Vadot BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consits 16*2eb4d8dcSEmmanuel Vadot of: 17*2eb4d8dcSEmmanuel Vadot MSPI : SPI master controller can read and write to a SPI slave device 18*2eb4d8dcSEmmanuel Vadot BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration 19*2eb4d8dcSEmmanuel Vadot for flash reads and be configured to do single, double, quad lane 20*2eb4d8dcSEmmanuel Vadot io with 3-byte and 4-byte addressing support. 21*2eb4d8dcSEmmanuel Vadot 22*2eb4d8dcSEmmanuel Vadot Supported Broadcom SoCs have one instance of MSPI+BSPI controller IP. 23*2eb4d8dcSEmmanuel Vadot MSPI master can be used wihout BSPI. BRCMSTB SoCs have an additional instance 24*2eb4d8dcSEmmanuel Vadot of a MSPI master without the BSPI to use with non flash slave devices that 25*2eb4d8dcSEmmanuel Vadot use SPI protocol. 26*2eb4d8dcSEmmanuel Vadot 27*2eb4d8dcSEmmanuel VadotallOf: 28*2eb4d8dcSEmmanuel Vadot - $ref: spi-controller.yaml# 29*2eb4d8dcSEmmanuel Vadot 30*2eb4d8dcSEmmanuel Vadotproperties: 31*2eb4d8dcSEmmanuel Vadot compatible: 32*2eb4d8dcSEmmanuel Vadot oneOf: 33*2eb4d8dcSEmmanuel Vadot - description: Second Instance of MSPI BRCMSTB SoCs 34*2eb4d8dcSEmmanuel Vadot items: 35*2eb4d8dcSEmmanuel Vadot - enum: 36*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7425-qspi 37*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7429-qspi 38*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7435-qspi 39*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7445-qspi 40*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7216-qspi 41*2eb4d8dcSEmmanuel Vadot - brcm,spi-bcm7278-qspi 42*2eb4d8dcSEmmanuel Vadot - const: brcm,spi-bcm-qspi 43*2eb4d8dcSEmmanuel Vadot - const: brcm,spi-brcmstb-mspi 44*2eb4d8dcSEmmanuel Vadot - description: Second Instance of MSPI BRCMSTB SoCs 45*2eb4d8dcSEmmanuel Vadot items: 46*2eb4d8dcSEmmanuel Vadot - enum: 47*2eb4d8dcSEmmanuel Vadot - brcm,spi-brcmstb-qspi 48*2eb4d8dcSEmmanuel Vadot - brcm,spi-brcmstb-mspi 49*2eb4d8dcSEmmanuel Vadot - brcm,spi-nsp-qspi 50*2eb4d8dcSEmmanuel Vadot - brcm,spi-ns2-qspi 51*2eb4d8dcSEmmanuel Vadot - const: brcm,spi-bcm-qspi 52*2eb4d8dcSEmmanuel Vadot 53*2eb4d8dcSEmmanuel Vadot reg: 54*2eb4d8dcSEmmanuel Vadot minItems: 1 55*2eb4d8dcSEmmanuel Vadot maxItems: 5 56*2eb4d8dcSEmmanuel Vadot 57*2eb4d8dcSEmmanuel Vadot reg-names: 58*2eb4d8dcSEmmanuel Vadot minItems: 1 59*2eb4d8dcSEmmanuel Vadot maxItems: 5 60*2eb4d8dcSEmmanuel Vadot items: 61*2eb4d8dcSEmmanuel Vadot - const: mspi 62*2eb4d8dcSEmmanuel Vadot - const: bspi 63*2eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 64*2eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 65*2eb4d8dcSEmmanuel Vadot - enum: [ intr_regs, intr_status_reg, cs_reg ] 66*2eb4d8dcSEmmanuel Vadot 67*2eb4d8dcSEmmanuel Vadot interrupts: 68*2eb4d8dcSEmmanuel Vadot minItems: 1 69*2eb4d8dcSEmmanuel Vadot maxItems: 7 70*2eb4d8dcSEmmanuel Vadot 71*2eb4d8dcSEmmanuel Vadot interrupt-names: 72*2eb4d8dcSEmmanuel Vadot oneOf: 73*2eb4d8dcSEmmanuel Vadot - minItems: 1 74*2eb4d8dcSEmmanuel Vadot maxItems: 7 75*2eb4d8dcSEmmanuel Vadot items: 76*2eb4d8dcSEmmanuel Vadot - const: mspi_done 77*2eb4d8dcSEmmanuel Vadot - const: mspi_halted 78*2eb4d8dcSEmmanuel Vadot - const: spi_lr_fullness_reached 79*2eb4d8dcSEmmanuel Vadot - const: spi_lr_session_aborted 80*2eb4d8dcSEmmanuel Vadot - const: spi_lr_impatient 81*2eb4d8dcSEmmanuel Vadot - const: spi_lr_session_done 82*2eb4d8dcSEmmanuel Vadot - const: spi_lr_overread 83*2eb4d8dcSEmmanuel Vadot - const: spi_l1_intr 84*2eb4d8dcSEmmanuel Vadot 85*2eb4d8dcSEmmanuel Vadot clocks: 86*2eb4d8dcSEmmanuel Vadot maxItems: 1 87*2eb4d8dcSEmmanuel Vadot description: reference clock for this block 88*2eb4d8dcSEmmanuel Vadot 89*2eb4d8dcSEmmanuel Vadot native-endian: 90*2eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 91*2eb4d8dcSEmmanuel Vadot description: Defined when using BE SoC and device uses BE register read/write 92*2eb4d8dcSEmmanuel Vadot 93*2eb4d8dcSEmmanuel VadotunevaluatedProperties: false 94*2eb4d8dcSEmmanuel Vadot 95*2eb4d8dcSEmmanuel Vadotrequired: 96*2eb4d8dcSEmmanuel Vadot - reg 97*2eb4d8dcSEmmanuel Vadot - reg-names 98*2eb4d8dcSEmmanuel Vadot - interrupts 99*2eb4d8dcSEmmanuel Vadot - interrupt-names 100*2eb4d8dcSEmmanuel Vadot 101*2eb4d8dcSEmmanuel Vadotexamples: 102*2eb4d8dcSEmmanuel Vadot - | # BRCMSTB SoC: SPI Master (MSPI+BSPI) for SPI-NOR access 103*2eb4d8dcSEmmanuel Vadot spi@f03e3400 { 104*2eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-bcm-qspi"; 105*2eb4d8dcSEmmanuel Vadot reg = <0xf03e3400 0x188>, <0xf03e3200 0x50>, <0xf03e0920 0x4>; 106*2eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "cs_reg"; 107*2eb4d8dcSEmmanuel Vadot interrupts = <0x5>, <0x6>, <0x1>, <0x2>, <0x3>, <0x4>, <0x0>; 108*2eb4d8dcSEmmanuel Vadot interrupt-parent = <&gic>; 109*2eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done", 110*2eb4d8dcSEmmanuel Vadot "mspi_halted", 111*2eb4d8dcSEmmanuel Vadot "spi_lr_fullness_reached", 112*2eb4d8dcSEmmanuel Vadot "spi_lr_session_aborted", 113*2eb4d8dcSEmmanuel Vadot "spi_lr_impatient", 114*2eb4d8dcSEmmanuel Vadot "spi_lr_session_done", 115*2eb4d8dcSEmmanuel Vadot "spi_lr_overread"; 116*2eb4d8dcSEmmanuel Vadot clocks = <&hif_spi>; 117*2eb4d8dcSEmmanuel Vadot #address-cells = <0x1>; 118*2eb4d8dcSEmmanuel Vadot #size-cells = <0x0>; 119*2eb4d8dcSEmmanuel Vadot 120*2eb4d8dcSEmmanuel Vadot flash@0 { 121*2eb4d8dcSEmmanuel Vadot #size-cells = <0x2>; 122*2eb4d8dcSEmmanuel Vadot #address-cells = <0x2>; 123*2eb4d8dcSEmmanuel Vadot compatible = "m25p80"; 124*2eb4d8dcSEmmanuel Vadot reg = <0x0>; 125*2eb4d8dcSEmmanuel Vadot spi-max-frequency = <0x2625a00>; 126*2eb4d8dcSEmmanuel Vadot spi-cpol; 127*2eb4d8dcSEmmanuel Vadot spi-cpha; 128*2eb4d8dcSEmmanuel Vadot }; 129*2eb4d8dcSEmmanuel Vadot }; 130*2eb4d8dcSEmmanuel Vadot - | # BRCMSTB SoC: MSPI master for any SPI device 131*2eb4d8dcSEmmanuel Vadot spi@f0416000 { 132*2eb4d8dcSEmmanuel Vadot clocks = <&upg_fixed>; 133*2eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-brcmstb-mspi", "brcm,spi-bcm-qspi"; 134*2eb4d8dcSEmmanuel Vadot reg = <0xf0416000 0x180>; 135*2eb4d8dcSEmmanuel Vadot reg-names = "mspi"; 136*2eb4d8dcSEmmanuel Vadot interrupts = <0x14>; 137*2eb4d8dcSEmmanuel Vadot interrupt-parent = <&irq0_aon_intc>; 138*2eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done"; 139*2eb4d8dcSEmmanuel Vadot #address-cells = <1>; 140*2eb4d8dcSEmmanuel Vadot #size-cells = <0>; 141*2eb4d8dcSEmmanuel Vadot }; 142*2eb4d8dcSEmmanuel Vadot - | # iProc SoC 143*2eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 144*2eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 145*2eb4d8dcSEmmanuel Vadot 146*2eb4d8dcSEmmanuel Vadot spi@18027200 { 147*2eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"; 148*2eb4d8dcSEmmanuel Vadot reg = <0x18027200 0x184>, 149*2eb4d8dcSEmmanuel Vadot <0x18027000 0x124>, 150*2eb4d8dcSEmmanuel Vadot <0x1811c408 0x004>, 151*2eb4d8dcSEmmanuel Vadot <0x180273a0 0x01c>; 152*2eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; 153*2eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, 154*2eb4d8dcSEmmanuel Vadot <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>, 155*2eb4d8dcSEmmanuel Vadot <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, 156*2eb4d8dcSEmmanuel Vadot <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, 157*2eb4d8dcSEmmanuel Vadot <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>, 158*2eb4d8dcSEmmanuel Vadot <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>, 159*2eb4d8dcSEmmanuel Vadot <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 160*2eb4d8dcSEmmanuel Vadot interrupt-names = "mspi_done", 161*2eb4d8dcSEmmanuel Vadot "mspi_halted", 162*2eb4d8dcSEmmanuel Vadot "spi_lr_fullness_reached", 163*2eb4d8dcSEmmanuel Vadot "spi_lr_session_aborted", 164*2eb4d8dcSEmmanuel Vadot "spi_lr_impatient", 165*2eb4d8dcSEmmanuel Vadot "spi_lr_session_done"; 166*2eb4d8dcSEmmanuel Vadot clocks = <&iprocmed>; 167*2eb4d8dcSEmmanuel Vadot num-cs = <2>; 168*2eb4d8dcSEmmanuel Vadot #address-cells = <1>; 169*2eb4d8dcSEmmanuel Vadot #size-cells = <0>; 170*2eb4d8dcSEmmanuel Vadot }; 171*2eb4d8dcSEmmanuel Vadot - | # NS2 SoC 172*2eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 173*2eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 174*2eb4d8dcSEmmanuel Vadot 175*2eb4d8dcSEmmanuel Vadot spi@66470200 { 176*2eb4d8dcSEmmanuel Vadot compatible = "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi"; 177*2eb4d8dcSEmmanuel Vadot reg = <0x66470200 0x184>, 178*2eb4d8dcSEmmanuel Vadot <0x66470000 0x124>, 179*2eb4d8dcSEmmanuel Vadot <0x67017408 0x004>, 180*2eb4d8dcSEmmanuel Vadot <0x664703a0 0x01c>; 181*2eb4d8dcSEmmanuel Vadot reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; 182*2eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>; 183*2eb4d8dcSEmmanuel Vadot interrupt-names = "spi_l1_intr"; 184*2eb4d8dcSEmmanuel Vadot clocks = <&iprocmed>; 185*2eb4d8dcSEmmanuel Vadot num-cs = <2>; 186*2eb4d8dcSEmmanuel Vadot #address-cells = <1>; 187*2eb4d8dcSEmmanuel Vadot #size-cells = <0>; 188*2eb4d8dcSEmmanuel Vadot 189*2eb4d8dcSEmmanuel Vadot flash@0 { 190*2eb4d8dcSEmmanuel Vadot #address-cells = <1>; 191*2eb4d8dcSEmmanuel Vadot #size-cells = <1>; 192*2eb4d8dcSEmmanuel Vadot compatible = "m25p80"; 193*2eb4d8dcSEmmanuel Vadot reg = <0x0>; 194*2eb4d8dcSEmmanuel Vadot spi-max-frequency = <12500000>; 195*2eb4d8dcSEmmanuel Vadot spi-cpol; 196*2eb4d8dcSEmmanuel Vadot spi-cpha; 197*2eb4d8dcSEmmanuel Vadot }; 198*2eb4d8dcSEmmanuel Vadot }; 199