147 lines
2.8 KiB
Plaintext
147 lines
2.8 KiB
Plaintext
/*
|
|
* Copyright (c) 2020, Linaro Ltd.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Application overlay for testing driver builds
|
|
*
|
|
* Names in this file should be chosen in a way that won't conflict
|
|
* with real-world devicetree nodes, to allow these tests to run on
|
|
* (and be extended to test) real hardware.
|
|
*/
|
|
|
|
/ {
|
|
test {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
test_gpio: gpio@deadbeef {
|
|
compatible = "vnd,gpio";
|
|
gpio-controller;
|
|
reg = <0xdeadbeef 0x1000>;
|
|
#gpio-cells = <0x2>;
|
|
label = "TEST_GPIO_1";
|
|
status = "okay";
|
|
};
|
|
|
|
test_i2c: i2c@11112222 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "vnd,i2c";
|
|
reg = <0x11112222 0x1000>;
|
|
label = "TEST_I2C_CTLR";
|
|
status = "okay";
|
|
clock-frequency = <100000>;
|
|
|
|
#include "i2c.dtsi"
|
|
};
|
|
|
|
test_spi: spi@33334444 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "vnd,spi";
|
|
reg = <0x33334444 0x1000>;
|
|
label = "TEST_SPI_CTLR";
|
|
status = "okay";
|
|
clock-frequency = <2000000>;
|
|
|
|
#include "spi.dtsi"
|
|
};
|
|
|
|
dht22 {
|
|
compatible = "aosong,dht";
|
|
status = "okay";
|
|
label = "DHT22";
|
|
dio-gpios = <&test_gpio 0 0>;
|
|
/* dht22; */
|
|
};
|
|
};
|
|
};
|
|
|
|
/* Put device specific modifications to properties or disabling of devices
|
|
* here to keep the bus specific dtsi files (i2c.dtsi, spi.dtsi, etc..)
|
|
* pristine
|
|
*/
|
|
|
|
/* setup valid params for the device */
|
|
&test_i2c_at24 {
|
|
reg = <0x8>;
|
|
size = <32768>;
|
|
pagesize = <64>;
|
|
address-width = <16>;
|
|
timeout = <5>;
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_iis2dlpc {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_ism330dhcx {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lis2dh {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lis2ds12 {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lis2dw12 {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lis2mdl {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lps22hh {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lsm6dsl {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_i2c_lsm6dso {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* setup valid params for the device */
|
|
&test_spi_at25 {
|
|
size = <32768>;
|
|
pagesize = <64>;
|
|
address-width = <16>;
|
|
timeout = <5>;
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_spi_bme280 {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* setup valid params for the device */
|
|
&test_spi_enc28j60 {
|
|
local-mac-address = [00 00 00 00 00 00];
|
|
};
|
|
|
|
/* disable device to conflict with i2c version */
|
|
&test_spi_iis2mdc {
|
|
status = "disabled";
|
|
};
|
|
|
|
/* setup valid params for the device */
|
|
&test_spi_iis3dhhc {
|
|
irq-gpios = <&test_gpio 0 0>, <&test_gpio 0 0>;
|
|
};
|