summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-12-14 20:06:47 +0300
committerSimon Glass <sjg@chromium.org>2020-12-23 06:39:25 +0300
commit1dc53ce71d961a0404c0d785fb0b66f351a7b730 (patch)
treea7710af87cc6f698b8d8ea33391ef370d38f4ef7 /arch/sandbox
parent1f6d618bb16e10bdba5cb08733e228367662b12c (diff)
downloadu-boot-1dc53ce71d961a0404c0d785fb0b66f351a7b730.tar.xz
sandbox: test: Add a second SPI slave on sandbox_spi bus
Place a second spi slave on the sandbox_spi bus, to be used by the spi_claim_bus() testcase we are about to introduce. We need to make sure that jumping between slaves calling spi_claim_bus() sets the bus speed and mode appropriately. Use different max-hz and mode properties for this new slave. Also, update sandbox_spi cs_info call to allow activity on CS0/CS1 and adapt dm_test_spi_find() testcase for this new setup. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/test.dts10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index d49bee43aa..c9b9b7b75e 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -865,13 +865,21 @@
#size-cells = <0>;
reg = <0 1>;
compatible = "sandbox,spi";
- cs-gpios = <0>, <&gpio_a 0>;
+ cs-gpios = <0>, <0>, <&gpio_a 0>;
spi.bin@0 {
reg = <0>;
compatible = "spansion,m25p16", "jedec,spi-nor";
spi-max-frequency = <40000000>;
sandbox,filename = "spi.bin";
};
+ spi.bin@1 {
+ reg = <1>;
+ compatible = "spansion,m25p16", "jedec,spi-nor";
+ spi-max-frequency = <50000000>;
+ sandbox,filename = "spi.bin";
+ spi-cpol;
+ spi-cpha;
+ };
};
syscon0: syscon@0 {