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