2013-03-06 10:56:46

by Thomas Abraham

[permalink] [raw]
Subject: [PATCH v2 0/3] pinctrl: exynos: add support for Samsung's Exynos5250

Changes since v1:
- Change the compatible string from "samsung,pinctrl-exynos5250" to
"samsung,exynos5250-pinctrl".
- Rebased to v3.9-rc1

This patch series add pinctrl driver support for Samsung's Exynos5250 SoC.
The first patch adds the required Exynos5250 SoC specific data which is
used by the Samsung pinctrl driver to setup the pinctrl/pinmux/eint
controllers. The second and third patches skips the wakeup interrupt and
gpiolib registration if the pinctrl support is enabled for Exynos5250.

Thomas Abraham (3):
pinctrl: exynos: add exynos5250 SoC specific data
gpio: samsung: skip gpiolib registration if pinctrl support is enabled for exynos5250
arm: exynos: skip wakeup interrupt registration for exynos5250 if pinctrl is enabled

arch/arm/mach-exynos/common.c | 1 +
drivers/gpio/gpio-samsung.c | 1 +
drivers/pinctrl/pinctrl-exynos.c | 108 +++++++++++++++++++++++++++++++++++++
drivers/pinctrl/pinctrl-samsung.c | 2 +
drivers/pinctrl/pinctrl-samsung.h | 1 +
5 files changed, 113 insertions(+), 0 deletions(-)


2013-03-06 10:56:55

by Thomas Abraham

[permalink] [raw]
Subject: [PATCH v2 3/3] arm: exynos: skip wakeup interrupt registration for exynos5250 if pinctrl is enabled

Skip the wakeup interrupt registration for Exynos5250 if pinctrl support
is enabled for Exynos5250.

Signed-off-by: Thomas Abraham <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Acked-by: Linus Walleij <[email protected]>
---
arch/arm/mach-exynos/common.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d63d399..bdd9579 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -822,6 +822,7 @@ static int __init exynos_init_irq_eint(void)
static const struct of_device_id exynos_pinctrl_ids[] = {
{ .compatible = "samsung,exynos4210-pinctrl", },
{ .compatible = "samsung,exynos4x12-pinctrl", },
+ { .compatible = "samsung,exynos5250-pinctrl", },
};
struct device_node *pctrl_np, *wkup_np;
const char *wkup_compat = "samsung,exynos4210-wakeup-eint";
--
1.6.6.rc2

2013-03-06 10:56:52

by Thomas Abraham

[permalink] [raw]
Subject: [PATCH v2 2/3] gpio: samsung: skip gpiolib registration if pinctrl support is enabled for exynos5250

Skip exynos5250 gpiolib registration if pinctrl support for exynos5250
is enabled.

Signed-off-by: Thomas Abraham <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Acked-by: Linus Walleij <[email protected]>
---
drivers/gpio/gpio-samsung.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index b3643ff..49b4292 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -3024,6 +3024,7 @@ static __init int samsung_gpiolib_init(void)
static const struct of_device_id exynos_pinctrl_ids[] = {
{ .compatible = "samsung,exynos4210-pinctrl", },
{ .compatible = "samsung,exynos4x12-pinctrl", },
+ { .compatible = "samsung,exynos5250-pinctrl", },
{ .compatible = "samsung,exynos5440-pinctrl", },
};
for_each_matching_node(pctrl_np, exynos_pinctrl_ids)
--
1.6.6.rc2

2013-03-06 10:57:27

by Thomas Abraham

[permalink] [raw]
Subject: [PATCH v2 1/3] pinctrl: exynos: add exynos5250 SoC specific data

Add Samsung Exynos5250 SoC specific data to enable pinctrl support for
all platforms based on Exynos5250.

