blob: 7c6737a64a88738245bc3afe6e942cb93e320e0a [file] [log] [blame]
/*
* 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_adc: adc@adc0adc0 {
compatible = "vnd,adc";
reg = <0xadc0adc0 0x1000>;
#io-channel-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_VDD_1";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <0>;
zephyr,resolution = <12>;
};
#include "adc.dtsi"
};
test_gpio: gpio@deadbeef {
compatible = "vnd,gpio";
gpio-controller;
reg = <0xdeadbeef 0x1000>;
#gpio-cells = <0x2>;
status = "okay";
#include "gpio.dtsi"
};
test_i2c: i2c@11112222 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,i2c";
reg = <0x11112222 0x1000>;
status = "okay";
clock-frequency = <100000>;
#include "i2c.dtsi"
};
test_spi: spi@33334444 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "vnd,spi";
reg = <0x33334444 0x1000>;
status = "okay";
clock-frequency = <2000000>;
/* one entry for every devices at spi.dtsi */
cs-gpios = <&test_gpio 0 0>, /* 0x00 */
<&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>, /* 0x10 */
<&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>, /* 0x20 */
<&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 */
#include "spi.dtsi"
};
test_uart: uart@55556666 {
compatible = "vnd,serial";
reg = <0x55556666 0x1000>;
status = "okay";
#include "uart.dtsi"
};
test_w1: w1@66660000 {
compatible = "vnd,w1";
reg = <0x66660000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
#include "w1.dtsi"
};
dht22 {
compatible = "aosong,dht";
status = "okay";
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
*/
/* disable device to conflict with i2c version */
&test_i2c_ism330dhcx {
status = "disabled";
};
/* disable device to conflict with i2c version */
&test_spi_bme280 {
status = "disabled";
};
/* disable device to conflict with i2c version */
&test_spi_iis2dh {
status = "disabled";
};