aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl/renesas/pfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/renesas/pfc.c')
-rw-r--r--drivers/pinctrl/renesas/pfc.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 8f7f9a74b45..f6e8dd93374 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -43,6 +43,8 @@ enum sh_pfc_model {
SH_PFC_R8A77990,
SH_PFC_R8A77995,
SH_PFC_R8A779A0,
+ SH_PFC_R8A779F0,
+ SH_PFC_R8A779G0,
};
struct sh_pfc_pin_config {
@@ -810,6 +812,8 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,
void __iomem *pocctrl;
u32 addr, val;
int bit, ret;
+ int idx = sh_pfc_get_pin_index(pfc, _pin);
+ const struct sh_pfc_pin *pin = &pfc->info->pins[idx];
if (!sh_pfc_pinconf_validate(pfc, _pin, param))
return -ENOTSUPP;
@@ -842,13 +846,13 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,
return bit;
}
- if (arg != 1800 && arg != 3300)
+ if (arg != 1800 && arg != 2500 && arg != 3300)
return -EINVAL;
pocctrl = (void __iomem *)(uintptr_t)addr;
val = sh_pfc_read_raw_reg(pocctrl, 32);
- if (arg == 3300)
+ if (arg == ((pin->configs & SH_PFC_PIN_VOLTAGE_18_25) ? 2500 : 3300))
val |= BIT(bit);
else
val &= ~BIT(bit);
@@ -1025,6 +1029,14 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev)
if (model == SH_PFC_R8A779A0)
priv->pfc.info = &r8a779a0_pinmux_info;
#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A779F0
+ if (model == SH_PFC_R8A779F0)
+ priv->pfc.info = &r8a779f0_pinmux_info;
+#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A779G0
+ if (model == SH_PFC_R8A779G0)
+ priv->pfc.info = &r8a779g0_pinmux_info;
+#endif
priv->pmx.pfc = &priv->pfc;
sh_pfc_init_ranges(&priv->pfc);
@@ -1142,6 +1154,18 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = {
.data = SH_PFC_R8A779A0,
},
#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A779F0
+ {
+ .compatible = "renesas,pfc-r8a779f0",
+ .data = SH_PFC_R8A779F0,
+ },
+#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A779G0
+ {
+ .compatible = "renesas,pfc-r8a779g0",
+ .data = SH_PFC_R8A779G0,
+ },
+#endif
{ },
};