Skip to content
Snippets Groups Projects
Commit 892cac72 authored by Simon Glass's avatar Simon Glass
Browse files

sandbox: Move CONFIG_SANDBOX_SPI to Kconfig


Move this over to Kconfig and tidy up.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 1174aada
No related branches found
No related tags found
No related merge requests found
...@@ -20,3 +20,4 @@ CONFIG_BOOTSTAGE_REPORT=y ...@@ -20,3 +20,4 @@ CONFIG_BOOTSTAGE_REPORT=y
CONFIG_SANDBOX_GPIO=y CONFIG_SANDBOX_GPIO=y
CONFIG_SYS_VSNPRINTF=y CONFIG_SYS_VSNPRINTF=y
CONFIG_SYS_I2C_SANDBOX=y CONFIG_SYS_I2C_SANDBOX=y
CONFIG_SANDBOX_SPI=y
...@@ -10,3 +10,28 @@ config DM_SPI ...@@ -10,3 +10,28 @@ config DM_SPI
as 'parent data' to every slave on each bus. Slaves as 'parent data' to every slave on each bus. Slaves
typically use driver-private data instead of extending the typically use driver-private data instead of extending the
spi_slave structure. spi_slave structure.
config SANDBOX_SPI
bool "Sandbox SPI driver"
depends on SANDBOX && DM
help
Enable SPI support for sandbox. This is an emulation of a real SPI
bus. Devices can be attached to the bus using the device tree
which specifies the driver to use. As an example, see this device
tree fragment from sandbox.dts. It shows that the SPI bus has a
single flash device on chip select 0 which is emulated by the driver
for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c.
spi@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
compatible = "sandbox,spi";
cs-gpios = <0>, <&gpio_a 0>;
flash@0 {
reg = <0>;
compatible = "spansion,m25p16", "sandbox,spi-flash";
spi-max-frequency = <40000000>;
sandbox,filename = "spi.bin";
};
};
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
#define CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_IS_NOWHERE
/* SPI - enable all SPI flash types for testing purposes */ /* SPI - enable all SPI flash types for testing purposes */
#define CONFIG_SANDBOX_SPI
#define CONFIG_CMD_SF #define CONFIG_CMD_SF
#define CONFIG_CMD_SF_TEST #define CONFIG_CMD_SF_TEST
#define CONFIG_CMD_SPI #define CONFIG_CMD_SPI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment