Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 899d81b9 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/imx',...

Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/imx', 'spi/topic/mxs', 'spi/topic/omap-100k' and 'spi/topic/orion' into spi-next
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
Device-Tree binding for regmap

The endianness mode of CPU & Device scenarios:
Index     Device     Endianness properties
---------------------------------------------------
1         BE         'big-endian'
2         LE         'little-endian'

For one device driver, which will run in different scenarios above
on different SoCs using the devicetree, we need one way to simplify
this.

Required properties:
- {big,little}-endian: these are boolean properties, if absent
  meaning that the CPU and the Device are in the same endianness mode,
  these properties are for register values and all the buffers only.

Examples:
Scenario 1 : CPU in LE mode & device in LE mode.
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
};

Scenario 2 : CPU in LE mode & device in BE mode.
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      big-endian;
};

Scenario 3 : CPU in BE mode & device in BE mode.
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
};

Scenario 4 : CPU in BE mode & device in LE mode.
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      little-endian;
};
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@ Required properties:
- interrupts : Should contain CSPI/eCSPI interrupt
- fsl,spi-num-chipselects : Contains the number of the chipselect
- cs-gpios : Specifies the gpio pins to be used for chipselects.
- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
		Documentation/devicetree/bindings/dma/dma.txt
- dma-names: DMA request names should include "tx" and "rx" if present.

Example:

@@ -19,4 +22,6 @@ ecspi@70010000 {
	fsl,spi-num-chipselects = <2>;
	cs-gpios = <&gpio3 24 0>, /* GPIO3_24 */
		   <&gpio3 25 0>; /* GPIO3_25 */
	dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
	dma-names = "rx", "tx";
};
+6 −1
Original line number Diff line number Diff line
@@ -10,7 +10,12 @@ Required properties:
- pinctrl-names: must contain a "default" entry.
- spi-num-chipselects : the number of the chipselect signals.
- bus-num : the slave chip chipselect signal number.
- big-endian : if DSPI modudle is big endian, the bool will be set in node.

Optional property:
- big-endian: If present the dspi device's registers are implemented
  in big endian mode, otherwise in native mode(same with CPU), for more
  detail please see: Documentation/devicetree/bindings/regmap/regmap.txt.

Example:

dspi0@4002c000 {
+1 −1
Original line number Diff line number Diff line
Marvell Orion SPI device

Required properties:
- compatible : should be "marvell,orion-spi".
- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
- reg : offset and length of the register set for the device
- cell-index : Which of multiple SPI controllers is this.
Optional properties:
+2 −0
Original line number Diff line number Diff line
@@ -168,6 +168,8 @@ static struct regmap_bus regmap_i2c = {
	.write = regmap_i2c_write,
	.gather_write = regmap_i2c_gather_write,
	.read = regmap_i2c_read,
	.reg_format_endian_default = REGMAP_ENDIAN_BIG,
	.val_format_endian_default = REGMAP_ENDIAN_BIG,
};

static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c,
Loading