203 lines
4.3 KiB
Plaintext
203 lines
4.3 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_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>;
|
|
};
|
|
|
|
channel@1 {
|
|
reg = <1>;
|
|
zephyr,gain = "ADC_GAIN_1_6";
|
|
zephyr,reference = "ADC_REF_INTERNAL";
|
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
|
zephyr,input-positive = <0>;
|
|
zephyr,resolution = <12>;
|
|
};
|
|
|
|
channel@2 {
|
|
reg = <2>;
|
|
zephyr,gain = "ADC_GAIN_1_6";
|
|
zephyr,reference = "ADC_REF_INTERNAL";
|
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
|
zephyr,input-positive = <0>;
|
|
zephyr,resolution = <12>;
|
|
};
|
|
|
|
#include "adc.dtsi"
|
|
};
|
|
|
|
test_dac: dac@dac0dac0 {
|
|
compatible = "vnd,dac";
|
|
reg = <0xdac0dac0 0x1000>;
|
|
status = "okay";
|
|
#io-channel-cells = <1>;
|
|
};
|
|
|
|
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 = "zephyr,i2c-emul-controller";
|
|
reg = <0x11112222 0x1000>;
|
|
status = "okay";
|
|
clock-frequency = <100000>;
|
|
|
|
#include "i2c.dtsi"
|
|
};
|
|
|
|
test_pwm: pwm@12341234 {
|
|
compatible = "vnd,pwm";
|
|
reg = <0x12341234 0x1000>;
|
|
#pwm-cells = <3>;
|
|
status = "okay";
|
|
|
|
#include "pwm.dtsi"
|
|
};
|
|
|
|
test_spi: spi@33334444 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "zephyr,spi-emul-controller";
|
|
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>; /* 0x2e */
|
|
|
|
#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"
|
|
};
|
|
|
|
test_i3c: i3c@f0cacc1a {
|
|
#address-cells = <3>;
|
|
#size-cells = <0>;
|
|
compatible = "vnd,i3c";
|
|
reg = <0xf0cacc1a 0x1000>;
|
|
status = "okay";
|
|
|
|
#include "i3c.dtsi"
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
/* 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";
|
|
};
|