diff options
Diffstat (limited to 'Documentation/devicetree/bindings/spi')
-rw-r--r-- | Documentation/devicetree/bindings/spi/fsl-spi.txt | 53 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/spi/spi-bus.txt | 57 |
2 files changed, 110 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/spi/fsl-spi.txt b/Documentation/devicetree/bindings/spi/fsl-spi.txt new file mode 100644 index 000000000000..777abd7399d5 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/fsl-spi.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | * SPI (Serial Peripheral Interface) | ||
2 | |||
3 | Required properties: | ||
4 | - cell-index : QE SPI subblock index. | ||
5 | 0: QE subblock SPI1 | ||
6 | 1: QE subblock SPI2 | ||
7 | - compatible : should be "fsl,spi". | ||
8 | - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". | ||
9 | - reg : Offset and length of the register set for the device | ||
10 | - interrupts : <a b> where a is the interrupt number and b is a | ||
11 | field that represents an encoding of the sense and level | ||
12 | information for the interrupt. This should be encoded based on | ||
13 | the information in section 2) depending on the type of interrupt | ||
14 | controller you have. | ||
15 | - interrupt-parent : the phandle for the interrupt controller that | ||
16 | services interrupts for this device. | ||
17 | |||
18 | Optional properties: | ||
19 | - gpios : specifies the gpio pins to be used for chipselects. | ||
20 | The gpios will be referred to as reg = <index> in the SPI child nodes. | ||
21 | If unspecified, a single SPI device without a chip select can be used. | ||
22 | |||
23 | Example: | ||
24 | spi@4c0 { | ||
25 | cell-index = <0>; | ||
26 | compatible = "fsl,spi"; | ||
27 | reg = <4c0 40>; | ||
28 | interrupts = <82 0>; | ||
29 | interrupt-parent = <700>; | ||
30 | mode = "cpu"; | ||
31 | gpios = <&gpio 18 1 // device reg=<0> | ||
32 | &gpio 19 1>; // device reg=<1> | ||
33 | }; | ||
34 | |||
35 | |||
36 | * eSPI (Enhanced Serial Peripheral Interface) | ||
37 | |||
38 | Required properties: | ||
39 | - compatible : should be "fsl,mpc8536-espi". | ||
40 | - reg : Offset and length of the register set for the device. | ||
41 | - interrupts : should contain eSPI interrupt, the device has one interrupt. | ||
42 | - fsl,espi-num-chipselects : the number of the chipselect signals. | ||
43 | |||
44 | Example: | ||
45 | spi@110000 { | ||
46 | #address-cells = <1>; | ||
47 | #size-cells = <0>; | ||
48 | compatible = "fsl,mpc8536-espi"; | ||
49 | reg = <0x110000 0x1000>; | ||
50 | interrupts = <53 0x2>; | ||
51 | interrupt-parent = <&mpic>; | ||
52 | fsl,espi-num-chipselects = <4>; | ||
53 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt new file mode 100644 index 000000000000..e782add2e457 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | SPI (Serial Peripheral Interface) busses | ||
2 | |||
3 | SPI busses can be described with a node for the SPI master device | ||
4 | and a set of child nodes for each SPI slave on the bus. For this | ||
5 | discussion, it is assumed that the system's SPI controller is in | ||
6 | SPI master mode. This binding does not describe SPI controllers | ||
7 | in slave mode. | ||
8 | |||
9 | The SPI master node requires the following properties: | ||
10 | - #address-cells - number of cells required to define a chip select | ||
11 | address on the SPI bus. | ||
12 | - #size-cells - should be zero. | ||
13 | - compatible - name of SPI bus controller following generic names | ||
14 | recommended practice. | ||
15 | No other properties are required in the SPI bus node. It is assumed | ||
16 | that a driver for an SPI bus device will understand that it is an SPI bus. | ||
17 | However, the binding does not attempt to define the specific method for | ||
18 | assigning chip select numbers. Since SPI chip select configuration is | ||
19 | flexible and non-standardized, it is left out of this binding with the | ||
20 | assumption that board specific platform code will be used to manage | ||
21 | chip selects. Individual drivers can define additional properties to | ||
22 | support describing the chip select layout. | ||
23 | |||
24 | SPI slave nodes must be children of the SPI master node and can | ||
25 | contain the following properties. | ||
26 | - reg - (required) chip select address of device. | ||
27 | - compatible - (required) name of SPI device following generic names | ||
28 | recommended practice | ||
29 | - spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz | ||
30 | - spi-cpol - (optional) Empty property indicating device requires | ||
31 | inverse clock polarity (CPOL) mode | ||
32 | - spi-cpha - (optional) Empty property indicating device requires | ||
33 | shifted clock phase (CPHA) mode | ||
34 | - spi-cs-high - (optional) Empty property indicating device requires | ||
35 | chip select active high | ||
36 | |||
37 | SPI example for an MPC5200 SPI bus: | ||
38 | spi@f00 { | ||
39 | #address-cells = <1>; | ||
40 | #size-cells = <0>; | ||
41 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; | ||
42 | reg = <0xf00 0x20>; | ||
43 | interrupts = <2 13 0 2 14 0>; | ||
44 | interrupt-parent = <&mpc5200_pic>; | ||
45 | |||
46 | ethernet-switch@0 { | ||
47 | compatible = "micrel,ks8995m"; | ||
48 | spi-max-frequency = <1000000>; | ||
49 | reg = <0>; | ||
50 | }; | ||
51 | |||
52 | codec@1 { | ||
53 | compatible = "ti,tlv320aic26"; | ||
54 | spi-max-frequency = <100000>; | ||
55 | reg = <1>; | ||
56 | }; | ||
57 | }; | ||