mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 10:06:42 +07:00
pinctrl: sh-pfc: r8a77990: Add R8A774C0 PFC support
Renesas RZ/G2E (a.k.a. r8a774c0) is pin compatible with R-Car E3 (a.k.a. r8a77990), however it doesn't have several automotive specific peripherals. Add a r8a77990 specific pin groups/functions along with common pin groups/functions for supporting both r8a77990 and r8a774c0 SoCs. Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> Reviewed-by: Biju Das <biju.das@bp.renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
c382e8ba7c
commit
9f2b76a2db
@ -60,6 +60,11 @@ config PINCTRL_PFC_R8A774A1
|
||||
depends on ARCH_R8A774A1
|
||||
select PINCTRL_SH_PFC
|
||||
|
||||
config PINCTRL_PFC_R8A774C0
|
||||
def_bool y
|
||||
depends on ARCH_R8A774C0
|
||||
select PINCTRL_SH_PFC
|
||||
|
||||
config PINCTRL_PFC_R8A7778
|
||||
def_bool y
|
||||
depends on ARCH_R8A7778
|
||||
|
@ -9,6 +9,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7744) += pfc-r8a7791.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A7745) += pfc-r8a7794.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o
|
||||
obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o
|
||||
|
@ -518,6 +518,12 @@ static const struct of_device_id sh_pfc_of_table[] = {
|
||||
.data = &r8a774a1_pinmux_info,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PINCTRL_PFC_R8A774C0
|
||||
{
|
||||
.compatible = "renesas,pfc-r8a774c0",
|
||||
.data = &r8a774c0_pinmux_info,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PINCTRL_PFC_R8A7778
|
||||
{
|
||||
.compatible = "renesas,pfc-r8a7778",
|
||||
|
@ -2389,7 +2389,11 @@ static const unsigned int usb30_id_mux[] = {
|
||||
USB3HS0_ID_MARK,
|
||||
};
|
||||
|
||||
static const struct sh_pfc_pin_group pinmux_groups[] = {
|
||||
static const struct {
|
||||
struct sh_pfc_pin_group common[117];
|
||||
struct sh_pfc_pin_group r8a77990[0];
|
||||
} pinmux_groups = {
|
||||
.common = {
|
||||
SH_PFC_PIN_GROUP(avb_link),
|
||||
SH_PFC_PIN_GROUP(avb_magic),
|
||||
SH_PFC_PIN_GROUP(avb_phy_int),
|
||||
@ -2507,6 +2511,7 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
|
||||
SH_PFC_PIN_GROUP(usb0_id),
|
||||
SH_PFC_PIN_GROUP(usb30),
|
||||
SH_PFC_PIN_GROUP(usb30_id),
|
||||
}
|
||||
};
|
||||
|
||||
static const char * const avb_groups[] = {
|
||||
@ -2710,7 +2715,11 @@ static const char * const usb30_groups[] = {
|
||||
"usb30_id",
|
||||
};
|
||||
|
||||
static const struct sh_pfc_function pinmux_functions[] = {
|
||||
static const struct {
|
||||
struct sh_pfc_function common[28];
|
||||
struct sh_pfc_function r8a77990[0];
|
||||
} pinmux_functions = {
|
||||
.common = {
|
||||
SH_PFC_FUNCTION(avb),
|
||||
SH_PFC_FUNCTION(du),
|
||||
SH_PFC_FUNCTION(i2c1),
|
||||
@ -2739,6 +2748,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
|
||||
SH_PFC_FUNCTION(scif_clk),
|
||||
SH_PFC_FUNCTION(usb0),
|
||||
SH_PFC_FUNCTION(usb30),
|
||||
}
|
||||
};
|
||||
|
||||
static const struct pinmux_cfg_reg pinmux_config_regs[] = {
|
||||
@ -3464,6 +3474,30 @@ static const struct sh_pfc_soc_operations r8a77990_pinmux_ops = {
|
||||
.set_bias = r8a77990_pinmux_set_bias,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PINCTRL_PFC_R8A774C0
|
||||
const struct sh_pfc_soc_info r8a774c0_pinmux_info = {
|
||||
.name = "r8a774c0_pfc",
|
||||
.ops = &r8a77990_pinmux_ops,
|
||||
.unlock_reg = 0xe6060000, /* PMMR */
|
||||
|
||||
.function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
|
||||
|
||||
.pins = pinmux_pins,
|
||||
.nr_pins = ARRAY_SIZE(pinmux_pins),
|
||||
.groups = pinmux_groups.common,
|
||||
.nr_groups = ARRAY_SIZE(pinmux_groups.common),
|
||||
.functions = pinmux_functions.common,
|
||||
.nr_functions = ARRAY_SIZE(pinmux_functions.common),
|
||||
|
||||
.cfg_regs = pinmux_config_regs,
|
||||
.bias_regs = pinmux_bias_regs,
|
||||
|
||||
.pinmux_data = pinmux_data,
|
||||
.pinmux_data_size = ARRAY_SIZE(pinmux_data),
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINCTRL_PFC_R8A77990
|
||||
const struct sh_pfc_soc_info r8a77990_pinmux_info = {
|
||||
.name = "r8a77990_pfc",
|
||||
.ops = &r8a77990_pinmux_ops,
|
||||
@ -3473,10 +3507,12 @@ const struct sh_pfc_soc_info r8a77990_pinmux_info = {
|
||||
|
||||
.pins = pinmux_pins,
|
||||
.nr_pins = ARRAY_SIZE(pinmux_pins),
|
||||
.groups = pinmux_groups,
|
||||
.nr_groups = ARRAY_SIZE(pinmux_groups),
|
||||
.functions = pinmux_functions,
|
||||
.nr_functions = ARRAY_SIZE(pinmux_functions),
|
||||
.groups = pinmux_groups.common,
|
||||
.nr_groups = ARRAY_SIZE(pinmux_groups.common) +
|
||||
ARRAY_SIZE(pinmux_groups.r8a77990),
|
||||
.functions = pinmux_functions.common,
|
||||
.nr_functions = ARRAY_SIZE(pinmux_functions.common) +
|
||||
ARRAY_SIZE(pinmux_functions.r8a77990),
|
||||
|
||||
.cfg_regs = pinmux_config_regs,
|
||||
.bias_regs = pinmux_bias_regs,
|
||||
@ -3484,3 +3520,4 @@ const struct sh_pfc_soc_info r8a77990_pinmux_info = {
|
||||
.pinmux_data = pinmux_data,
|
||||
.pinmux_data_size = ARRAY_SIZE(pinmux_data),
|
||||
};
|
||||
#endif
|
||||
|
@ -274,6 +274,7 @@ extern const struct sh_pfc_soc_info r8a7744_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a7745_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a77470_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a774a1_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a774c0_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a7778_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a7779_pinmux_info;
|
||||
extern const struct sh_pfc_soc_info r8a7790_pinmux_info;
|
||||
|
Loading…
Reference in New Issue
Block a user