aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Krawczuk <m.krawczuk@partner.samsung.com>2013-08-27 09:08:10 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-28 09:56:06 -0400
commit608a26a7bc04a39cfd7041f31ca2b2100113d14e (patch)
tree73e9541f43c81ad6c8c18e33ec8cd7990dbb1213
parent2f62eb9d64b04b4fdc0a2364801592e054ebc6df (diff)
pinctrl: Add s5pv210 support to pinctrl-exynos
This patch implements pinctrl support and adds device tree bindings for s5pv210. Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt3
-rw-r--r--drivers/pinctrl/Kconfig2
-rw-r--r--drivers/pinctrl/pinctrl-exynos.c58
-rw-r--r--drivers/pinctrl/pinctrl-samsung.c2
-rw-r--r--drivers/pinctrl/pinctrl-samsung.h1
5 files changed, 64 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index 36281e7a2a46..257677de3e6b 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -12,6 +12,7 @@ Required Properties:
12 - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller, 12 - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller,
13 - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller, 13 - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller,
14 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, 14 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller,
15 - "samsung,s5pv210-pinctrl": for S5PV210-compatible pin-controller,
15 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. 16 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller.
16 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. 17 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller.
17 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. 18 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
@@ -128,7 +129,7 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
128 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller 129 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller
129 found on Samsung S3C64xx SoCs, 130 found on Samsung S3C64xx SoCs,
130 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller 131 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
131 found on Samsung Exynos4210 SoC. 132 found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
132 - interrupt-parent: phandle of the interrupt parent to which the external 133 - interrupt-parent: phandle of the interrupt parent to which the external
133 wakeup interrupts are forwarded to. 134 wakeup interrupts are forwarded to.
134 - interrupts: interrupt used by multiplexed wakeup interrupts. 135 - interrupts: interrupt used by multiplexed wakeup interrupts.
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index b920901058e3..b6e864e8c9e8 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -252,7 +252,7 @@ config PINCTRL_SAMSUNG
252 252
253config PINCTRL_EXYNOS 253config PINCTRL_EXYNOS
254 bool "Pinctrl driver data for Samsung EXYNOS SoCs other than 5440" 254 bool "Pinctrl driver data for Samsung EXYNOS SoCs other than 5440"
255 depends on OF && GPIOLIB && ARCH_EXYNOS 255 depends on OF && GPIOLIB && (ARCH_EXYNOS || ARCH_S5PV210)
256 select PINCTRL_SAMSUNG 256 select PINCTRL_SAMSUNG
257 257
258config PINCTRL_EXYNOS5440 258config PINCTRL_EXYNOS5440
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c
index a74b3cbd7451..2689f8d01a1e 100644
--- a/drivers/pinctrl/pinctrl-exynos.c
+++ b/drivers/pinctrl/pinctrl-exynos.c
@@ -660,6 +660,64 @@ static void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata)
660 exynos_pinctrl_resume_bank(drvdata, bank); 660 exynos_pinctrl_resume_bank(drvdata, bank);
661} 661}
662 662
663/* pin banks of s5pv210 pin-controller */
664static struct samsung_pin_bank s5pv210_pin_bank[] = {
665 EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
666 EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
667 EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08),
668 EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c),
669 EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10),
670 EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
671 EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpd1", 0x18),
672 EXYNOS_PIN_BANK_EINTG(5, 0x0e0, "gpe0", 0x1c),
673 EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20),
674 EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpf0", 0x24),
675 EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpf1", 0x28),
676 EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpf2", 0x2c),
677 EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf3", 0x30),
678 EXYNOS_PIN_BANK_EINTG(7, 0x1a0, "gpg0", 0x34),
679 EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38),
680 EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c),
681 EXYNOS_PIN_BANK_EINTG(7, 0x200, "gpg3", 0x40),
682 EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"),
683 EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x44),
684 EXYNOS_PIN_BANK_EINTG(6, 0x260, "gpj1", 0x48),
685 EXYNOS_PIN_BANK_EINTG(8, 0x280, "gpj2", 0x4c),
686 EXYNOS_PIN_BANK_EINTG(8, 0x2a0, "gpj3", 0x50),
687 EXYNOS_PIN_BANK_EINTG(5, 0x2c0, "gpj4", 0x54),
688 EXYNOS_PIN_BANK_EINTN(8, 0x2e0, "mp01"),
689 EXYNOS_PIN_BANK_EINTN(4, 0x300, "mp02"),
690 EXYNOS_PIN_BANK_EINTN(8, 0x320, "mp03"),
691 EXYNOS_PIN_BANK_EINTN(8, 0x340, "mp04"),
692 EXYNOS_PIN_BANK_EINTN(8, 0x360, "mp05"),
693 EXYNOS_PIN_BANK_EINTN(8, 0x380, "mp06"),
694 EXYNOS_PIN_BANK_EINTN(8, 0x3a0, "mp07"),
695 EXYNOS_PIN_BANK_EINTW(8, 0xc00, "gph0", 0x00),
696 EXYNOS_PIN_BANK_EINTW(8, 0xc20, "gph1", 0x04),
697 EXYNOS_PIN_BANK_EINTW(8, 0xc40, "gph2", 0x08),
698 EXYNOS_PIN_BANK_EINTW(8, 0xc60, "gph3", 0x0c),
699};
700
701struct samsung_pin_ctrl s5pv210_pin_ctrl[] = {
702 {
703 /* pin-controller instance 0 data */
704 .pin_banks = s5pv210_pin_bank,
705 .nr_banks = ARRAY_SIZE(s5pv210_pin_bank),
706 .geint_con = EXYNOS_GPIO_ECON_OFFSET,
707 .geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
708 .geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
709 .weint_con = EXYNOS_WKUP_ECON_OFFSET,
710 .weint_mask = EXYNOS_WKUP_EMASK_OFFSET,
711 .weint_pend = EXYNOS_WKUP_EPEND_OFFSET,
712 .svc = EXYNOS_SVC_OFFSET,
713 .eint_gpio_init = exynos_eint_gpio_init,
714 .eint_wkup_init = exynos_eint_wkup_init,
715 .suspend = exynos_pinctrl_suspend,
716 .resume = exynos_pinctrl_resume,
717 .label = "s5pv210-gpio-ctrl0",
718 },
719};
720
663/* pin banks of exynos4210 pin-controller 0 */ 721/* pin banks of exynos4210 pin-controller 0 */
664static struct samsung_pin_bank exynos4210_pin_banks0[] = { 722static struct samsung_pin_bank exynos4210_pin_banks0[] = {
665 EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 723 EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index 222648d69f25..92a9d6c8db0a 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -1122,6 +1122,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = {
1122 .data = (void *)exynos5250_pin_ctrl }, 1122 .data = (void *)exynos5250_pin_ctrl },
1123 { .compatible = "samsung,exynos5420-pinctrl", 1123 { .compatible = "samsung,exynos5420-pinctrl",
1124 .data = (void *)exynos5420_pin_ctrl }, 1124 .data = (void *)exynos5420_pin_ctrl },
1125 { .compatible = "samsung,s5pv210-pinctrl",
1126 .data = (void *)s5pv210_pin_ctrl },
1125#endif 1127#endif
1126#ifdef CONFIG_PINCTRL_S3C64XX 1128#ifdef CONFIG_PINCTRL_S3C64XX
1127 { .compatible = "samsung,s3c64xx-pinctrl", 1129 { .compatible = "samsung,s3c64xx-pinctrl",
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h
index 11bb75ba81a9..30622d9afa2e 100644
--- a/drivers/pinctrl/pinctrl-samsung.h
+++ b/drivers/pinctrl/pinctrl-samsung.h
@@ -260,5 +260,6 @@ extern struct samsung_pin_ctrl s3c2412_pin_ctrl[];
260extern struct samsung_pin_ctrl s3c2416_pin_ctrl[]; 260extern struct samsung_pin_ctrl s3c2416_pin_ctrl[];
261extern struct samsung_pin_ctrl s3c2440_pin_ctrl[]; 261extern struct samsung_pin_ctrl s3c2440_pin_ctrl[];
262extern struct samsung_pin_ctrl s3c2450_pin_ctrl[]; 262extern struct samsung_pin_ctrl s3c2450_pin_ctrl[];
263extern struct samsung_pin_ctrl s5pv210_pin_ctrl[];
263 264
264#endif /* __PINCTRL_SAMSUNG_H */ 265#endif /* __PINCTRL_SAMSUNG_H */