summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorKory Maincent <kory.maincent@bootlin.com>2021-05-04 20:31:23 +0300
committerTom Rini <trini@konsulko.com>2021-05-13 20:09:09 +0300
commit95300f203f3249ffb7a08222dc4d8106c5a6ceeb (patch)
treea26fd939eccb3eca623057083a4758507041520b /arch/sandbox
parent2f84e9cf06d31aa703ff31301bf811b3fcfc16cf (diff)
downloadu-boot-95300f203f3249ffb7a08222dc4d8106c5a6ceeb.tar.xz
pytest: add sandbox test for "extension" command
This commit extends the sandbox to implement a dummy extension_board_scan() function and enables the extension command in the sandbox configuration. It then adds a test that checks the proper functionality of the extension command by applying two Device Tree overlays to the sandbox Device Tree. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> [trini: Limit to running on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/Makefile1
-rw-r--r--arch/sandbox/dts/overlay0.dts9
-rw-r--r--arch/sandbox/dts/overlay1.dts9
3 files changed, 19 insertions, 0 deletions
diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
index d231dc2877..3e5dc67d53 100644
--- a/arch/sandbox/dts/Makefile
+++ b/arch/sandbox/dts/Makefile
@@ -6,6 +6,7 @@ else
dtb-$(CONFIG_SANDBOX) += sandbox.dtb
endif
dtb-$(CONFIG_UT_DM) += test.dtb
+dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo
targets += $(dtb-y)
diff --git a/arch/sandbox/dts/overlay0.dts b/arch/sandbox/dts/overlay0.dts
new file mode 100644
index 0000000000..70c6cf77aa
--- /dev/null
+++ b/arch/sandbox/dts/overlay0.dts
@@ -0,0 +1,9 @@
+/dts-v1/;
+/plugin/;
+
+&{/buttons} {
+ btn3 {
+ gpios = <&gpio_a 5 0>;
+ label = "button3";
+ };
+};
diff --git a/arch/sandbox/dts/overlay1.dts b/arch/sandbox/dts/overlay1.dts
new file mode 100644
index 0000000000..51621b3110
--- /dev/null
+++ b/arch/sandbox/dts/overlay1.dts
@@ -0,0 +1,9 @@
+/dts-v1/;
+/plugin/;
+
+&{/buttons} {
+ btn4 {
+ gpios = <&gpio_a 5 0>;
+ label = "button4";
+ };
+};