Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: sh-pfc: r8a7796: Add R8A77961 PFC support

Add support for the Pin Function Controller in the R-Car M3-W+
(R8A77961) SoC.

R-Car M3-W+ is pin compatible with R-Car M3-W (R8A77960), which allows
for both SoCs to share a driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191023122955.12420-4-geert+renesas@glider.be

+40 -1
+4
drivers/pinctrl/sh-pfc/Kconfig
··· 28 28 select PINCTRL_PFC_R8A7794 if ARCH_R8A7794 29 29 select PINCTRL_PFC_R8A7795 if ARCH_R8A7795 30 30 select PINCTRL_PFC_R8A77960 if ARCH_R8A77960 || ARCH_R8A7796 31 + select PINCTRL_PFC_R8A77961 if ARCH_R8A77961 31 32 select PINCTRL_PFC_R8A77965 if ARCH_R8A77965 32 33 select PINCTRL_PFC_R8A77970 if ARCH_R8A77970 33 34 select PINCTRL_PFC_R8A77980 if ARCH_R8A77980 ··· 120 119 121 120 config PINCTRL_PFC_R8A77960 122 121 bool "R-Car M3-W pin control support" if COMPILE_TEST 122 + 123 + config PINCTRL_PFC_R8A77961 124 + bool "R-Car M3-W+ pin control support" if COMPILE_TEST 123 125 124 126 config PINCTRL_PFC_R8A77965 125 127 bool "R-Car M3-N pin control support" if COMPILE_TEST
+1
drivers/pinctrl/sh-pfc/Makefile
··· 21 21 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o 22 22 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795-es1.o 23 23 obj-$(CONFIG_PINCTRL_PFC_R8A77960) += pfc-r8a7796.o 24 + obj-$(CONFIG_PINCTRL_PFC_R8A77961) += pfc-r8a7796.o 24 25 obj-$(CONFIG_PINCTRL_PFC_R8A77965) += pfc-r8a77965.o 25 26 obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o 26 27 obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o
+6
drivers/pinctrl/sh-pfc/core.c
··· 587 587 .data = &r8a77960_pinmux_info, 588 588 }, 589 589 #endif 590 + #ifdef CONFIG_PINCTRL_PFC_R8A77961 591 + { 592 + .compatible = "renesas,pfc-r8a77961", 593 + .data = &r8a77961_pinmux_info, 594 + }, 595 + #endif 590 596 #ifdef CONFIG_PINCTRL_PFC_R8A77965 591 597 { 592 598 .compatible = "renesas,pfc-r8a77965",
+28 -1
drivers/pinctrl/sh-pfc/pfc-r8a7796.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * R8A7796 processor support - PFC hardware block. 3 + * R8A7796 (R-Car M3-W/W+) support - PFC hardware block. 4 4 * 5 5 * Copyright (C) 2016-2019 Renesas Electronics Corp. 6 6 * ··· 6213 6213 #ifdef CONFIG_PINCTRL_PFC_R8A77960 6214 6214 const struct sh_pfc_soc_info r8a77960_pinmux_info = { 6215 6215 .name = "r8a77960_pfc", 6216 + .ops = &r8a7796_pinmux_ops, 6217 + .unlock_reg = 0xe6060000, /* PMMR */ 6218 + 6219 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 6220 + 6221 + .pins = pinmux_pins, 6222 + .nr_pins = ARRAY_SIZE(pinmux_pins), 6223 + .groups = pinmux_groups.common, 6224 + .nr_groups = ARRAY_SIZE(pinmux_groups.common) + 6225 + ARRAY_SIZE(pinmux_groups.automotive), 6226 + .functions = pinmux_functions.common, 6227 + .nr_functions = ARRAY_SIZE(pinmux_functions.common) + 6228 + ARRAY_SIZE(pinmux_functions.automotive), 6229 + 6230 + .cfg_regs = pinmux_config_regs, 6231 + .drive_regs = pinmux_drive_regs, 6232 + .bias_regs = pinmux_bias_regs, 6233 + .ioctrl_regs = pinmux_ioctrl_regs, 6234 + 6235 + .pinmux_data = pinmux_data, 6236 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 6237 + }; 6238 + #endif 6239 + 6240 + #ifdef CONFIG_PINCTRL_PFC_R8A77961 6241 + const struct sh_pfc_soc_info r8a77961_pinmux_info = { 6242 + .name = "r8a77961_pfc", 6216 6243 .ops = &r8a7796_pinmux_ops, 6217 6244 .unlock_reg = 0xe6060000, /* PMMR */ 6218 6245
+1
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 321 321 extern const struct sh_pfc_soc_info r8a7795_pinmux_info; 322 322 extern const struct sh_pfc_soc_info r8a7795es1_pinmux_info; 323 323 extern const struct sh_pfc_soc_info r8a77960_pinmux_info; 324 + extern const struct sh_pfc_soc_info r8a77961_pinmux_info; 324 325 extern const struct sh_pfc_soc_info r8a77965_pinmux_info; 325 326 extern const struct sh_pfc_soc_info r8a77970_pinmux_info; 326 327 extern const struct sh_pfc_soc_info r8a77980_pinmux_info;