1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Application overlay for testing the devicetree.h API.
7 *
8 * Names in this file should be chosen in a way that won't conflict
9 * with real-world devicetree nodes, to allow these tests to run on
10 * (and be extended to test) real hardware.
11 */
12
13/ {
14	test {
15		#address-cells = <0x1>;
16		#size-cells = <0x1>;
17
18		test_gpio_0: gpio@ffff {
19			gpio-controller;
20			#gpio-cells = <0x2>;
21			compatible = "vnd,gpio-device";
22			status = "okay";
23			reg = <0xffff 0x1000>;
24		};
25
26		test_i2c: i2c@11112222 {
27			#address-cells = <1>;
28			#size-cells = <0>;
29			compatible = "vnd,i2c";
30			status = "okay";
31			reg = <0x11112222 0x1000>;
32			clock-frequency = <100000>;
33
34			test_dev_a: test-i2c-dev@10 {
35				compatible = "vnd,i2c-device";
36				status = "okay";
37				reg = <0x10>;
38				supply-gpios = <&test_gpio_0 1 0>;
39			};
40
41			test_gpiox: test-i2c-dev@11 {
42				gpio-controller;
43				#gpio-cells = <2>;
44				compatible = "vnd,gpio-expander";
45				status = "okay";
46				reg = <0x11>;
47			};
48
49			test_dev_b: test-i2c-dev@12 {
50				compatible = "vnd,i2c-device";
51				status = "okay";
52				reg = <0x12>;
53				supply-gpios = <&test_gpiox 2 0>;
54			};
55
56			test_dev_c: test-i2c-dev@13 {
57				compatible = "vnd,i2c-device";
58				reg = <0x13>;
59				status = "disabled";
60
61				partitions {
62					compatible = "fixed-partitions";
63					#address-cells = <1>;
64					#size-cells = <1>;
65
66					test_p0_p1: partition@0 {
67						compatible = "fixed-subpartitions";
68						label = "partition-0-1-outer";
69						reg = <0x00000000 0x73000>;
70						ranges = <0x0 0x0 0x73000>;
71						#address-cells = <1>;
72						#size-cells = <1>;
73
74						test_p0: partition@0 {
75							label = "partition-0";
76							reg = <0x00000000 0x0000C000>;
77						};
78
79						test_p1: partition@c000 {
80							label = "partition-1";
81							reg = <0x0000C000 0x00067000>;
82						};
83					};
84				};
85			};
86
87			test-i2c-dev@14 {
88				compatible = "vnd,i2c-device";
89				status = "okay";
90				reg = <0x14>;
91				supply-gpios = <&test_gpiox 2 0>;
92			};
93		};
94
95		test_gpio_injected: gpio@1000 {
96			gpio-controller;
97			#gpio-cells = <0x2>;
98			compatible = "vnd,gpio-device";
99			status = "okay";
100			reg = <0x1000 0x1000>;
101		};
102	};
103};
104