diff options
author | Kory Maincent <kory.maincent@bootlin.com> | 2021-05-04 19:31:23 +0200 |
---|---|---|
committer | Han Gao <gaohan@iscas.ac.cn> | 2023-10-20 13:38:37 +0800 |
commit | cccf006cae8e64b9c499ea3cd498604e9ae35172 (patch) | |
tree | a0e19ea09fdcf0010762c93535f331368233007a /arch | |
parent | c86cc5402a3f1147e40367658e33c29dbf0d0d2b (diff) |
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/Kconfig | 2 | ||||
-rw-r--r-- | arch/sandbox/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/sandbox/dts/overlay0.dts | 9 | ||||
-rw-r--r-- | arch/sandbox/dts/overlay1.dts | 9 |
4 files changed, 21 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 5dd84d8f..f8bfdb1d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -119,6 +119,7 @@ config SANDBOX select SPI select SUPPORT_OF_CONTROL select SYSRESET_CMD_POWEROFF if CMD_POWEROFF + select SUPPORT_EXTENSION_SCAN imply BITREVERSE select BLOBLIST imply CMD_DM @@ -152,6 +153,7 @@ config SANDBOX imply PHYLIB imply DM_MDIO imply DM_MDIO_MUX + imply CMD_EXTENSION config SH bool "SuperH architecture" diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile index d231dc28..3e5dc67d 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 00000000..70c6cf77 --- /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 00000000..51621b31 --- /dev/null +++ b/arch/sandbox/dts/overlay1.dts @@ -0,0 +1,9 @@ +/dts-v1/; +/plugin/; + +&{/buttons} { + btn4 { + gpios = <&gpio_a 5 0>; + label = "button4"; + }; +}; |