diff options
author | Tomasz Figa <t.figa@samsung.com> | 2012-11-06 18:44:59 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-11-18 20:02:07 -0500 |
commit | 6edc794a5ff245faf60488d32e9fdbeb0aad2223 (patch) | |
tree | 9a38d9ac0cfec7fd84461abeb23e39d6c138ad6f | |
parent | bab797f8e36a4dd0476eda5197182aeea44e23db (diff) |
pinctrl: samsung: Add support for EXYNOS4X12
This patch extends the driver with any necessary SoC-specific
definitions to support EXYNOS4X12 SoCs.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | 1 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-exynos.c | 110 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.h | 1 |
4 files changed, 114 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index 63806e2d49c2..e97a27856b21 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -8,6 +8,7 @@ on-chip controllers onto these pads. | |||
8 | Required Properties: | 8 | Required Properties: |
9 | - compatible: should be one of the following. | 9 | - compatible: should be one of the following. |
10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. | 10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. |
11 | - "samsung,pinctrl-exynos4x12": for Exynos4x12 compatible pin-controller. | ||
11 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. | 12 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. |
12 | 13 | ||
13 | - reg: Base address of the pin controller hardware module and length of | 14 | - reg: Base address of the pin controller hardware module and length of |
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 73a0aa27cd56..19fab68a9fbf 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c | |||
@@ -566,3 +566,113 @@ struct samsung_pin_ctrl exynos4210_pin_ctrl[] = { | |||
566 | .label = "exynos4210-gpio-ctrl2", | 566 | .label = "exynos4210-gpio-ctrl2", |
567 | }, | 567 | }, |
568 | }; | 568 | }; |
569 | |||
570 | /* pin banks of exynos4x12 pin-controller 0 */ | ||
571 | static struct samsung_pin_bank exynos4x12_pin_banks0[] = { | ||
572 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), | ||
573 | EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), | ||
574 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), | ||
575 | EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), | ||
576 | EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), | ||
577 | EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), | ||
578 | EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), | ||
579 | EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), | ||
580 | EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), | ||
581 | EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), | ||
582 | EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), | ||
583 | EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x40), | ||
584 | EXYNOS_PIN_BANK_EINTG(5, 0x260, "gpj1", 0x44), | ||
585 | }; | ||
586 | |||
587 | /* pin banks of exynos4x12 pin-controller 1 */ | ||
588 | static struct samsung_pin_bank exynos4x12_pin_banks1[] = { | ||
589 | EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), | ||
590 | EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), | ||
591 | EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), | ||
592 | EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), | ||
593 | EXYNOS_PIN_BANK_EINTG(7, 0x0C0, "gpl0", 0x18), | ||
594 | EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpl1", 0x1c), | ||
595 | EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), | ||
596 | EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24), | ||
597 | EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28), | ||
598 | EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c), | ||
599 | EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30), | ||
600 | EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34), | ||
601 | EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), | ||
602 | EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), | ||
603 | EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), | ||
604 | EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), | ||
605 | EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), | ||
606 | EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), | ||
607 | EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), | ||
608 | EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), | ||
609 | EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), | ||
610 | EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), | ||
611 | EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), | ||
612 | }; | ||
613 | |||
614 | /* pin banks of exynos4x12 pin-controller 2 */ | ||
615 | static struct samsung_pin_bank exynos4x12_pin_banks2[] = { | ||
616 | EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), | ||
617 | }; | ||
618 | |||
619 | /* pin banks of exynos4x12 pin-controller 3 */ | ||
620 | static struct samsung_pin_bank exynos4x12_pin_banks3[] = { | ||
621 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), | ||
622 | EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), | ||
623 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpv2", 0x08), | ||
624 | EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv3", 0x0c), | ||
625 | EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpv4", 0x10), | ||
626 | }; | ||
627 | |||
628 | /* | ||
629 | * Samsung pinctrl driver data for Exynos4x12 SoC. Exynos4x12 SoC includes | ||
630 | * four gpio/pin-mux/pinconfig controllers. | ||
631 | */ | ||
632 | struct samsung_pin_ctrl exynos4x12_pin_ctrl[] = { | ||
633 | { | ||
634 | /* pin-controller instance 0 data */ | ||
635 | .pin_banks = exynos4x12_pin_banks0, | ||
636 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks0), | ||
637 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
638 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
639 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
640 | .svc = EXYNOS_SVC_OFFSET, | ||
641 | .eint_gpio_init = exynos_eint_gpio_init, | ||
642 | .label = "exynos4x12-gpio-ctrl0", | ||
643 | }, { | ||
644 | /* pin-controller instance 1 data */ | ||
645 | .pin_banks = exynos4x12_pin_banks1, | ||
646 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks1), | ||
647 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
648 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
649 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
650 | .weint_con = EXYNOS_WKUP_ECON_OFFSET, | ||
651 | .weint_mask = EXYNOS_WKUP_EMASK_OFFSET, | ||
652 | .weint_pend = EXYNOS_WKUP_EPEND_OFFSET, | ||
653 | .svc = EXYNOS_SVC_OFFSET, | ||
654 | .eint_gpio_init = exynos_eint_gpio_init, | ||
655 | .eint_wkup_init = exynos_eint_wkup_init, | ||
656 | .label = "exynos4x12-gpio-ctrl1", | ||
657 | }, { | ||
658 | /* pin-controller instance 2 data */ | ||
659 | .pin_banks = exynos4x12_pin_banks2, | ||
660 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks2), | ||
661 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
662 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
663 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
664 | .svc = EXYNOS_SVC_OFFSET, | ||
665 | .eint_gpio_init = exynos_eint_gpio_init, | ||
666 | .label = "exynos4x12-gpio-ctrl2", | ||
667 | }, { | ||
668 | /* pin-controller instance 3 data */ | ||
669 | .pin_banks = exynos4x12_pin_banks3, | ||
670 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks3), | ||
671 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
672 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
673 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
674 | .svc = EXYNOS_SVC_OFFSET, | ||
675 | .eint_gpio_init = exynos_eint_gpio_init, | ||
676 | .label = "exynos4x12-gpio-ctrl3", | ||
677 | }, | ||
678 | }; | ||
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index fc34cac8a1b0..81c9896d4f64 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -947,6 +947,8 @@ static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) | |||
947 | static const struct of_device_id samsung_pinctrl_dt_match[] = { | 947 | static const struct of_device_id samsung_pinctrl_dt_match[] = { |
948 | { .compatible = "samsung,pinctrl-exynos4210", | 948 | { .compatible = "samsung,pinctrl-exynos4210", |
949 | .data = (void *)exynos4210_pin_ctrl }, | 949 | .data = (void *)exynos4210_pin_ctrl }, |
950 | { .compatible = "samsung,pinctrl-exynos4x12", | ||
951 | .data = (void *)exynos4x12_pin_ctrl }, | ||
950 | {}, | 952 | {}, |
951 | }; | 953 | }; |
952 | MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match); | 954 | MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match); |
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index 0670d9ea43fa..5addfd16e3cc 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h | |||
@@ -236,5 +236,6 @@ struct samsung_pmx_func { | |||
236 | 236 | ||
237 | /* list of all exported SoC specific data */ | 237 | /* list of all exported SoC specific data */ |
238 | extern struct samsung_pin_ctrl exynos4210_pin_ctrl[]; | 238 | extern struct samsung_pin_ctrl exynos4210_pin_ctrl[]; |
239 | extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[]; | ||
239 | 240 | ||
240 | #endif /* __PINCTRL_SAMSUNG_H */ | 241 | #endif /* __PINCTRL_SAMSUNG_H */ |