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