1 // SPDX-License-Identifier: GPL-2.0
3 * Pin Control driver for SuperH Pin Function Controller.
5 * Authors: Magnus Damm, Paul Mundt, Laurent Pinchart
7 * Copyright (C) 2008 Magnus Damm
8 * Copyright (C) 2009 - 2012 Paul Mundt
9 * Copyright (C) 2017 Marek Vasut
12 #define DRV_NAME "sh-pfc"
17 #include <dm/pinctrl.h>
19 #include <linux/sizes.h>
36 struct sh_pfc_pin_config {
40 struct sh_pfc_pinctrl {
43 struct sh_pfc_pin_config *configs;
45 const char *func_prop_name;
46 const char *groups_prop_name;
47 const char *pins_prop_name;
50 struct sh_pfc_pin_range {
55 struct sh_pfc_pinctrl_priv {
57 struct sh_pfc_pinctrl pmx;
60 int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin)
65 for (i = 0, offset = 0; i < pfc->nr_ranges; ++i) {
66 const struct sh_pfc_pin_range *range = &pfc->ranges[i];
68 if (pin <= range->end)
69 return pin >= range->start
70 ? offset + pin - range->start : -1;
72 offset += range->end - range->start + 1;
78 static int sh_pfc_enum_in_range(u16 enum_id, const struct pinmux_range *r)
80 if (enum_id < r->begin)
89 u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width)
93 return readb(mapped_reg);
95 return readw(mapped_reg);
97 return readl(mapped_reg);
104 void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
109 writeb(data, mapped_reg);
112 writew(data, mapped_reg);
115 writel(data, mapped_reg);
122 u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg)
124 return sh_pfc_read_raw_reg((void __iomem *)(uintptr_t)reg, 32);
127 void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data)
129 void __iomem *unlock_reg =
130 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
132 if (pfc->info->unlock_reg)
133 sh_pfc_write_raw_reg(unlock_reg, 32, ~data);
135 sh_pfc_write_raw_reg((void __iomem *)(uintptr_t)reg, 32, data);
138 static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
139 const struct pinmux_cfg_reg *crp,
141 void __iomem **mapped_regp, u32 *maskp,
146 *mapped_regp = (void __iomem *)(uintptr_t)crp->reg;
148 if (crp->field_width) {
149 *maskp = (1 << crp->field_width) - 1;
150 *posp = crp->reg_width - ((in_pos + 1) * crp->field_width);
152 *maskp = (1 << crp->var_field_width[in_pos]) - 1;
153 *posp = crp->reg_width;
154 for (k = 0; k <= in_pos; k++)
155 *posp -= crp->var_field_width[k];
159 static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
160 const struct pinmux_cfg_reg *crp,
161 unsigned int field, u32 value)
163 void __iomem *mapped_reg;
164 void __iomem *unlock_reg =
165 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
169 sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos);
171 dev_dbg(pfc->dev, "write_reg addr = %x, value = 0x%x, field = %u, "
172 "r_width = %u, f_width = %u\n",
173 crp->reg, value, field, crp->reg_width, crp->field_width);
175 mask = ~(mask << pos);
176 value = value << pos;
178 data = sh_pfc_read_raw_reg(mapped_reg, crp->reg_width);
182 if (pfc->info->unlock_reg)
183 sh_pfc_write_raw_reg(unlock_reg, 32, ~data);
185 sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data);
188 static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
189 const struct pinmux_cfg_reg **crp,
190 unsigned int *fieldp, u32 *valuep)
195 const struct pinmux_cfg_reg *config_reg =
196 pfc->info->cfg_regs + k;
197 unsigned int r_width = config_reg->reg_width;
198 unsigned int f_width = config_reg->field_width;
199 unsigned int curr_width;
200 unsigned int bit_pos;
201 unsigned int pos = 0;
207 for (bit_pos = 0; bit_pos < r_width; bit_pos += curr_width) {
212 curr_width = f_width;
214 curr_width = config_reg->var_field_width[m];
216 ncomb = 1 << curr_width;
217 for (n = 0; n < ncomb; n++) {
218 if (config_reg->enum_ids[pos + n] == enum_id) {
234 static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
237 const u16 *data = pfc->info->pinmux_data;
241 *enum_idp = data[pos + 1];
245 for (k = 0; k < pfc->info->pinmux_data_size; k++) {
246 if (data[k] == mark) {
247 *enum_idp = data[k + 1];
252 dev_err(pfc->dev, "cannot locate data/mark enum_id for mark %d\n",
257 int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
259 const struct pinmux_range *range;
262 switch (pinmux_type) {
263 case PINMUX_TYPE_GPIO:
264 case PINMUX_TYPE_FUNCTION:
268 case PINMUX_TYPE_OUTPUT:
269 range = &pfc->info->output;
272 case PINMUX_TYPE_INPUT:
273 range = &pfc->info->input;
280 /* Iterate over all the configuration fields we need to update. */
282 const struct pinmux_cfg_reg *cr;
289 pos = sh_pfc_mark_to_enum(pfc, mark, pos, &enum_id);
296 /* Check if the configuration field selects a function. If it
297 * doesn't, skip the field if it's not applicable to the
298 * requested pinmux type.
300 in_range = sh_pfc_enum_in_range(enum_id, &pfc->info->function);
302 if (pinmux_type == PINMUX_TYPE_FUNCTION) {
303 /* Functions are allowed to modify all
307 } else if (pinmux_type != PINMUX_TYPE_GPIO) {
308 /* Input/output types can only modify fields
309 * that correspond to their respective ranges.
311 in_range = sh_pfc_enum_in_range(enum_id, range);
314 * special case pass through for fixed
315 * input-only or output-only pins without
316 * function enum register association.
318 if (in_range && enum_id == range->force)
321 /* GPIOs are only allowed to modify function fields. */
327 ret = sh_pfc_get_config_reg(pfc, enum_id, &cr, &field, &value);
331 sh_pfc_write_config_reg(pfc, cr, field, value);
337 const struct pinmux_bias_reg *
338 sh_pfc_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin,
343 for (i = 0; pfc->info->bias_regs[i].puen; i++) {
344 for (j = 0; j < ARRAY_SIZE(pfc->info->bias_regs[i].pins); j++) {
345 if (pfc->info->bias_regs[i].pins[j] == pin) {
347 return &pfc->info->bias_regs[i];
352 WARN_ONCE(1, "Pin %u is not in bias info list\n", pin);
357 static int sh_pfc_init_ranges(struct sh_pfc *pfc)
359 struct sh_pfc_pin_range *range;
360 unsigned int nr_ranges;
363 if (pfc->info->pins[0].pin == (u16)-1) {
364 /* Pin number -1 denotes that the SoC doesn't report pin numbers
365 * in its pin arrays yet. Consider the pin numbers range as
366 * continuous and allocate a single range.
369 pfc->ranges = kzalloc(sizeof(*pfc->ranges), GFP_KERNEL);
370 if (pfc->ranges == NULL)
373 pfc->ranges->start = 0;
374 pfc->ranges->end = pfc->info->nr_pins - 1;
375 pfc->nr_gpio_pins = pfc->info->nr_pins;
380 /* Count, allocate and fill the ranges. The PFC SoC data pins array must
381 * be sorted by pin numbers, and pins without a GPIO port must come
384 for (i = 1, nr_ranges = 1; i < pfc->info->nr_pins; ++i) {
385 if (pfc->info->pins[i-1].pin != pfc->info->pins[i].pin - 1)
389 pfc->nr_ranges = nr_ranges;
390 pfc->ranges = kzalloc(sizeof(*pfc->ranges) * nr_ranges, GFP_KERNEL);
391 if (pfc->ranges == NULL)
395 range->start = pfc->info->pins[0].pin;
397 for (i = 1; i < pfc->info->nr_pins; ++i) {
398 if (pfc->info->pins[i-1].pin == pfc->info->pins[i].pin - 1)
401 range->end = pfc->info->pins[i-1].pin;
402 if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
403 pfc->nr_gpio_pins = range->end + 1;
406 range->start = pfc->info->pins[i].pin;
409 range->end = pfc->info->pins[i-1].pin;
410 if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
411 pfc->nr_gpio_pins = range->end + 1;
416 static int sh_pfc_pinctrl_get_pins_count(struct udevice *dev)
418 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
420 return priv->pfc.info->nr_pins;
423 static const char *sh_pfc_pinctrl_get_pin_name(struct udevice *dev,
426 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
428 return priv->pfc.info->pins[selector].name;
431 static int sh_pfc_pinctrl_get_groups_count(struct udevice *dev)
433 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
435 return priv->pfc.info->nr_groups;
438 static const char *sh_pfc_pinctrl_get_group_name(struct udevice *dev,
441 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
443 return priv->pfc.info->groups[selector].name;
446 static int sh_pfc_pinctrl_get_functions_count(struct udevice *dev)
448 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
450 return priv->pfc.info->nr_functions;
453 static const char *sh_pfc_pinctrl_get_function_name(struct udevice *dev,
456 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
458 return priv->pfc.info->functions[selector].name;
461 int sh_pfc_config_mux_for_gpio(struct udevice *dev, unsigned pin_selector)
463 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
464 struct sh_pfc_pinctrl *pmx = &priv->pmx;
465 struct sh_pfc *pfc = &priv->pfc;
466 struct sh_pfc_pin_config *cfg;
467 const struct sh_pfc_pin *pin = NULL;
470 for (i = 1; i < pfc->info->nr_pins; i++) {
471 if (priv->pfc.info->pins[i].pin != pin_selector)
474 pin = &priv->pfc.info->pins[i];
481 idx = sh_pfc_get_pin_index(pfc, pin->pin);
482 cfg = &pmx->configs[idx];
484 if (cfg->type != PINMUX_TYPE_NONE)
487 return sh_pfc_config_mux(pfc, pin->enum_id, PINMUX_TYPE_GPIO);
490 static int sh_pfc_pinctrl_pin_set(struct udevice *dev, unsigned pin_selector,
491 unsigned func_selector)
493 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
494 struct sh_pfc_pinctrl *pmx = &priv->pmx;
495 struct sh_pfc *pfc = &priv->pfc;
496 const struct sh_pfc_pin *pin = &priv->pfc.info->pins[pin_selector];
497 int idx = sh_pfc_get_pin_index(pfc, pin->pin);
498 struct sh_pfc_pin_config *cfg = &pmx->configs[idx];
500 if (cfg->type != PINMUX_TYPE_NONE)
503 return sh_pfc_config_mux(pfc, pin->enum_id, PINMUX_TYPE_FUNCTION);
506 static int sh_pfc_pinctrl_group_set(struct udevice *dev, unsigned group_selector,
507 unsigned func_selector)
509 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
510 struct sh_pfc_pinctrl *pmx = &priv->pmx;
511 struct sh_pfc *pfc = &priv->pfc;
512 const struct sh_pfc_pin_group *grp = &priv->pfc.info->groups[group_selector];
516 for (i = 0; i < grp->nr_pins; ++i) {
517 int idx = sh_pfc_get_pin_index(pfc, grp->pins[i]);
518 struct sh_pfc_pin_config *cfg = &pmx->configs[idx];
520 if (cfg->type != PINMUX_TYPE_NONE) {
526 for (i = 0; i < grp->nr_pins; ++i) {
527 ret = sh_pfc_config_mux(pfc, grp->mux[i], PINMUX_TYPE_FUNCTION);
535 #if CONFIG_IS_ENABLED(PINCONF)
536 static const struct pinconf_param sh_pfc_pinconf_params[] = {
537 { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
538 { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
539 { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
540 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
541 { "power-source", PIN_CONFIG_POWER_SOURCE, 3300 },
544 static void __iomem *
545 sh_pfc_pinconf_find_drive_strength_reg(struct sh_pfc *pfc, unsigned int pin,
546 unsigned int *offset, unsigned int *size)
548 const struct pinmux_drive_reg_field *field;
549 const struct pinmux_drive_reg *reg;
552 for (reg = pfc->info->drive_regs; reg->reg; ++reg) {
553 for (i = 0; i < ARRAY_SIZE(reg->fields); ++i) {
554 field = ®->fields[i];
556 if (field->size && field->pin == pin) {
557 *offset = field->offset;
560 return (void __iomem *)(uintptr_t)reg->reg;
568 static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc,
569 unsigned int pin, u16 strength)
575 void __iomem *unlock_reg =
576 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
579 reg = sh_pfc_pinconf_find_drive_strength_reg(pfc, pin, &offset, &size);
583 step = size == 2 ? 6 : 3;
585 if (strength < step || strength > 24)
588 /* Convert the value from mA based on a full drive strength value of
589 * 24mA. We can make the full value configurable later if needed.
591 strength = strength / step - 1;
593 val = sh_pfc_read_raw_reg(reg, 32);
594 val &= ~GENMASK(offset + size - 1, offset);
595 val |= strength << offset;
598 sh_pfc_write_raw_reg(unlock_reg, 32, ~val);
600 sh_pfc_write_raw_reg(reg, 32, val);
605 /* Check whether the requested parameter is supported for a pin. */
606 static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc, unsigned int _pin,
609 int idx = sh_pfc_get_pin_index(pfc, _pin);
610 const struct sh_pfc_pin *pin = &pfc->info->pins[idx];
613 case PIN_CONFIG_BIAS_DISABLE:
614 return pin->configs &
615 (SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN);
617 case PIN_CONFIG_BIAS_PULL_UP:
618 return pin->configs & SH_PFC_PIN_CFG_PULL_UP;
620 case PIN_CONFIG_BIAS_PULL_DOWN:
621 return pin->configs & SH_PFC_PIN_CFG_PULL_DOWN;
623 case PIN_CONFIG_DRIVE_STRENGTH:
624 return pin->configs & SH_PFC_PIN_CFG_DRIVE_STRENGTH;
626 case PIN_CONFIG_POWER_SOURCE:
627 return pin->configs & SH_PFC_PIN_CFG_IO_VOLTAGE;
634 static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,
635 unsigned int param, unsigned int arg)
637 struct sh_pfc *pfc = pmx->pfc;
638 void __iomem *pocctrl;
639 void __iomem *unlock_reg =
640 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
644 if (!sh_pfc_pinconf_validate(pfc, _pin, param))
648 case PIN_CONFIG_BIAS_PULL_UP:
649 case PIN_CONFIG_BIAS_PULL_DOWN:
650 case PIN_CONFIG_BIAS_DISABLE:
651 if (!pfc->info->ops || !pfc->info->ops->set_bias)
654 pfc->info->ops->set_bias(pfc, _pin, param);
658 case PIN_CONFIG_DRIVE_STRENGTH:
659 ret = sh_pfc_pinconf_set_drive_strength(pfc, _pin, arg);
665 case PIN_CONFIG_POWER_SOURCE:
666 if (!pfc->info->ops || !pfc->info->ops->pin_to_pocctrl)
669 bit = pfc->info->ops->pin_to_pocctrl(pfc, _pin, &addr);
671 printf("invalid pin %#x", _pin);
675 if (arg != 1800 && arg != 3300)
678 pocctrl = (void __iomem *)(uintptr_t)addr;
680 val = sh_pfc_read_raw_reg(pocctrl, 32);
687 sh_pfc_write_raw_reg(unlock_reg, 32, ~val);
689 sh_pfc_write_raw_reg(pocctrl, 32, val);
700 static int sh_pfc_pinconf_pin_set(struct udevice *dev,
701 unsigned int pin_selector,
702 unsigned int param, unsigned int arg)
704 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
705 struct sh_pfc_pinctrl *pmx = &priv->pmx;
706 struct sh_pfc *pfc = &priv->pfc;
707 const struct sh_pfc_pin *pin = &pfc->info->pins[pin_selector];
709 sh_pfc_pinconf_set(pmx, pin->pin, param, arg);
714 static int sh_pfc_pinconf_group_set(struct udevice *dev,
715 unsigned int group_selector,
716 unsigned int param, unsigned int arg)
718 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
719 struct sh_pfc_pinctrl *pmx = &priv->pmx;
720 struct sh_pfc *pfc = &priv->pfc;
721 const struct sh_pfc_pin_group *grp = &pfc->info->groups[group_selector];
724 for (i = 0; i < grp->nr_pins; i++)
725 sh_pfc_pinconf_set(pmx, grp->pins[i], param, arg);
731 static struct pinctrl_ops sh_pfc_pinctrl_ops = {
732 .get_pins_count = sh_pfc_pinctrl_get_pins_count,
733 .get_pin_name = sh_pfc_pinctrl_get_pin_name,
734 .get_groups_count = sh_pfc_pinctrl_get_groups_count,
735 .get_group_name = sh_pfc_pinctrl_get_group_name,
736 .get_functions_count = sh_pfc_pinctrl_get_functions_count,
737 .get_function_name = sh_pfc_pinctrl_get_function_name,
739 #if CONFIG_IS_ENABLED(PINCONF)
740 .pinconf_num_params = ARRAY_SIZE(sh_pfc_pinconf_params),
741 .pinconf_params = sh_pfc_pinconf_params,
742 .pinconf_set = sh_pfc_pinconf_pin_set,
743 .pinconf_group_set = sh_pfc_pinconf_group_set,
745 .pinmux_set = sh_pfc_pinctrl_pin_set,
746 .pinmux_group_set = sh_pfc_pinctrl_group_set,
747 .set_state = pinctrl_generic_set_state,
750 static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
754 /* Allocate and initialize the pins and configs arrays. */
755 pmx->configs = kzalloc(sizeof(*pmx->configs) * pfc->info->nr_pins,
757 if (unlikely(!pmx->configs))
760 for (i = 0; i < pfc->info->nr_pins; ++i) {
761 struct sh_pfc_pin_config *cfg = &pmx->configs[i];
762 cfg->type = PINMUX_TYPE_NONE;
769 static int sh_pfc_pinctrl_probe(struct udevice *dev)
771 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
772 enum sh_pfc_model model = dev_get_driver_data(dev);
775 base = devfdt_get_addr(dev);
776 if (base == FDT_ADDR_T_NONE)
779 priv->pfc.regs = devm_ioremap(dev, base, SZ_2K);
783 #ifdef CONFIG_PINCTRL_PFC_R8A7790
784 if (model == SH_PFC_R8A7790)
785 priv->pfc.info = &r8a7790_pinmux_info;
787 #ifdef CONFIG_PINCTRL_PFC_R8A7791
788 if (model == SH_PFC_R8A7791)
789 priv->pfc.info = &r8a7791_pinmux_info;
791 #ifdef CONFIG_PINCTRL_PFC_R8A7792
792 if (model == SH_PFC_R8A7792)
793 priv->pfc.info = &r8a7792_pinmux_info;
795 #ifdef CONFIG_PINCTRL_PFC_R8A7793
796 if (model == SH_PFC_R8A7793)
797 priv->pfc.info = &r8a7793_pinmux_info;
799 #ifdef CONFIG_PINCTRL_PFC_R8A7794
800 if (model == SH_PFC_R8A7794)
801 priv->pfc.info = &r8a7794_pinmux_info;
803 #ifdef CONFIG_PINCTRL_PFC_R8A7795
804 if (model == SH_PFC_R8A7795)
805 priv->pfc.info = &r8a7795_pinmux_info;
807 #ifdef CONFIG_PINCTRL_PFC_R8A7796
808 if (model == SH_PFC_R8A7796)
809 priv->pfc.info = &r8a7796_pinmux_info;
811 #ifdef CONFIG_PINCTRL_PFC_R8A77970
812 if (model == SH_PFC_R8A77970)
813 priv->pfc.info = &r8a77970_pinmux_info;
815 #ifdef CONFIG_PINCTRL_PFC_R8A77990
816 if (model == SH_PFC_R8A77990)
817 priv->pfc.info = &r8a77990_pinmux_info;
819 #ifdef CONFIG_PINCTRL_PFC_R8A77995
820 if (model == SH_PFC_R8A77995)
821 priv->pfc.info = &r8a77995_pinmux_info;
824 priv->pmx.pfc = &priv->pfc;
825 sh_pfc_init_ranges(&priv->pfc);
826 sh_pfc_map_pins(&priv->pfc, &priv->pmx);
831 static const struct udevice_id sh_pfc_pinctrl_ids[] = {
832 #ifdef CONFIG_PINCTRL_PFC_R8A7790
834 .compatible = "renesas,pfc-r8a7790",
835 .data = SH_PFC_R8A7790,
838 #ifdef CONFIG_PINCTRL_PFC_R8A7791
840 .compatible = "renesas,pfc-r8a7791",
841 .data = SH_PFC_R8A7791,
844 #ifdef CONFIG_PINCTRL_PFC_R8A7792
846 .compatible = "renesas,pfc-r8a7792",
847 .data = SH_PFC_R8A7792,
850 #ifdef CONFIG_PINCTRL_PFC_R8A7793
852 .compatible = "renesas,pfc-r8a7793",
853 .data = SH_PFC_R8A7793,
856 #ifdef CONFIG_PINCTRL_PFC_R8A7794
858 .compatible = "renesas,pfc-r8a7794",
859 .data = SH_PFC_R8A7794,
862 #ifdef CONFIG_PINCTRL_PFC_R8A7795
864 .compatible = "renesas,pfc-r8a7795",
865 .data = SH_PFC_R8A7795,
868 #ifdef CONFIG_PINCTRL_PFC_R8A7796
870 .compatible = "renesas,pfc-r8a7796",
871 .data = SH_PFC_R8A7796,
873 .compatible = "renesas,pfc-r8a77965",
874 .data = SH_PFC_R8A7796,
877 #ifdef CONFIG_PINCTRL_PFC_R8A77970
879 .compatible = "renesas,pfc-r8a77970",
880 .data = SH_PFC_R8A77970,
883 #ifdef CONFIG_PINCTRL_PFC_R8A77990
885 .compatible = "renesas,pfc-r8a77990",
886 .data = SH_PFC_R8A77990,
889 #ifdef CONFIG_PINCTRL_PFC_R8A77995
891 .compatible = "renesas,pfc-r8a77995",
892 .data = SH_PFC_R8A77995,
898 U_BOOT_DRIVER(pinctrl_sh_pfc) = {
899 .name = "sh_pfc_pinctrl",
900 .id = UCLASS_PINCTRL,
901 .of_match = sh_pfc_pinctrl_ids,
902 .priv_auto_alloc_size = sizeof(struct sh_pfc_pinctrl_priv),
903 .ops = &sh_pfc_pinctrl_ops,
904 .probe = sh_pfc_pinctrl_probe,