1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/renesas,sh-msiof.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Renesas MSIOF SPI controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Geert Uytterhoeven <geert+renesas@glider.be> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel VadotallOf: 13c66ec88fSEmmanuel Vadot - $ref: spi-controller.yaml# 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadotproperties: 16c66ec88fSEmmanuel Vadot compatible: 17c66ec88fSEmmanuel Vadot oneOf: 18c66ec88fSEmmanuel Vadot - items: 19c66ec88fSEmmanuel Vadot - const: renesas,msiof-sh73a0 # SH-Mobile AG5 20c66ec88fSEmmanuel Vadot - const: renesas,sh-mobile-msiof # generic SH-Mobile compatible 21c66ec88fSEmmanuel Vadot # device 22c66ec88fSEmmanuel Vadot - items: 23c66ec88fSEmmanuel Vadot - enum: 24c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7742 # RZ/G1H 25c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7743 # RZ/G1M 26c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7744 # RZ/G1N 27c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7745 # RZ/G1E 28c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77470 # RZ/G1C 29c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7790 # R-Car H2 30c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7791 # R-Car M2-W 31c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7792 # R-Car V2H 32c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7793 # R-Car M2-N 33c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7794 # R-Car E2 34c66ec88fSEmmanuel Vadot - const: renesas,rcar-gen2-msiof # generic R-Car Gen2 and RZ/G1 35c66ec88fSEmmanuel Vadot # compatible device 36c66ec88fSEmmanuel Vadot - items: 37c66ec88fSEmmanuel Vadot - enum: 38c66ec88fSEmmanuel Vadot - renesas,msiof-r8a774a1 # RZ/G2M 39c66ec88fSEmmanuel Vadot - renesas,msiof-r8a774b1 # RZ/G2N 40c66ec88fSEmmanuel Vadot - renesas,msiof-r8a774c0 # RZ/G2E 41c66ec88fSEmmanuel Vadot - renesas,msiof-r8a774e1 # RZ/G2H 42c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7795 # R-Car H3 43c66ec88fSEmmanuel Vadot - renesas,msiof-r8a7796 # R-Car M3-W 446be33864SEmmanuel Vadot - renesas,msiof-r8a77961 # R-Car M3-W+ 45c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77965 # R-Car M3-N 46c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77970 # R-Car V3M 47c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77980 # R-Car V3H 48c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77990 # R-Car E3 49c66ec88fSEmmanuel Vadot - renesas,msiof-r8a77995 # R-Car D3 50c66ec88fSEmmanuel Vadot - const: renesas,rcar-gen3-msiof # generic R-Car Gen3 and RZ/G2 51c66ec88fSEmmanuel Vadot # compatible device 52c66ec88fSEmmanuel Vadot - items: 537ef62cebSEmmanuel Vadot - enum: 547ef62cebSEmmanuel Vadot - renesas,msiof-r8a779a0 # R-Car V3U 557ef62cebSEmmanuel Vadot - renesas,msiof-r8a779f0 # R-Car S4-8 567ef62cebSEmmanuel Vadot - renesas,msiof-r8a779g0 # R-Car V4H 57*7d0873ebSEmmanuel Vadot - renesas,msiof-r8a779h0 # R-Car V4M 587ef62cebSEmmanuel Vadot - const: renesas,rcar-gen4-msiof # generic R-Car Gen4 597ef62cebSEmmanuel Vadot # compatible device 607ef62cebSEmmanuel Vadot - items: 61c66ec88fSEmmanuel Vadot - const: renesas,sh-msiof # deprecated 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot reg: 64c66ec88fSEmmanuel Vadot minItems: 1 65c66ec88fSEmmanuel Vadot maxItems: 2 66c66ec88fSEmmanuel Vadot oneOf: 67c66ec88fSEmmanuel Vadot - items: 68c66ec88fSEmmanuel Vadot - description: CPU and DMA engine registers 69c66ec88fSEmmanuel Vadot - items: 70c66ec88fSEmmanuel Vadot - description: CPU registers 71c66ec88fSEmmanuel Vadot - description: DMA engine registers 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadot interrupts: 74c66ec88fSEmmanuel Vadot maxItems: 1 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel Vadot clocks: 77c66ec88fSEmmanuel Vadot maxItems: 1 78c66ec88fSEmmanuel Vadot 797ef62cebSEmmanuel Vadot power-domains: 807ef62cebSEmmanuel Vadot maxItems: 1 817ef62cebSEmmanuel Vadot 827ef62cebSEmmanuel Vadot resets: 837ef62cebSEmmanuel Vadot maxItems: 1 847ef62cebSEmmanuel Vadot 85c66ec88fSEmmanuel Vadot num-cs: 86c66ec88fSEmmanuel Vadot description: | 87c66ec88fSEmmanuel Vadot Total number of chip selects (default is 1). 88c66ec88fSEmmanuel Vadot Up to 3 native chip selects are supported: 89c66ec88fSEmmanuel Vadot 0: MSIOF_SYNC 90c66ec88fSEmmanuel Vadot 1: MSIOF_SS1 91c66ec88fSEmmanuel Vadot 2: MSIOF_SS2 92c66ec88fSEmmanuel Vadot Hardware limitations related to chip selects: 93c66ec88fSEmmanuel Vadot - Native chip selects are always deasserted in between transfers 94c66ec88fSEmmanuel Vadot that are part of the same message. Use cs-gpios to work around 95c66ec88fSEmmanuel Vadot this. 96c66ec88fSEmmanuel Vadot - All slaves using native chip selects must use the same spi-cs-high 97c66ec88fSEmmanuel Vadot configuration. Use cs-gpios to work around this. 98c66ec88fSEmmanuel Vadot - When using GPIO chip selects, at least one native chip select must 99c66ec88fSEmmanuel Vadot be left unused, as it will be driven anyway. 100c66ec88fSEmmanuel Vadot minimum: 1 101c66ec88fSEmmanuel Vadot maximum: 3 102c66ec88fSEmmanuel Vadot default: 1 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot dmas: 105c66ec88fSEmmanuel Vadot minItems: 2 106c66ec88fSEmmanuel Vadot maxItems: 4 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot dma-names: 109c66ec88fSEmmanuel Vadot minItems: 2 110c66ec88fSEmmanuel Vadot maxItems: 4 111c66ec88fSEmmanuel Vadot items: 112c66ec88fSEmmanuel Vadot enum: [ tx, rx ] 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadot renesas,dtdl: 115c66ec88fSEmmanuel Vadot description: delay sync signal (setup) in transmit mode. 116c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 117c66ec88fSEmmanuel Vadot enum: 118c66ec88fSEmmanuel Vadot - 0 # no bit delay 119c66ec88fSEmmanuel Vadot - 50 # 0.5-clock-cycle delay 120c66ec88fSEmmanuel Vadot - 100 # 1-clock-cycle delay 121c66ec88fSEmmanuel Vadot - 150 # 1.5-clock-cycle delay 122c66ec88fSEmmanuel Vadot - 200 # 2-clock-cycle delay 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel Vadot renesas,syncdl: 125c66ec88fSEmmanuel Vadot description: delay sync signal (hold) in transmit mode 126c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 127c66ec88fSEmmanuel Vadot enum: 128c66ec88fSEmmanuel Vadot - 0 # no bit delay 129c66ec88fSEmmanuel Vadot - 50 # 0.5-clock-cycle delay 130c66ec88fSEmmanuel Vadot - 100 # 1-clock-cycle delay 131c66ec88fSEmmanuel Vadot - 150 # 1.5-clock-cycle delay 132c66ec88fSEmmanuel Vadot - 200 # 2-clock-cycle delay 133c66ec88fSEmmanuel Vadot - 300 # 3-clock-cycle delay 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel Vadot renesas,tx-fifo-size: 136c66ec88fSEmmanuel Vadot # deprecated for soctype-specific bindings 137c66ec88fSEmmanuel Vadot description: | 138c66ec88fSEmmanuel Vadot Override the default TX fifo size. Unit is words. Ignored if 0. 139c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 140c66ec88fSEmmanuel Vadot default: 64 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot renesas,rx-fifo-size: 143c66ec88fSEmmanuel Vadot # deprecated for soctype-specific bindings 144c66ec88fSEmmanuel Vadot description: | 145c66ec88fSEmmanuel Vadot Override the default RX fifo size. Unit is words. Ignored if 0. 146c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 147c66ec88fSEmmanuel Vadot default: 64 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadotrequired: 150c66ec88fSEmmanuel Vadot - compatible 151c66ec88fSEmmanuel Vadot - reg 152c66ec88fSEmmanuel Vadot - interrupts 153fac71e4eSEmmanuel Vadot - clocks 154fac71e4eSEmmanuel Vadot - power-domains 155c66ec88fSEmmanuel Vadot - '#address-cells' 156c66ec88fSEmmanuel Vadot - '#size-cells' 157c66ec88fSEmmanuel Vadot 158fac71e4eSEmmanuel Vadotif: 159fac71e4eSEmmanuel Vadot not: 160fac71e4eSEmmanuel Vadot properties: 161fac71e4eSEmmanuel Vadot compatible: 162fac71e4eSEmmanuel Vadot contains: 163fac71e4eSEmmanuel Vadot const: renesas,sh-mobile-msiof 164fac71e4eSEmmanuel Vadotthen: 165fac71e4eSEmmanuel Vadot required: 166fac71e4eSEmmanuel Vadot - resets 167fac71e4eSEmmanuel Vadot 1686be33864SEmmanuel VadotunevaluatedProperties: false 1696be33864SEmmanuel Vadot 170c66ec88fSEmmanuel Vadotexamples: 171c66ec88fSEmmanuel Vadot - | 172fac71e4eSEmmanuel Vadot #include <dt-bindings/clock/r8a7791-cpg-mssr.h> 173fac71e4eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 174fac71e4eSEmmanuel Vadot #include <dt-bindings/power/r8a7791-sysc.h> 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot msiof0: spi@e6e20000 { 177c66ec88fSEmmanuel Vadot compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof"; 178c66ec88fSEmmanuel Vadot reg = <0xe6e20000 0x0064>; 179fac71e4eSEmmanuel Vadot interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; 180fac71e4eSEmmanuel Vadot clocks = <&cpg CPG_MOD 000>; 181c66ec88fSEmmanuel Vadot dmas = <&dmac0 0x51>, <&dmac0 0x52>; 182c66ec88fSEmmanuel Vadot dma-names = "tx", "rx"; 183fac71e4eSEmmanuel Vadot power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; 184fac71e4eSEmmanuel Vadot resets = <&cpg 0>; 185c66ec88fSEmmanuel Vadot #address-cells = <1>; 186c66ec88fSEmmanuel Vadot #size-cells = <0>; 187c66ec88fSEmmanuel Vadot }; 188