2020-12-09 22:29:26 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Application overlay for testing the devicetree.h API.
|
|
|
|
*
|
|
|
|
* 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 = <0x1>;
|
|
|
|
#size-cells = <0x1>;
|
|
|
|
|
2022-08-25 01:07:00 +08:00
|
|
|
test_gpio_0: gpio@ffff {
|
2020-12-09 22:29:26 +08:00
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <0x2>;
|
2022-01-05 00:04:12 +08:00
|
|
|
compatible = "vnd,gpio-device";
|
2020-12-09 22:29:26 +08:00
|
|
|
status = "okay";
|
2022-08-25 01:07:00 +08:00
|
|
|
reg = <0xffff 0x1000>;
|
2020-12-09 22:29:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
test_i2c: i2c@11112222 {
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
compatible = "vnd,i2c";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x11112222 0x1000>;
|
|
|
|
clock-frequency = <100000>;
|
|
|
|
|
|
|
|
test_dev_a: test-i2c-dev@10 {
|
|
|
|
compatible = "vnd,i2c-device";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x10>;
|
|
|
|
supply-gpios = <&test_gpio_0 1 0>;
|
|
|
|
};
|
|
|
|
|
|
|
|
test_gpiox: test-i2c-dev@11 {
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
compatible = "vnd,gpio-expander";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x11>;
|
|
|
|
};
|
|
|
|
|
|
|
|
test_dev_b: test-i2c-dev@12 {
|
|
|
|
compatible = "vnd,i2c-device";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x12>;
|
|
|
|
supply-gpios = <&test_gpiox 2 0>;
|
|
|
|
};
|
2021-08-20 17:30:47 +08:00
|
|
|
|
|
|
|
test_dev_c: test-i2c-dev@13 {
|
|
|
|
compatible = "vnd,i2c-device";
|
2022-04-18 13:36:27 +08:00
|
|
|
reg = <0x13>;
|
2021-08-20 17:30:47 +08:00
|
|
|
status = "disabled";
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
test_p0: partition@0 {
|
|
|
|
label = "partition-0";
|
2022-05-24 03:27:57 +08:00
|
|
|
reg = <0x00000000 0x0000C000>;
|
2021-08-20 17:30:47 +08:00
|
|
|
};
|
|
|
|
test_p1: partition@c000 {
|
|
|
|
label = "partition-1";
|
|
|
|
reg = <0x0000C000 0x00067000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-07-10 12:08:54 +08:00
|
|
|
|
|
|
|
test-i2c-dev@14 {
|
|
|
|
compatible = "vnd,i2c-device";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x14>;
|
|
|
|
supply-gpios = <&test_gpiox 2 0>;
|
|
|
|
};
|
2020-12-09 22:29:26 +08:00
|
|
|
};
|
2022-04-18 13:36:27 +08:00
|
|
|
|
|
|
|
test_gpio_injected: gpio@1000 {
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <0x2>;
|
|
|
|
compatible = "vnd,gpio-device";
|
|
|
|
status = "okay";
|
|
|
|
reg = <0x1000 0x1000>;
|
|
|
|
};
|
2020-12-09 22:29:26 +08:00
|
|
|
};
|
|
|
|
};
|