Signed-off-by: Thomas Abraham <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Acked-by: Linus Walleij <[email protected]>
---
drivers/pinctrl/pinctrl-exynos.c | 108 +++++++++++++++++++++++++++++++++++++
drivers/pinctrl/pinctrl-samsung.c | 2 +
drivers/pinctrl/pinctrl-samsung.h | 1 +
3 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c
index 538b9dd..8738933 100644
--- a/drivers/pinctrl/pinctrl-exynos.c
+++ b/drivers/pinctrl/pinctrl-exynos.c
@@ -677,3 +677,111 @@ struct samsung_pin_ctrl exynos4x12_pin_ctrl[] = {
.label = "exynos4x12-gpio-ctrl3",
},
};
+
+/* pin banks of exynos5250 pin-controller 0 */
+static struct samsung_pin_bank exynos5250_pin_banks0[] = {
+ EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04),
+ EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08),
+ EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpb0", 0x0c),
+ EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpb1", 0x10),
+ EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpb2", 0x14),
+ EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpb3", 0x18),
+ EXYNOS_PIN_BANK_EINTG(7, 0x0E0, "gpc0", 0x1c),
+ EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc1", 0x20),
+ EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc2", 0x24),
+ EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc3", 0x28),
+ EXYNOS_PIN_BANK_EINTG(4, 0x160, "gpd0", 0x2c),
+ EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x30),
+ EXYNOS_PIN_BANK_EINTG(7, 0x2E0, "gpc4", 0x34),
+ EXYNOS_PIN_BANK_EINTN(6, 0x1A0, "gpy0"),
+ EXYNOS_PIN_BANK_EINTN(4, 0x1C0, "gpy1"),
+ EXYNOS_PIN_BANK_EINTN(6, 0x1E0, "gpy2"),
+ EXYNOS_PIN_BANK_EINTN(8, 0x200, "gpy3"),
+ EXYNOS_PIN_BANK_EINTN(8, 0x220, "gpy4"),
+ EXYNOS_PIN_BANK_EINTN(8, 0x240, "gpy5"),
+ EXYNOS_PIN_BANK_EINTN(8, 0x260, "gpy6"),
+ EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00),
+ EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04),
+ EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08),
+ EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c),
+};
+
+/* pin banks of exynos5250 pin-controller 1 */
+static struct samsung_pin_bank exynos5250_pin_banks1[] = {
+ EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(2, 0x020, "gpe1", 0x04),
+ EXYNOS_PIN_BANK_EINTG(4, 0x040, "gpf0", 0x08),
+ EXYNOS_PIN_BANK_EINTG(4, 0x060, "gpf1", 0x0c),
+ EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10),
+ EXYNOS_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14),
+ EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpg2", 0x18),
+ EXYNOS_PIN_BANK_EINTG(4, 0x0E0, "gph0", 0x1c),
+ EXYNOS_PIN_BANK_EINTG(8, 0x100, "gph1", 0x20),
+};
+
+/* pin banks of exynos5250 pin-controller 2 */
+static struct samsung_pin_bank exynos5250_pin_banks2[] = {
+ EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04),
+ EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv2", 0x08),
+ EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpv3", 0x0c),
+ EXYNOS_PIN_BANK_EINTG(2, 0x0C0, "gpv4", 0x10),
+};
+
+/* pin banks of exynos5250 pin-controller 3 */
+static struct samsung_pin_bank exynos5250_pin_banks3[] = {
+ EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00),
+};
+
+/*
+ * Samsung pinctrl driver data for Exynos5250 SoC. Exynos5250 SoC includes
+ * four gpio/pin-mux/pinconfig controllers.
+ */
+struct samsung_pin_ctrl exynos5250_pin_ctrl[] = {
+ {
+ /* pin-controller instance 0 data */
+ .pin_banks = exynos5250_pin_banks0,
+ .nr_banks = ARRAY_SIZE(exynos5250_pin_banks0),
+ .geint_con = EXYNOS_GPIO_ECON_OFFSET,
+ .geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
+ .geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
+ .weint_con = EXYNOS_WKUP_ECON_OFFSET,
+ .weint_mask = EXYNOS_WKUP_EMASK_OFFSET,
+ .weint_pend = EXYNOS_WKUP_EPEND_OFFSET,
+ .svc = EXYNOS_SVC_OFFSET,
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .eint_wkup_init = exynos_eint_wkup_init,
+ .label = "exynos5250-gpio-ctrl0",
+ }, {
+ /* pin-controller instance 1 data */
+ .pin_banks = exynos5250_pin_banks1,
+ .nr_banks = ARRAY_SIZE(exynos5250_pin_banks1),
+ .geint_con = EXYNOS_GPIO_ECON_OFFSET,
+ .geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
+ .geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
+ .svc = EXYNOS_SVC_OFFSET,
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos5250-gpio-ctrl1",
+ }, {
+ /* pin-controller instance 2 data */
+ .pin_banks = exynos5250_pin_banks2,
+ .nr_banks = ARRAY_SIZE(exynos5250_pin_banks2),
+ .geint_con = EXYNOS_GPIO_ECON_OFFSET,
+ .geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
+ .geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
+ .svc = EXYNOS_SVC_OFFSET,
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos5250-gpio-ctrl2",
+ }, {
+ /* pin-controller instance 3 data */
+ .pin_banks = exynos5250_pin_banks3,
+ .nr_banks = ARRAY_SIZE(exynos5250_pin_banks3),
+ .geint_con = EXYNOS_GPIO_ECON_OFFSET,
+ .geint_mask = EXYNOS_GPIO_EMASK_OFFSET,
+ .geint_pend = EXYNOS_GPIO_EPEND_OFFSET,
+ .svc = EXYNOS_SVC_OFFSET,
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos5250-gpio-ctrl3",
+ },
+};
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index f206df1..3d5cf63 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -948,6 +948,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = {
.data = (void *)exynos4210_pin_ctrl },
{ .compatible = "samsung,exynos4x12-pinctrl",
.data = (void *)exynos4x12_pin_ctrl },
+ { .compatible = "samsung,exynos5250-pinctrl",
+ .data = (void *)exynos5250_pin_ctrl },
{},
};
MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match);
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h
index e2d4e67..ee964aa 100644
--- a/drivers/pinctrl/pinctrl-samsung.h
+++ b/drivers/pinctrl/pinctrl-samsung.h
@@ -237,5 +237,6 @@ struct samsung_pmx_func {
/* list of all exported SoC specific data */
extern struct samsung_pin_ctrl exynos4210_pin_ctrl[];
extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[];
+extern struct samsung_pin_ctrl exynos5250_pin_ctrl[];

#endif /* __PINCTRL_SAMSUNG_H */
--
1.6.6.rc2

2013-03-07 00:11:48

by Kukjin Kim

[permalink] [raw]
Subject: RE: [PATCH v2 0/3] pinctrl: exynos: add support for Samsung's Exynos5250

Thomas Abraham wrote:
>
> Changes since v1:
> - Change the compatible string from "samsung,pinctrl-exynos5250" to
> "samsung,exynos5250-pinctrl".
> - Rebased to v3.9-rc1
>

Thomas, this stuff is already in my tree for v3.10, and above changes
included in there. Do you want to replace with this patches?

- Kukjin

> This patch series add pinctrl driver support for Samsung's Exynos5250 SoC.
> The first patch adds the required Exynos5250 SoC specific data which is
> used by the Samsung pinctrl driver to setup the pinctrl/pinmux/eint
> controllers. The second and third patches skips the wakeup interrupt and
> gpiolib registration if the pinctrl support is enabled for Exynos5250.
>
> Thomas Abraham (3):
> pinctrl: exynos: add exynos5250 SoC specific data
> gpio: samsung: skip gpiolib registration if pinctrl support is enabled
> for exynos5250
> arm: exynos: skip wakeup interrupt registration for exynos5250 if
> pinctrl is enabled
>
> arch/arm/mach-exynos/common.c | 1 +
> drivers/gpio/gpio-samsung.c | 1 +
> drivers/pinctrl/pinctrl-exynos.c | 108
> +++++++++++++++++++++++++++++++++++++
> drivers/pinctrl/pinctrl-samsung.c | 2 +
> drivers/pinctrl/pinctrl-samsung.h | 1 +
> 5 files changed, 113 insertions(+), 0 deletions(-)

2013-03-07 03:22:49

by Thomas Abraham

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] pinctrl: exynos: add support for Samsung's Exynos5250

