blob: 14fcacdbed991c3fbb9549455ded73b99e7a9bb2 [file] [log] [blame]
Vikas Manocha07e9e412017-02-12 10:25:49 -08001#include <common.h>
Vikas Manocha07e9e412017-02-12 10:25:49 -08002#include <dm.h>
Benjamin Gaignard16f6f332018-11-27 13:49:53 +01003#include <hwspinlock.h>
Simon Glass0f2af882020-05-10 11:40:05 -06004#include <log.h>
Simon Glass9bc15642020-02-03 07:36:16 -07005#include <malloc.h>
Vikas Manochaec8630a2017-04-10 15:02:57 -07006#include <asm/arch/gpio.h>
7#include <asm/gpio.h>
8#include <asm/io.h>
Simon Glass9bc15642020-02-03 07:36:16 -07009#include <dm/device_compat.h>
Patrice Chotarde16e8f42019-07-30 19:16:10 +020010#include <dm/lists.h>
11#include <dm/pinctrl.h>
Simon Glassd66c5f72020-02-03 07:36:15 -070012#include <linux/err.h>
Simon Glass2dc9c342020-05-10 11:40:01 -060013#include <linux/libfdt.h>
Vikas Manocha07e9e412017-02-12 10:25:49 -080014
15DECLARE_GLOBAL_DATA_PTR;
16
Vikas Manocha40ddb3a2017-04-10 15:03:04 -070017#define MAX_PINS_ONE_IP 70
Vikas Manochaec8630a2017-04-10 15:02:57 -070018#define MODE_BITS_MASK 3
19#define OSPEED_MASK 3
20#define PUPD_MASK 3
21#define OTYPE_MSK 1
22#define AFR_MASK 0xF
23
Patrice Chotardaaf68e82018-10-24 14:10:18 +020024struct stm32_pinctrl_priv {
Benjamin Gaignard16f6f332018-11-27 13:49:53 +010025 struct hwspinlock hws;
Patrice Chotardaaf68e82018-10-24 14:10:18 +020026 int pinctrl_ngpios;
27 struct list_head gpio_dev;
28};
29
30struct stm32_gpio_bank {
31 struct udevice *gpio_dev;
32 struct list_head list;
33};
34
Benjamin Gaignard16f6f332018-11-27 13:49:53 +010035#ifndef CONFIG_SPL_BUILD
36
Patrice Chotard881e8672018-10-24 14:10:19 +020037static char pin_name[PINNAME_SIZE];
Patrice Chotarda46fb392018-10-24 14:10:20 +020038#define PINMUX_MODE_COUNT 5
39static const char * const pinmux_mode[PINMUX_MODE_COUNT] = {
40 "gpio input",
41 "gpio output",
42 "analog",
43 "unknown",
44 "alt function",
45};
46
47static int stm32_pinctrl_get_af(struct udevice *dev, unsigned int offset)
48{
49 struct stm32_gpio_priv *priv = dev_get_priv(dev);
50 struct stm32_gpio_regs *regs = priv->regs;
51 u32 af;
52 u32 alt_shift = (offset % 8) * 4;
53 u32 alt_index = offset / 8;
54
55 af = (readl(&regs->afr[alt_index]) &
56 GENMASK(alt_shift + 3, alt_shift)) >> alt_shift;
57
58 return af;
59}
60
Patrice Chotard7ef91082018-12-03 10:52:50 +010061static int stm32_populate_gpio_dev_list(struct udevice *dev)
62{
63 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
64 struct udevice *gpio_dev;
65 struct udevice *child;
66 struct stm32_gpio_bank *gpio_bank;
67 int ret;
68
69 /*
70 * parse pin-controller sub-nodes (ie gpio bank nodes) and fill
71 * a list with all gpio device reference which belongs to the
72 * current pin-controller. This list is used to find pin_name and
73 * pin muxing
74 */
75 list_for_each_entry(child, &dev->child_head, sibling_node) {
76 ret = uclass_get_device_by_name(UCLASS_GPIO, child->name,
77 &gpio_dev);
78 if (ret < 0)
79 continue;
80
81 gpio_bank = malloc(sizeof(*gpio_bank));
82 if (!gpio_bank) {
83 dev_err(dev, "Not enough memory\n");
84 return -ENOMEM;
85 }
86
87 gpio_bank->gpio_dev = gpio_dev;
88 list_add_tail(&gpio_bank->list, &priv->gpio_dev);
89 }
90
91 return 0;
92}
93
Patrice Chotardaaf68e82018-10-24 14:10:18 +020094static int stm32_pinctrl_get_pins_count(struct udevice *dev)
95{
96 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
97 struct gpio_dev_priv *uc_priv;
98 struct stm32_gpio_bank *gpio_bank;
99
100 /*
101 * if get_pins_count has already been executed once on this
102 * pin-controller, no need to run it again
103 */
104 if (priv->pinctrl_ngpios)
105 return priv->pinctrl_ngpios;
106
Patrice Chotard7ef91082018-12-03 10:52:50 +0100107 if (list_empty(&priv->gpio_dev))
108 stm32_populate_gpio_dev_list(dev);
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200109 /*
110 * walk through all banks to retrieve the pin-controller
111 * pins number
112 */
113 list_for_each_entry(gpio_bank, &priv->gpio_dev, list) {
114 uc_priv = dev_get_uclass_priv(gpio_bank->gpio_dev);
115
116 priv->pinctrl_ngpios += uc_priv->gpio_count;
117 }
118
119 return priv->pinctrl_ngpios;
120}
121
Patrice Chotard881e8672018-10-24 14:10:19 +0200122static struct udevice *stm32_pinctrl_get_gpio_dev(struct udevice *dev,
Patrice Chotard0b968002018-12-03 10:52:54 +0100123 unsigned int selector,
124 unsigned int *idx)
Patrice Chotard881e8672018-10-24 14:10:19 +0200125{
126 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
127 struct stm32_gpio_bank *gpio_bank;
128 struct gpio_dev_priv *uc_priv;
Patrice Chotard0b968002018-12-03 10:52:54 +0100129 int pin_count = 0;
Patrice Chotard881e8672018-10-24 14:10:19 +0200130
Patrice Chotard7ef91082018-12-03 10:52:50 +0100131 if (list_empty(&priv->gpio_dev))
132 stm32_populate_gpio_dev_list(dev);
133
Patrice Chotard881e8672018-10-24 14:10:19 +0200134 /* look up for the bank which owns the requested pin */
135 list_for_each_entry(gpio_bank, &priv->gpio_dev, list) {
136 uc_priv = dev_get_uclass_priv(gpio_bank->gpio_dev);
137
Patrice Chotard0b968002018-12-03 10:52:54 +0100138 if (selector < (pin_count + uc_priv->gpio_count)) {
139 /*
140 * we found the bank, convert pin selector to
141 * gpio bank index
142 */
143 *idx = stm32_offset_to_index(gpio_bank->gpio_dev,
144 selector - pin_count);
Patrick Delaunay4c11a112019-06-21 15:26:52 +0200145 if (IS_ERR_VALUE(*idx))
Patrice Chotard0b968002018-12-03 10:52:54 +0100146 return NULL;
Patrice Chotard881e8672018-10-24 14:10:19 +0200147
Patrice Chotard0b968002018-12-03 10:52:54 +0100148 return gpio_bank->gpio_dev;
149 }
150 pin_count += uc_priv->gpio_count;
Patrice Chotard881e8672018-10-24 14:10:19 +0200151 }
152
153 return NULL;
154}
155
156static const char *stm32_pinctrl_get_pin_name(struct udevice *dev,
157 unsigned int selector)
158{
159 struct gpio_dev_priv *uc_priv;
160 struct udevice *gpio_dev;
Patrice Chotard0b968002018-12-03 10:52:54 +0100161 unsigned int gpio_idx;
Patrice Chotard881e8672018-10-24 14:10:19 +0200162
163 /* look up for the bank which owns the requested pin */
Patrice Chotard0b968002018-12-03 10:52:54 +0100164 gpio_dev = stm32_pinctrl_get_gpio_dev(dev, selector, &gpio_idx);
Patrice Chotard881e8672018-10-24 14:10:19 +0200165 if (!gpio_dev) {
166 snprintf(pin_name, PINNAME_SIZE, "Error");
167 } else {
168 uc_priv = dev_get_uclass_priv(gpio_dev);
169
170 snprintf(pin_name, PINNAME_SIZE, "%s%d",
171 uc_priv->bank_name,
Patrice Chotard0b968002018-12-03 10:52:54 +0100172 gpio_idx);
Patrice Chotard881e8672018-10-24 14:10:19 +0200173 }
174
175 return pin_name;
176}
Patrice Chotarda46fb392018-10-24 14:10:20 +0200177
178static int stm32_pinctrl_get_pin_muxing(struct udevice *dev,
179 unsigned int selector,
180 char *buf,
181 int size)
182{
183 struct udevice *gpio_dev;
184 const char *label;
Patrice Chotarda46fb392018-10-24 14:10:20 +0200185 int mode;
186 int af_num;
Patrice Chotard0b968002018-12-03 10:52:54 +0100187 unsigned int gpio_idx;
Patrice Chotarda46fb392018-10-24 14:10:20 +0200188
189 /* look up for the bank which owns the requested pin */
Patrice Chotard0b968002018-12-03 10:52:54 +0100190 gpio_dev = stm32_pinctrl_get_gpio_dev(dev, selector, &gpio_idx);
Patrice Chotarda46fb392018-10-24 14:10:20 +0200191
192 if (!gpio_dev)
193 return -ENODEV;
194
Patrice Chotard0b968002018-12-03 10:52:54 +0100195 mode = gpio_get_raw_function(gpio_dev, gpio_idx, &label);
Patrice Chotarda46fb392018-10-24 14:10:20 +0200196
Patrice Chotard0b968002018-12-03 10:52:54 +0100197 dev_dbg(dev, "selector = %d gpio_idx = %d mode = %d\n",
198 selector, gpio_idx, mode);
Patrice Chotarda46fb392018-10-24 14:10:20 +0200199
Patrice Chotarda46fb392018-10-24 14:10:20 +0200200
201 switch (mode) {
202 case GPIOF_UNKNOWN:
203 /* should never happen */
204 return -EINVAL;
205 case GPIOF_UNUSED:
206 snprintf(buf, size, "%s", pinmux_mode[mode]);
207 break;
208 case GPIOF_FUNC:
Patrice Chotard0b968002018-12-03 10:52:54 +0100209 af_num = stm32_pinctrl_get_af(gpio_dev, gpio_idx);
Patrice Chotarda46fb392018-10-24 14:10:20 +0200210 snprintf(buf, size, "%s %d", pinmux_mode[mode], af_num);
211 break;
212 case GPIOF_OUTPUT:
213 case GPIOF_INPUT:
214 snprintf(buf, size, "%s %s",
215 pinmux_mode[mode], label ? label : "");
216 break;
217 }
218
219 return 0;
220}
221
Benjamin Gaignard16f6f332018-11-27 13:49:53 +0100222#endif
223
Patrick Delaunay4c11a112019-06-21 15:26:52 +0200224static int stm32_pinctrl_probe(struct udevice *dev)
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200225{
226 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200227 int ret;
228
229 INIT_LIST_HEAD(&priv->gpio_dev);
230
Benjamin Gaignard16f6f332018-11-27 13:49:53 +0100231 /* hwspinlock property is optional, just log the error */
232 ret = hwspinlock_get_by_index(dev, 0, &priv->hws);
233 if (ret)
234 debug("%s: hwspinlock_get_by_index may have failed (%d)\n",
235 __func__, ret);
236
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200237 return 0;
238}
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200239
Vikas Manochaec8630a2017-04-10 15:02:57 -0700240static int stm32_gpio_config(struct gpio_desc *desc,
241 const struct stm32_gpio_ctl *ctl)
242{
243 struct stm32_gpio_priv *priv = dev_get_priv(desc->dev);
244 struct stm32_gpio_regs *regs = priv->regs;
Benjamin Gaignard16f6f332018-11-27 13:49:53 +0100245 struct stm32_pinctrl_priv *ctrl_priv;
246 int ret;
Vikas Manochaec8630a2017-04-10 15:02:57 -0700247 u32 index;
248
249 if (!ctl || ctl->af > 15 || ctl->mode > 3 || ctl->otype > 1 ||
250 ctl->pupd > 2 || ctl->speed > 3)
251 return -EINVAL;
252
Benjamin Gaignard16f6f332018-11-27 13:49:53 +0100253 ctrl_priv = dev_get_priv(dev_get_parent(desc->dev));
254 ret = hwspinlock_lock_timeout(&ctrl_priv->hws, 10);
255 if (ret == -ETIME) {
256 dev_err(desc->dev, "HWSpinlock timeout\n");
257 return ret;
258 }
259
Vikas Manochaec8630a2017-04-10 15:02:57 -0700260 index = (desc->offset & 0x07) * 4;
261 clrsetbits_le32(&regs->afr[desc->offset >> 3], AFR_MASK << index,
262 ctl->af << index);
263
264 index = desc->offset * 2;
265 clrsetbits_le32(&regs->moder, MODE_BITS_MASK << index,
266 ctl->mode << index);
267 clrsetbits_le32(&regs->ospeedr, OSPEED_MASK << index,
268 ctl->speed << index);
269 clrsetbits_le32(&regs->pupdr, PUPD_MASK << index, ctl->pupd << index);
270
271 index = desc->offset;
272 clrsetbits_le32(&regs->otyper, OTYPE_MSK << index, ctl->otype << index);
273
Benjamin Gaignard16f6f332018-11-27 13:49:53 +0100274 hwspinlock_unlock(&ctrl_priv->hws);
275
Vikas Manochaec8630a2017-04-10 15:02:57 -0700276 return 0;
277}
Patrick Delaunayd252d752018-03-12 10:46:13 +0100278
Vikas Manocha07e9e412017-02-12 10:25:49 -0800279static int prep_gpio_dsc(struct stm32_gpio_dsc *gpio_dsc, u32 port_pin)
280{
Patrick Delaunayd252d752018-03-12 10:46:13 +0100281 gpio_dsc->port = (port_pin & 0x1F000) >> 12;
Vikas Manocha07e9e412017-02-12 10:25:49 -0800282 gpio_dsc->pin = (port_pin & 0x0F00) >> 8;
283 debug("%s: GPIO:port= %d, pin= %d\n", __func__, gpio_dsc->port,
284 gpio_dsc->pin);
285
286 return 0;
287}
288
289static int prep_gpio_ctl(struct stm32_gpio_ctl *gpio_ctl, u32 gpio_fn, int node)
290{
291 gpio_fn &= 0x00FF;
Vikas Manochaec8630a2017-04-10 15:02:57 -0700292 gpio_ctl->af = 0;
Vikas Manocha07e9e412017-02-12 10:25:49 -0800293
294 switch (gpio_fn) {
295 case 0:
296 gpio_ctl->mode = STM32_GPIO_MODE_IN;
297 break;
298 case 1 ... 16:
299 gpio_ctl->mode = STM32_GPIO_MODE_AF;
300 gpio_ctl->af = gpio_fn - 1;
301 break;
302 case 17:
303 gpio_ctl->mode = STM32_GPIO_MODE_AN;
304 break;
305 default:
306 gpio_ctl->mode = STM32_GPIO_MODE_OUT;
307 break;
308 }
309
310 gpio_ctl->speed = fdtdec_get_int(gd->fdt_blob, node, "slew-rate", 0);
311
312 if (fdtdec_get_bool(gd->fdt_blob, node, "drive-open-drain"))
313 gpio_ctl->otype = STM32_GPIO_OTYPE_OD;
314 else
315 gpio_ctl->otype = STM32_GPIO_OTYPE_PP;
316
317 if (fdtdec_get_bool(gd->fdt_blob, node, "bias-pull-up"))
318 gpio_ctl->pupd = STM32_GPIO_PUPD_UP;
319 else if (fdtdec_get_bool(gd->fdt_blob, node, "bias-pull-down"))
320 gpio_ctl->pupd = STM32_GPIO_PUPD_DOWN;
321 else
322 gpio_ctl->pupd = STM32_GPIO_PUPD_NO;
323
324 debug("%s: gpio fn= %d, slew-rate= %x, op type= %x, pull-upd is = %x\n",
325 __func__, gpio_fn, gpio_ctl->speed, gpio_ctl->otype,
326 gpio_ctl->pupd);
327
328 return 0;
329}
330
Christophe Kerelloa466d212017-06-20 17:04:18 +0200331static int stm32_pinctrl_config(int offset)
Vikas Manocha07e9e412017-02-12 10:25:49 -0800332{
Vikas Manocha40ddb3a2017-04-10 15:03:04 -0700333 u32 pin_mux[MAX_PINS_ONE_IP];
Vikas Manocha07e9e412017-02-12 10:25:49 -0800334 int rv, len;
335
Vikas Manocha07e9e412017-02-12 10:25:49 -0800336 /*
337 * check for "pinmux" property in each subnode (e.g. pins1 and pins2 for
338 * usart1) of pin controller phandle "pinctrl-0"
339 * */
Christophe Kerelloa466d212017-06-20 17:04:18 +0200340 fdt_for_each_subnode(offset, gd->fdt_blob, offset) {
Vikas Manocha07e9e412017-02-12 10:25:49 -0800341 struct stm32_gpio_dsc gpio_dsc;
342 struct stm32_gpio_ctl gpio_ctl;
343 int i;
344
Christophe Kerelloa466d212017-06-20 17:04:18 +0200345 len = fdtdec_get_int_array_count(gd->fdt_blob, offset,
Vikas Manocha07e9e412017-02-12 10:25:49 -0800346 "pinmux", pin_mux,
347 ARRAY_SIZE(pin_mux));
Christophe Kerelloa466d212017-06-20 17:04:18 +0200348 debug("%s: no of pinmux entries= %d\n", __func__, len);
Vikas Manocha07e9e412017-02-12 10:25:49 -0800349 if (len < 0)
350 return -EINVAL;
351 for (i = 0; i < len; i++) {
Vikas Manocha1a8fde72017-04-10 15:02:59 -0700352 struct gpio_desc desc;
Patrick Delaunayd252d752018-03-12 10:46:13 +0100353
Vikas Manocha07e9e412017-02-12 10:25:49 -0800354 debug("%s: pinmux = %x\n", __func__, *(pin_mux + i));
355 prep_gpio_dsc(&gpio_dsc, *(pin_mux + i));
Christophe Kerelloa466d212017-06-20 17:04:18 +0200356 prep_gpio_ctl(&gpio_ctl, *(pin_mux + i), offset);
Vikas Manocha1a8fde72017-04-10 15:02:59 -0700357 rv = uclass_get_device_by_seq(UCLASS_GPIO,
Patrick Delaunayd252d752018-03-12 10:46:13 +0100358 gpio_dsc.port,
359 &desc.dev);
Vikas Manocha1a8fde72017-04-10 15:02:59 -0700360 if (rv)
361 return rv;
362 desc.offset = gpio_dsc.pin;
363 rv = stm32_gpio_config(&desc, &gpio_ctl);
Vikas Manocha07e9e412017-02-12 10:25:49 -0800364 debug("%s: rv = %d\n\n", __func__, rv);
365 if (rv)
366 return rv;
367 }
Christophe Kerelloa466d212017-06-20 17:04:18 +0200368 }
369
370 return 0;
371}
372
Patrice Chotard05a93192019-06-21 15:39:23 +0200373static int stm32_pinctrl_bind(struct udevice *dev)
374{
375 ofnode node;
376 const char *name;
377 int ret;
378
379 dev_for_each_subnode(node, dev) {
380 debug("%s: bind %s\n", __func__, ofnode_get_name(node));
381
382 ofnode_get_property(node, "gpio-controller", &ret);
383 if (ret < 0)
384 continue;
385 /* Get the name of each gpio node */
386 name = ofnode_get_name(node);
387 if (!name)
388 return -EINVAL;
389
390 /* Bind each gpio node */
391 ret = device_bind_driver_to_node(dev, "gpio_stm32",
392 name, node, NULL);
393 if (ret)
394 return ret;
395
396 debug("%s: bind %s\n", __func__, name);
397 }
398
399 return 0;
400}
401
Christophe Kerellod6661552017-06-20 17:04:19 +0200402#if CONFIG_IS_ENABLED(PINCTRL_FULL)
403static int stm32_pinctrl_set_state(struct udevice *dev, struct udevice *config)
404{
405 return stm32_pinctrl_config(dev_of_offset(config));
406}
407#else /* PINCTRL_FULL */
Christophe Kerelloa466d212017-06-20 17:04:18 +0200408static int stm32_pinctrl_set_state_simple(struct udevice *dev,
409 struct udevice *periph)
410{
411 const void *fdt = gd->fdt_blob;
412 const fdt32_t *list;
413 uint32_t phandle;
414 int config_node;
415 int size, i, ret;
416
417 list = fdt_getprop(fdt, dev_of_offset(periph), "pinctrl-0", &size);
418 if (!list)
419 return -EINVAL;
420
421 debug("%s: periph->name = %s\n", __func__, periph->name);
422
423 size /= sizeof(*list);
424 for (i = 0; i < size; i++) {
425 phandle = fdt32_to_cpu(*list++);
426
427 config_node = fdt_node_offset_by_phandle(fdt, phandle);
428 if (config_node < 0) {
Masahiro Yamada81e10422017-09-16 14:10:41 +0900429 pr_err("prop pinctrl-0 index %d invalid phandle\n", i);
Christophe Kerelloa466d212017-06-20 17:04:18 +0200430 return -EINVAL;
431 }
432
433 ret = stm32_pinctrl_config(config_node);
434 if (ret)
435 return ret;
Vikas Manocha07e9e412017-02-12 10:25:49 -0800436 }
437
438 return 0;
439}
Christophe Kerellod6661552017-06-20 17:04:19 +0200440#endif /* PINCTRL_FULL */
Vikas Manocha07e9e412017-02-12 10:25:49 -0800441
442static struct pinctrl_ops stm32_pinctrl_ops = {
Christophe Kerellod6661552017-06-20 17:04:19 +0200443#if CONFIG_IS_ENABLED(PINCTRL_FULL)
444 .set_state = stm32_pinctrl_set_state,
445#else /* PINCTRL_FULL */
Vikas Manocha07e9e412017-02-12 10:25:49 -0800446 .set_state_simple = stm32_pinctrl_set_state_simple,
Christophe Kerellod6661552017-06-20 17:04:19 +0200447#endif /* PINCTRL_FULL */
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200448#ifndef CONFIG_SPL_BUILD
Patrice Chotard881e8672018-10-24 14:10:19 +0200449 .get_pin_name = stm32_pinctrl_get_pin_name,
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200450 .get_pins_count = stm32_pinctrl_get_pins_count,
Patrice Chotarda46fb392018-10-24 14:10:20 +0200451 .get_pin_muxing = stm32_pinctrl_get_pin_muxing,
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200452#endif
Vikas Manocha07e9e412017-02-12 10:25:49 -0800453};
454
455static const struct udevice_id stm32_pinctrl_ids[] = {
Patrice Chotardb5652b72017-12-12 09:49:35 +0100456 { .compatible = "st,stm32f429-pinctrl" },
457 { .compatible = "st,stm32f469-pinctrl" },
Vikas Manocha07e9e412017-02-12 10:25:49 -0800458 { .compatible = "st,stm32f746-pinctrl" },
Patrice Chotard636768f2018-12-11 14:49:18 +0100459 { .compatible = "st,stm32f769-pinctrl" },
Patrice Chotard6502c472017-09-13 18:00:04 +0200460 { .compatible = "st,stm32h743-pinctrl" },
Patrick Delaunayd252d752018-03-12 10:46:13 +0100461 { .compatible = "st,stm32mp157-pinctrl" },
462 { .compatible = "st,stm32mp157-z-pinctrl" },
Vikas Manocha07e9e412017-02-12 10:25:49 -0800463 { }
464};
465
466U_BOOT_DRIVER(pinctrl_stm32) = {
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200467 .name = "pinctrl_stm32",
468 .id = UCLASS_PINCTRL,
469 .of_match = stm32_pinctrl_ids,
470 .ops = &stm32_pinctrl_ops,
Patrice Chotard05a93192019-06-21 15:39:23 +0200471 .bind = stm32_pinctrl_bind,
Patrice Chotardaaf68e82018-10-24 14:10:18 +0200472 .probe = stm32_pinctrl_probe,
473 .priv_auto_alloc_size = sizeof(struct stm32_pinctrl_priv),
Vikas Manocha07e9e412017-02-12 10:25:49 -0800474};