pinctrl: exynos: add support for Samsung's Exynos5250
Subsystems (5)
cover pinctrl: exynos: add support for Samsung's Exynos5250
This patch series adds 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(-)
PATCH 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.
--- 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(-)
drivers/pinctrl/pinctrl-exynos.c +108 -0
@@ -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" , + }, +};
drivers/pinctrl/pinctrl-samsung.c +2 -0
@@ -949,6 +949,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = { .data = (void *)exynos4210_pin_ctrl }, { .compatible = "samsung,pinctrl-exynos4x12", .data = (void *)exynos4x12_pin_ctrl }, + { .compatible = "samsung,pinctrl-exynos5250", + .data = (void *)exynos5250_pin_ctrl }, {}, };MODULE_DEVICE_TABLE (of, samsung_pinctrl_dt_match);
drivers/pinctrl/pinctrl-samsung.h +1 -0
@@ -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 */
Signature · 1 line
1.6.6.rc2
PATCH 2/3 gpio: samsung: skip gpiolib registration if pinctrl support is enabled for exynos5250
In reply to Thomas AbrahamSkip exynos5250 gpiolib registration if pinctrl support for exynos5250 is enabled.
--- drivers/gpio/gpio-samsung.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-samsung.c +1 -0
@@ -3026,6 +3026,7 @@ static __init int samsung_gpiolib_init(void)static const struct of_device_id exynos_pinctrl_ids[] = { { .compatible ="samsung,pinctrl-exynos4210" , }, { .compatible ="samsung,pinctrl-exynos4x12" , }, + { .compatible ="samsung,pinctrl-exynos5250" , }, };for_each_matching_node (pctrl_np, exynos_pinctrl_ids)if (pctrl_np &&of_device_is_available (pctrl_np))
Signature · 1 line
1.6.6.rc2
PATCH 3/3 arm: exynos: skip wakeup interrupt registration for exynos5250 if pinctrl is enabled
In reply to Thomas AbrahamSkip the wakeup interrupt registration for Exynos5250 if pinctrl support is enabled for Exynos5250.
--- arch/arm/mach-exynos/common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/common.c +1 -0
@@ -1019,6 +1019,7 @@ static int __init exynos_init_irq_eint(void)static const struct of_device_id exynos_pinctrl_ids[] = { { .compatible ="samsung,pinctrl-exynos4210" , }, { .compatible ="samsung,pinctrl-exynos4x12" , }, + { .compatible ="samsung,pinctrl-exynos5250" , }, };struct device_node *pctrl_np, *wkup_np;const char *wkup_compat ="samsung,exynos4210-wakeup-eint" ;
Signature · 1 line
1.6.6.rc2
Hi Thomas,
Quoted 21 lines · On Thursday 13 of December 2012 17:24:01 Thomas Abraham wrote:
This patch series adds 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 enabledarch/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(-)
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks good. For the whole series:
Best regards,
Signature · 3 lines
Tomasz Figa Samsung Poland R&D Center SW Solution Development, Linux Platform
Re: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
In reply to Thomas AbrahamQuoted 4 lines · Thomas Abraham
Add Samsung Exynos5250 SoC specific data to enable pinctrl support for all platforms based on Exynos5250.
Signed-off-by Thomas Abraham <[email protected]>
For this series, I guess you'll fix it through the Samsung tree?
Yours,
Linus Walleij
Re: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
Hi Linus,
Quoted 11 lines · Linus Walleij
Quoted 4 lines · Thomas Abraham
Add Samsung Exynos5250 SoC specific data to enable pinctrl support for all platforms based on Exynos5250.
Signed-off-by Thomas Abraham <[email protected]>Acked-by Linus Walleij <[email protected]>For this series, I guess you'll fix it through the Samsung tree?
Thanks for your ack. Since there are patches to be prepared for migrating the rest of Exynos5250 related code to the pinctrl framework, it would be easier if this series goes through the Samsung tree.
Thanks,
Thomas.
Quoted 3 lines
Yours,
Linus Walleij
Kukjin Kim
AppliedRE: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
Quoted 12 lines · Thomas Abraham
Hi Linus,
Quoted 8 lines · Linus Walleij
Quoted 4 lines · Thomas Abraham
Add Samsung Exynos5250 SoC specific data to enable pinctrl support for all platforms based on Exynos5250.
Signed-off-by Thomas Abraham <[email protected]>
Quoted 9 lines
Quoted 3 lines
Acked-by Linus Walleij <[email protected]>For this series, I guess you'll fix it through the Samsung tree?
Thanks for your ack. Since there are patches to be prepared for migrating the rest of Exynos5250 related code to the pinctrl framework, it would be easier if this series goes through the Samsung tree.
I applied this series, thanks.
And I think, would be clear if the config could be changed like following.
8<----------------------------------------------------------------------
From: Kukjin Kim <[email protected]>
Subject: [PATCH] pinctrl: exynos: change PINCTRL_EXYNOS option
Since pinctrl-exynos can support exynos4 and exynos5 so changed the option name to PINCTRL_EXYNOS for more clarity.
---
arch/arm/mach-exynos/Kconfig +1 -1
@@ -412,7 +412,7 @@ config MACH_EXYNOS4_DT select CPU_EXYNOS4210 select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD select PINCTRL - select PINCTRL_EXYNOS4 + select PINCTRL_EXYNOS select USE_OF help Machine support for Samsung Exynos4 machine with device tree
enabled.
drivers/pinctrl/Kconfig +2 -2
@@ -185,8 +185,8 @@ config PINCTRL_SAMSUNG select PINMUX select PINCONF -config PINCTRL_EXYNOS4 - bool "Pinctrl driver data for Exynos4 SoC" +config PINCTRL_EXYNOS + bool "Pinctrl driver data for Samsung EXYNOS SoCs" depends on OF && GPIOLIB select PINCTRL_SAMSUNG
drivers/pinctrl/Makefile +1 -1
@@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o -obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o +obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o
8<----------------------------------------------------------------------
- Kukjin
Linus Walleij
Acked-byRe: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
Quoted 6 lines · Kukjin Kim
And I think, would be clear if the config could be changed like following.
8<----------------------------------------------------------------------
From: Kukjin Kim <[email protected]>
Subject: [PATCH] pinctrl: exynos: changePINCTRL_EXYNOSoption
Quoted 7 lines
Since pinctrl-exynos can support exynos4 and exynos5 so changed the option name to
PINCTRL_EXYNOSfor more clarity.Cc Thomas Abraham <[email protected]>Cc Linus Walleij <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
Shall I take this into the pinctrl tree?
Yours,
Linus Walleij
RE: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
Quoted 5 lines · Linus Walleij
Quoted 1 line · Kukjin Kim
And I think, would be clear if the config could be changed like
following.
Quoted 8 lines
Quoted 8 lines
8<----------------------------------------------------------------------
From: Kukjin Kim <[email protected]>
Subject: [PATCH] pinctrl: exynos: changePINCTRL_EXYNOSoptionSince pinctrl-exynos can support exynos4 and exynos5 so changed the option name to
PINCTRL_EXYNOSfor more clarity.
Quoted 9 lines
Quoted 4 lines
Cc Thomas Abraham <[email protected]>Cc Linus Walleij <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Kukjin Kim <[email protected]>Acked-by Linus Walleij <[email protected]>Shall I take this into the pinctrl tree?
Yes, please :-)
Just note, regarding Samsung pinctrl changes in the following:git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
next/pinctrl-exynos
Thanks.
- Kukjin
Re: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
Quoted 19 lines · Kukjin Kim
Quoted 4 lines · Linus Walleij
Quoted 1 line · Kukjin Kim
And I think, would be clear if the config could be changed like
following.
Quoted 13 lines
Quoted 12 lines
8<----------------------------------------------------------------------
From: Kukjin Kim <[email protected]>
Subject: [PATCH] pinctrl: exynos: changePINCTRL_EXYNOSoptionSince pinctrl-exynos can support exynos4 and exynos5 so changed the option name to
PINCTRL_EXYNOSfor more clarity.Cc Thomas Abraham <[email protected]>Cc Linus Walleij <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
Quoted 5 lines
Quoted 4 lines
Acked-by Linus Walleij <[email protected]>Shall I take this into the pinctrl tree?
Yes, please :-)
OK I did.
Quoted 3 lines
Just note, regarding Samsung pinctrl changes in the following:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
next/pinctrl-exynos
Hm. I had to use patch -p1 < ... to apply the patch, which indicates there may be merge clashes.
Anyway, it's merged now.
Yours,
Linus Walleij
Re: [PATCH 1/3] pinctrl: exynos: add exynos5250 SoC specific data
In reply to Kukjin KimQuoted 15 lines · Kukjin Kim
Quoted 14 lines · Thomas Abraham
Hi Linus,
Quoted 10 lines · Linus Walleij
Quoted 4 lines · Thomas Abraham
Add Samsung Exynos5250 SoC specific data to enable pinctrl support for all platforms based on Exynos5250.
Signed-off-by Thomas Abraham <[email protected]>Acked-by Linus Walleij <[email protected]>
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
For this series, I guess you'll fix it through the Samsung tree?
Thanks for your ack. Since there are patches to be prepared for migrating the rest of Exynos5250 related code to the pinctrl framework, it would be easier if this series goes through the Samsung tree.
I applied this series, thanks.
This series has not made it into 3.9-rc1. So I will rebase this series to 3.9-rc1 and post again.
Thanks,
Thomas.
Quoted 61 lines
And I think, would be clear if the config could be changed like following.
8<----------------------------------------------------------------------
From: Kukjin Kim <[email protected]>
Subject: [PATCH] pinctrl: exynos: changePINCTRL_EXYNOSoptionSince pinctrl-exynos can support exynos4 and exynos5 so changed the option name to
PINCTRL_EXYNOSfor more clarity.Cc Thomas Abraham <[email protected]>Cc Linus Walleij <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
arch/arm/mach-exynos/Kconfig +1
-1@@ -412,7 +412,7 @@ config MACH_EXYNOS4_DT select CPU_EXYNOS4210 select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD select PINCTRL - select PINCTRL_EXYNOS4 + select PINCTRL_EXYNOS select USE_OF help Machine support for Samsung Exynos4 machine with device treeenabled.
drivers/pinctrl/Kconfig +2
-2@@ -185,8 +185,8 @@ config PINCTRL_SAMSUNG select PINMUX select PINCONF -config PINCTRL_EXYNOS4 - bool "Pinctrl driver data for Exynos4 SoC" +config PINCTRL_EXYNOS + bool "Pinctrl driver data for Samsung EXYNOS SoCs" depends on OF && GPIOLIB select PINCTRL_SAMSUNGdrivers/pinctrl/Makefile +1
-1@@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o -obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o +obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o8<----------------------------------------------------------------------
- Kukjin