On 7 March 2013 05:41, Kukjin Kim <[email protected]> wrote:
> Thomas Abraham wrote:
>>
>> Changes since v1:
>> - Change the compatible string from "samsung,pinctrl-exynos5250" to
>> "samsung,exynos5250-pinctrl".
>> - Rebased to v3.9-rc1
>>
>
> Thomas, this stuff is already in my tree for v3.10, and above changes
> included in there. Do you want to replace with this patches?

Dear Mr. Kim,

The v2 version includes one fix for the compatilble string. It changes
the compatible string from "samsung,pinctrl-exynos5250" to
"samsung,exynos5250-pinctrl". So could you pick this v2 series instead
of the series which you have already merged.

Thanks,
Thomas.

>
> - Kukjin
>
>> This patch series add pinctrl driver support for Samsung's Exynos5250 SoC.
>> The first patch adds the required Exynos5250 SoC specific data which is
>> used by the Samsung pinctrl driver to setup the pinctrl/pinmux/eint
>> controllers. The second and third patches skips the wakeup interrupt and
>> gpiolib registration if the pinctrl support is enabled for Exynos5250.
>>
>> Thomas Abraham (3):
>> pinctrl: exynos: add exynos5250 SoC specific data
>> gpio: samsung: skip gpiolib registration if pinctrl support is enabled
>> for exynos5250
>> arm: exynos: skip wakeup interrupt registration for exynos5250 if
>> pinctrl is enabled
>>
>> arch/arm/mach-exynos/common.c | 1 +
>> drivers/gpio/gpio-samsung.c | 1 +
>> drivers/pinctrl/pinctrl-exynos.c | 108
>> +++++++++++++++++++++++++++++++++++++
>> drivers/pinctrl/pinctrl-samsung.c | 2 +
>> drivers/pinctrl/pinctrl-samsung.h | 1 +
>> 5 files changed, 113 insertions(+), 0 deletions(-)
>

