1*4882a593SmuzhiyunMarvell Orion SPI device 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun- compatible : should be on of the following: 5*4882a593Smuzhiyun - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs 6*4882a593Smuzhiyun - "marvell,armada-370-spi", for the Armada 370 SoCs 7*4882a593Smuzhiyun - "marvell,armada-375-spi", for the Armada 375 SoCs 8*4882a593Smuzhiyun - "marvell,armada-380-spi", for the Armada 38x SoCs 9*4882a593Smuzhiyun - "marvell,armada-390-spi", for the Armada 39x SoCs 10*4882a593Smuzhiyun - "marvell,armada-xp-spi", for the Armada XP SoCs 11*4882a593Smuzhiyun- reg : offset and length of the register set for the device. 12*4882a593Smuzhiyun This property can optionally have additional entries to configure 13*4882a593Smuzhiyun the SPI direct access mode that some of the Marvell SoCs support 14*4882a593Smuzhiyun additionally to the normal indirect access (PIO) mode. The values 15*4882a593Smuzhiyun for the MBus "target" and "attribute" are defined in the Marvell 16*4882a593Smuzhiyun SoC "Functional Specifications" Manual in the chapter "Marvell 17*4882a593Smuzhiyun Core Processor Address Decoding". 18*4882a593Smuzhiyun The eight register sets following the control registers refer to 19*4882a593Smuzhiyun chip-select lines 0 through 7 respectively. 20*4882a593Smuzhiyun- cell-index : Which of multiple SPI controllers is this. 21*4882a593Smuzhiyun- clocks : pointers to the reference clocks for this device, the first 22*4882a593Smuzhiyun one is the one used for the clock on the spi bus, the 23*4882a593Smuzhiyun second one is optional and is the clock used for the 24*4882a593Smuzhiyun functional part of the controller 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunOptional properties: 27*4882a593Smuzhiyun- interrupts : Is currently not used. 28*4882a593Smuzhiyun- clock-names : names of used clocks, mandatory if the second clock is 29*4882a593Smuzhiyun used, the name must be "core", and "axi" (the latter 30*4882a593Smuzhiyun is only for Armada 7K/8K). 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunExample: 34*4882a593Smuzhiyun spi@10600 { 35*4882a593Smuzhiyun compatible = "marvell,orion-spi"; 36*4882a593Smuzhiyun #address-cells = <1>; 37*4882a593Smuzhiyun #size-cells = <0>; 38*4882a593Smuzhiyun cell-index = <0>; 39*4882a593Smuzhiyun reg = <0x10600 0x28>; 40*4882a593Smuzhiyun interrupts = <23>; 41*4882a593Smuzhiyun }; 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunExample with SPI direct mode support (optionally): 44*4882a593Smuzhiyun spi0: spi@10600 { 45*4882a593Smuzhiyun compatible = "marvell,orion-spi"; 46*4882a593Smuzhiyun #address-cells = <1>; 47*4882a593Smuzhiyun #size-cells = <0>; 48*4882a593Smuzhiyun cell-index = <0>; 49*4882a593Smuzhiyun reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */ 50*4882a593Smuzhiyun <MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */ 51*4882a593Smuzhiyun <MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */ 52*4882a593Smuzhiyun <MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */ 53*4882a593Smuzhiyun <MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */ 54*4882a593Smuzhiyun <MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */ 55*4882a593Smuzhiyun <MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */ 56*4882a593Smuzhiyun <MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */ 57*4882a593Smuzhiyun <MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */ 58*4882a593Smuzhiyun interrupts = <23>; 59*4882a593Smuzhiyun }; 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunTo enable the direct mode, the board specific 'ranges' property in the 62*4882a593Smuzhiyun'soc' node needs to add the entries for the desired SPI controllers 63*4882a593Smuzhiyunand its chip-selects that are used in the direct mode instead of PIO 64*4882a593Smuzhiyunmode. Here an example for this (SPI controller 0, device 1 and SPI 65*4882a593Smuzhiyuncontroller 1, device 2 are used in direct mode. All other SPI device 66*4882a593Smuzhiyunare used in the default indirect (PIO) mode): 67*4882a593Smuzhiyun soc { 68*4882a593Smuzhiyun /* 69*4882a593Smuzhiyun * Enable the SPI direct access by configuring an entry 70*4882a593Smuzhiyun * here in the board-specific ranges property 71*4882a593Smuzhiyun */ 72*4882a593Smuzhiyun ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000>, /* internal regs */ 73*4882a593Smuzhiyun <MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>, /* BootROM */ 74*4882a593Smuzhiyun <MBUS_ID(0x01, 0x5e) 0 0 0xf1100000 0x10000>, /* SPI0-DEV1 */ 75*4882a593Smuzhiyun <MBUS_ID(0x01, 0x9a) 0 0 0xf1110000 0x10000>; /* SPI1-DEV2 */ 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunFor further information on the MBus bindings, please see the MBus 78*4882a593SmuzhiyunDT documentation: 79*4882a593SmuzhiyunDocumentation/devicetree/bindings/bus/mvebu-mbus.txt 80