blob: fc241fdcdef9d89cc4bbb37b3f867eb7f8a2e868 [file] [log] [blame]
Vikas Manocha94d53082017-02-12 10:25:49 -08001#include <common.h>
Vikas Manocha94d53082017-02-12 10:25:49 -08002#include <dm.h>
Benjamin Gaignard075b0182018-11-27 13:49:53 +01003#include <hwspinlock.h>
Simon Glassf7ae49f2020-05-10 11:40:05 -06004#include <log.h>
Simon Glass336d4612020-02-03 07:36:16 -07005#include <malloc.h>
Vikas Manocha77417102017-04-10 15:02:57 -07006#include <asm/arch/gpio.h>
7#include <asm/gpio.h>
8#include <asm/io.h>
Simon Glass336d4612020-02-03 07:36:16 -07009#include <dm/device_compat.h>
Patrice Chotard73858262019-07-30 19:16:10 +020010#include <dm/lists.h>
11#include <dm/pinctrl.h>
Simon Glasscd93d622020-05-10 11:40:13 -060012#include <linux/bitops.h>
Simon Glass61b29b82020-02-03 07:36:15 -070013#include <linux/err.h>
Simon Glass4d72caa2020-05-10 11:40:01 -060014#include <linux/libfdt.h>
Vikas Manocha94d53082017-02-12 10:25:49 -080015
16DECLARE_GLOBAL_DATA_PTR;
17
Vikas Manocha58fb3c82017-04-10 15:03:04 -070018#define MAX_PINS_ONE_IP 70
Vikas Manocha77417102017-04-10 15:02:57 -070019#define MODE_BITS_MASK 3
20#define OSPEED_MASK 3
21#define PUPD_MASK 3
22#define OTYPE_MSK 1
23#define AFR_MASK 0xF
24
Patrice Chotard8f651ca2018-10-24 14:10:18 +020025struct stm32_pinctrl_priv {
Benjamin Gaignard075b0182018-11-27 13:49:53 +010026 struct hwspinlock hws;
Patrice Chotard8f651ca2018-10-24 14:10:18 +020027 int pinctrl_ngpios;
28 struct list_head gpio_dev;
29};
30
31struct stm32_gpio_bank {
32 struct udevice *gpio_dev;
33 struct list_head list;
34};
35
Benjamin Gaignard075b0182018-11-27 13:49:53 +010036#ifndef CONFIG_SPL_BUILD
37
Patrice Chotard4ff1c202018-10-24 14:10:19 +020038static char pin_name[PINNAME_SIZE];
Patrice Chotardb42d9382018-10-24 14:10:20 +020039#define PINMUX_MODE_COUNT 5
40static const char * const pinmux_mode[PINMUX_MODE_COUNT] = {
41 "gpio input",
42 "gpio output",
43 "analog",
44 "unknown",
45 "alt function",
46};
47
48static int stm32_pinctrl_get_af(struct udevice *dev, unsigned int offset)
49{
50 struct stm32_gpio_priv *priv = dev_get_priv(dev);
51 struct stm32_gpio_regs *regs = priv->regs;
52 u32 af;
53 u32 alt_shift = (offset % 8) * 4;
54 u32 alt_index = offset / 8;
55
56 af = (readl(&regs->afr[alt_index]) &
57 GENMASK(alt_shift + 3, alt_shift)) >> alt_shift;
58
59 return af;
60}
61
Patrice Chotard04355042018-12-03 10:52:50 +010062static int stm32_populate_gpio_dev_list(struct udevice *dev)
63{
64 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
65 struct udevice *gpio_dev;
66 struct udevice *child;
67 struct stm32_gpio_bank *gpio_bank;
68 int ret;
69
70 /*
71 * parse pin-controller sub-nodes (ie gpio bank nodes) and fill
72 * a list with all gpio device reference which belongs to the
73 * current pin-controller. This list is used to find pin_name and
74 * pin muxing
75 */
76 list_for_each_entry(child, &dev->child_head, sibling_node) {
77 ret = uclass_get_device_by_name(UCLASS_GPIO, child->name,
78 &gpio_dev);
79 if (ret < 0)
80 continue;
81
82 gpio_bank = malloc(sizeof(*gpio_bank));
83 if (!gpio_bank) {
84 dev_err(dev, "Not enough memory\n");
85 return -ENOMEM;
86 }
87
88 gpio_bank->gpio_dev = gpio_dev;
89 list_add_tail(&gpio_bank->list, &priv->gpio_dev);
90 }
91
92 return 0;
93}
94
Patrice Chotard8f651ca2018-10-24 14:10:18 +020095static int stm32_pinctrl_get_pins_count(struct udevice *dev)
96{
97 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
98 struct gpio_dev_priv *uc_priv;
99 struct stm32_gpio_bank *gpio_bank;
100
101 /*
102 * if get_pins_count has already been executed once on this
103 * pin-controller, no need to run it again
104 */
105 if (priv->pinctrl_ngpios)
106 return priv->pinctrl_ngpios;
107
Patrice Chotard04355042018-12-03 10:52:50 +0100108 if (list_empty(&priv->gpio_dev))
109 stm32_populate_gpio_dev_list(dev);
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200110 /*
111 * walk through all banks to retrieve the pin-controller
112 * pins number
113 */
114 list_for_each_entry(gpio_bank, &priv->gpio_dev, list) {
115 uc_priv = dev_get_uclass_priv(gpio_bank->gpio_dev);
116
117 priv->pinctrl_ngpios += uc_priv->gpio_count;
118 }
119
120 return priv->pinctrl_ngpios;
121}
122
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200123static struct udevice *stm32_pinctrl_get_gpio_dev(struct udevice *dev,
Patrice Chotard530b63c2018-12-03 10:52:54 +0100124 unsigned int selector,
125 unsigned int *idx)
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200126{
127 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
128 struct stm32_gpio_bank *gpio_bank;
129 struct gpio_dev_priv *uc_priv;
Patrice Chotard530b63c2018-12-03 10:52:54 +0100130 int pin_count = 0;
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200131
Patrice Chotard04355042018-12-03 10:52:50 +0100132 if (list_empty(&priv->gpio_dev))
133 stm32_populate_gpio_dev_list(dev);
134
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200135 /* look up for the bank which owns the requested pin */
136 list_for_each_entry(gpio_bank, &priv->gpio_dev, list) {
137 uc_priv = dev_get_uclass_priv(gpio_bank->gpio_dev);
138
Patrice Chotard530b63c2018-12-03 10:52:54 +0100139 if (selector < (pin_count + uc_priv->gpio_count)) {
140 /*
141 * we found the bank, convert pin selector to
142 * gpio bank index
143 */
144 *idx = stm32_offset_to_index(gpio_bank->gpio_dev,
145 selector - pin_count);
Patrick Delaunay91ca91e2019-06-21 15:26:52 +0200146 if (IS_ERR_VALUE(*idx))
Patrice Chotard530b63c2018-12-03 10:52:54 +0100147 return NULL;
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200148
Patrice Chotard530b63c2018-12-03 10:52:54 +0100149 return gpio_bank->gpio_dev;
150 }
151 pin_count += uc_priv->gpio_count;
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200152 }
153
154 return NULL;
155}
156
157static const char *stm32_pinctrl_get_pin_name(struct udevice *dev,
158 unsigned int selector)
159{
160 struct gpio_dev_priv *uc_priv;
161 struct udevice *gpio_dev;
Patrice Chotard530b63c2018-12-03 10:52:54 +0100162 unsigned int gpio_idx;
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200163
164 /* look up for the bank which owns the requested pin */
Patrice Chotard530b63c2018-12-03 10:52:54 +0100165 gpio_dev = stm32_pinctrl_get_gpio_dev(dev, selector, &gpio_idx);
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200166 if (!gpio_dev) {
167 snprintf(pin_name, PINNAME_SIZE, "Error");
168 } else {
169 uc_priv = dev_get_uclass_priv(gpio_dev);
170
171 snprintf(pin_name, PINNAME_SIZE, "%s%d",
172 uc_priv->bank_name,
Patrice Chotard530b63c2018-12-03 10:52:54 +0100173 gpio_idx);
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200174 }
175
176 return pin_name;
177}
Patrice Chotardb42d9382018-10-24 14:10:20 +0200178
179static int stm32_pinctrl_get_pin_muxing(struct udevice *dev,
180 unsigned int selector,
181 char *buf,
182 int size)
183{
184 struct udevice *gpio_dev;
185 const char *label;
Patrice Chotardb42d9382018-10-24 14:10:20 +0200186 int mode;
187 int af_num;
Patrice Chotard530b63c2018-12-03 10:52:54 +0100188 unsigned int gpio_idx;
Patrice Chotardb42d9382018-10-24 14:10:20 +0200189
190 /* look up for the bank which owns the requested pin */
Patrice Chotard530b63c2018-12-03 10:52:54 +0100191 gpio_dev = stm32_pinctrl_get_gpio_dev(dev, selector, &gpio_idx);
Patrice Chotardb42d9382018-10-24 14:10:20 +0200192
193 if (!gpio_dev)
194 return -ENODEV;
195
Patrice Chotard530b63c2018-12-03 10:52:54 +0100196 mode = gpio_get_raw_function(gpio_dev, gpio_idx, &label);
Patrice Chotardb42d9382018-10-24 14:10:20 +0200197
Patrice Chotard530b63c2018-12-03 10:52:54 +0100198 dev_dbg(dev, "selector = %d gpio_idx = %d mode = %d\n",
199 selector, gpio_idx, mode);
Patrice Chotardb42d9382018-10-24 14:10:20 +0200200
Patrice Chotardb42d9382018-10-24 14:10:20 +0200201
202 switch (mode) {
203 case GPIOF_UNKNOWN:
204 /* should never happen */
205 return -EINVAL;
206 case GPIOF_UNUSED:
207 snprintf(buf, size, "%s", pinmux_mode[mode]);
208 break;
209 case GPIOF_FUNC:
Patrice Chotard530b63c2018-12-03 10:52:54 +0100210 af_num = stm32_pinctrl_get_af(gpio_dev, gpio_idx);
Patrice Chotardb42d9382018-10-24 14:10:20 +0200211 snprintf(buf, size, "%s %d", pinmux_mode[mode], af_num);
212 break;
213 case GPIOF_OUTPUT:
214 case GPIOF_INPUT:
215 snprintf(buf, size, "%s %s",
216 pinmux_mode[mode], label ? label : "");
217 break;
218 }
219
220 return 0;
221}
222
Benjamin Gaignard075b0182018-11-27 13:49:53 +0100223#endif
224
Patrick Delaunay91ca91e2019-06-21 15:26:52 +0200225static int stm32_pinctrl_probe(struct udevice *dev)
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200226{
227 struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200228 int ret;
229
230 INIT_LIST_HEAD(&priv->gpio_dev);
231
Benjamin Gaignard075b0182018-11-27 13:49:53 +0100232 /* hwspinlock property is optional, just log the error */
233 ret = hwspinlock_get_by_index(dev, 0, &priv->hws);
234 if (ret)
235 debug("%s: hwspinlock_get_by_index may have failed (%d)\n",
236 __func__, ret);
237
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200238 return 0;
239}
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200240
Vikas Manocha77417102017-04-10 15:02:57 -0700241static int stm32_gpio_config(struct gpio_desc *desc,
242 const struct stm32_gpio_ctl *ctl)
243{
244 struct stm32_gpio_priv *priv = dev_get_priv(desc->dev);
245 struct stm32_gpio_regs *regs = priv->regs;
Benjamin Gaignard075b0182018-11-27 13:49:53 +0100246 struct stm32_pinctrl_priv *ctrl_priv;
247 int ret;
Vikas Manocha77417102017-04-10 15:02:57 -0700248 u32 index;
249
250 if (!ctl || ctl->af > 15 || ctl->mode > 3 || ctl->otype > 1 ||
251 ctl->pupd > 2 || ctl->speed > 3)
252 return -EINVAL;
253
Benjamin Gaignard075b0182018-11-27 13:49:53 +0100254 ctrl_priv = dev_get_priv(dev_get_parent(desc->dev));
255 ret = hwspinlock_lock_timeout(&ctrl_priv->hws, 10);
256 if (ret == -ETIME) {
257 dev_err(desc->dev, "HWSpinlock timeout\n");
258 return ret;
259 }
260
Vikas Manocha77417102017-04-10 15:02:57 -0700261 index = (desc->offset & 0x07) * 4;
262 clrsetbits_le32(&regs->afr[desc->offset >> 3], AFR_MASK << index,
263 ctl->af << index);
264
265 index = desc->offset * 2;
266 clrsetbits_le32(&regs->moder, MODE_BITS_MASK << index,
267 ctl->mode << index);
268 clrsetbits_le32(&regs->ospeedr, OSPEED_MASK << index,
269 ctl->speed << index);
270 clrsetbits_le32(&regs->pupdr, PUPD_MASK << index, ctl->pupd << index);
271
272 index = desc->offset;
273 clrsetbits_le32(&regs->otyper, OTYPE_MSK << index, ctl->otype << index);
274
Benjamin Gaignard075b0182018-11-27 13:49:53 +0100275 hwspinlock_unlock(&ctrl_priv->hws);
276
Vikas Manocha77417102017-04-10 15:02:57 -0700277 return 0;
278}
Patrick Delaunay8aeba622018-03-12 10:46:13 +0100279
Vikas Manocha94d53082017-02-12 10:25:49 -0800280static int prep_gpio_dsc(struct stm32_gpio_dsc *gpio_dsc, u32 port_pin)
281{
Patrick Delaunay8aeba622018-03-12 10:46:13 +0100282 gpio_dsc->port = (port_pin & 0x1F000) >> 12;
Vikas Manocha94d53082017-02-12 10:25:49 -0800283 gpio_dsc->pin = (port_pin & 0x0F00) >> 8;
284 debug("%s: GPIO:port= %d, pin= %d\n", __func__, gpio_dsc->port,
285 gpio_dsc->pin);
286
287 return 0;
288}
289
290static int prep_gpio_ctl(struct stm32_gpio_ctl *gpio_ctl, u32 gpio_fn, int node)
291{
292 gpio_fn &= 0x00FF;
Vikas Manocha77417102017-04-10 15:02:57 -0700293 gpio_ctl->af = 0;
Vikas Manocha94d53082017-02-12 10:25:49 -0800294
295 switch (gpio_fn) {
296 case 0:
297 gpio_ctl->mode = STM32_GPIO_MODE_IN;
298 break;
299 case 1 ... 16:
300 gpio_ctl->mode = STM32_GPIO_MODE_AF;
301 gpio_ctl->af = gpio_fn - 1;
302 break;
303 case 17:
304 gpio_ctl->mode = STM32_GPIO_MODE_AN;
305 break;
306 default:
307 gpio_ctl->mode = STM32_GPIO_MODE_OUT;
308 break;
309 }
310
311 gpio_ctl->speed = fdtdec_get_int(gd->fdt_blob, node, "slew-rate", 0);
312
313 if (fdtdec_get_bool(gd->fdt_blob, node, "drive-open-drain"))
314 gpio_ctl->otype = STM32_GPIO_OTYPE_OD;
315 else
316 gpio_ctl->otype = STM32_GPIO_OTYPE_PP;
317
318 if (fdtdec_get_bool(gd->fdt_blob, node, "bias-pull-up"))
319 gpio_ctl->pupd = STM32_GPIO_PUPD_UP;
320 else if (fdtdec_get_bool(gd->fdt_blob, node, "bias-pull-down"))
321 gpio_ctl->pupd = STM32_GPIO_PUPD_DOWN;
322 else
323 gpio_ctl->pupd = STM32_GPIO_PUPD_NO;
324
325 debug("%s: gpio fn= %d, slew-rate= %x, op type= %x, pull-upd is = %x\n",
326 __func__, gpio_fn, gpio_ctl->speed, gpio_ctl->otype,
327 gpio_ctl->pupd);
328
329 return 0;
330}
331
Christophe Kerelload0376e2017-06-20 17:04:18 +0200332static int stm32_pinctrl_config(int offset)
Vikas Manocha94d53082017-02-12 10:25:49 -0800333{
Vikas Manocha58fb3c82017-04-10 15:03:04 -0700334 u32 pin_mux[MAX_PINS_ONE_IP];
Vikas Manocha94d53082017-02-12 10:25:49 -0800335 int rv, len;
336
Vikas Manocha94d53082017-02-12 10:25:49 -0800337 /*
338 * check for "pinmux" property in each subnode (e.g. pins1 and pins2 for
339 * usart1) of pin controller phandle "pinctrl-0"
340 * */
Christophe Kerelload0376e2017-06-20 17:04:18 +0200341 fdt_for_each_subnode(offset, gd->fdt_blob, offset) {
Vikas Manocha94d53082017-02-12 10:25:49 -0800342 struct stm32_gpio_dsc gpio_dsc;
343 struct stm32_gpio_ctl gpio_ctl;
344 int i;
345
Christophe Kerelload0376e2017-06-20 17:04:18 +0200346 len = fdtdec_get_int_array_count(gd->fdt_blob, offset,
Vikas Manocha94d53082017-02-12 10:25:49 -0800347 "pinmux", pin_mux,
348 ARRAY_SIZE(pin_mux));
Christophe Kerelload0376e2017-06-20 17:04:18 +0200349 debug("%s: no of pinmux entries= %d\n", __func__, len);
Vikas Manocha94d53082017-02-12 10:25:49 -0800350 if (len < 0)
351 return -EINVAL;
352 for (i = 0; i < len; i++) {
Vikas Manocha280057b2017-04-10 15:02:59 -0700353 struct gpio_desc desc;
Patrick Delaunay8aeba622018-03-12 10:46:13 +0100354
Vikas Manocha94d53082017-02-12 10:25:49 -0800355 debug("%s: pinmux = %x\n", __func__, *(pin_mux + i));
356 prep_gpio_dsc(&gpio_dsc, *(pin_mux + i));
Christophe Kerelload0376e2017-06-20 17:04:18 +0200357 prep_gpio_ctl(&gpio_ctl, *(pin_mux + i), offset);
Vikas Manocha280057b2017-04-10 15:02:59 -0700358 rv = uclass_get_device_by_seq(UCLASS_GPIO,
Patrick Delaunay8aeba622018-03-12 10:46:13 +0100359 gpio_dsc.port,
360 &desc.dev);
Vikas Manocha280057b2017-04-10 15:02:59 -0700361 if (rv)
362 return rv;
363 desc.offset = gpio_dsc.pin;
364 rv = stm32_gpio_config(&desc, &gpio_ctl);
Vikas Manocha94d53082017-02-12 10:25:49 -0800365 debug("%s: rv = %d\n\n", __func__, rv);
366 if (rv)
367 return rv;
368 }
369 }
370
371 return 0;
372}
373
Patrice Chotard158abbf2019-06-21 15:39:23 +0200374static int stm32_pinctrl_bind(struct udevice *dev)
375{
376 ofnode node;
377 const char *name;
378 int ret;
379
380 dev_for_each_subnode(node, dev) {
381 debug("%s: bind %s\n", __func__, ofnode_get_name(node));
382
383 ofnode_get_property(node, "gpio-controller", &ret);
384 if (ret < 0)
385 continue;
386 /* Get the name of each gpio node */
387 name = ofnode_get_name(node);
388 if (!name)
389 return -EINVAL;
390
391 /* Bind each gpio node */
392 ret = device_bind_driver_to_node(dev, "gpio_stm32",
393 name, node, NULL);
394 if (ret)
395 return ret;
396
397 debug("%s: bind %s\n", __func__, name);
398 }
399
400 return 0;
401}
402
Christophe Kerellobb44b962017-06-20 17:04:19 +0200403#if CONFIG_IS_ENABLED(PINCTRL_FULL)
404static int stm32_pinctrl_set_state(struct udevice *dev, struct udevice *config)
405{
406 return stm32_pinctrl_config(dev_of_offset(config));
407}
408#else /* PINCTRL_FULL */
Christophe Kerelload0376e2017-06-20 17:04:18 +0200409static int stm32_pinctrl_set_state_simple(struct udevice *dev,
410 struct udevice *periph)
411{
412 const void *fdt = gd->fdt_blob;
413 const fdt32_t *list;
414 uint32_t phandle;
415 int config_node;
416 int size, i, ret;
417
418 list = fdt_getprop(fdt, dev_of_offset(periph), "pinctrl-0", &size);
419 if (!list)
420 return -EINVAL;
421
422 debug("%s: periph->name = %s\n", __func__, periph->name);
423
424 size /= sizeof(*list);
425 for (i = 0; i < size; i++) {
426 phandle = fdt32_to_cpu(*list++);
427
428 config_node = fdt_node_offset_by_phandle(fdt, phandle);
429 if (config_node < 0) {
Masahiro Yamada9b643e32017-09-16 14:10:41 +0900430 pr_err("prop pinctrl-0 index %d invalid phandle\n", i);
Christophe Kerelload0376e2017-06-20 17:04:18 +0200431 return -EINVAL;
432 }
433
434 ret = stm32_pinctrl_config(config_node);
435 if (ret)
436 return ret;
437 }
438
439 return 0;
440}
Christophe Kerellobb44b962017-06-20 17:04:19 +0200441#endif /* PINCTRL_FULL */
Christophe Kerelload0376e2017-06-20 17:04:18 +0200442
Vikas Manocha94d53082017-02-12 10:25:49 -0800443static struct pinctrl_ops stm32_pinctrl_ops = {
Christophe Kerellobb44b962017-06-20 17:04:19 +0200444#if CONFIG_IS_ENABLED(PINCTRL_FULL)
445 .set_state = stm32_pinctrl_set_state,
446#else /* PINCTRL_FULL */
Vikas Manocha94d53082017-02-12 10:25:49 -0800447 .set_state_simple = stm32_pinctrl_set_state_simple,
Christophe Kerellobb44b962017-06-20 17:04:19 +0200448#endif /* PINCTRL_FULL */
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200449#ifndef CONFIG_SPL_BUILD
Patrice Chotard4ff1c202018-10-24 14:10:19 +0200450 .get_pin_name = stm32_pinctrl_get_pin_name,
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200451 .get_pins_count = stm32_pinctrl_get_pins_count,
Patrice Chotardb42d9382018-10-24 14:10:20 +0200452 .get_pin_muxing = stm32_pinctrl_get_pin_muxing,
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200453#endif
Vikas Manocha94d53082017-02-12 10:25:49 -0800454};
455
456static const struct udevice_id stm32_pinctrl_ids[] = {
Patrice Chotard98693c22017-12-12 09:49:35 +0100457 { .compatible = "st,stm32f429-pinctrl" },
458 { .compatible = "st,stm32f469-pinctrl" },
Vikas Manocha94d53082017-02-12 10:25:49 -0800459 { .compatible = "st,stm32f746-pinctrl" },
Patrice Chotarddd18df42018-12-11 14:49:18 +0100460 { .compatible = "st,stm32f769-pinctrl" },
Patrice Chotard092e72c2017-09-13 18:00:04 +0200461 { .compatible = "st,stm32h743-pinctrl" },
Patrick Delaunay8aeba622018-03-12 10:46:13 +0100462 { .compatible = "st,stm32mp157-pinctrl" },
463 { .compatible = "st,stm32mp157-z-pinctrl" },
Vikas Manocha94d53082017-02-12 10:25:49 -0800464 { }
465};
466
467U_BOOT_DRIVER(pinctrl_stm32) = {
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200468 .name = "pinctrl_stm32",
469 .id = UCLASS_PINCTRL,
470 .of_match = stm32_pinctrl_ids,
471 .ops = &stm32_pinctrl_ops,
Patrice Chotard158abbf2019-06-21 15:39:23 +0200472 .bind = stm32_pinctrl_bind,
Patrice Chotard8f651ca2018-10-24 14:10:18 +0200473 .probe = stm32_pinctrl_probe,
474 .priv_auto_alloc_size = sizeof(struct stm32_pinctrl_priv),
Vikas Manocha94d53082017-02-12 10:25:49 -0800475};