2013-03-07 03:26:33

by Kukjin Kim

[permalink] [raw]
Subject: RE: [PATCH v2 0/3] pinctrl: exynos: add support for Samsung's Exynos5250

Thomas Abraham wrote:
>
> On 7 March 2013 05:41, Kukjin Kim <[email protected]> wrote:
> > Thomas Abraham wrote:
> >>
> >> Changes since v1:
> >> - Change the compatible string from "samsung,pinctrl-exynos5250" to
> >> "samsung,exynos5250-pinctrl".
> >> - Rebased to v3.9-rc1
> >>
> >
> > Thomas, this stuff is already in my tree for v3.10, and above changes
> > included in there. Do you want to replace with this patches?
>
> Dear Mr. Kim,
>
> The v2 version includes one fix for the compatilble string. It changes
> the compatible string from "samsung,pinctrl-exynos5250" to
> "samsung,exynos5250-pinctrl". So could you pick this v2 series instead
> of the series which you have already merged.
>

Hey, probably, you didn't check my tree. As I said, already changed/fixed.

- Kukjin

2013-03-07 08:08:34

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] pinctrl: exynos: add exynos5250 SoC specific data

On Wed, Mar 6, 2013 at 12:18 PM, Thomas Abraham
<[email protected]> wrote:

> Add Samsung Exynos5250 SoC specific data to enable pinctrl support for
> all platforms based on Exynos5250.
>
> Signed-off-by: Thomas Abraham <[email protected]>
> Reviewed-by: Tomasz Figa <[email protected]>
> Acked-by: Linus Walleij <[email protected]>

So shall I merge these three patches to the pinctrl tree or not?

Yours,
Linus Walleij

2013-03-07 11:09:35

by Kukjin Kim

[permalink] [raw]
Subject: RE: [PATCH v2 1/3] pinctrl: exynos: add exynos5250 SoC specific data

Linus Walleij wrote:
>
> On Wed, Mar 6, 2013 at 12:18 PM, Thomas Abraham
> <[email protected]> wrote:
>
> > Add Samsung Exynos5250 SoC specific data to enable pinctrl support for
> > all platforms based on Exynos5250.
> >
> > Signed-off-by: Thomas Abraham <[email protected]>
> > Reviewed-by: Tomasz Figa <[email protected]>
> > Acked-by: Linus Walleij <[email protected]>
>
> So shall I merge these three patches to the pinctrl tree or not?
>
Hi Linus, this series is already in Samsung tree with your ack.

Thanks.

- Kukjin

2013-03-08 07:09:24

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] pinctrl: exynos: add exynos5250 SoC specific data

On Thu, Mar 7, 2013 at 12:09 PM, Kukjin Kim <[email protected]> wrote:
> [Me]
>> So shall I merge these three patches to the pinctrl tree or not?
>>
> Hi Linus, this series is already in Samsung tree with your ack.

OK good, thanks!

Yours,
Linus Walleij