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>
37 struct sh_pfc_pin_config {
41 struct sh_pfc_pinctrl {
44 struct sh_pfc_pin_config *configs;
46 const char *func_prop_name;
47 const char *groups_prop_name;
48 const char *pins_prop_name;
51 struct sh_pfc_pin_range {
56 struct sh_pfc_pinctrl_priv {
58 struct sh_pfc_pinctrl pmx;
61 int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin)
66 for (i = 0, offset = 0; i < pfc->nr_ranges; ++i) {
67 const struct sh_pfc_pin_range *range = &pfc->ranges[i];
69 if (pin <= range->end)
70 return pin >= range->start
71 ? offset + pin - range->start : -1;
73 offset += range->end - range->start + 1;
79 static int sh_pfc_enum_in_range(u16 enum_id, const struct pinmux_range *r)
81 if (enum_id < r->begin)
90 u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width)
94 return readb(mapped_reg);
96 return readw(mapped_reg);
98 return readl(mapped_reg);
105 void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
110 writeb(data, mapped_reg);
113 writew(data, mapped_reg);
116 writel(data, mapped_reg);
123 u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg)
125 return sh_pfc_read_raw_reg((void __iomem *)(uintptr_t)reg, 32);
128 void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data)
130 void __iomem *unlock_reg =
131 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
133 if (pfc->info->unlock_reg)
134 sh_pfc_write_raw_reg(unlock_reg, 32, ~data);
136 sh_pfc_write_raw_reg((void __iomem *)(uintptr_t)reg, 32, data);
139 static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
140 const struct pinmux_cfg_reg *crp,
142 void __iomem **mapped_regp, u32 *maskp,
147 *mapped_regp = (void __iomem *)(uintptr_t)crp->reg;
149 if (crp->field_width) {
150 *maskp = (1 << crp->field_width) - 1;
151 *posp = crp->reg_width - ((in_pos + 1) * crp->field_width);
153 *maskp = (1 << crp->var_field_width[in_pos]) - 1;
154 *posp = crp->reg_width;
155 for (k = 0; k <= in_pos; k++)
156 *posp -= crp->var_field_width[k];
160 static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
161 const struct pinmux_cfg_reg *crp,
162 unsigned int field, u32 value)
164 void __iomem *mapped_reg;
165 void __iomem *unlock_reg =
166 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
170 sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos);
172 dev_dbg(pfc->dev, "write_reg addr = %x, value = 0x%x, field = %u, "
173 "r_width = %u, f_width = %u\n",
174 crp->reg, value, field, crp->reg_width, crp->field_width);
176 mask = ~(mask << pos);
177 value = value << pos;
179 data = sh_pfc_read_raw_reg(mapped_reg, crp->reg_width);
183 if (pfc->info->unlock_reg)
184 sh_pfc_write_raw_reg(unlock_reg, 32, ~data);
186 sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data);
189 static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
190 const struct pinmux_cfg_reg **crp,
191 unsigned int *fieldp, u32 *valuep)
196 const struct pinmux_cfg_reg *config_reg =
197 pfc->info->cfg_regs + k;
198 unsigned int r_width = config_reg->reg_width;
199 unsigned int f_width = config_reg->field_width;
200 unsigned int curr_width;
201 unsigned int bit_pos;
202 unsigned int pos = 0;
208 for (bit_pos = 0; bit_pos < r_width; bit_pos += curr_width) {
213 curr_width = f_width;
215 curr_width = config_reg->var_field_width[m];
217 ncomb = 1 << curr_width;
218 for (n = 0; n < ncomb; n++) {
219 if (config_reg->enum_ids[pos + n] == enum_id) {
235 static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
238 const u16 *data = pfc->info->pinmux_data;
242 *enum_idp = data[pos + 1];
246 for (k = 0; k < pfc->info->pinmux_data_size; k++) {
247 if (data[k] == mark) {
248 *enum_idp = data[k + 1];
253 dev_err(pfc->dev, "cannot locate data/mark enum_id for mark %d\n",
258 int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
260 const struct pinmux_range *range;
263 switch (pinmux_type) {
264 case PINMUX_TYPE_GPIO:
265 case PINMUX_TYPE_FUNCTION:
269 case PINMUX_TYPE_OUTPUT:
270 range = &pfc->info->output;
273 case PINMUX_TYPE_INPUT:
274 range = &pfc->info->input;
281 /* Iterate over all the configuration fields we need to update. */
283 const struct pinmux_cfg_reg *cr;
290 pos = sh_pfc_mark_to_enum(pfc, mark, pos, &enum_id);
297 /* Check if the configuration field selects a function. If it
298 * doesn't, skip the field if it's not applicable to the
299 * requested pinmux type.
301 in_range = sh_pfc_enum_in_range(enum_id, &pfc->info->function);
303 if (pinmux_type == PINMUX_TYPE_FUNCTION) {
304 /* Functions are allowed to modify all
308 } else if (pinmux_type != PINMUX_TYPE_GPIO) {
309 /* Input/output types can only modify fields
310 * that correspond to their respective ranges.
312 in_range = sh_pfc_enum_in_range(enum_id, range);
315 * special case pass through for fixed
316 * input-only or output-only pins without
317 * function enum register association.
319 if (in_range && enum_id == range->force)
322 /* GPIOs are only allowed to modify function fields. */
328 ret = sh_pfc_get_config_reg(pfc, enum_id, &cr, &field, &value);
332 sh_pfc_write_config_reg(pfc, cr, field, value);
338 const struct pinmux_bias_reg *
339 sh_pfc_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin,
344 for (i = 0; pfc->info->bias_regs[i].puen; i++) {
345 for (j = 0; j < ARRAY_SIZE(pfc->info->bias_regs[i].pins); j++) {
346 if (pfc->info->bias_regs[i].pins[j] == pin) {
348 return &pfc->info->bias_regs[i];
353 WARN_ONCE(1, "Pin %u is not in bias info list\n", pin);
358 static int sh_pfc_init_ranges(struct sh_pfc *pfc)
360 struct sh_pfc_pin_range *range;
361 unsigned int nr_ranges;
364 if (pfc->info->pins[0].pin == (u16)-1) {
365 /* Pin number -1 denotes that the SoC doesn't report pin numbers
366 * in its pin arrays yet. Consider the pin numbers range as
367 * continuous and allocate a single range.
370 pfc->ranges = kzalloc(sizeof(*pfc->ranges), GFP_KERNEL);
371 if (pfc->ranges == NULL)
374 pfc->ranges->start = 0;
375 pfc->ranges->end = pfc->info->nr_pins - 1;
376 pfc->nr_gpio_pins = pfc->info->nr_pins;
381 /* Count, allocate and fill the ranges. The PFC SoC data pins array must
382 * be sorted by pin numbers, and pins without a GPIO port must come
385 for (i = 1, nr_ranges = 1; i < pfc->info->nr_pins; ++i) {
386 if (pfc->info->pins[i-1].pin != pfc->info->pins[i].pin - 1)
390 pfc->nr_ranges = nr_ranges;
391 pfc->ranges = kzalloc(sizeof(*pfc->ranges) * nr_ranges, GFP_KERNEL);
392 if (pfc->ranges == NULL)
396 range->start = pfc->info->pins[0].pin;
398 for (i = 1; i < pfc->info->nr_pins; ++i) {
399 if (pfc->info->pins[i-1].pin == pfc->info->pins[i].pin - 1)
402 range->end = pfc->info->pins[i-1].pin;
403 if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
404 pfc->nr_gpio_pins = range->end + 1;
407 range->start = pfc->info->pins[i].pin;
410 range->end = pfc->info->pins[i-1].pin;
411 if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
412 pfc->nr_gpio_pins = range->end + 1;
417 static int sh_pfc_pinctrl_get_pins_count(struct udevice *dev)
419 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
421 return priv->pfc.info->nr_pins;
424 static const char *sh_pfc_pinctrl_get_pin_name(struct udevice *dev,
427 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
429 return priv->pfc.info->pins[selector].name;
432 static int sh_pfc_pinctrl_get_groups_count(struct udevice *dev)
434 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
436 return priv->pfc.info->nr_groups;
439 static const char *sh_pfc_pinctrl_get_group_name(struct udevice *dev,
442 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
444 return priv->pfc.info->groups[selector].name;
447 static int sh_pfc_pinctrl_get_functions_count(struct udevice *dev)
449 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
451 return priv->pfc.info->nr_functions;
454 static const char *sh_pfc_pinctrl_get_function_name(struct udevice *dev,
457 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
459 return priv->pfc.info->functions[selector].name;
462 int sh_pfc_config_mux_for_gpio(struct udevice *dev, unsigned pin_selector)
464 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
465 struct sh_pfc_pinctrl *pmx = &priv->pmx;
466 struct sh_pfc *pfc = &priv->pfc;
467 struct sh_pfc_pin_config *cfg;
468 const struct sh_pfc_pin *pin = NULL;
471 for (i = 1; i < pfc->info->nr_pins; i++) {
472 if (priv->pfc.info->pins[i].pin != pin_selector)
475 pin = &priv->pfc.info->pins[i];
482 idx = sh_pfc_get_pin_index(pfc, pin->pin);
483 cfg = &pmx->configs[idx];
485 if (cfg->type != PINMUX_TYPE_NONE)
488 return sh_pfc_config_mux(pfc, pin->enum_id, PINMUX_TYPE_GPIO);
491 static int sh_pfc_pinctrl_pin_set(struct udevice *dev, unsigned pin_selector,
492 unsigned func_selector)
494 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
495 struct sh_pfc_pinctrl *pmx = &priv->pmx;
496 struct sh_pfc *pfc = &priv->pfc;
497 const struct sh_pfc_pin *pin = &priv->pfc.info->pins[pin_selector];
498 int idx = sh_pfc_get_pin_index(pfc, pin->pin);
499 struct sh_pfc_pin_config *cfg = &pmx->configs[idx];
501 if (cfg->type != PINMUX_TYPE_NONE)
504 return sh_pfc_config_mux(pfc, pin->enum_id, PINMUX_TYPE_FUNCTION);
507 static int sh_pfc_pinctrl_group_set(struct udevice *dev, unsigned group_selector,
508 unsigned func_selector)
510 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
511 struct sh_pfc_pinctrl *pmx = &priv->pmx;
512 struct sh_pfc *pfc = &priv->pfc;
513 const struct sh_pfc_pin_group *grp = &priv->pfc.info->groups[group_selector];
517 for (i = 0; i < grp->nr_pins; ++i) {
518 int idx = sh_pfc_get_pin_index(pfc, grp->pins[i]);
519 struct sh_pfc_pin_config *cfg = &pmx->configs[idx];
521 if (cfg->type != PINMUX_TYPE_NONE) {
527 for (i = 0; i < grp->nr_pins; ++i) {
528 ret = sh_pfc_config_mux(pfc, grp->mux[i], PINMUX_TYPE_FUNCTION);
536 #if CONFIG_IS_ENABLED(PINCONF)
537 static const struct pinconf_param sh_pfc_pinconf_params[] = {
538 { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
539 { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
540 { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
541 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
542 { "power-source", PIN_CONFIG_POWER_SOURCE, 3300 },
545 static void __iomem *
546 sh_pfc_pinconf_find_drive_strength_reg(struct sh_pfc *pfc, unsigned int pin,
547 unsigned int *offset, unsigned int *size)
549 const struct pinmux_drive_reg_field *field;
550 const struct pinmux_drive_reg *reg;
553 for (reg = pfc->info->drive_regs; reg->reg; ++reg) {
554 for (i = 0; i < ARRAY_SIZE(reg->fields); ++i) {
555 field = ®->fields[i];
557 if (field->size && field->pin == pin) {
558 *offset = field->offset;
561 return (void __iomem *)(uintptr_t)reg->reg;
569 static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc,
570 unsigned int pin, u16 strength)
576 void __iomem *unlock_reg =
577 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
580 reg = sh_pfc_pinconf_find_drive_strength_reg(pfc, pin, &offset, &size);
584 step = size == 2 ? 6 : 3;
586 if (strength < step || strength > 24)
589 /* Convert the value from mA based on a full drive strength value of
590 * 24mA. We can make the full value configurable later if needed.
592 strength = strength / step - 1;
594 val = sh_pfc_read_raw_reg(reg, 32);
595 val &= ~GENMASK(offset + 4 - 1, offset);
596 val |= strength << offset;
599 sh_pfc_write_raw_reg(unlock_reg, 32, ~val);
601 sh_pfc_write_raw_reg(reg, 32, val);
606 /* Check whether the requested parameter is supported for a pin. */
607 static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc, unsigned int _pin,
610 int idx = sh_pfc_get_pin_index(pfc, _pin);
611 const struct sh_pfc_pin *pin = &pfc->info->pins[idx];
614 case PIN_CONFIG_BIAS_DISABLE:
615 return pin->configs &
616 (SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN);
618 case PIN_CONFIG_BIAS_PULL_UP:
619 return pin->configs & SH_PFC_PIN_CFG_PULL_UP;
621 case PIN_CONFIG_BIAS_PULL_DOWN:
622 return pin->configs & SH_PFC_PIN_CFG_PULL_DOWN;
624 case PIN_CONFIG_DRIVE_STRENGTH:
625 return pin->configs & SH_PFC_PIN_CFG_DRIVE_STRENGTH;
627 case PIN_CONFIG_POWER_SOURCE:
628 return pin->configs & SH_PFC_PIN_CFG_IO_VOLTAGE;
635 static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,
636 unsigned int param, unsigned int arg)
638 struct sh_pfc *pfc = pmx->pfc;
639 void __iomem *pocctrl;
640 void __iomem *unlock_reg =
641 (void __iomem *)(uintptr_t)pfc->info->unlock_reg;
645 if (!sh_pfc_pinconf_validate(pfc, _pin, param))
649 case PIN_CONFIG_BIAS_PULL_UP:
650 case PIN_CONFIG_BIAS_PULL_DOWN:
651 case PIN_CONFIG_BIAS_DISABLE:
652 if (!pfc->info->ops || !pfc->info->ops->set_bias)
655 pfc->info->ops->set_bias(pfc, _pin, param);
659 case PIN_CONFIG_DRIVE_STRENGTH:
660 ret = sh_pfc_pinconf_set_drive_strength(pfc, _pin, arg);
666 case PIN_CONFIG_POWER_SOURCE:
667 if (!pfc->info->ops || !pfc->info->ops->pin_to_pocctrl)
670 bit = pfc->info->ops->pin_to_pocctrl(pfc, _pin, &addr);
672 printf("invalid pin %#x", _pin);
676 if (arg != 1800 && arg != 3300)
679 pocctrl = (void __iomem *)(uintptr_t)addr;
681 val = sh_pfc_read_raw_reg(pocctrl, 32);
688 sh_pfc_write_raw_reg(unlock_reg, 32, ~val);
690 sh_pfc_write_raw_reg(pocctrl, 32, val);
701 static int sh_pfc_pinconf_pin_set(struct udevice *dev,
702 unsigned int pin_selector,
703 unsigned int param, unsigned int arg)
705 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
706 struct sh_pfc_pinctrl *pmx = &priv->pmx;
707 struct sh_pfc *pfc = &priv->pfc;
708 const struct sh_pfc_pin *pin = &pfc->info->pins[pin_selector];
710 sh_pfc_pinconf_set(pmx, pin->pin, param, arg);
715 static int sh_pfc_pinconf_group_set(struct udevice *dev,
716 unsigned int group_selector,
717 unsigned int param, unsigned int arg)
719 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
720 struct sh_pfc_pinctrl *pmx = &priv->pmx;
721 struct sh_pfc *pfc = &priv->pfc;
722 const struct sh_pfc_pin_group *grp = &pfc->info->groups[group_selector];
725 for (i = 0; i < grp->nr_pins; i++)
726 sh_pfc_pinconf_set(pmx, grp->pins[i], param, arg);
732 static struct pinctrl_ops sh_pfc_pinctrl_ops = {
733 .get_pins_count = sh_pfc_pinctrl_get_pins_count,
734 .get_pin_name = sh_pfc_pinctrl_get_pin_name,
735 .get_groups_count = sh_pfc_pinctrl_get_groups_count,
736 .get_group_name = sh_pfc_pinctrl_get_group_name,
737 .get_functions_count = sh_pfc_pinctrl_get_functions_count,
738 .get_function_name = sh_pfc_pinctrl_get_function_name,
740 #if CONFIG_IS_ENABLED(PINCONF)
741 .pinconf_num_params = ARRAY_SIZE(sh_pfc_pinconf_params),
742 .pinconf_params = sh_pfc_pinconf_params,
743 .pinconf_set = sh_pfc_pinconf_pin_set,
744 .pinconf_group_set = sh_pfc_pinconf_group_set,
746 .pinmux_set = sh_pfc_pinctrl_pin_set,
747 .pinmux_group_set = sh_pfc_pinctrl_group_set,
748 .set_state = pinctrl_generic_set_state,
751 static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
755 /* Allocate and initialize the pins and configs arrays. */
756 pmx->configs = kzalloc(sizeof(*pmx->configs) * pfc->info->nr_pins,
758 if (unlikely(!pmx->configs))
761 for (i = 0; i < pfc->info->nr_pins; ++i) {
762 struct sh_pfc_pin_config *cfg = &pmx->configs[i];
763 cfg->type = PINMUX_TYPE_NONE;
770 static int sh_pfc_pinctrl_probe(struct udevice *dev)
772 struct sh_pfc_pinctrl_priv *priv = dev_get_priv(dev);
773 enum sh_pfc_model model = dev_get_driver_data(dev);
776 base = devfdt_get_addr(dev);
777 if (base == FDT_ADDR_T_NONE)
780 priv->pfc.regs = devm_ioremap(dev, base, SZ_2K);
784 #ifdef CONFIG_PINCTRL_PFC_R8A7790
785 if (model == SH_PFC_R8A7790)
786 priv->pfc.info = &r8a7790_pinmux_info;
788 #ifdef CONFIG_PINCTRL_PFC_R8A7791
789 if (model == SH_PFC_R8A7791)
790 priv->pfc.info = &r8a7791_pinmux_info;
792 #ifdef CONFIG_PINCTRL_PFC_R8A7792
793 if (model == SH_PFC_R8A7792)
794 priv->pfc.info = &r8a7792_pinmux_info;
796 #ifdef CONFIG_PINCTRL_PFC_R8A7793
797 if (model == SH_PFC_R8A7793)
798 priv->pfc.info = &r8a7793_pinmux_info;
800 #ifdef CONFIG_PINCTRL_PFC_R8A7794
801 if (model == SH_PFC_R8A7794)
802 priv->pfc.info = &r8a7794_pinmux_info;
804 #ifdef CONFIG_PINCTRL_PFC_R8A7795
805 if (model == SH_PFC_R8A7795)
806 priv->pfc.info = &r8a7795_pinmux_info;
808 #ifdef CONFIG_PINCTRL_PFC_R8A7796
809 if (model == SH_PFC_R8A7796)
810 priv->pfc.info = &r8a7796_pinmux_info;
812 #ifdef CONFIG_PINCTRL_PFC_R8A77965
813 if (model == SH_PFC_R8A77965)
814 priv->pfc.info = &r8a77965_pinmux_info;
816 #ifdef CONFIG_PINCTRL_PFC_R8A77970
817 if (model == SH_PFC_R8A77970)
818 priv->pfc.info = &r8a77970_pinmux_info;
820 #ifdef CONFIG_PINCTRL_PFC_R8A77990
821 if (model == SH_PFC_R8A77990)
822 priv->pfc.info = &r8a77990_pinmux_info;
824 #ifdef CONFIG_PINCTRL_PFC_R8A77995
825 if (model == SH_PFC_R8A77995)
826 priv->pfc.info = &r8a77995_pinmux_info;
829 priv->pmx.pfc = &priv->pfc;
830 sh_pfc_init_ranges(&priv->pfc);
831 sh_pfc_map_pins(&priv->pfc, &priv->pmx);
836 static const struct udevice_id sh_pfc_pinctrl_ids[] = {
837 #ifdef CONFIG_PINCTRL_PFC_R8A7790
839 .compatible = "renesas,pfc-r8a7790",
840 .data = SH_PFC_R8A7790,
843 #ifdef CONFIG_PINCTRL_PFC_R8A7791
845 .compatible = "renesas,pfc-r8a7791",
846 .data = SH_PFC_R8A7791,
849 #ifdef CONFIG_PINCTRL_PFC_R8A7792
851 .compatible = "renesas,pfc-r8a7792",
852 .data = SH_PFC_R8A7792,
855 #ifdef CONFIG_PINCTRL_PFC_R8A7793
857 .compatible = "renesas,pfc-r8a7793",
858 .data = SH_PFC_R8A7793,
861 #ifdef CONFIG_PINCTRL_PFC_R8A7794
863 .compatible = "renesas,pfc-r8a7794",
864 .data = SH_PFC_R8A7794,
867 #ifdef CONFIG_PINCTRL_PFC_R8A7795
869 .compatible = "renesas,pfc-r8a7795",
870 .data = SH_PFC_R8A7795,
873 #ifdef CONFIG_PINCTRL_PFC_R8A7796
875 .compatible = "renesas,pfc-r8a7796",
876 .data = SH_PFC_R8A7796,
879 #ifdef CONFIG_PINCTRL_PFC_R8A77965
881 .compatible = "renesas,pfc-r8a77965",
882 .data = SH_PFC_R8A77965,
885 #ifdef CONFIG_PINCTRL_PFC_R8A77970
887 .compatible = "renesas,pfc-r8a77970",
888 .data = SH_PFC_R8A77970,
891 #ifdef CONFIG_PINCTRL_PFC_R8A77990
893 .compatible = "renesas,pfc-r8a77990",
894 .data = SH_PFC_R8A77990,
897 #ifdef CONFIG_PINCTRL_PFC_R8A77995
899 .compatible = "renesas,pfc-r8a77995",
900 .data = SH_PFC_R8A77995,
906 U_BOOT_DRIVER(pinctrl_sh_pfc) = {
907 .name = "sh_pfc_pinctrl",
908 .id = UCLASS_PINCTRL,
909 .of_match = sh_pfc_pinctrl_ids,
910 .priv_auto_alloc_size = sizeof(struct sh_pfc_pinctrl_priv),
911 .ops = &sh_pfc_pinctrl_ops,
912 .probe = sh_pfc_pinctrl_probe,