| /* |
| * 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>; |
| 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_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"; |
| }; |
| |
| /* disable device to conflict with i2c version */ |
| &test_spi_bme280 { |
| status = "disabled"; |
| }; |
| |
| /* disable device to conflict with i2c version */ |
| &test_spi_iis2iclx { |
| status = "disabled"; |
| }; |
| |
| /* 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>; |
| }; |
| |
| /* disable device to conflict with i2c version */ |
| &test_spi_iis2dh { |
| status = "disabled"; |
| }; |