tests: Verify SBS Gauge driver on qemu_cortex_a9
The SBS Gauge driver is tested on a nucleo_f070rb board. This is an ARM board so we should also verify on some Qemu emulated ARM platform. Enable SBS Gauge driver test on an ARM platform, arbitrarily chosen as qemu_cortex_a9. TEST=twister -T tests/drivers/sensor/sbs_gauge Signed-off-by: Aaron Massey <aaronmassey@google.com>
This commit is contained in:
parent
642a88abf3
commit
09ec321b0c
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2022 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_EMUL=y
|
||||
CONFIG_EMUL_SBS_GAUGE=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_EMUL=y
|
31
tests/drivers/sensor/sbs_gauge/boards/qemu_cortex_a9.overlay
Normal file
31
tests/drivers/sensor/sbs_gauge/boards/qemu_cortex_a9.overlay
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Google LLC
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
|
||||
/ {
|
||||
/* qemu_cortex_a9 board isn't configured with an I2C node */
|
||||
fake_i2c_bus: i2c@100 {
|
||||
status = "okay";
|
||||
compatible = "zephyr,i2c-emul-controller";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x100 4>;
|
||||
label = "FAKE_I2C_BUS";
|
||||
};
|
||||
};
|
||||
|
||||
&fake_i2c_bus {
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
compatible = "zephyr,i2c-emul-controller";
|
||||
smartbattery0: smartbattery@b {
|
||||
compatible = "sbs,sbs-gauge";
|
||||
reg = <0x0B>;
|
||||
label = "SMARTBATTERY";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
|
@ -11,3 +11,4 @@ tests:
|
|||
filter: dt_compat_enabled("sbs,sbs-gauge")
|
||||
platform_allow:
|
||||
native_posix
|
||||
qemu_cortex_a9
|
||||
|
|
Loading…
Reference in a new issue