new file mode 100644
@@ -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 >;
+ };
@@ -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 {
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@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