1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2014 Linaro Ltd.
4 */
5
6/ {
7	soc {
8		prcmu@80157000 {
9			ab8505 {
10				ab8505-gpio {
11					/* Hog a few default settings */
12					pinctrl-names = "default";
13					pinctrl-0 = <&gpio2_default_mode>,
14						    <&gpio10_default_mode>,
15						    <&gpio11_default_mode>,
16						    <&gpio13_default_mode>,
17						    <&gpio34_default_mode>,
18						    <&gpio50_default_mode>,
19						    <&pwm_default_mode>,
20						    <&adi2_default_mode>,
21						    <&modsclsda_default_mode>,
22						    <&resethw_default_mode>,
23						    <&service_default_mode>;
24
25					/*
26					 * Pins 2, 10, 11, 13, 34 and 50
27					 * are muxed in as GPIO, and configured as INPUT PULL DOWN
28					 */
29					gpio2 {
30						gpio2_default_mode: gpio2_default {
31							default_mux {
32								function = "gpio";
33								groups = "gpio2_a_1";
34							};
35							default_cfg {
36								pins = "GPIO2_R5";
37								input-enable;
38								bias-pull-down;
39							};
40						};
41					};
42					gpio10 {
43						gpio10_default_mode: gpio10_default {
44							default_mux {
45								function = "gpio";
46								groups = "gpio10_d_1";
47							};
48							default_cfg {
49								pins = "GPIO10_B16";
50								input-enable;
51								bias-pull-down;
52							};
53						};
54					};
55					gpio11 {
56						gpio11_default_mode: gpio11_default {
57							default_mux {
58								function = "gpio";
59								groups = "gpio11_d_1";
60							};
61							default_cfg {
62								pins = "GPIO11_B17";
63								input-enable;
64								bias-pull-down;
65							};
66						};
67					};
68					gpio13 {
69						gpio13_default_mode: gpio13_default {
70							default_mux {
71								function = "gpio";
72								groups = "gpio13_d_1";
73							};
74							default_cfg {
75								pins = "GPIO13_D17";
76								input-enable;
77								bias-disable;
78							};
79						};
80					};
81					gpio34 {
82						gpio34_default_mode: gpio34_default {
83							default_mux {
84								function = "gpio";
85								groups = "gpio34_a_1";
86							};
87							default_cfg {
88								pins = "GPIO34_H14";
89								input-enable;
90								bias-pull-down;
91							};
92						};
93					};
94					gpio50 {
95						gpio50_default_mode: gpio50_default {
96							default_mux {
97								function = "gpio";
98								groups = "gpio50_d_1";
99							};
100							default_cfg {
101								pins = "GPIO50_L4";
102								input-enable;
103								bias-disable;
104							};
105						};
106					};
107					/* This sets up the PWM pin 14 */
108					pwm {
109						pwm_default_mode: pwm_default {
110							default_mux {
111								function = "pwmout";
112								groups = "pwmout1_d_1";
113							};
114							default_cfg {
115								pins = "GPIO14_C16";
116								input-enable;
117								bias-pull-down;
118							};
119						};
120					};
121					/* This sets up audio interface 2 */
122					adi2 {
123						adi2_default_mode: adi2_default {
124							default_mux {
125								function = "adi2";
126								groups = "adi2_d_1";
127							};
128							default_cfg {
129								pins = "GPIO17_P2",
130									 "GPIO18_N3",
131									 "GPIO19_T1",
132									 "GPIO20_P3";
133								input-enable;
134								bias-pull-down;
135							};
136						};
137					};
138					/* Modem I2C setup (SCL and SDA pins) */
139					modsclsda {
140						modsclsda_default_mode: modsclsda_default {
141							default_mux {
142								function = "modsclsda";
143								groups = "modsclsda_d_1";
144							};
145							default_cfg {
146								pins = "GPIO40_J15",
147									"GPIO41_J14";
148								input-enable;
149								bias-pull-down;
150							};
151						};
152					};
153					resethw {
154						resethw_default_mode: resethw_default {
155							default_mux {
156								function = "resethw";
157								groups = "resethw_d_1";
158							};
159							default_cfg {
160								pins = "GPIO52_D16";
161								input-enable;
162								bias-pull-down;
163							};
164						};
165					};
166					service {
167						service_default_mode: service_default {
168							default_mux {
169								function = "service";
170								groups = "service_d_1";
171							};
172							default_cfg {
173								pins = "GPIO53_D15";
174								input-enable;
175								bias-pull-down;
176							};
177						};
178					};
179					/*
180					 * Clock output pins associated with regulators.
181					 */
182					sysclkreq2 {
183						sysclkreq2_default_mode: sysclkreq2_default {
184							default_mux {
185								function = "sysclkreq";
186								groups = "sysclkreq2_d_1";
187							};
188							default_cfg {
189								pins = "GPIO1_N4";
190								input-enable;
191								bias-disable;
192							};
193						};
194						sysclkreq2_sleep_mode: sysclkreq2_sleep {
195							default_mux {
196								function = "gpio";
197								groups = "gpio1_a_1";
198							};
199							default_cfg {
200								pins = "GPIO1_N4";
201								input-enable;
202								bias-pull-down;
203							};
204						};
205					};
206					sysclkreq4 {
207						sysclkreq4_default_mode: sysclkreq4_default {
208							default_mux {
209								function = "sysclkreq";
210								groups = "sysclkreq4_d_1";
211							};
212							default_cfg {
213								pins = "GPIO3_P5";
214								input-enable;
215								bias-disable;
216							};
217						};
218						sysclkreq4_sleep_mode: sysclkreq4_sleep {
219							default_mux {
220								function = "gpio";
221								groups = "gpio3_a_1";
222							};
223							default_cfg {
224								pins = "GPIO3_P5";
225								input-enable;
226								bias-pull-down;
227							};
228						};
229					};
230				};
231			};
232		};
233	};
234};
235