1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/ {
8	pinctrl {
9		compatible = "vnd,pinctrl-test";
10
11		/* default state for device 0 */
12		test_device0_default: test_device0_default {
13			group1 {
14				pins = <0>;
15				bias-pull-up;
16			};
17
18			group2 {
19				pins = <1>;
20				bias-pull-down;
21			};
22		};
23
24		/* sleep state for device 0 */
25		test_device0_sleep: test_device0_sleep {
26			group1 {
27				pins = <0>, <1>;
28			};
29		};
30
31		/* alternative default state for device 0 */
32		test_device0_alt_default: test_device0_alt_default {
33			group1 {
34				pins = <2>;
35				bias-pull-down;
36			};
37
38			group2 {
39				pins = <3>;
40				bias-pull-up;
41			};
42		};
43
44		/* alternative sleep state for device 0 */
45		test_device0_alt_sleep: test_device0_alt_sleep {
46			group1 {
47				pins = <2>, <3>;
48			};
49		};
50
51		/* default state for device 1 */
52		test_device1_default: test_device1_default {
53			group1 {
54				pins = <10>, <11>, <12>;
55			};
56		};
57
58		/* custom state "mystate" for device 1 */
59		test_device1_mystate: test_device1_mystate {
60			group1 {
61				pins = <10>;
62			};
63
64			group2 {
65				pins = <11>;
66				bias-pull-up;
67			};
68
69			group3 {
70				pins = <12>;
71				bias-pull-down;
72			};
73		};
74	};
75
76	zephyr,user {
77		test_device0_alt_default = <&test_device0_alt_default>;
78		test_device0_alt_sleep = <&test_device0_alt_sleep>;
79	};
80
81	test_device0: test_device@0 {
82		compatible = "vnd,pinctrl-device";
83		reg = <0x0 0x1>;
84		pinctrl-0 = <&test_device0_default>;
85		pinctrl-1 = <&test_device0_sleep>;
86		pinctrl-names = "default", "sleep";
87	};
88
89	test_device1: test_device@1 {
90		compatible = "vnd,pinctrl-device";
91		reg = <0x1 0x1>;
92		pinctrl-0 = <&test_device1_default>;
93		pinctrl-1 = <&test_device1_mystate>;
94		pinctrl-names = "default", "mystate";
95	};
96};
97