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: partition@0 { 67 label = "partition-0"; 68 reg = <0x00000000 0x0000C000>; 69 }; 70 test_p1: partition@c000 { 71 label = "partition-1"; 72 reg = <0x0000C000 0x00067000>; 73 }; 74 }; 75 }; 76 77 test-i2c-dev@14 { 78 compatible = "vnd,i2c-device"; 79 status = "okay"; 80 reg = <0x14>; 81 supply-gpios = <&test_gpiox 2 0>; 82 }; 83 }; 84 85 test_gpio_injected: gpio@1000 { 86 gpio-controller; 87 #gpio-cells = <0x2>; 88 compatible = "vnd,gpio-device"; 89 status = "okay"; 90 reg = <0x1000 0x1000>; 91 }; 92 }; 93}; 94