tests: Clean up sensor driver build_all test

This PR performs a few cleanup actions for the build-all sensor driver
test:

  1. Remove many non-sensors from the test's device tree, including
     wireless radios, LED strips, flash memory, and displays. These
     devices don't belong in this test and in most cases were not being
     compiled anyways due to missing config flags and not being
     status-okay.
  2. For the remaining devices, enable them in the device tree so the
     sensors build and get instantiated. A handful of device nodes that
     caused linker errors due to the driver not instantiating are left
     disabled.
  3. Convert the test I2C and SPI buses into emulated buses to support
     upcoming live testing over these sensor devices.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
This commit is contained in:
Tristan Honscheid 2023-07-12 15:49:58 -06:00 committed by Fabio Baltieri
commit 613c32b03f
3 changed files with 469 additions and 521 deletions

View file

@ -48,7 +48,7 @@
test_i2c: i2c@11112222 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,i2c";
compatible = "zephyr,i2c-emul-controller";
reg = <0x11112222 0x1000>;
status = "okay";
clock-frequency = <100000>;
@ -59,7 +59,7 @@
test_spi: spi@33334444 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,spi";
compatible = "zephyr,spi-emul-controller";
reg = <0x33334444 0x1000>;
status = "okay";
clock-frequency = <2000000>;
@ -101,35 +101,7 @@
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>, /* 0x30 */
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>; /* 0x40 */
<&test_gpio 0 0>; /* 0x24 */
#include "spi.dtsi"
};

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,7 @@ test_spi_adxl362: adxl362@0 {
reg = <0x0>;
spi-max-frequency = <0>;
int1-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_adxl372: adxl372@1 {
@ -22,383 +23,282 @@ test_spi_adxl372: adxl372@1 {
reg = <0x1>;
spi-max-frequency = <0>;
int1-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_apa102: apa102@2 {
compatible = "apa,apa102";
test_spi_bme280: bme280@2 {
compatible = "bosch,bme280";
reg = <0x2>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_rf2xx: rf2xx@3 {
compatible = "atmel,rf2xx";
test_spi_bmi160: bmi160@3 {
compatible = "bosch,bmi160";
reg = <0x3>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
slptr-gpios = <&test_gpio 0 0>;
dig2-gpios = <&test_gpio 0 0>;
clkm-gpios = <&test_gpio 0 0>;
int-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_winc1500: winc1500@4 {
compatible = "atmel,winc1500";
test_spi_ms5607: ms5607@4 {
compatible = "meas,ms5607";
reg = <0x4>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
enable-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_bme280: bme280@5 {
compatible = "bosch,bme280";
test_spi_iis2dlpc: iis2dlpc@5 {
compatible = "st,iis2dlpc";
reg = <0x5>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_bmi160: bmi160@6 {
compatible = "bosch,bmi160";
test_spi_iis2mdc: iis2mdc@6 {
compatible = "st,iis2mdc";
reg = <0x6>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_lpd8803: lpd8803@7 {
compatible = "greeled,lpd8803";
test_spi_iis3dhhc: iis3dhhc@7 {
compatible = "st,iis3dhhc";
reg = <0x7>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_lpd8806: lpd8806@8 {
compatible = "greeled,lpd8806";
test_spi_ism330dhcx: ism330dhcx@8 {
compatible = "st,ism330dhcx";
reg = <0x8>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_uc8176: uc8176@9 {
compatible = "ultrachip,uc8176";
test_spi_lis2dh: lis2dh@9 {
compatible = "st,lis2dh";
reg = <0x9>;
spi-max-frequency = <0>;
height = <0>;
width = <0>;
reset-gpios = <&test_gpio 0 0>;
dc-gpios = <&test_gpio 0 0>;
busy-gpios = <&test_gpio 0 0>;
irq-gpios = <&test_gpio 0 0>;
/* disconnect-sdo-sa0-pull-up; */
status = "okay";
};
test_spi_uc8179: uc8179@a {
compatible = "ultrachip,uc8179";
test_spi_lis2ds12: lis2ds12@a {
compatible = "st,lis2ds12";
reg = <0xa>;
spi-max-frequency = <0>;
height = <0>;
width = <0>;
reset-gpios = <&test_gpio 0 0>;
dc-gpios = <&test_gpio 0 0>;
busy-gpios = <&test_gpio 0 0>;
softstart = [];
full {
pwr = [];
cdi = <0>;
tcon = <0>;
};
partial {
pwr = [];
cdi = <0>;
tcon = <0>;
};
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_eswifi: eswifi@b {
compatible = "inventek,eswifi";
test_spi_lis2dw12: lis2dw12@b {
compatible = "st,lis2dw12";
reg = <0xb>;
spi-max-frequency = <0>;
resetn-gpios = <&test_gpio 0 0>;
data-gpios = <&test_gpio 0 0>;
wakeup-gpios = <&test_gpio 0 0>;
boot0-gpios = <&test_gpio 0 0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_spi_nor: spi-nor@c {
compatible = "jedec,spi-nor";
test_spi_lis2mdl: lis2mdl@c {
compatible = "st,lis2mdl";
reg = <0xc>;
spi-max-frequency = <0>;
wp-gpios = <&test_gpio 0 0>;
hold-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
jedec-id = [];
/* requires-ulbpr; */
/* has-dpd; */
size = <0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_ms5607: ms5607@d {
compatible = "meas,ms5607";
test_spi_lps22hh: lps22hh@d {
compatible = "st,lps22hh";
reg = <0xd>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_mcr20a: mcr20a@e {
compatible = "nxp,mcr20a";
test_spi_lsm303agr_accel: lsm303agr-accel@e {
compatible = "st,lsm303agr-accel";
reg = <0xe>;
spi-max-frequency = <0>;
irqb-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
irq-gpios = <&test_gpio 0 0>;
/* disconnect-sdo-sa0-pull-up; */
status = "disabled";
};
test_spi_sx1276: sx1276@f {
compatible = "semtech,sx1276";
test_spi_lsm6dsl: lsm6dsl@f {
compatible = "st,lsm6dsl";
reg = <0xf>;
spi-max-frequency = <0>;
reset-gpios = <&test_gpio 0 0>;
dio-gpios = <&test_gpio 0 0>;
power-amplifier-output = "rfo";
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_iis2dlpc: iis2dlpc@10 {
compatible = "st,iis2dlpc";
test_spi_lsm6dso: lsm6dso@10 {
compatible = "st,lsm6dso";
reg = <0x10>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_iis2mdc: iis2mdc@11 {
compatible = "st,iis2mdc";
test_spi_iis2dh: iis2dh@11 {
compatible = "st,iis2dh";
reg = <0x11>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_iis3dhhc: iis3dhhc@12 {
compatible = "st,iis3dhhc";
reg = <0x12>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_ism330dhcx: ism330dhcx@13 {
compatible = "st,ism330dhcx";
reg = <0x13>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
};
test_spi_lis2dh: lis2dh@14 {
compatible = "st,lis2dh";
reg = <0x14>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
/* disconnect-sdo-sa0-pull-up; */
};
test_spi_lis2ds12: lis2ds12@15 {
compatible = "st,lis2ds12";
reg = <0x15>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_lis2dw12: lis2dw12@16 {
compatible = "st,lis2dw12";
reg = <0x16>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_lis2mdl: lis2mdl@17 {
compatible = "st,lis2mdl";
reg = <0x17>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_lps22hh: lps22hh@18 {
compatible = "st,lps22hh";
reg = <0x18>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
};
test_spi_lsm303agr_accel: lsm303agr-accel@19 {
compatible = "st,lsm303agr-accel";
reg = <0x19>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
/* disconnect-sdo-sa0-pull-up; */
};
test_spi_lsm6dsl: lsm6dsl@1a {
compatible = "st,lsm6dsl";
reg = <0x1a>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_lsm6dso: lsm6dso@1b {
compatible = "st,lsm6dso";
reg = <0x1b>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
};
test_spi_ws2812_spi: ws2812-spi@1c {
compatible = "worldsemi,ws2812-spi";
reg = <0x1c>;
spi-max-frequency = <0>;
spi-one-frame = <0>;
spi-zero-frame = <0>;
chain-length = <0>;
color-mapping = <0 0 0>;
};
test_spi_bt_hci_spi: bt-hci-spi@1d {
compatible = "zephyr,bt-hci-spi";
reg = <0x1d>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
reset-gpios = <&test_gpio 0 0>;
};
test_spi_mmc_spi_slot: mmc-spi-slot@1e {
compatible = "zephyr,mmc-spi-slot";
reg = <0x1e>;
spi-max-frequency = <0>;
};
test_spi_iis2dh: iis2dh@1f {
compatible = "st,iis2dh";
reg = <0x1f>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
};
test_spi_iis2iclx: iis2iclx@20 {
test_spi_iis2iclx: iis2iclx@12 {
compatible = "st,iis2iclx";
reg = <0x20>;
reg = <0x12>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
int-pin = <1>;
status = "okay";
};
test_spi_icm42605: icm42605@21 {
test_spi_icm42605: icm42605@13 {
compatible = "invensense,icm42605";
reg = <0x21>;
reg = <0x13>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_max6675: max6675@22 {
test_spi_max6675: max6675@14 {
compatible = "maxim,max6675";
reg = <0x22>;
reg = <0x14>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_bmi270: bmi270@23 {
test_spi_bmi270: bmi270@15 {
compatible = "bosch,bmi270";
reg = <0x23>;
reg = <0x15>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_bmp388: bmp388@24 {
test_spi_bmp388: bmp388@16 {
compatible = "bosch,bmp388";
reg = <0x24>;
reg = <0x16>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_i3g4250d: i3g4250d@25 {
test_spi_i3g4250d: i3g4250d@17 {
compatible = "st,i3g4250d";
reg = <0x25>;
reg = <0x17>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_icm42670: icm42670@26 {
test_spi_icm42670: icm42670@18 {
compatible = "invensense,icm42670";
reg = <0x26>;
reg = <0x18>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
accel-hz = <800>;
accel-fs = <16>;
gyro-hz = <800>;
gyro-fs = <2000>;
status = "okay";
};
test_spi_bme680: bme680@27 {
test_spi_bme680: bme680@19 {
compatible = "bosch,bme680";
reg = <0x27>;
reg = <0x19>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_icm426888: icm42688@28 {
test_spi_icm426888: icm42688@1a {
compatible = "invensense,icm42688";
reg = <0x28>;
reg = <0x1a>;
spi-max-frequency = <24000000>;
accel-hz = <32000>;
accel-fs = <16>;
gyro-hz = <32000>;
gyro-fs = <2000>;
status = "okay";
};
test_spi_max31855: max31855@29 {
test_spi_max31855: max31855@1b {
compatible = "maxim,max31855";
reg = <0x29>;
reg = <0x1b>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_max31865: max31865@2a {
test_spi_max31865: max31865@1c {
compatible = "maxim,max31865";
reg = <0x2a>;
reg = <0x1c>;
spi-max-frequency = <125000>;
resistance-at-zero = <100>;
resistance-reference = <430>;
low-threshold = <6579>;
high-threshold = <32767>;
filter-50hz;
status = "okay";
};
test_spi_bmm150: bmm150@2b {
test_spi_bmm150: bmm150@1d {
compatible = "bosch,bmm150";
reg = <0x2b>;
reg = <0x1d>;
spi-max-frequency = <0>;
status = "okay";
};
test_spi_hts221: hts221@2c {
test_spi_hts221: hts221@1e {
compatible = "st,hts221";
reg = <0x2c>;
reg = <0x1e>;
spi-max-frequency = <0>;
drdy-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_adt7310: adt7310@2d {
test_spi_adt7310: adt7310@1f {
compatible = "adi,adt7310";
reg = <0x2d>;
reg = <0x1f>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_bmi323: bmi323@2e {
test_spi_bmi323: bmi323@20 {
compatible = "bosch,bmi323";
reg = <0x2e>;
reg = <0x20>;
spi-max-frequency = <8000000>;
int-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_lsm6dso16is: lsm6dso16is@2f {
test_spi_lsm6dso16is: lsm6dso16is@21 {
compatible = "st,lsm6dso16is";
reg = <0x2f>;
reg = <0x21>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_lsm6dsv16x: lsm6dsv16x@30 {
test_spi_lsm6dsv16x: lsm6dsv16x@22 {
compatible = "st,lsm6dsv16x";
reg = <0x30>;
reg = <0x22>;
spi-max-frequency = <0>;
irq-gpios = <&test_gpio 0 0>;
status = "okay";
};
test_spi_bmi08x_accel: bmi08x@31 {
test_spi_bmi08x_accel: bmi08x@23 {
compatible = "bosch,bmi08x-accel";
reg = <0x31>;
reg = <0x23>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
int1-map-io = <0x01>;
@ -409,9 +309,9 @@ test_spi_bmi08x_accel: bmi08x@31 {
accel-fs = <4>;
};
test_spi_bmi08x_gyro: bmi08x@32 {
test_spi_bmi08x_gyro: bmi08x@24 {
compatible = "bosch,bmi08x-gyro";
reg = <0x32>;
reg = <0x24>;
spi-max-frequency = <0>;
int-gpios = <&test_gpio 0 0>;
int3-4-map-io = <0x01>;