[PATCH] test: arm: qemu-sabrelite: Use qemu specific device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The sabrelite board has some GPIOs registered as buttons. These GPIOs
are not properly emulated in QEMU and read as low. The buttons are
active low as well, so in barebox we detect all buttons as pressed. One
of these buttons is registered as KEY_POWER. Depending on the
initialization order it can happen that barebox tries to power down the
board during startup. Avoid this pitfall by passing a device tree to
QEMU which has the gpio-keys driver disabled.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/dts/Makefile                           | 2 +-
 arch/arm/dts/imx6q-sabrelite-qemu.dts           | 5 +++++
 test/arm/qemu-sabrelite@multi_v7_defconfig.yaml | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/imx6q-sabrelite-qemu.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 68585e1e4b..3b3236b416 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -127,7 +127,7 @@ lwl-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o
 lwl-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o
 lwl-$(CONFIG_MACH_RPI_CM3) += bcm2837-rpi-cm3.dtb.o
 lwl-$(CONFIG_MACH_RPI4) += bcm2711-rpi-4.dtb.o bcm2711-rpi-400.dtb.o bcm2711-rpi-cm4-io.dtb.o bcm2711-rpi-cm4s-io.dtb.o
-lwl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o
+lwl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o imx6q-sabrelite-qemu.dtb.o
 lwl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o imx6qp-sabresd.dtb.o imx6dl-sabresd.dtb.o
 lwl-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o
 lwl-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += socfpga_cyclone5_socdk.dtb.o
diff --git a/arch/arm/dts/imx6q-sabrelite-qemu.dts b/arch/arm/dts/imx6q-sabrelite-qemu.dts
new file mode 100644
index 0000000000..a16a882543
--- /dev/null
+++ b/arch/arm/dts/imx6q-sabrelite-qemu.dts
@@ -0,0 +1,5 @@
+#include "imx6q-sabrelite.dts"
+
+&{/gpio-keys} {
+	status = "disabled";
+};
diff --git a/test/arm/qemu-sabrelite@multi_v7_defconfig.yaml b/test/arm/qemu-sabrelite@multi_v7_defconfig.yaml
index 77b7f9e589..8dc137ee44 100644
--- a/test/arm/qemu-sabrelite@multi_v7_defconfig.yaml
+++ b/test/arm/qemu-sabrelite@multi_v7_defconfig.yaml
@@ -15,6 +15,6 @@ targets:
       BareboxTestStrategy: {}
 images:
   barebox-dt-2nd.img: !template "$LG_BUILDDIR/images/barebox-dt-2nd.img"
-  imx6q-sabreliste.dtb: !template "$LG_BUILDDIR/arch/arm/dts/imx6q-sabrelite.dtb"
+  imx6q-sabreliste.dtb: !template "$LG_BUILDDIR/arch/arm/dts/imx6q-sabrelite-qemu.dtb"
 imports:
   -  ../strategy.py
-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux