1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2*cb7aa33aSEmmanuel Vadot%YAML 1.2 3*cb7aa33aSEmmanuel Vadot--- 4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/brcm,bcm63xx-hsspi.yaml# 5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*cb7aa33aSEmmanuel Vadot 7*cb7aa33aSEmmanuel Vadottitle: Broadcom Broadband SoC High Speed SPI controller 8*cb7aa33aSEmmanuel Vadot 9*cb7aa33aSEmmanuel Vadotmaintainers: 10*cb7aa33aSEmmanuel Vadot - William Zhang <william.zhang@broadcom.com> 11*cb7aa33aSEmmanuel Vadot - Kursad Oney <kursad.oney@broadcom.com> 12*cb7aa33aSEmmanuel Vadot - Jonas Gorski <jonas.gorski@gmail.com> 13*cb7aa33aSEmmanuel Vadot 14*cb7aa33aSEmmanuel Vadotdescription: | 15*cb7aa33aSEmmanuel Vadot Broadcom Broadband SoC supports High Speed SPI master controller since the 16*cb7aa33aSEmmanuel Vadot early MIPS based chips such as BCM6328 and BCM63268. This initial rev 1.0 17*cb7aa33aSEmmanuel Vadot controller was carried over to recent ARM based chips, such as BCM63138, 18*cb7aa33aSEmmanuel Vadot BCM4908 and BCM6858. The old MIPS based chip should continue to use the 19*cb7aa33aSEmmanuel Vadot brcm,bcm6328-hsspi compatible string. The recent ARM based chip is required to 20*cb7aa33aSEmmanuel Vadot use the brcm,bcmbca-hsspi-v1.0 as part of its compatible string list as 21*cb7aa33aSEmmanuel Vadot defined below to match the specific chip along with ip revision info. 22*cb7aa33aSEmmanuel Vadot 23*cb7aa33aSEmmanuel Vadot This rev 1.0 controller has a limitation that can not keep the chip select line 24*cb7aa33aSEmmanuel Vadot active between the SPI transfers within the same SPI message. This can 25*cb7aa33aSEmmanuel Vadot terminate the transaction to some SPI devices prematurely. The issue can be 26*cb7aa33aSEmmanuel Vadot worked around by either the controller's prepend mode or using the dummy chip 27*cb7aa33aSEmmanuel Vadot select workaround. Driver automatically picks the suitable mode based on 28*cb7aa33aSEmmanuel Vadot transfer type so it is transparent to the user. 29*cb7aa33aSEmmanuel Vadot 30*cb7aa33aSEmmanuel Vadot The newer SoCs such as BCM6756, BCM4912 and BCM6855 include an updated SPI 31*cb7aa33aSEmmanuel Vadot controller rev 1.1 that add the capability to allow the driver to control chip 32*cb7aa33aSEmmanuel Vadot select explicitly. This solves the issue in the old controller. 33*cb7aa33aSEmmanuel Vadot 34*cb7aa33aSEmmanuel Vadotproperties: 35*cb7aa33aSEmmanuel Vadot compatible: 36*cb7aa33aSEmmanuel Vadot oneOf: 37*cb7aa33aSEmmanuel Vadot - const: brcm,bcm6328-hsspi 38*cb7aa33aSEmmanuel Vadot - items: 39*cb7aa33aSEmmanuel Vadot - enum: 40*cb7aa33aSEmmanuel Vadot - brcm,bcm47622-hsspi 41*cb7aa33aSEmmanuel Vadot - brcm,bcm4908-hsspi 42*cb7aa33aSEmmanuel Vadot - brcm,bcm63138-hsspi 43*cb7aa33aSEmmanuel Vadot - brcm,bcm63146-hsspi 44*cb7aa33aSEmmanuel Vadot - brcm,bcm63148-hsspi 45*cb7aa33aSEmmanuel Vadot - brcm,bcm63158-hsspi 46*cb7aa33aSEmmanuel Vadot - brcm,bcm63178-hsspi 47*cb7aa33aSEmmanuel Vadot - brcm,bcm6846-hsspi 48*cb7aa33aSEmmanuel Vadot - brcm,bcm6856-hsspi 49*cb7aa33aSEmmanuel Vadot - brcm,bcm6858-hsspi 50*cb7aa33aSEmmanuel Vadot - brcm,bcm6878-hsspi 51*cb7aa33aSEmmanuel Vadot - const: brcm,bcmbca-hsspi-v1.0 52*cb7aa33aSEmmanuel Vadot - items: 53*cb7aa33aSEmmanuel Vadot - enum: 54*cb7aa33aSEmmanuel Vadot - brcm,bcm4912-hsspi 55*cb7aa33aSEmmanuel Vadot - brcm,bcm6756-hsspi 56*cb7aa33aSEmmanuel Vadot - brcm,bcm6813-hsspi 57*cb7aa33aSEmmanuel Vadot - brcm,bcm6855-hsspi 58*cb7aa33aSEmmanuel Vadot - const: brcm,bcmbca-hsspi-v1.1 59*cb7aa33aSEmmanuel Vadot 60*cb7aa33aSEmmanuel Vadot reg: 61*cb7aa33aSEmmanuel Vadot items: 62*cb7aa33aSEmmanuel Vadot - description: main registers 63*cb7aa33aSEmmanuel Vadot - description: miscellaneous control registers 64*cb7aa33aSEmmanuel Vadot minItems: 1 65*cb7aa33aSEmmanuel Vadot 66*cb7aa33aSEmmanuel Vadot reg-names: 67*cb7aa33aSEmmanuel Vadot items: 68*cb7aa33aSEmmanuel Vadot - const: hsspi 69*cb7aa33aSEmmanuel Vadot - const: spim-ctrl 70*cb7aa33aSEmmanuel Vadot minItems: 1 71*cb7aa33aSEmmanuel Vadot 72*cb7aa33aSEmmanuel Vadot clocks: 73*cb7aa33aSEmmanuel Vadot items: 74*cb7aa33aSEmmanuel Vadot - description: SPI master reference clock 75*cb7aa33aSEmmanuel Vadot - description: SPI master pll clock 76*cb7aa33aSEmmanuel Vadot 77*cb7aa33aSEmmanuel Vadot clock-names: 78*cb7aa33aSEmmanuel Vadot items: 79*cb7aa33aSEmmanuel Vadot - const: hsspi 80*cb7aa33aSEmmanuel Vadot - const: pll 81*cb7aa33aSEmmanuel Vadot 82*cb7aa33aSEmmanuel Vadot interrupts: 83*cb7aa33aSEmmanuel Vadot maxItems: 1 84*cb7aa33aSEmmanuel Vadot 85*cb7aa33aSEmmanuel Vadotrequired: 86*cb7aa33aSEmmanuel Vadot - compatible 87*cb7aa33aSEmmanuel Vadot - reg 88*cb7aa33aSEmmanuel Vadot - clocks 89*cb7aa33aSEmmanuel Vadot - clock-names 90*cb7aa33aSEmmanuel Vadot - interrupts 91*cb7aa33aSEmmanuel Vadot 92*cb7aa33aSEmmanuel VadotallOf: 93*cb7aa33aSEmmanuel Vadot - $ref: spi-controller.yaml# 94*cb7aa33aSEmmanuel Vadot - if: 95*cb7aa33aSEmmanuel Vadot properties: 96*cb7aa33aSEmmanuel Vadot compatible: 97*cb7aa33aSEmmanuel Vadot contains: 98*cb7aa33aSEmmanuel Vadot enum: 99*cb7aa33aSEmmanuel Vadot - brcm,bcm6328-hsspi 100*cb7aa33aSEmmanuel Vadot - brcm,bcmbca-hsspi-v1.0 101*cb7aa33aSEmmanuel Vadot then: 102*cb7aa33aSEmmanuel Vadot properties: 103*cb7aa33aSEmmanuel Vadot reg: 104*cb7aa33aSEmmanuel Vadot maxItems: 1 105*cb7aa33aSEmmanuel Vadot reg-names: 106*cb7aa33aSEmmanuel Vadot maxItems: 1 107*cb7aa33aSEmmanuel Vadot else: 108*cb7aa33aSEmmanuel Vadot properties: 109*cb7aa33aSEmmanuel Vadot reg: 110*cb7aa33aSEmmanuel Vadot minItems: 2 111*cb7aa33aSEmmanuel Vadot maxItems: 2 112*cb7aa33aSEmmanuel Vadot reg-names: 113*cb7aa33aSEmmanuel Vadot minItems: 2 114*cb7aa33aSEmmanuel Vadot maxItems: 2 115*cb7aa33aSEmmanuel Vadot required: 116*cb7aa33aSEmmanuel Vadot - reg-names 117*cb7aa33aSEmmanuel Vadot 118*cb7aa33aSEmmanuel VadotunevaluatedProperties: false 119*cb7aa33aSEmmanuel Vadot 120*cb7aa33aSEmmanuel Vadotexamples: 121*cb7aa33aSEmmanuel Vadot - | 122*cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 123*cb7aa33aSEmmanuel Vadot spi@ff801000 { 124*cb7aa33aSEmmanuel Vadot compatible = "brcm,bcm6756-hsspi", "brcm,bcmbca-hsspi-v1.1"; 125*cb7aa33aSEmmanuel Vadot reg = <0xff801000 0x1000>, 126*cb7aa33aSEmmanuel Vadot <0xff802610 0x4>; 127*cb7aa33aSEmmanuel Vadot reg-names = "hsspi", "spim-ctrl"; 128*cb7aa33aSEmmanuel Vadot interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 129*cb7aa33aSEmmanuel Vadot clocks = <&hsspi>, <&hsspi_pll>; 130*cb7aa33aSEmmanuel Vadot clock-names = "hsspi", "pll"; 131*cb7aa33aSEmmanuel Vadot num-cs = <8>; 132*cb7aa33aSEmmanuel Vadot #address-cells = <1>; 133*cb7aa33aSEmmanuel Vadot #size-cells = <0>; 134*cb7aa33aSEmmanuel Vadot }; 135