[RFC 2/2] spi: aspeed: documentation and device tree bindings for ASPEED SPI1 mode controller

Kun Yi kunyi at google.com
Sat Oct 22 11:45:58 AEDT 2016


There is no accurate HW representation for the driver at the moment,
thus it is represented as a "virtual" platform device node. The driver
is placed in misc for the same reason.

Signed-off-by: Kun Yi <kunyi at google.com>
---
 .../devicetree/bindings/misc/aspeed-spi-mode.txt   | 29 ++++++++++++++++++++++
 arch/arm/boot/dts/aspeed-ast2500-evb.dts           | 10 ++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/aspeed-spi-mode.txt

diff --git a/Documentation/devicetree/bindings/misc/aspeed-spi-mode.txt b/Documentation/devicetree/bindings/misc/aspeed-spi-mode.txt
new file mode 100644
index 0000000..540b101
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/aspeed-spi-mode.txt
@@ -0,0 +1,29 @@
+Device tree entry for SPI1 mode controller on AST24XX/AST25XX.
+
+This binding enables the SPI1 mode controller virtual driver that exposes
+the SPI1 interface toggle capability to userspace through sysfs interface. If
+optional argument "start_mode" is defined, it also configures the SPI mode.
+
+Required Properties:
+- #address-cells	: should be 1
+- #size-cells		: should be 1
+- compatible		: should be "aspeed, aspeed_spi_mode"
+- reg			: addresses and sizes of HW strap register and HW strap
+			  reset register. Should be < 0x1e6e2070 0x4 > and
+			  < 0x1e6e207c 0x4 > respectively.
+
+Optional Properties:
+- start_mode		: spi mode to override HW strap setting during probe.
+			  Can be 0(disabled) 1(master) or 3(pass-through).
+			  If not defined, HW strap or pinctrl setting is kept.
+
+Example:
+	spi_mode_ctrl: spi_mode {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "aspeed,aspeed_spi_mode";
+		start_mode = <1>;
+		status = "okay";
+		reg = < 0x1e6e2070 0x4
+			0x1e6e207c 0x4 >;
+	};
diff --git a/arch/arm/boot/dts/aspeed-ast2500-evb.dts b/arch/arm/boot/dts/aspeed-ast2500-evb.dts
index 33b3907..f50812a 100644
--- a/arch/arm/boot/dts/aspeed-ast2500-evb.dts
+++ b/arch/arm/boot/dts/aspeed-ast2500-evb.dts
@@ -18,6 +18,16 @@
 	memory {
 		reg = <0x80000000 0x20000000>;
 	};
+
+	spi_mode_ctrl: spi_mode {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "aspeed,aspeed_spi_mode";
+		start_mode = <1>;
+		status = "okay";
+		reg = < 0x1e6e2070 0x4
+			0x1e6e207c 0x4 >;
+	};
 };
 
 &fmc {
-- 
2.8.0.rc3.226.g39d4020



More information about the openbmc mailing list