aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorKory Maincent <kory.maincent@bootlin.com>2021-05-04 19:31:23 +0200
committerTom Rini <trini@konsulko.com>2021-05-13 13:09:09 -0400
commit95300f203f3249ffb7a08222dc4d8106c5a6ceeb (patch)
treea26fd939eccb3eca623057083a4758507041520b /arch
parent2f84e9cf06d31aa703ff31301bf811b3fcfc16cf (diff)
downloadu-boot-95300f203f3249ffb7a08222dc4d8106c5a6ceeb.zip
u-boot-95300f203f3249ffb7a08222dc4d8106c5a6ceeb.tar.gz
u-boot-95300f203f3249ffb7a08222dc4d8106c5a6ceeb.tar.bz2
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')
-rw-r--r--arch/Kconfig2
-rw-r--r--arch/sandbox/dts/Makefile1
-rw-r--r--arch/sandbox/dts/overlay0.dts9
-rw-r--r--arch/sandbox/dts/overlay1.dts9
4 files changed, 21 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index e61a752..6c4b81a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -121,6 +121,7 @@ config SANDBOX
select SUPPORT_OF_CONTROL
select SYSRESET_CMD_POWEROFF
select IRQ
+ select SUPPORT_EXTENSION_SCAN
imply BITREVERSE
select BLOBLIST
imply CMD_DM
@@ -165,6 +166,7 @@ config SANDBOX
imply BOOTARGS_SUBST
imply PHY_FIXED
imply DM_DSA
+ imply CMD_EXTENSION
config SH
bool "SuperH architecture"
diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
index d231dc2..3e5dc67 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 0000000..70c6cf7
--- /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 0000000..51621b3
--- /dev/null
+++ b/arch/sandbox/dts/overlay1.dts
@@ -0,0 +1,9 @@
+/dts-v1/;
+/plugin/;
+
+&{/buttons} {
+ btn4 {
+ gpios = <&gpio_a 5 0>;
+ label = "button4";
+ };
+};