* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab
The following patches are tested based on Kgene's for-next tree.
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
http://comments.gmane.org/gmane.linux.kbuild.devel/12131
3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
Abhilash Kesavan (2):
pinctrl: exynos: Generalize the eint16_31 demux code
pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
Naveen Krishna Chatradhi (2):
pinctrl: exynos: Add initial driver data for Exynos7
arm64: dts: Add initial pinctrl support to EXYNOS7
.../bindings/pinctrl/samsung-pinctrl.txt | 3 +
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
8 files changed, 788 insertions(+), 11 deletions(-)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
--
1.7.9.5
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
The following patches are tested based on Kgene's for-next tree.
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
http://comments.gmane.org/gmane.linux.kbuild.devel/12131
3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
Abhilash Kesavan (2):
pinctrl: exynos: Generalize the eint16_31 demux code
pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
Naveen Krishna Chatradhi (2):
pinctrl: exynos: Add initial driver data for Exynos7
arm64: dts: Add initial pinctrl support to EXYNOS7
.../bindings/pinctrl/samsung-pinctrl.txt | 3 +
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
8 files changed, 788 insertions(+), 11 deletions(-)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
--
1.7.9.5
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 8:50 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab
The following patches are tested based on Kgene's for-next tree.
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
http://comments.gmane.org/gmane.linux.kbuild.devel/12131
3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
Abhilash Kesavan (2):
pinctrl: exynos: Generalize the eint16_31 demux code
pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
Naveen Krishna Chatradhi (2):
pinctrl: exynos: Add initial driver data for Exynos7
arm64: dts: Add initial pinctrl support to EXYNOS7
.../bindings/pinctrl/samsung-pinctrl.txt | 3 +
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
8 files changed, 788 insertions(+), 11 deletions(-)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
--
1.7.9.5
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
The following patches are tested based on Kgene's for-next tree.
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
http://comments.gmane.org/gmane.linux.kbuild.devel/12131
3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
Abhilash Kesavan (2):
pinctrl: exynos: Generalize the eint16_31 demux code
pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
Naveen Krishna Chatradhi (2):
pinctrl: exynos: Add initial driver data for Exynos7
arm64: dts: Add initial pinctrl support to EXYNOS7
.../bindings/pinctrl/samsung-pinctrl.txt | 3 +
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
8 files changed, 788 insertions(+), 11 deletions(-)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
--
1.7.9.5
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 1/4] pinctrl: exynos: Generalize the eint16_31 demux code
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 8:50 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab
The function exynos_irq_demux_eint16_31 uses pre-defined offsets for external
interrupt pending status and mask registers. So this function is not extensible
for Exynos7 SoC which have these registers at different offsets. So generalize
the exynos_irq_demux_eint16_31 function by using the pending/mask register
offset values from the exynos_irq_chip structure.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++++--
drivers/pinctrl/samsung/pinctrl-exynos.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 003bfd8..3133a1e 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -387,10 +387,11 @@ static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
chained_irq_enter(chip, desc);
for (i = 0; i < eintd->nr_banks; ++i) {
+ struct exynos_irq_chip *our_chip = eintd->chip;
struct samsung_pin_bank *b = eintd->banks[i];
- pend = readl(d->virt_base + EXYNOS_WKUP_EPEND_OFFSET
+ pend = readl(d->virt_base + our_chip->eint_pend
+ b->eint_offset);
- mask = readl(d->virt_base + EXYNOS_WKUP_EMASK_OFFSET
+ mask = readl(d->virt_base + our_chip->eint_mask
+ b->eint_offset);
exynos_irq_demux_eint(pend & ~mask, b->irq_domain);
}
@@ -508,6 +509,7 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
muxed_data->banks[idx++] = bank;
}
muxed_data->nr_banks = muxed_banks;
+ muxed_data->chip = &exynos_wkup_irq_chip;
return 0;
}
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
index 3c91c35..e060722 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.h
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
@@ -94,6 +94,7 @@ struct exynos_weint_data {
* @banks: array of banks being part of the mux
*/
struct exynos_muxed_weint_data {
+ struct exynos_irq_chip *chip;
unsigned int nr_banks;
struct samsung_pin_bank *banks[];
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 1/4] pinctrl: exynos: Generalize the eint16_31 demux code
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
The function exynos_irq_demux_eint16_31 uses pre-defined offsets for external
interrupt pending status and mask registers. So this function is not extensible
for Exynos7 SoC which have these registers at different offsets. So generalize
the exynos_irq_demux_eint16_31 function by using the pending/mask register
offset values from the exynos_irq_chip structure.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++++--
drivers/pinctrl/samsung/pinctrl-exynos.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 003bfd8..3133a1e 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -387,10 +387,11 @@ static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
chained_irq_enter(chip, desc);
for (i = 0; i < eintd->nr_banks; ++i) {
+ struct exynos_irq_chip *our_chip = eintd->chip;
struct samsung_pin_bank *b = eintd->banks[i];
- pend = readl(d->virt_base + EXYNOS_WKUP_EPEND_OFFSET
+ pend = readl(d->virt_base + our_chip->eint_pend
+ b->eint_offset);
- mask = readl(d->virt_base + EXYNOS_WKUP_EMASK_OFFSET
+ mask = readl(d->virt_base + our_chip->eint_mask
+ b->eint_offset);
exynos_irq_demux_eint(pend & ~mask, b->irq_domain);
}
@@ -508,6 +509,7 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
muxed_data->banks[idx++] = bank;
}
muxed_data->nr_banks = muxed_banks;
+ muxed_data->chip = &exynos_wkup_irq_chip;
return 0;
}
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
index 3c91c35..e060722 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.h
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
@@ -94,6 +94,7 @@ struct exynos_weint_data {
* @banks: array of banks being part of the mux
*/
struct exynos_muxed_weint_data {
+ struct exynos_irq_chip *chip;
unsigned int nr_banks;
struct samsung_pin_bank *banks[];
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 8:50 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab
Exynos7 uses different offsets for wakeup interrupt configuration registers.
So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
selection is now based on the wakeup interrupt controller compatible string.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
.../bindings/pinctrl/samsung-pinctrl.txt | 2 +
drivers/pinctrl/samsung/pinctrl-exynos.c | 42 +++++++++++++++-----
drivers/pinctrl/samsung/pinctrl-exynos.h | 3 ++
3 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index e82aaf4..f80519a 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -136,6 +136,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
found on Samsung S3C64xx SoCs,
- samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
+ - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
+ found on Samsung Exynos7 SoC.
- interrupt-parent: phandle of the interrupt parent to which the external
wakeup interrupts are forwarded to.
- interrupts: interrupt used by multiplexed wakeup interrupts.
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 3133a1e..fe15ab8 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -56,12 +56,6 @@ static struct samsung_pin_bank_type bank_type_alive = {
.reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
};
-/* list of external wakeup controllers supported */
-static const struct of_device_id exynos_wkup_irq_ids[] = {
- { .compatible = "samsung,exynos4210-wakeup-eint", },
- { }
-};
-
static void exynos_irq_mask(struct irq_data *irqd)
{
struct irq_chip *chip = irq_data_get_irq_chip(irqd);
@@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
/*
* irq_chip for wakeup interrupts
*/
-static struct exynos_irq_chip exynos_wkup_irq_chip = {
+static struct exynos_irq_chip exynos_wkup_irq_chip;
+
+static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
.chip = {
- .name = "exynos_wkup_irq_chip",
+ .name = "exynos4210_wkup_irq_chip",
.irq_unmask = exynos_irq_unmask,
.irq_mask = exynos_irq_mask,
.irq_ack = exynos_irq_ack,
@@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
.eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
};
+static struct exynos_irq_chip exynos7_wkup_irq_chip = {
+ .chip = {
+ .name = "exynos7_wkup_irq_chip",
+ .irq_unmask = exynos_irq_unmask,
+ .irq_mask = exynos_irq_mask,
+ .irq_ack = exynos_irq_ack,
+ .irq_set_type = exynos_irq_set_type,
+ .irq_set_wake = exynos_wkup_irq_set_wake,
+ },
+ .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
+ .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
+ .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
+};
+
+/* list of external wakeup controllers supported */
+static const struct of_device_id exynos_wkup_irq_ids[] = {
+ { .compatible = "samsung,exynos4210-wakeup-eint",
+ .data = &exynos4210_wkup_irq_chip },
+ { .compatible = "samsung,exynos7-wakeup-eint",
+ .data = &exynos7_wkup_irq_chip },
+ { }
+};
+
/* interrupt handler for wakeup interrupts 0..15 */
static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
{
@@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
int idx, irq;
for_each_child_of_node(dev->of_node, np) {
- if (of_match_node(exynos_wkup_irq_ids, np)) {
+ const struct of_device_id *match;
+
+ match = of_match_node(exynos_wkup_irq_ids, np);
+ if (match) {
+ memcpy(&exynos_wkup_irq_chip, match->data,
+ sizeof(struct exynos_irq_chip));
wkup_np = np;
break;
}
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
index e060722..0db1e52 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.h
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
@@ -25,6 +25,9 @@
#define EXYNOS_WKUP_ECON_OFFSET 0xE00
#define EXYNOS_WKUP_EMASK_OFFSET 0xF00
#define EXYNOS_WKUP_EPEND_OFFSET 0xF40
+#define EXYNOS7_WKUP_ECON_OFFSET 0x700
+#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
+#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
#define EXYNOS_SVC_OFFSET 0xB08
#define EXYNOS_EINT_FUNC 0xF
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Exynos7 uses different offsets for wakeup interrupt configuration registers.
So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
selection is now based on the wakeup interrupt controller compatible string.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
.../bindings/pinctrl/samsung-pinctrl.txt | 2 +
drivers/pinctrl/samsung/pinctrl-exynos.c | 42 +++++++++++++++-----
drivers/pinctrl/samsung/pinctrl-exynos.h | 3 ++
3 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index e82aaf4..f80519a 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -136,6 +136,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
found on Samsung S3C64xx SoCs,
- samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
+ - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
+ found on Samsung Exynos7 SoC.
- interrupt-parent: phandle of the interrupt parent to which the external
wakeup interrupts are forwarded to.
- interrupts: interrupt used by multiplexed wakeup interrupts.
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 3133a1e..fe15ab8 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -56,12 +56,6 @@ static struct samsung_pin_bank_type bank_type_alive = {
.reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
};
-/* list of external wakeup controllers supported */
-static const struct of_device_id exynos_wkup_irq_ids[] = {
- { .compatible = "samsung,exynos4210-wakeup-eint", },
- { }
-};
-
static void exynos_irq_mask(struct irq_data *irqd)
{
struct irq_chip *chip = irq_data_get_irq_chip(irqd);
@@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
/*
* irq_chip for wakeup interrupts
*/
-static struct exynos_irq_chip exynos_wkup_irq_chip = {
+static struct exynos_irq_chip exynos_wkup_irq_chip;
+
+static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
.chip = {
- .name = "exynos_wkup_irq_chip",
+ .name = "exynos4210_wkup_irq_chip",
.irq_unmask = exynos_irq_unmask,
.irq_mask = exynos_irq_mask,
.irq_ack = exynos_irq_ack,
@@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
.eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
};
+static struct exynos_irq_chip exynos7_wkup_irq_chip = {
+ .chip = {
+ .name = "exynos7_wkup_irq_chip",
+ .irq_unmask = exynos_irq_unmask,
+ .irq_mask = exynos_irq_mask,
+ .irq_ack = exynos_irq_ack,
+ .irq_set_type = exynos_irq_set_type,
+ .irq_set_wake = exynos_wkup_irq_set_wake,
+ },
+ .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
+ .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
+ .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
+};
+
+/* list of external wakeup controllers supported */
+static const struct of_device_id exynos_wkup_irq_ids[] = {
+ { .compatible = "samsung,exynos4210-wakeup-eint",
+ .data = &exynos4210_wkup_irq_chip },
+ { .compatible = "samsung,exynos7-wakeup-eint",
+ .data = &exynos7_wkup_irq_chip },
+ { }
+};
+
/* interrupt handler for wakeup interrupts 0..15 */
static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
{
@@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
int idx, irq;
for_each_child_of_node(dev->of_node, np) {
- if (of_match_node(exynos_wkup_irq_ids, np)) {
+ const struct of_device_id *match;
+
+ match = of_match_node(exynos_wkup_irq_ids, np);
+ if (match) {
+ memcpy(&exynos_wkup_irq_chip, match->data,
+ sizeof(struct exynos_irq_chip));
wkup_np = np;
break;
}
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
index e060722..0db1e52 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.h
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
@@ -25,6 +25,9 @@
#define EXYNOS_WKUP_ECON_OFFSET 0xE00
#define EXYNOS_WKUP_EMASK_OFFSET 0xF00
#define EXYNOS_WKUP_EPEND_OFFSET 0xF40
+#define EXYNOS7_WKUP_ECON_OFFSET 0x700
+#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
+#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
#define EXYNOS_SVC_OFFSET 0xB08
#define EXYNOS_EINT_FUNC 0xF
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 3/4] pinctrl: exynos: Add initial driver data for Exynos7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 8:50 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab,
Naveen Krishna Chatradhi
From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
This patch adds initial driver data for Exynos7 pinctrl support.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
.../bindings/pinctrl/samsung-pinctrl.txt | 1 +
drivers/pinctrl/samsung/pinctrl-exynos.c | 113 ++++++++++++++++++++
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
4 files changed, 117 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index f80519a..8425838 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -18,6 +18,7 @@ Required Properties:
- "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
- "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller.
- "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
+ - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller.
- reg: Base address of the pin controller hardware module and length of
the address space it occupies.
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index fe15ab8..1ebd080 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -1147,3 +1147,116 @@ struct samsung_pin_ctrl exynos5420_pin_ctrl[] = {
.label = "exynos5420-gpio-ctrl4",
},
};
+
+/* pin banks of exynos7 pin-controller - ALIVE */
+static struct samsung_pin_bank exynos7_pin_banks0[] = {
+ EXYNOS_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00),
+ EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04),
+ EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08),
+ EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c),
+};
+
+/* pin banks of exynos7 pin-controller - BUS0 */
+static struct samsung_pin_bank exynos7_pin_banks1[] = {
+ EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc0", 0x04),
+ EXYNOS_PIN_BANK_EINTG(2, 0x040, "gpc1", 0x08),
+ EXYNOS_PIN_BANK_EINTG(6, 0x060, "gpc2", 0x0c),
+ EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpc3", 0x10),
+ EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
+ EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18),
+ EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpd2", 0x1c),
+ EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpd4", 0x20),
+ EXYNOS_PIN_BANK_EINTG(4, 0x120, "gpd5", 0x24),
+ EXYNOS_PIN_BANK_EINTG(6, 0x140, "gpd6", 0x28),
+ EXYNOS_PIN_BANK_EINTG(3, 0x160, "gpd7", 0x2c),
+ EXYNOS_PIN_BANK_EINTG(2, 0x180, "gpd8", 0x30),
+ EXYNOS_PIN_BANK_EINTG(2, 0x1a0, "gpg0", 0x34),
+ EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpg3", 0x38),
+};
+
+/* pin banks of exynos7 pin-controller - NFC */
+static struct samsung_pin_bank exynos7_pin_banks2[] = {
+ EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - TOUCH */
+static struct samsung_pin_bank exynos7_pin_banks3[] = {
+ EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FF */
+static struct samsung_pin_bank exynos7_pin_banks4[] = {
+ EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpg4", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - ESE */
+static struct samsung_pin_bank exynos7_pin_banks5[] = {
+ EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpv7", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FSYS0 */
+static struct samsung_pin_bank exynos7_pin_banks6[] = {
+ EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpr4", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FSYS1 */
+static struct samsung_pin_bank exynos7_pin_banks7[] = {
+ EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpr0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpr1", 0x04),
+ EXYNOS_PIN_BANK_EINTG(5, 0x040, "gpr2", 0x08),
+ EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpr3", 0x0c),
+};
+
+struct samsung_pin_ctrl exynos7_pin_ctrl[] = {
+ {
+ /* pin-controller instance 0 Alive data */
+ .pin_banks = exynos7_pin_banks0,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks0),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .eint_wkup_init = exynos_eint_wkup_init,
+ .label = "exynos7-gpio-ctrl0",
+ }, {
+ /* pin-controller instance 1 BUS0 data */
+ .pin_banks = exynos7_pin_banks1,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks1),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl1",
+ }, {
+ /* pin-controller instance 2 NFC data */
+ .pin_banks = exynos7_pin_banks2,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks2),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl2",
+ }, {
+ /* pin-controller instance 3 TOUCH data */
+ .pin_banks = exynos7_pin_banks3,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks3),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl3",
+ }, {
+ /* pin-controller instance 4 FF data */
+ .pin_banks = exynos7_pin_banks4,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks4),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl4",
+ }, {
+ /* pin-controller instance 5 ESE data */
+ .pin_banks = exynos7_pin_banks5,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks5),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl5",
+ }, {
+ /* pin-controller instance 6 FSYS0 data */
+ .pin_banks = exynos7_pin_banks6,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks6),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl6",
+ }, {
+ /* pin-controller instance 7 FSYS1 data */
+ .pin_banks = exynos7_pin_banks7,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks7),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl7",
+ },
+};
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index b07406d..dd996b2f 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -1232,6 +1232,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = {
.data = (void *)exynos5420_pin_ctrl },
{ .compatible = "samsung,s5pv210-pinctrl",
.data = (void *)s5pv210_pin_ctrl },
+ { .compatible = "samsung,exynos7-pinctrl",
+ .data = (void *)exynos7_pin_ctrl },
#endif
#ifdef CONFIG_PINCTRL_S3C64XX
{ .compatible = "samsung,s3c64xx-pinctrl",
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h
index 2b88232..d070a6d 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.h
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.h
@@ -241,6 +241,7 @@ extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5250_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5260_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5420_pin_ctrl[];
+extern struct samsung_pin_ctrl exynos7_pin_ctrl[];
extern struct samsung_pin_ctrl s3c64xx_pin_ctrl[];
extern struct samsung_pin_ctrl s3c2412_pin_ctrl[];
extern struct samsung_pin_ctrl s3c2416_pin_ctrl[];
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 3/4] pinctrl: exynos: Add initial driver data for Exynos7
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
This patch adds initial driver data for Exynos7 pinctrl support.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
.../bindings/pinctrl/samsung-pinctrl.txt | 1 +
drivers/pinctrl/samsung/pinctrl-exynos.c | 113 ++++++++++++++++++++
drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
4 files changed, 117 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index f80519a..8425838 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -18,6 +18,7 @@ Required Properties:
- "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
- "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller.
- "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
+ - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller.
- reg: Base address of the pin controller hardware module and length of
the address space it occupies.
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index fe15ab8..1ebd080 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -1147,3 +1147,116 @@ struct samsung_pin_ctrl exynos5420_pin_ctrl[] = {
.label = "exynos5420-gpio-ctrl4",
},
};
+
+/* pin banks of exynos7 pin-controller - ALIVE */
+static struct samsung_pin_bank exynos7_pin_banks0[] = {
+ EXYNOS_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00),
+ EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04),
+ EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08),
+ EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c),
+};
+
+/* pin banks of exynos7 pin-controller - BUS0 */
+static struct samsung_pin_bank exynos7_pin_banks1[] = {
+ EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpc0", 0x04),
+ EXYNOS_PIN_BANK_EINTG(2, 0x040, "gpc1", 0x08),
+ EXYNOS_PIN_BANK_EINTG(6, 0x060, "gpc2", 0x0c),
+ EXYNOS_PIN_BANK_EINTG(8, 0x080, "gpc3", 0x10),
+ EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14),
+ EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18),
+ EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpd2", 0x1c),
+ EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpd4", 0x20),
+ EXYNOS_PIN_BANK_EINTG(4, 0x120, "gpd5", 0x24),
+ EXYNOS_PIN_BANK_EINTG(6, 0x140, "gpd6", 0x28),
+ EXYNOS_PIN_BANK_EINTG(3, 0x160, "gpd7", 0x2c),
+ EXYNOS_PIN_BANK_EINTG(2, 0x180, "gpd8", 0x30),
+ EXYNOS_PIN_BANK_EINTG(2, 0x1a0, "gpg0", 0x34),
+ EXYNOS_PIN_BANK_EINTG(4, 0x1c0, "gpg3", 0x38),
+};
+
+/* pin banks of exynos7 pin-controller - NFC */
+static struct samsung_pin_bank exynos7_pin_banks2[] = {
+ EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj0", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - TOUCH */
+static struct samsung_pin_bank exynos7_pin_banks3[] = {
+ EXYNOS_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FF */
+static struct samsung_pin_bank exynos7_pin_banks4[] = {
+ EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpg4", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - ESE */
+static struct samsung_pin_bank exynos7_pin_banks5[] = {
+ EXYNOS_PIN_BANK_EINTG(5, 0x000, "gpv7", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FSYS0 */
+static struct samsung_pin_bank exynos7_pin_banks6[] = {
+ EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpr4", 0x00),
+};
+
+/* pin banks of exynos7 pin-controller - FSYS1 */
+static struct samsung_pin_bank exynos7_pin_banks7[] = {
+ EXYNOS_PIN_BANK_EINTG(4, 0x000, "gpr0", 0x00),
+ EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpr1", 0x04),
+ EXYNOS_PIN_BANK_EINTG(5, 0x040, "gpr2", 0x08),
+ EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpr3", 0x0c),
+};
+
+struct samsung_pin_ctrl exynos7_pin_ctrl[] = {
+ {
+ /* pin-controller instance 0 Alive data */
+ .pin_banks = exynos7_pin_banks0,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks0),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .eint_wkup_init = exynos_eint_wkup_init,
+ .label = "exynos7-gpio-ctrl0",
+ }, {
+ /* pin-controller instance 1 BUS0 data */
+ .pin_banks = exynos7_pin_banks1,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks1),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl1",
+ }, {
+ /* pin-controller instance 2 NFC data */
+ .pin_banks = exynos7_pin_banks2,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks2),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl2",
+ }, {
+ /* pin-controller instance 3 TOUCH data */
+ .pin_banks = exynos7_pin_banks3,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks3),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl3",
+ }, {
+ /* pin-controller instance 4 FF data */
+ .pin_banks = exynos7_pin_banks4,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks4),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl4",
+ }, {
+ /* pin-controller instance 5 ESE data */
+ .pin_banks = exynos7_pin_banks5,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks5),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl5",
+ }, {
+ /* pin-controller instance 6 FSYS0 data */
+ .pin_banks = exynos7_pin_banks6,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks6),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl6",
+ }, {
+ /* pin-controller instance 7 FSYS1 data */
+ .pin_banks = exynos7_pin_banks7,
+ .nr_banks = ARRAY_SIZE(exynos7_pin_banks7),
+ .eint_gpio_init = exynos_eint_gpio_init,
+ .label = "exynos7-gpio-ctrl7",
+ },
+};
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index b07406d..dd996b2f 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -1232,6 +1232,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = {
.data = (void *)exynos5420_pin_ctrl },
{ .compatible = "samsung,s5pv210-pinctrl",
.data = (void *)s5pv210_pin_ctrl },
+ { .compatible = "samsung,exynos7-pinctrl",
+ .data = (void *)exynos7_pin_ctrl },
#endif
#ifdef CONFIG_PINCTRL_S3C64XX
{ .compatible = "samsung,s3c64xx-pinctrl",
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h
index 2b88232..d070a6d 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.h
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.h
@@ -241,6 +241,7 @@ extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5250_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5260_pin_ctrl[];
extern struct samsung_pin_ctrl exynos5420_pin_ctrl[];
+extern struct samsung_pin_ctrl exynos7_pin_ctrl[];
extern struct samsung_pin_ctrl s3c64xx_pin_ctrl[];
extern struct samsung_pin_ctrl s3c2412_pin_ctrl[];
extern struct samsung_pin_ctrl s3c2416_pin_ctrl[];
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 8:50 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, tomasz.figa, linus.walleij, thomas.ab,
Naveen Krishna Chatradhi
From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Add intial pin configuration nodes for EXYNOS7.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Abraham <thomas.ab@samsung.com>
---
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
3 files changed, 628 insertions(+)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b4d1dc2..0dcf6f5 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -143,6 +143,8 @@ config ARCH_EXYNOS7
bool "ARMv8 based Samsung Exynos7"
select ARCH_EXYNOS
select COMMON_CLK_SAMSUNG
+ select PINCTRL
+ select PINCTRL_EXYNOS
help
This enables support for Samsung Exynos7 SoC family
diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
new file mode 100644
index 0000000..d858805
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
@@ -0,0 +1,560 @@
+/*
+ * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
+ * device tree nodes in this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+&pinctrl_alive {
+ gpa0: gpa0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ interrupt-parent = <&gic>;
+ #interrupt-cells = <2>;
+ interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
+ <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
+ };
+
+ gpa1: gpa1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ interrupt-parent = <&gic>;
+ #interrupt-cells = <2>;
+ interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
+ <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
+ };
+
+ gpa2: gpa2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpa3: gpa3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_bus0 {
+ gpb0: gpb0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc0: gpc0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc1: gpc1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc2: gpc2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc3: gpc3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd0: gpd0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd1: gpd1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd2: gpd2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd4: gpd4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd5: gpd5 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd6: gpd6 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd7: gpd7 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd8: gpd8 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg0: gpg0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg3: gpg3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c10_bus: hs-i2c10-bus {
+ samsung,pins = "gpb0-1", "gpb0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c11_bus: hs-i2c11-bus {
+ samsung,pins = "gpb0-3", "gpb0-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c2_bus: hs-i2c2-bus {
+ samsung,pins = "gpd0-3", "gpd0-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart0_data: uart0-data {
+ samsung,pins = "gpd0-0", "gpd0-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart0_fctl: uart0-fctl {
+ samsung,pins = "gpd0-2", "gpd0-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart2_data: uart2-data {
+ samsung,pins = "gpd1-4", "gpd1-5";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c3_bus: hs-i2c3-bus {
+ samsung,pins = "gpd1-3", "gpd1-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart1_data: uart1-data {
+ samsung,pins = "gpd1-0", "gpd1-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart1_fctl: uart1-fctl {
+ samsung,pins = "gpd1-2", "gpd1-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c0_bus: hs-i2c0-bus {
+ samsung,pins = "gpd2-1", "gpd2-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c1_bus: hs-i2c1-bus {
+ samsung,pins = "gpd2-3", "gpd2-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c9_bus: hs-i2c9-bus {
+ samsung,pins = "gpd2-7", "gpd2-6";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c8_bus: hs-i2c8-bus {
+ samsung,pins = "gpd5-3", "gpd5-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart3_data: uart3-data {
+ samsung,pins = "gpd5-0", "gpd5-1";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi2_bus: spi2-bus {
+ samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi1_bus: spi1-bus {
+ samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi0_bus: spi0-bus {
+ samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c4_bus: hs-i2c4-bus {
+ samsung,pins = "gpg3-1", "gpg3-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c5_bus: hs-i2c5-bus {
+ samsung,pins = "gpg3-3", "gpg3-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_nfc {
+ gpj0: gpj0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c6_bus: hs-i2c6-bus {
+ samsung,pins = "gpj0-1", "gpj0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_touch {
+ gpj1: gpj1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c7_bus: hs-i2c7-bus {
+ samsung,pins = "gpj1-1", "gpj1-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_ff {
+ gpg4: gpg4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ spi3_bus: spi3-bus {
+ samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_ese {
+ gpv7: gpv7 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ spi4_bus: spi4-bus {
+ samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_fsys0 {
+ gpr4: gpr4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ sd2_clk: sd2-clk {
+ samsung,pins = "gpr4-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_cmd: sd2-cmd {
+ samsung,pins = "gpr4-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_cd: sd2-cd {
+ samsung,pins = "gpr4-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_bus1: sd2-bus-width1 {
+ samsung,pins = "gpr4-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_bus4: sd2-bus-width4 {
+ samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+};
+
+&pinctrl_fsys1 {
+ gpr0: gpr0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr1: gpr1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr2: gpr2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr3: gpr3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ sd0_clk: sd0-clk {
+ samsung,pins = "gpr0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_cmd: sd0-cmd {
+ samsung,pins = "gpr0-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_rdqs: sd0-rdqs {
+ samsung,pins = "gpr0-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_qrdy: sd0-qrdy {
+ samsung,pins = "gpr0-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus1: sd0-bus-width1 {
+ samsung,pins = "gpr1-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus4: sd0-bus-width4 {
+ samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus8: sd0-bus-width8 {
+ samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd1_clk: sd1-clk {
+ samsung,pins = "gpr2-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_cmd: sd1-cmd {
+ samsung,pins = "gpr2-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_ds: sd1-ds {
+ samsung,pins = "gpr2-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_qrdy: sd1-qrdy {
+ samsung,pins = "gpr2-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_int: sd1-int {
+ samsung,pins = "gpr2-4";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_bus1: sd1-bus-width1 {
+ samsung,pins = "gpr3-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_bus4: sd1-bus-width4 {
+ samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_bus8: sd1-bus-width8 {
+ samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+};
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index c5b1b86..f8a07cc 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -17,6 +17,17 @@
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ pinctrl0 = &pinctrl_alive;
+ pinctrl1 = &pinctrl_bus0;
+ pinctrl2 = &pinctrl_nfc;
+ pinctrl3 = &pinctrl_touch;
+ pinctrl4 = &pinctrl_ff;
+ pinctrl5 = &pinctrl_ese;
+ pinctrl6 = &pinctrl_fsys0;
+ pinctrl7 = &pinctrl_fsys1;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -149,6 +160,59 @@
status = "disabled";
};
+ pinctrl_alive: pinctrl@10580000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x10580000 0x1000>;
+
+ wakeup-interrupt-controller {
+ compatible = "samsung,exynos7-wakeup-eint";
+ interrupt-parent = <&gic>;
+ interrupts = <0 16 0>;
+ };
+ };
+
+ pinctrl_bus0: pinctrl@13470000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x13470000 0x1000>;
+ interrupts = <0 383 0>;
+ };
+
+ pinctrl_nfc: pinctrl@14cd0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14cd0000 0x1000>;
+ interrupts = <0 473 0>;
+ };
+
+ pinctrl_touch: pinctrl@14ce0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14ce0000 0x1000>;
+ interrupts = <0 474 0>;
+ };
+
+ pinctrl_ff: pinctrl@14c90000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14c90000 0x1000>;
+ interrupts = <0 475 0>;
+ };
+
+ pinctrl_ese: pinctrl@14ca0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14ca0000 0x1000>;
+ interrupts = <0 476 0>;
+ };
+
+ pinctrl_fsys0: pinctrl@10e60000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x10e60000 0x1000>;
+ interrupts = <0 221 0>;
+ };
+
+ pinctrl_fsys1: pinctrl@15690000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x15690000 0x1000>;
+ interrupts = <0 203 0>;
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <1 13 0xff01>,
@@ -158,3 +222,5 @@
};
};
};
+
+#include "exynos7-pinctrl.dtsi"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
@ 2014-09-13 8:50 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-13 8:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Add intial pin configuration nodes for EXYNOS7.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Abraham <thomas.ab@samsung.com>
---
arch/arm64/Kconfig | 2 +
arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
3 files changed, 628 insertions(+)
create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b4d1dc2..0dcf6f5 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -143,6 +143,8 @@ config ARCH_EXYNOS7
bool "ARMv8 based Samsung Exynos7"
select ARCH_EXYNOS
select COMMON_CLK_SAMSUNG
+ select PINCTRL
+ select PINCTRL_EXYNOS
help
This enables support for Samsung Exynos7 SoC family
diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
new file mode 100644
index 0000000..d858805
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
@@ -0,0 +1,560 @@
+/*
+ * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
+ * device tree nodes in this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+&pinctrl_alive {
+ gpa0: gpa0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ interrupt-parent = <&gic>;
+ #interrupt-cells = <2>;
+ interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
+ <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
+ };
+
+ gpa1: gpa1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ interrupt-parent = <&gic>;
+ #interrupt-cells = <2>;
+ interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
+ <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
+ };
+
+ gpa2: gpa2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpa3: gpa3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_bus0 {
+ gpb0: gpb0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc0: gpc0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc1: gpc1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc2: gpc2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpc3: gpc3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd0: gpd0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd1: gpd1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd2: gpd2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd4: gpd4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd5: gpd5 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd6: gpd6 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd7: gpd7 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpd8: gpd8 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg0: gpg0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg3: gpg3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c10_bus: hs-i2c10-bus {
+ samsung,pins = "gpb0-1", "gpb0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c11_bus: hs-i2c11-bus {
+ samsung,pins = "gpb0-3", "gpb0-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c2_bus: hs-i2c2-bus {
+ samsung,pins = "gpd0-3", "gpd0-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart0_data: uart0-data {
+ samsung,pins = "gpd0-0", "gpd0-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart0_fctl: uart0-fctl {
+ samsung,pins = "gpd0-2", "gpd0-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart2_data: uart2-data {
+ samsung,pins = "gpd1-4", "gpd1-5";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c3_bus: hs-i2c3-bus {
+ samsung,pins = "gpd1-3", "gpd1-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart1_data: uart1-data {
+ samsung,pins = "gpd1-0", "gpd1-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart1_fctl: uart1-fctl {
+ samsung,pins = "gpd1-2", "gpd1-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c0_bus: hs-i2c0-bus {
+ samsung,pins = "gpd2-1", "gpd2-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c1_bus: hs-i2c1-bus {
+ samsung,pins = "gpd2-3", "gpd2-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c9_bus: hs-i2c9-bus {
+ samsung,pins = "gpd2-7", "gpd2-6";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c8_bus: hs-i2c8-bus {
+ samsung,pins = "gpd5-3", "gpd5-2";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ uart3_data: uart3-data {
+ samsung,pins = "gpd5-0", "gpd5-1";
+ samsung,pin-function = <3>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi2_bus: spi2-bus {
+ samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi1_bus: spi1-bus {
+ samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ spi0_bus: spi0-bus {
+ samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c4_bus: hs-i2c4-bus {
+ samsung,pins = "gpg3-1", "gpg3-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+
+ hs_i2c5_bus: hs-i2c5-bus {
+ samsung,pins = "gpg3-3", "gpg3-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_nfc {
+ gpj0: gpj0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c6_bus: hs-i2c6-bus {
+ samsung,pins = "gpj0-1", "gpj0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_touch {
+ gpj1: gpj1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hs_i2c7_bus: hs-i2c7-bus {
+ samsung,pins = "gpj1-1", "gpj1-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_ff {
+ gpg4: gpg4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ spi3_bus: spi3-bus {
+ samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_ese {
+ gpv7: gpv7 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ spi4_bus: spi4-bus {
+ samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <0>;
+ };
+};
+
+&pinctrl_fsys0 {
+ gpr4: gpr4 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ sd2_clk: sd2-clk {
+ samsung,pins = "gpr4-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_cmd: sd2-cmd {
+ samsung,pins = "gpr4-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_cd: sd2-cd {
+ samsung,pins = "gpr4-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_bus1: sd2-bus-width1 {
+ samsung,pins = "gpr4-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd2_bus4: sd2-bus-width4 {
+ samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+};
+
+&pinctrl_fsys1 {
+ gpr0: gpr0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr1: gpr1 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr2: gpr2 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpr3: gpr3 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ sd0_clk: sd0-clk {
+ samsung,pins = "gpr0-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_cmd: sd0-cmd {
+ samsung,pins = "gpr0-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_rdqs: sd0-rdqs {
+ samsung,pins = "gpr0-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_qrdy: sd0-qrdy {
+ samsung,pins = "gpr0-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus1: sd0-bus-width1 {
+ samsung,pins = "gpr1-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus4: sd0-bus-width4 {
+ samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd0_bus8: sd0-bus-width8 {
+ samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <3>;
+ };
+
+ sd1_clk: sd1-clk {
+ samsung,pins = "gpr2-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_cmd: sd1-cmd {
+ samsung,pins = "gpr2-1";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <0>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_ds: sd1-ds {
+ samsung,pins = "gpr2-2";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_qrdy: sd1-qrdy {
+ samsung,pins = "gpr2-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_int: sd1-int {
+ samsung,pins = "gpr2-4";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <1>;
+ samsung,pin-drv = <6>;
+ };
+
+ sd1_bus1: sd1-bus-width1 {
+ samsung,pins = "gpr3-0";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_bus4: sd1-bus-width4 {
+ samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+
+ sd1_bus8: sd1-bus-width8 {
+ samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
+ samsung,pin-function = <2>;
+ samsung,pin-pud = <3>;
+ samsung,pin-drv = <2>;
+ };
+};
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index c5b1b86..f8a07cc 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -17,6 +17,17 @@
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ pinctrl0 = &pinctrl_alive;
+ pinctrl1 = &pinctrl_bus0;
+ pinctrl2 = &pinctrl_nfc;
+ pinctrl3 = &pinctrl_touch;
+ pinctrl4 = &pinctrl_ff;
+ pinctrl5 = &pinctrl_ese;
+ pinctrl6 = &pinctrl_fsys0;
+ pinctrl7 = &pinctrl_fsys1;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -149,6 +160,59 @@
status = "disabled";
};
+ pinctrl_alive: pinctrl at 10580000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x10580000 0x1000>;
+
+ wakeup-interrupt-controller {
+ compatible = "samsung,exynos7-wakeup-eint";
+ interrupt-parent = <&gic>;
+ interrupts = <0 16 0>;
+ };
+ };
+
+ pinctrl_bus0: pinctrl at 13470000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x13470000 0x1000>;
+ interrupts = <0 383 0>;
+ };
+
+ pinctrl_nfc: pinctrl at 14cd0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14cd0000 0x1000>;
+ interrupts = <0 473 0>;
+ };
+
+ pinctrl_touch: pinctrl at 14ce0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14ce0000 0x1000>;
+ interrupts = <0 474 0>;
+ };
+
+ pinctrl_ff: pinctrl at 14c90000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14c90000 0x1000>;
+ interrupts = <0 475 0>;
+ };
+
+ pinctrl_ese: pinctrl at 14ca0000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x14ca0000 0x1000>;
+ interrupts = <0 476 0>;
+ };
+
+ pinctrl_fsys0: pinctrl at 10e60000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x10e60000 0x1000>;
+ interrupts = <0 221 0>;
+ };
+
+ pinctrl_fsys1: pinctrl at 15690000 {
+ compatible = "samsung,exynos7-pinctrl";
+ reg = <0x15690000 0x1000>;
+ interrupts = <0 203 0>;
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <1 13 0xff01>,
@@ -158,3 +222,5 @@
};
};
};
+
+#include "exynos7-pinctrl.dtsi"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 10:03 ` Thomas Abraham
-1 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 10:03 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, kesavan.abhilash, linux-samsung-soc,
catalin.marinas, robh, devicetree, Tomasz Figa, linus.walleij
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> Exynos7 uses different offsets for wakeup interrupt configuration registers.
> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
> selection is now based on the wakeup interrupt controller compatible string.
>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../bindings/pinctrl/samsung-pinctrl.txt | 2 +
> drivers/pinctrl/samsung/pinctrl-exynos.c | 42 +++++++++++++++-----
> drivers/pinctrl/samsung/pinctrl-exynos.h | 3 ++
> 3 files changed, 38 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> index e82aaf4..f80519a 100644
> --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> @@ -136,6 +136,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
> found on Samsung S3C64xx SoCs,
> - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
> found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
> + - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
> + found on Samsung Exynos7 SoC.
> - interrupt-parent: phandle of the interrupt parent to which the external
> wakeup interrupts are forwarded to.
> - interrupts: interrupt used by multiplexed wakeup interrupts.
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
> index 3133a1e..fe15ab8 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.c
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
> @@ -56,12 +56,6 @@ static struct samsung_pin_bank_type bank_type_alive = {
> .reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
> };
>
> -/* list of external wakeup controllers supported */
> -static const struct of_device_id exynos_wkup_irq_ids[] = {
> - { .compatible = "samsung,exynos4210-wakeup-eint", },
> - { }
> -};
> -
> static void exynos_irq_mask(struct irq_data *irqd)
> {
> struct irq_chip *chip = irq_data_get_irq_chip(irqd);
> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
> /*
> * irq_chip for wakeup interrupts
> */
> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
> +static struct exynos_irq_chip exynos_wkup_irq_chip;
> +
> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
This should be marked as initdata.
> .chip = {
> - .name = "exynos_wkup_irq_chip",
> + .name = "exynos4210_wkup_irq_chip",
> .irq_unmask = exynos_irq_unmask,
> .irq_mask = exynos_irq_mask,
> .irq_ack = exynos_irq_ack,
> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
> };
>
> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
this as well.
> + .chip = {
> + .name = "exynos7_wkup_irq_chip",
> + .irq_unmask = exynos_irq_unmask,
> + .irq_mask = exynos_irq_mask,
> + .irq_ack = exynos_irq_ack,
> + .irq_set_type = exynos_irq_set_type,
> + .irq_set_wake = exynos_wkup_irq_set_wake,
> + },
> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
> +};
> +
> +/* list of external wakeup controllers supported */
> +static const struct of_device_id exynos_wkup_irq_ids[] = {
> + { .compatible = "samsung,exynos4210-wakeup-eint",
> + .data = &exynos4210_wkup_irq_chip },
> + { .compatible = "samsung,exynos7-wakeup-eint",
> + .data = &exynos7_wkup_irq_chip },
> + { }
> +};
> +
> /* interrupt handler for wakeup interrupts 0..15 */
> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
> {
> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
> int idx, irq;
>
> for_each_child_of_node(dev->of_node, np) {
> - if (of_match_node(exynos_wkup_irq_ids, np)) {
> + const struct of_device_id *match;
> +
> + match = of_match_node(exynos_wkup_irq_ids, np);
> + if (match) {
> + memcpy(&exynos_wkup_irq_chip, match->data,
> + sizeof(struct exynos_irq_chip));
> wkup_np = np;
> break;
> }
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
> index e060722..0db1e52 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
> @@ -25,6 +25,9 @@
> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
> #define EXYNOS_SVC_OFFSET 0xB08
> #define EXYNOS_EINT_FUNC 0xF
>
Regards,
Thomas.
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-13 10:03 ` Thomas Abraham
0 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 10:03 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> Exynos7 uses different offsets for wakeup interrupt configuration registers.
> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
> selection is now based on the wakeup interrupt controller compatible string.
>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../bindings/pinctrl/samsung-pinctrl.txt | 2 +
> drivers/pinctrl/samsung/pinctrl-exynos.c | 42 +++++++++++++++-----
> drivers/pinctrl/samsung/pinctrl-exynos.h | 3 ++
> 3 files changed, 38 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> index e82aaf4..f80519a 100644
> --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> @@ -136,6 +136,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
> found on Samsung S3C64xx SoCs,
> - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
> found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
> + - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
> + found on Samsung Exynos7 SoC.
> - interrupt-parent: phandle of the interrupt parent to which the external
> wakeup interrupts are forwarded to.
> - interrupts: interrupt used by multiplexed wakeup interrupts.
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
> index 3133a1e..fe15ab8 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.c
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
> @@ -56,12 +56,6 @@ static struct samsung_pin_bank_type bank_type_alive = {
> .reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
> };
>
> -/* list of external wakeup controllers supported */
> -static const struct of_device_id exynos_wkup_irq_ids[] = {
> - { .compatible = "samsung,exynos4210-wakeup-eint", },
> - { }
> -};
> -
> static void exynos_irq_mask(struct irq_data *irqd)
> {
> struct irq_chip *chip = irq_data_get_irq_chip(irqd);
> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
> /*
> * irq_chip for wakeup interrupts
> */
> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
> +static struct exynos_irq_chip exynos_wkup_irq_chip;
> +
> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
This should be marked as initdata.
> .chip = {
> - .name = "exynos_wkup_irq_chip",
> + .name = "exynos4210_wkup_irq_chip",
> .irq_unmask = exynos_irq_unmask,
> .irq_mask = exynos_irq_mask,
> .irq_ack = exynos_irq_ack,
> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
> };
>
> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
this as well.
> + .chip = {
> + .name = "exynos7_wkup_irq_chip",
> + .irq_unmask = exynos_irq_unmask,
> + .irq_mask = exynos_irq_mask,
> + .irq_ack = exynos_irq_ack,
> + .irq_set_type = exynos_irq_set_type,
> + .irq_set_wake = exynos_wkup_irq_set_wake,
> + },
> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
> +};
> +
> +/* list of external wakeup controllers supported */
> +static const struct of_device_id exynos_wkup_irq_ids[] = {
> + { .compatible = "samsung,exynos4210-wakeup-eint",
> + .data = &exynos4210_wkup_irq_chip },
> + { .compatible = "samsung,exynos7-wakeup-eint",
> + .data = &exynos7_wkup_irq_chip },
> + { }
> +};
> +
> /* interrupt handler for wakeup interrupts 0..15 */
> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
> {
> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
> int idx, irq;
>
> for_each_child_of_node(dev->of_node, np) {
> - if (of_match_node(exynos_wkup_irq_ids, np)) {
> + const struct of_device_id *match;
> +
> + match = of_match_node(exynos_wkup_irq_ids, np);
> + if (match) {
> + memcpy(&exynos_wkup_irq_chip, match->data,
> + sizeof(struct exynos_irq_chip));
> wkup_np = np;
> break;
> }
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
> index e060722..0db1e52 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
> @@ -25,6 +25,9 @@
> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
> #define EXYNOS_SVC_OFFSET 0xB08
> #define EXYNOS_EINT_FUNC 0xF
>
Regards,
Thomas.
> --
> 1.7.9.5
>
> --
> 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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 10:54 ` Thomas Abraham
-1 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 10:54 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, kesavan.abhilash, linux-samsung-soc,
catalin.marinas, robh, devicetree, Tomasz Figa, linus.walleij,
Naveen Krishna Chatradhi
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> Add intial pin configuration nodes for EXYNOS7.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> ---
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> 3 files changed, 628 insertions(+)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b4d1dc2..0dcf6f5 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -143,6 +143,8 @@ config ARCH_EXYNOS7
> bool "ARMv8 based Samsung Exynos7"
> select ARCH_EXYNOS
> select COMMON_CLK_SAMSUNG
> + select PINCTRL
> + select PINCTRL_EXYNOS
It would be good if the this change is moved to a different patch and
keep this only for dts updates. Rest of the patch looks fine.
Regards,
Thomas.
> help
> This enables support for Samsung Exynos7 SoC family
>
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> new file mode 100644
> index 0000000..d858805
> --- /dev/null
> +++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> @@ -0,0 +1,560 @@
> +/*
> + * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
> + * device tree nodes in this file.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +&pinctrl_alive {
> + gpa0: gpa0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
> + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
> + };
> +
> + gpa1: gpa1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
> + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
> + };
> +
> + gpa2: gpa2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpa3: gpa3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +};
> +
> +&pinctrl_bus0 {
> + gpb0: gpb0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc0: gpc0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc1: gpc1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc2: gpc2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc3: gpc3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd0: gpd0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd1: gpd1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd2: gpd2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd4: gpd4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd5: gpd5 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd6: gpd6 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd7: gpd7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd8: gpd8 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg0: gpg0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg3: gpg3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c10_bus: hs-i2c10-bus {
> + samsung,pins = "gpb0-1", "gpb0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c11_bus: hs-i2c11-bus {
> + samsung,pins = "gpb0-3", "gpb0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c2_bus: hs-i2c2-bus {
> + samsung,pins = "gpd0-3", "gpd0-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_data: uart0-data {
> + samsung,pins = "gpd0-0", "gpd0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_fctl: uart0-fctl {
> + samsung,pins = "gpd0-2", "gpd0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart2_data: uart2-data {
> + samsung,pins = "gpd1-4", "gpd1-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c3_bus: hs-i2c3-bus {
> + samsung,pins = "gpd1-3", "gpd1-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_data: uart1-data {
> + samsung,pins = "gpd1-0", "gpd1-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_fctl: uart1-fctl {
> + samsung,pins = "gpd1-2", "gpd1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c0_bus: hs-i2c0-bus {
> + samsung,pins = "gpd2-1", "gpd2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c1_bus: hs-i2c1-bus {
> + samsung,pins = "gpd2-3", "gpd2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c9_bus: hs-i2c9-bus {
> + samsung,pins = "gpd2-7", "gpd2-6";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c8_bus: hs-i2c8-bus {
> + samsung,pins = "gpd5-3", "gpd5-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart3_data: uart3-data {
> + samsung,pins = "gpd5-0", "gpd5-1";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi2_bus: spi2-bus {
> + samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi1_bus: spi1-bus {
> + samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi0_bus: spi0-bus {
> + samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c4_bus: hs-i2c4-bus {
> + samsung,pins = "gpg3-1", "gpg3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c5_bus: hs-i2c5-bus {
> + samsung,pins = "gpg3-3", "gpg3-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_nfc {
> + gpj0: gpj0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c6_bus: hs-i2c6-bus {
> + samsung,pins = "gpj0-1", "gpj0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_touch {
> + gpj1: gpj1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c7_bus: hs-i2c7-bus {
> + samsung,pins = "gpj1-1", "gpj1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ff {
> + gpg4: gpg4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi3_bus: spi3-bus {
> + samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ese {
> + gpv7: gpv7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi4_bus: spi4-bus {
> + samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_fsys0 {
> + gpr4: gpr4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd2_clk: sd2-clk {
> + samsung,pins = "gpr4-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cmd: sd2-cmd {
> + samsung,pins = "gpr4-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cd: sd2-cd {
> + samsung,pins = "gpr4-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus1: sd2-bus-width1 {
> + samsung,pins = "gpr4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus4: sd2-bus-width4 {
> + samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +};
> +
> +&pinctrl_fsys1 {
> + gpr0: gpr0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr1: gpr1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr2: gpr2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr3: gpr3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd0_clk: sd0-clk {
> + samsung,pins = "gpr0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_cmd: sd0-cmd {
> + samsung,pins = "gpr0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_rdqs: sd0-rdqs {
> + samsung,pins = "gpr0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_qrdy: sd0-qrdy {
> + samsung,pins = "gpr0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus1: sd0-bus-width1 {
> + samsung,pins = "gpr1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus4: sd0-bus-width4 {
> + samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus8: sd0-bus-width8 {
> + samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd1_clk: sd1-clk {
> + samsung,pins = "gpr2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_cmd: sd1-cmd {
> + samsung,pins = "gpr2-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_ds: sd1-ds {
> + samsung,pins = "gpr2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_qrdy: sd1-qrdy {
> + samsung,pins = "gpr2-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_int: sd1-int {
> + samsung,pins = "gpr2-4";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_bus1: sd1-bus-width1 {
> + samsung,pins = "gpr3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus4: sd1-bus-width4 {
> + samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus8: sd1-bus-width8 {
> + samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index c5b1b86..f8a07cc 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -17,6 +17,17 @@
> #address-cells = <2>;
> #size-cells = <2>;
>
> + aliases {
> + pinctrl0 = &pinctrl_alive;
> + pinctrl1 = &pinctrl_bus0;
> + pinctrl2 = &pinctrl_nfc;
> + pinctrl3 = &pinctrl_touch;
> + pinctrl4 = &pinctrl_ff;
> + pinctrl5 = &pinctrl_ese;
> + pinctrl6 = &pinctrl_fsys0;
> + pinctrl7 = &pinctrl_fsys1;
> + };
> +
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -149,6 +160,59 @@
> status = "disabled";
> };
>
> + pinctrl_alive: pinctrl@10580000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10580000 0x1000>;
> +
> + wakeup-interrupt-controller {
> + compatible = "samsung,exynos7-wakeup-eint";
> + interrupt-parent = <&gic>;
> + interrupts = <0 16 0>;
> + };
> + };
> +
> + pinctrl_bus0: pinctrl@13470000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x13470000 0x1000>;
> + interrupts = <0 383 0>;
> + };
> +
> + pinctrl_nfc: pinctrl@14cd0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14cd0000 0x1000>;
> + interrupts = <0 473 0>;
> + };
> +
> + pinctrl_touch: pinctrl@14ce0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ce0000 0x1000>;
> + interrupts = <0 474 0>;
> + };
> +
> + pinctrl_ff: pinctrl@14c90000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14c90000 0x1000>;
> + interrupts = <0 475 0>;
> + };
> +
> + pinctrl_ese: pinctrl@14ca0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ca0000 0x1000>;
> + interrupts = <0 476 0>;
> + };
> +
> + pinctrl_fsys0: pinctrl@10e60000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10e60000 0x1000>;
> + interrupts = <0 221 0>;
> + };
> +
> + pinctrl_fsys1: pinctrl@15690000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x15690000 0x1000>;
> + interrupts = <0 203 0>;
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <1 13 0xff01>,
> @@ -158,3 +222,5 @@
> };
> };
> };
> +
> +#include "exynos7-pinctrl.dtsi"
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
@ 2014-09-13 10:54 ` Thomas Abraham
0 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 10:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> Add intial pin configuration nodes for EXYNOS7.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> ---
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> 3 files changed, 628 insertions(+)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b4d1dc2..0dcf6f5 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -143,6 +143,8 @@ config ARCH_EXYNOS7
> bool "ARMv8 based Samsung Exynos7"
> select ARCH_EXYNOS
> select COMMON_CLK_SAMSUNG
> + select PINCTRL
> + select PINCTRL_EXYNOS
It would be good if the this change is moved to a different patch and
keep this only for dts updates. Rest of the patch looks fine.
Regards,
Thomas.
> help
> This enables support for Samsung Exynos7 SoC family
>
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> new file mode 100644
> index 0000000..d858805
> --- /dev/null
> +++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> @@ -0,0 +1,560 @@
> +/*
> + * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
> + * device tree nodes in this file.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +&pinctrl_alive {
> + gpa0: gpa0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
> + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
> + };
> +
> + gpa1: gpa1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
> + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
> + };
> +
> + gpa2: gpa2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpa3: gpa3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +};
> +
> +&pinctrl_bus0 {
> + gpb0: gpb0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc0: gpc0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc1: gpc1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc2: gpc2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc3: gpc3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd0: gpd0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd1: gpd1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd2: gpd2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd4: gpd4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd5: gpd5 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd6: gpd6 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd7: gpd7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd8: gpd8 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg0: gpg0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg3: gpg3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c10_bus: hs-i2c10-bus {
> + samsung,pins = "gpb0-1", "gpb0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c11_bus: hs-i2c11-bus {
> + samsung,pins = "gpb0-3", "gpb0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c2_bus: hs-i2c2-bus {
> + samsung,pins = "gpd0-3", "gpd0-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_data: uart0-data {
> + samsung,pins = "gpd0-0", "gpd0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_fctl: uart0-fctl {
> + samsung,pins = "gpd0-2", "gpd0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart2_data: uart2-data {
> + samsung,pins = "gpd1-4", "gpd1-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c3_bus: hs-i2c3-bus {
> + samsung,pins = "gpd1-3", "gpd1-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_data: uart1-data {
> + samsung,pins = "gpd1-0", "gpd1-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_fctl: uart1-fctl {
> + samsung,pins = "gpd1-2", "gpd1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c0_bus: hs-i2c0-bus {
> + samsung,pins = "gpd2-1", "gpd2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c1_bus: hs-i2c1-bus {
> + samsung,pins = "gpd2-3", "gpd2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c9_bus: hs-i2c9-bus {
> + samsung,pins = "gpd2-7", "gpd2-6";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c8_bus: hs-i2c8-bus {
> + samsung,pins = "gpd5-3", "gpd5-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart3_data: uart3-data {
> + samsung,pins = "gpd5-0", "gpd5-1";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi2_bus: spi2-bus {
> + samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi1_bus: spi1-bus {
> + samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi0_bus: spi0-bus {
> + samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c4_bus: hs-i2c4-bus {
> + samsung,pins = "gpg3-1", "gpg3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c5_bus: hs-i2c5-bus {
> + samsung,pins = "gpg3-3", "gpg3-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_nfc {
> + gpj0: gpj0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c6_bus: hs-i2c6-bus {
> + samsung,pins = "gpj0-1", "gpj0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_touch {
> + gpj1: gpj1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c7_bus: hs-i2c7-bus {
> + samsung,pins = "gpj1-1", "gpj1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ff {
> + gpg4: gpg4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi3_bus: spi3-bus {
> + samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ese {
> + gpv7: gpv7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi4_bus: spi4-bus {
> + samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_fsys0 {
> + gpr4: gpr4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd2_clk: sd2-clk {
> + samsung,pins = "gpr4-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cmd: sd2-cmd {
> + samsung,pins = "gpr4-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cd: sd2-cd {
> + samsung,pins = "gpr4-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus1: sd2-bus-width1 {
> + samsung,pins = "gpr4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus4: sd2-bus-width4 {
> + samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +};
> +
> +&pinctrl_fsys1 {
> + gpr0: gpr0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr1: gpr1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr2: gpr2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr3: gpr3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd0_clk: sd0-clk {
> + samsung,pins = "gpr0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_cmd: sd0-cmd {
> + samsung,pins = "gpr0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_rdqs: sd0-rdqs {
> + samsung,pins = "gpr0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_qrdy: sd0-qrdy {
> + samsung,pins = "gpr0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus1: sd0-bus-width1 {
> + samsung,pins = "gpr1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus4: sd0-bus-width4 {
> + samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus8: sd0-bus-width8 {
> + samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd1_clk: sd1-clk {
> + samsung,pins = "gpr2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_cmd: sd1-cmd {
> + samsung,pins = "gpr2-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_ds: sd1-ds {
> + samsung,pins = "gpr2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_qrdy: sd1-qrdy {
> + samsung,pins = "gpr2-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_int: sd1-int {
> + samsung,pins = "gpr2-4";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_bus1: sd1-bus-width1 {
> + samsung,pins = "gpr3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus4: sd1-bus-width4 {
> + samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus8: sd1-bus-width8 {
> + samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index c5b1b86..f8a07cc 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -17,6 +17,17 @@
> #address-cells = <2>;
> #size-cells = <2>;
>
> + aliases {
> + pinctrl0 = &pinctrl_alive;
> + pinctrl1 = &pinctrl_bus0;
> + pinctrl2 = &pinctrl_nfc;
> + pinctrl3 = &pinctrl_touch;
> + pinctrl4 = &pinctrl_ff;
> + pinctrl5 = &pinctrl_ese;
> + pinctrl6 = &pinctrl_fsys0;
> + pinctrl7 = &pinctrl_fsys1;
> + };
> +
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -149,6 +160,59 @@
> status = "disabled";
> };
>
> + pinctrl_alive: pinctrl at 10580000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10580000 0x1000>;
> +
> + wakeup-interrupt-controller {
> + compatible = "samsung,exynos7-wakeup-eint";
> + interrupt-parent = <&gic>;
> + interrupts = <0 16 0>;
> + };
> + };
> +
> + pinctrl_bus0: pinctrl at 13470000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x13470000 0x1000>;
> + interrupts = <0 383 0>;
> + };
> +
> + pinctrl_nfc: pinctrl at 14cd0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14cd0000 0x1000>;
> + interrupts = <0 473 0>;
> + };
> +
> + pinctrl_touch: pinctrl at 14ce0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ce0000 0x1000>;
> + interrupts = <0 474 0>;
> + };
> +
> + pinctrl_ff: pinctrl at 14c90000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14c90000 0x1000>;
> + interrupts = <0 475 0>;
> + };
> +
> + pinctrl_ese: pinctrl at 14ca0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ca0000 0x1000>;
> + interrupts = <0 476 0>;
> + };
> +
> + pinctrl_fsys0: pinctrl at 10e60000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10e60000 0x1000>;
> + interrupts = <0 221 0>;
> + };
> +
> + pinctrl_fsys1: pinctrl at 15690000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x15690000 0x1000>;
> + interrupts = <0 203 0>;
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <1 13 0xff01>,
> @@ -158,3 +222,5 @@
> };
> };
> };
> +
> +#include "exynos7-pinctrl.dtsi"
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] Add initial support for pinctrl on Exynos7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 11:08 ` Thomas Abraham
-1 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 11:08 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, Abhilash Kesavan, linux-samsung-soc,
catalin.marinas, robh, devicetree, Tomasz Figa, Linus Walleij
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
> Abhilash Kesavan (2):
> pinctrl: exynos: Generalize the eint16_31 demux code
> pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
>
> Naveen Krishna Chatradhi (2):
> pinctrl: exynos: Add initial driver data for Exynos7
> arm64: dts: Add initial pinctrl support to EXYNOS7
>
> .../bindings/pinctrl/samsung-pinctrl.txt | 3 +
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
> drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
> drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
> 8 files changed, 788 insertions(+), 11 deletions(-)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
Tested GPIO and Wakeup interrupts. After fixing comments for patches
in this series, this series
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
>
> --
> 1.7.9.5
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-13 11:08 ` Thomas Abraham
0 siblings, 0 replies; 32+ messages in thread
From: Thomas Abraham @ 2014-09-13 11:08 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
> Abhilash Kesavan (2):
> pinctrl: exynos: Generalize the eint16_31 demux code
> pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
>
> Naveen Krishna Chatradhi (2):
> pinctrl: exynos: Add initial driver data for Exynos7
> arm64: dts: Add initial pinctrl support to EXYNOS7
>
> .../bindings/pinctrl/samsung-pinctrl.txt | 3 +
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
> drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
> drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
> 8 files changed, 788 insertions(+), 11 deletions(-)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
Tested GPIO and Wakeup interrupts. After fixing comments for patches
in this series, this series
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
>
> --
> 1.7.9.5
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 11:27 ` Tomasz Figa
-1 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-13 11:27 UTC (permalink / raw)
To: Abhilash Kesavan, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: kesavan.abhilash-Re5JQEeQqe8AvxtiuMwx3w,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
catalin.marinas-5wv7dgnIgG8, robh-DgEjT+Ai2ygdnm+yROfE0A,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
thomas.ab-Sze3O3UU22JBDgjK7y7TUQ
Hi Abhilash,
Please see my comments inline.
On 13.09.2014 10:50, Abhilash Kesavan wrote:
> Exynos7 uses different offsets for wakeup interrupt configuration registers.
> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
> selection is now based on the wakeup interrupt controller compatible string.
[snip]
> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
> /*
> * irq_chip for wakeup interrupts
> */
> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
> +static struct exynos_irq_chip exynos_wkup_irq_chip;
> +
Why do you still need this, if you have both variants below?
> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
> .chip = {
> - .name = "exynos_wkup_irq_chip",
> + .name = "exynos4210_wkup_irq_chip",
> .irq_unmask = exynos_irq_unmask,
> .irq_mask = exynos_irq_mask,
> .irq_ack = exynos_irq_ack,
> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
> };
>
> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
> + .chip = {
> + .name = "exynos7_wkup_irq_chip",
> + .irq_unmask = exynos_irq_unmask,
> + .irq_mask = exynos_irq_mask,
> + .irq_ack = exynos_irq_ack,
> + .irq_set_type = exynos_irq_set_type,
> + .irq_set_wake = exynos_wkup_irq_set_wake,
> + },
> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
> +};
> +
> +/* list of external wakeup controllers supported */
> +static const struct of_device_id exynos_wkup_irq_ids[] = {
> + { .compatible = "samsung,exynos4210-wakeup-eint",
> + .data = &exynos4210_wkup_irq_chip },
> + { .compatible = "samsung,exynos7-wakeup-eint",
> + .data = &exynos7_wkup_irq_chip },
> + { }
> +};
> +
> /* interrupt handler for wakeup interrupts 0..15 */
> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
> {
> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
> int idx, irq;
>
> for_each_child_of_node(dev->of_node, np) {
> - if (of_match_node(exynos_wkup_irq_ids, np)) {
> + const struct of_device_id *match;
> +
> + match = of_match_node(exynos_wkup_irq_ids, np);
> + if (match) {
> + memcpy(&exynos_wkup_irq_chip, match->data,
> + sizeof(struct exynos_irq_chip));
Hmm, this doesn't look correct to me. You are modifying a static struct
here. Why couldn't you simply use the exynos irq chip pointed by
match->data in further registration code?
> wkup_np = np;
> break;
> }
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
> index e060722..0db1e52 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
> @@ -25,6 +25,9 @@
> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
Interestingly enough, the offsets look just like the normal GPIO
interrupt controller of previous Exynos SoCs. Are you sure those are
correct? Also if somehow the controller now resembles the normal one,
doesn't it have the SVC register making it possible to reuse the non
wake-up code instead?
Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-13 11:27 ` Tomasz Figa
0 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-13 11:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
Please see my comments inline.
On 13.09.2014 10:50, Abhilash Kesavan wrote:
> Exynos7 uses different offsets for wakeup interrupt configuration registers.
> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
> selection is now based on the wakeup interrupt controller compatible string.
[snip]
> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
> /*
> * irq_chip for wakeup interrupts
> */
> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
> +static struct exynos_irq_chip exynos_wkup_irq_chip;
> +
Why do you still need this, if you have both variants below?
> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
> .chip = {
> - .name = "exynos_wkup_irq_chip",
> + .name = "exynos4210_wkup_irq_chip",
> .irq_unmask = exynos_irq_unmask,
> .irq_mask = exynos_irq_mask,
> .irq_ack = exynos_irq_ack,
> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
> };
>
> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
> + .chip = {
> + .name = "exynos7_wkup_irq_chip",
> + .irq_unmask = exynos_irq_unmask,
> + .irq_mask = exynos_irq_mask,
> + .irq_ack = exynos_irq_ack,
> + .irq_set_type = exynos_irq_set_type,
> + .irq_set_wake = exynos_wkup_irq_set_wake,
> + },
> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
> +};
> +
> +/* list of external wakeup controllers supported */
> +static const struct of_device_id exynos_wkup_irq_ids[] = {
> + { .compatible = "samsung,exynos4210-wakeup-eint",
> + .data = &exynos4210_wkup_irq_chip },
> + { .compatible = "samsung,exynos7-wakeup-eint",
> + .data = &exynos7_wkup_irq_chip },
> + { }
> +};
> +
> /* interrupt handler for wakeup interrupts 0..15 */
> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
> {
> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
> int idx, irq;
>
> for_each_child_of_node(dev->of_node, np) {
> - if (of_match_node(exynos_wkup_irq_ids, np)) {
> + const struct of_device_id *match;
> +
> + match = of_match_node(exynos_wkup_irq_ids, np);
> + if (match) {
> + memcpy(&exynos_wkup_irq_chip, match->data,
> + sizeof(struct exynos_irq_chip));
Hmm, this doesn't look correct to me. You are modifying a static struct
here. Why couldn't you simply use the exynos irq chip pointed by
match->data in further registration code?
> wkup_np = np;
> break;
> }
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
> index e060722..0db1e52 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
> @@ -25,6 +25,9 @@
> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
Interestingly enough, the offsets look just like the normal GPIO
interrupt controller of previous Exynos SoCs. Are you sure those are
correct? Also if somehow the controller now resembles the normal one,
doesn't it have the SVC register making it possible to reuse the non
wake-up code instead?
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] Add initial support for pinctrl on Exynos7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-13 11:34 ` Tomasz Figa
-1 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-13 11:34 UTC (permalink / raw)
To: Abhilash Kesavan, linux-arm-kernel
Cc: kesavan.abhilash, linux-samsung-soc, catalin.marinas, robh,
devicetree, linus.walleij, thomas.ab, Naveen Krishna Chatradhi
Hi Abhilash,
On 13.09.2014 10:50, Abhilash Kesavan wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
Other than few of my and Thomas's comments, my further actions (i.e. an
ACK) will depend on reply to [1].
[1] http://thread.gmane.org/gmane.linux.kernel.samsung-soc/36823/focus=37456
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-13 11:34 ` Tomasz Figa
0 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-13 11:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
On 13.09.2014 10:50, Abhilash Kesavan wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
Other than few of my and Thomas's comments, my further actions (i.e. an
ACK) will depend on reply to [1].
[1] http://thread.gmane.org/gmane.linux.kernel.samsung-soc/36823/focus=37456
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-20 12:08 ` Alim Akhtar
-1 siblings, 0 replies; 32+ messages in thread
From: Alim Akhtar @ 2014-09-20 12:08 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, Abhilash Kesavan, linux-samsung-soc,
catalin.marinas, robh, devicetree, Tomasz Figa, Linus Walleij,
Thomas P Abraham, Naveen Krishna Chatradhi
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> Add intial pin configuration nodes for EXYNOS7.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> ---
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> 3 files changed, 628 insertions(+)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b4d1dc2..0dcf6f5 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -143,6 +143,8 @@ config ARCH_EXYNOS7
> bool "ARMv8 based Samsung Exynos7"
> select ARCH_EXYNOS
> select COMMON_CLK_SAMSUNG
> + select PINCTRL
> + select PINCTRL_EXYNOS
> help
> This enables support for Samsung Exynos7 SoC family
>
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> new file mode 100644
> index 0000000..d858805
> --- /dev/null
> +++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> @@ -0,0 +1,560 @@
> +/*
> + * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
> + * device tree nodes in this file.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +&pinctrl_alive {
> + gpa0: gpa0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
> + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
> + };
> +
> + gpa1: gpa1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
> + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
> + };
> +
> + gpa2: gpa2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpa3: gpa3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +};
> +
> +&pinctrl_bus0 {
> + gpb0: gpb0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc0: gpc0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc1: gpc1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc2: gpc2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc3: gpc3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd0: gpd0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd1: gpd1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd2: gpd2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd4: gpd4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd5: gpd5 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd6: gpd6 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd7: gpd7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd8: gpd8 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg0: gpg0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg3: gpg3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c10_bus: hs-i2c10-bus {
> + samsung,pins = "gpb0-1", "gpb0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c11_bus: hs-i2c11-bus {
> + samsung,pins = "gpb0-3", "gpb0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c2_bus: hs-i2c2-bus {
> + samsung,pins = "gpd0-3", "gpd0-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_data: uart0-data {
> + samsung,pins = "gpd0-0", "gpd0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_fctl: uart0-fctl {
> + samsung,pins = "gpd0-2", "gpd0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart2_data: uart2-data {
> + samsung,pins = "gpd1-4", "gpd1-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c3_bus: hs-i2c3-bus {
> + samsung,pins = "gpd1-3", "gpd1-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_data: uart1-data {
> + samsung,pins = "gpd1-0", "gpd1-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_fctl: uart1-fctl {
> + samsung,pins = "gpd1-2", "gpd1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c0_bus: hs-i2c0-bus {
> + samsung,pins = "gpd2-1", "gpd2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c1_bus: hs-i2c1-bus {
> + samsung,pins = "gpd2-3", "gpd2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c9_bus: hs-i2c9-bus {
> + samsung,pins = "gpd2-7", "gpd2-6";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c8_bus: hs-i2c8-bus {
> + samsung,pins = "gpd5-3", "gpd5-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart3_data: uart3-data {
> + samsung,pins = "gpd5-0", "gpd5-1";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi2_bus: spi2-bus {
> + samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi1_bus: spi1-bus {
> + samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi0_bus: spi0-bus {
> + samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c4_bus: hs-i2c4-bus {
> + samsung,pins = "gpg3-1", "gpg3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c5_bus: hs-i2c5-bus {
> + samsung,pins = "gpg3-3", "gpg3-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_nfc {
> + gpj0: gpj0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c6_bus: hs-i2c6-bus {
> + samsung,pins = "gpj0-1", "gpj0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_touch {
> + gpj1: gpj1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c7_bus: hs-i2c7-bus {
> + samsung,pins = "gpj1-1", "gpj1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ff {
> + gpg4: gpg4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi3_bus: spi3-bus {
> + samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ese {
> + gpv7: gpv7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi4_bus: spi4-bus {
> + samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_fsys0 {
> + gpr4: gpr4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd2_clk: sd2-clk {
> + samsung,pins = "gpr4-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cmd: sd2-cmd {
> + samsung,pins = "gpr4-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cd: sd2-cd {
> + samsung,pins = "gpr4-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus1: sd2-bus-width1 {
> + samsung,pins = "gpr4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus4: sd2-bus-width4 {
> + samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +};
> +
> +&pinctrl_fsys1 {
> + gpr0: gpr0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr1: gpr1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr2: gpr2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr3: gpr3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd0_clk: sd0-clk {
> + samsung,pins = "gpr0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_cmd: sd0-cmd {
> + samsung,pins = "gpr0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_rdqs: sd0-rdqs {
This is Data Strobe pin, please rename this as 'sd0_ds' as it is down
below for sd1-ds. Also that matches the datasheet that I have.
> + samsung,pins = "gpr0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_qrdy: sd0-qrdy {
> + samsung,pins = "gpr0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus1: sd0-bus-width1 {
> + samsung,pins = "gpr1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus4: sd0-bus-width4 {
> + samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus8: sd0-bus-width8 {
> + samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd1_clk: sd1-clk {
> + samsung,pins = "gpr2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_cmd: sd1-cmd {
> + samsung,pins = "gpr2-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_ds: sd1-ds {
> + samsung,pins = "gpr2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_qrdy: sd1-qrdy {
> + samsung,pins = "gpr2-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_int: sd1-int {
> + samsung,pins = "gpr2-4";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_bus1: sd1-bus-width1 {
> + samsung,pins = "gpr3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus4: sd1-bus-width4 {
> + samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus8: sd1-bus-width8 {
> + samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index c5b1b86..f8a07cc 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -17,6 +17,17 @@
> #address-cells = <2>;
> #size-cells = <2>;
>
> + aliases {
> + pinctrl0 = &pinctrl_alive;
> + pinctrl1 = &pinctrl_bus0;
> + pinctrl2 = &pinctrl_nfc;
> + pinctrl3 = &pinctrl_touch;
> + pinctrl4 = &pinctrl_ff;
> + pinctrl5 = &pinctrl_ese;
> + pinctrl6 = &pinctrl_fsys0;
> + pinctrl7 = &pinctrl_fsys1;
> + };
> +
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -149,6 +160,59 @@
> status = "disabled";
> };
>
> + pinctrl_alive: pinctrl@10580000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10580000 0x1000>;
> +
> + wakeup-interrupt-controller {
> + compatible = "samsung,exynos7-wakeup-eint";
> + interrupt-parent = <&gic>;
> + interrupts = <0 16 0>;
> + };
> + };
> +
> + pinctrl_bus0: pinctrl@13470000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x13470000 0x1000>;
> + interrupts = <0 383 0>;
> + };
> +
> + pinctrl_nfc: pinctrl@14cd0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14cd0000 0x1000>;
> + interrupts = <0 473 0>;
> + };
> +
> + pinctrl_touch: pinctrl@14ce0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ce0000 0x1000>;
> + interrupts = <0 474 0>;
> + };
> +
> + pinctrl_ff: pinctrl@14c90000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14c90000 0x1000>;
> + interrupts = <0 475 0>;
> + };
> +
> + pinctrl_ese: pinctrl@14ca0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ca0000 0x1000>;
> + interrupts = <0 476 0>;
> + };
> +
> + pinctrl_fsys0: pinctrl@10e60000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10e60000 0x1000>;
> + interrupts = <0 221 0>;
> + };
> +
> + pinctrl_fsys1: pinctrl@15690000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x15690000 0x1000>;
> + interrupts = <0 203 0>;
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <1 13 0xff01>,
> @@ -158,3 +222,5 @@
> };
> };
> };
> +
> +#include "exynos7-pinctrl.dtsi"
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Regards,
Alim
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7
@ 2014-09-20 12:08 ` Alim Akhtar
0 siblings, 0 replies; 32+ messages in thread
From: Alim Akhtar @ 2014-09-20 12:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> Add intial pin configuration nodes for EXYNOS7.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> ---
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 +++++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> 3 files changed, 628 insertions(+)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b4d1dc2..0dcf6f5 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -143,6 +143,8 @@ config ARCH_EXYNOS7
> bool "ARMv8 based Samsung Exynos7"
> select ARCH_EXYNOS
> select COMMON_CLK_SAMSUNG
> + select PINCTRL
> + select PINCTRL_EXYNOS
> help
> This enables support for Samsung Exynos7 SoC family
>
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> new file mode 100644
> index 0000000..d858805
> --- /dev/null
> +++ b/arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
> @@ -0,0 +1,560 @@
> +/*
> + * Samsung's Exynos7 SoC pin-mux and pin-config device tree source
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Samsung's Exynos7 SoC pin-mux and pin-config options are listed as
> + * device tree nodes in this file.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +&pinctrl_alive {
> + gpa0: gpa0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
> + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
> + };
> +
> + gpa1: gpa1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + interrupt-parent = <&gic>;
> + #interrupt-cells = <2>;
> + interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
> + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
> + };
> +
> + gpa2: gpa2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpa3: gpa3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +};
> +
> +&pinctrl_bus0 {
> + gpb0: gpb0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc0: gpc0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc1: gpc1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc2: gpc2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpc3: gpc3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd0: gpd0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd1: gpd1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd2: gpd2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd4: gpd4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd5: gpd5 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd6: gpd6 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd7: gpd7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpd8: gpd8 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg0: gpg0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpg3: gpg3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c10_bus: hs-i2c10-bus {
> + samsung,pins = "gpb0-1", "gpb0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c11_bus: hs-i2c11-bus {
> + samsung,pins = "gpb0-3", "gpb0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c2_bus: hs-i2c2-bus {
> + samsung,pins = "gpd0-3", "gpd0-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_data: uart0-data {
> + samsung,pins = "gpd0-0", "gpd0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart0_fctl: uart0-fctl {
> + samsung,pins = "gpd0-2", "gpd0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart2_data: uart2-data {
> + samsung,pins = "gpd1-4", "gpd1-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c3_bus: hs-i2c3-bus {
> + samsung,pins = "gpd1-3", "gpd1-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_data: uart1-data {
> + samsung,pins = "gpd1-0", "gpd1-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart1_fctl: uart1-fctl {
> + samsung,pins = "gpd1-2", "gpd1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c0_bus: hs-i2c0-bus {
> + samsung,pins = "gpd2-1", "gpd2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c1_bus: hs-i2c1-bus {
> + samsung,pins = "gpd2-3", "gpd2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c9_bus: hs-i2c9-bus {
> + samsung,pins = "gpd2-7", "gpd2-6";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c8_bus: hs-i2c8-bus {
> + samsung,pins = "gpd5-3", "gpd5-2";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + uart3_data: uart3-data {
> + samsung,pins = "gpd5-0", "gpd5-1";
> + samsung,pin-function = <3>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi2_bus: spi2-bus {
> + samsung,pins = "gpd5-0", "gpd5-1", "gpd5-2", "gpd5-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi1_bus: spi1-bus {
> + samsung,pins = "gpd6-2", "gpd6-3", "gpd6-4", "gpd6-5";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + spi0_bus: spi0-bus {
> + samsung,pins = "gpd8-0", "gpd8-1", "gpd6-0", "gpd6-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c4_bus: hs-i2c4-bus {
> + samsung,pins = "gpg3-1", "gpg3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +
> + hs_i2c5_bus: hs-i2c5-bus {
> + samsung,pins = "gpg3-3", "gpg3-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_nfc {
> + gpj0: gpj0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c6_bus: hs-i2c6-bus {
> + samsung,pins = "gpj0-1", "gpj0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_touch {
> + gpj1: gpj1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + hs_i2c7_bus: hs-i2c7-bus {
> + samsung,pins = "gpj1-1", "gpj1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ff {
> + gpg4: gpg4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi3_bus: spi3-bus {
> + samsung,pins = "gpg4-0", "gpg4-1", "gpg4-2", "gpg4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_ese {
> + gpv7: gpv7 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + spi4_bus: spi4-bus {
> + samsung,pins = "gpv7-0", "gpv7-1", "gpv7-2", "gpv7-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <0>;
> + };
> +};
> +
> +&pinctrl_fsys0 {
> + gpr4: gpr4 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd2_clk: sd2-clk {
> + samsung,pins = "gpr4-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cmd: sd2-cmd {
> + samsung,pins = "gpr4-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_cd: sd2-cd {
> + samsung,pins = "gpr4-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus1: sd2-bus-width1 {
> + samsung,pins = "gpr4-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd2_bus4: sd2-bus-width4 {
> + samsung,pins = "gpr4-4", "gpr4-5", "gpr4-6";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +};
> +
> +&pinctrl_fsys1 {
> + gpr0: gpr0 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr1: gpr1 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr2: gpr2 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + gpr3: gpr3 {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sd0_clk: sd0-clk {
> + samsung,pins = "gpr0-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_cmd: sd0-cmd {
> + samsung,pins = "gpr0-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_rdqs: sd0-rdqs {
This is Data Strobe pin, please rename this as 'sd0_ds' as it is down
below for sd1-ds. Also that matches the datasheet that I have.
> + samsung,pins = "gpr0-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_qrdy: sd0-qrdy {
> + samsung,pins = "gpr0-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus1: sd0-bus-width1 {
> + samsung,pins = "gpr1-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus4: sd0-bus-width4 {
> + samsung,pins = "gpr1-1", "gpr1-2", "gpr1-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd0_bus8: sd0-bus-width8 {
> + samsung,pins = "gpr1-4", "gpr1-5", "gpr1-6", "gpr1-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <3>;
> + };
> +
> + sd1_clk: sd1-clk {
> + samsung,pins = "gpr2-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_cmd: sd1-cmd {
> + samsung,pins = "gpr2-1";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <0>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_ds: sd1-ds {
> + samsung,pins = "gpr2-2";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_qrdy: sd1-qrdy {
> + samsung,pins = "gpr2-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_int: sd1-int {
> + samsung,pins = "gpr2-4";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <1>;
> + samsung,pin-drv = <6>;
> + };
> +
> + sd1_bus1: sd1-bus-width1 {
> + samsung,pins = "gpr3-0";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus4: sd1-bus-width4 {
> + samsung,pins = "gpr3-1", "gpr3-2", "gpr3-3";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +
> + sd1_bus8: sd1-bus-width8 {
> + samsung,pins = "gpr3-4", "gpr3-5", "gpr3-6", "gpr3-7";
> + samsung,pin-function = <2>;
> + samsung,pin-pud = <3>;
> + samsung,pin-drv = <2>;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index c5b1b86..f8a07cc 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -17,6 +17,17 @@
> #address-cells = <2>;
> #size-cells = <2>;
>
> + aliases {
> + pinctrl0 = &pinctrl_alive;
> + pinctrl1 = &pinctrl_bus0;
> + pinctrl2 = &pinctrl_nfc;
> + pinctrl3 = &pinctrl_touch;
> + pinctrl4 = &pinctrl_ff;
> + pinctrl5 = &pinctrl_ese;
> + pinctrl6 = &pinctrl_fsys0;
> + pinctrl7 = &pinctrl_fsys1;
> + };
> +
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -149,6 +160,59 @@
> status = "disabled";
> };
>
> + pinctrl_alive: pinctrl at 10580000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10580000 0x1000>;
> +
> + wakeup-interrupt-controller {
> + compatible = "samsung,exynos7-wakeup-eint";
> + interrupt-parent = <&gic>;
> + interrupts = <0 16 0>;
> + };
> + };
> +
> + pinctrl_bus0: pinctrl at 13470000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x13470000 0x1000>;
> + interrupts = <0 383 0>;
> + };
> +
> + pinctrl_nfc: pinctrl at 14cd0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14cd0000 0x1000>;
> + interrupts = <0 473 0>;
> + };
> +
> + pinctrl_touch: pinctrl at 14ce0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ce0000 0x1000>;
> + interrupts = <0 474 0>;
> + };
> +
> + pinctrl_ff: pinctrl at 14c90000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14c90000 0x1000>;
> + interrupts = <0 475 0>;
> + };
> +
> + pinctrl_ese: pinctrl at 14ca0000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x14ca0000 0x1000>;
> + interrupts = <0 476 0>;
> + };
> +
> + pinctrl_fsys0: pinctrl at 10e60000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x10e60000 0x1000>;
> + interrupts = <0 221 0>;
> + };
> +
> + pinctrl_fsys1: pinctrl at 15690000 {
> + compatible = "samsung,exynos7-pinctrl";
> + reg = <0x15690000 0x1000>;
> + interrupts = <0 203 0>;
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <1 13 0xff01>,
> @@ -158,3 +222,5 @@
> };
> };
> };
> +
> +#include "exynos7-pinctrl.dtsi"
> --
> 1.7.9.5
>
> --
> 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
--
Regards,
Alim
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/4] Add initial support for pinctrl on Exynos7
2014-09-13 8:50 ` Abhilash Kesavan
@ 2014-09-20 12:13 ` Alim Akhtar
-1 siblings, 0 replies; 32+ messages in thread
From: Alim Akhtar @ 2014-09-20 12:13 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, Abhilash Kesavan, linux-samsung-soc,
catalin.marinas, robh, devicetree, Tomasz Figa, Linus Walleij,
Thomas P Abraham
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
> Abhilash Kesavan (2):
> pinctrl: exynos: Generalize the eint16_31 demux code
> pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
>
> Naveen Krishna Chatradhi (2):
> pinctrl: exynos: Add initial driver data for Exynos7
> arm64: dts: Add initial pinctrl support to EXYNOS7
>
> .../bindings/pinctrl/samsung-pinctrl.txt | 3 +
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
> drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
> drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
> 8 files changed, 788 insertions(+), 11 deletions(-)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
With the nit fix in patch-4 of this series, feel free to add
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> --
> 1.7.9.5
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Regards,
Alim
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/4] Add initial support for pinctrl on Exynos7
@ 2014-09-20 12:13 ` Alim Akhtar
0 siblings, 0 replies; 32+ messages in thread
From: Alim Akhtar @ 2014-09-20 12:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi Abhilash,
On Sat, Sep 13, 2014 at 2:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> The following patches are tested based on Kgene's for-next tree.
> https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=for-next
>
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
> https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 3- "arch: arm64: enable support for Samsung Exynos7 SoC" patchset
> http://www.spinics.net/lists/linux-samsung-soc/msg36728.html
>
> Abhilash Kesavan (2):
> pinctrl: exynos: Generalize the eint16_31 demux code
> pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
>
> Naveen Krishna Chatradhi (2):
> pinctrl: exynos: Add initial driver data for Exynos7
> arm64: dts: Add initial pinctrl support to EXYNOS7
>
> .../bindings/pinctrl/samsung-pinctrl.txt | 3 +
> arch/arm64/Kconfig | 2 +
> arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 560 ++++++++++++++++++++
> arch/arm64/boot/dts/exynos/exynos7.dtsi | 66 +++
> drivers/pinctrl/samsung/pinctrl-exynos.c | 161 +++++-
> drivers/pinctrl/samsung/pinctrl-exynos.h | 4 +
> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +
> drivers/pinctrl/samsung/pinctrl-samsung.h | 1 +
> 8 files changed, 788 insertions(+), 11 deletions(-)
> create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi
>
With the nit fix in patch-4 of this series, feel free to add
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> --
> 1.7.9.5
>
>
> --
> 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
--
Regards,
Alim
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-13 11:27 ` Tomasz Figa
@ 2014-09-22 6:17 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-22 6:17 UTC (permalink / raw)
To: Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, Catalin Marinas, robh,
devicetree, linus.walleij, Thomas P Abraham
Hi Tomasz,
On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> Hi Abhilash,
>
> Please see my comments inline.
>
> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>> selection is now based on the wakeup interrupt controller compatible string.
>
> [snip]
>
>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>> /*
>> * irq_chip for wakeup interrupts
>> */
>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>> +
>
> Why do you still need this, if you have both variants below?
After adding __initdata to the two variants, I will require to have a
copy of one of them.
>
>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>> .chip = {
>> - .name = "exynos_wkup_irq_chip",
>> + .name = "exynos4210_wkup_irq_chip",
>> .irq_unmask = exynos_irq_unmask,
>> .irq_mask = exynos_irq_mask,
>> .irq_ack = exynos_irq_ack,
>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>> };
>>
>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>> + .chip = {
>> + .name = "exynos7_wkup_irq_chip",
>> + .irq_unmask = exynos_irq_unmask,
>> + .irq_mask = exynos_irq_mask,
>> + .irq_ack = exynos_irq_ack,
>> + .irq_set_type = exynos_irq_set_type,
>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>> + },
>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>> +};
>> +
>> +/* list of external wakeup controllers supported */
>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>> + .data = &exynos4210_wkup_irq_chip },
>> + { .compatible = "samsung,exynos7-wakeup-eint",
>> + .data = &exynos7_wkup_irq_chip },
>> + { }
>> +};
>> +
>> /* interrupt handler for wakeup interrupts 0..15 */
>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>> {
>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>> int idx, irq;
>>
>> for_each_child_of_node(dev->of_node, np) {
>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>> + const struct of_device_id *match;
>> +
>> + match = of_match_node(exynos_wkup_irq_ids, np);
>> + if (match) {
>> + memcpy(&exynos_wkup_irq_chip, match->data,
>> + sizeof(struct exynos_irq_chip));
>
> Hmm, this doesn't look correct to me. You are modifying a static struct
> here. Why couldn't you simply use the exynos irq chip pointed by
> match->data in further registration code?
That will not be available later once I use __initdata.
>
>> wkup_np = np;
>> break;
>> }
>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>> index e060722..0db1e52 100644
>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>> @@ -25,6 +25,9 @@
>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>
> Interestingly enough, the offsets look just like the normal GPIO
> interrupt controller of previous Exynos SoCs. Are you sure those are
> correct? Also if somehow the controller now resembles the normal one,
> doesn't it have the SVC register making it possible to reuse the non
> wake-up code instead?
The wakeup interrupt register offsets are the same as the GPIO
interrupt offsets in earlier Exynos SoCs. There is no SVC register for
the wakeup interrupt block.
Regards,
Abhilash
>
> Best regards,
> Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-22 6:17 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-22 6:17 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tomasz,
On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> Hi Abhilash,
>
> Please see my comments inline.
>
> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>> selection is now based on the wakeup interrupt controller compatible string.
>
> [snip]
>
>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>> /*
>> * irq_chip for wakeup interrupts
>> */
>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>> +
>
> Why do you still need this, if you have both variants below?
After adding __initdata to the two variants, I will require to have a
copy of one of them.
>
>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>> .chip = {
>> - .name = "exynos_wkup_irq_chip",
>> + .name = "exynos4210_wkup_irq_chip",
>> .irq_unmask = exynos_irq_unmask,
>> .irq_mask = exynos_irq_mask,
>> .irq_ack = exynos_irq_ack,
>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>> };
>>
>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>> + .chip = {
>> + .name = "exynos7_wkup_irq_chip",
>> + .irq_unmask = exynos_irq_unmask,
>> + .irq_mask = exynos_irq_mask,
>> + .irq_ack = exynos_irq_ack,
>> + .irq_set_type = exynos_irq_set_type,
>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>> + },
>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>> +};
>> +
>> +/* list of external wakeup controllers supported */
>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>> + .data = &exynos4210_wkup_irq_chip },
>> + { .compatible = "samsung,exynos7-wakeup-eint",
>> + .data = &exynos7_wkup_irq_chip },
>> + { }
>> +};
>> +
>> /* interrupt handler for wakeup interrupts 0..15 */
>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>> {
>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>> int idx, irq;
>>
>> for_each_child_of_node(dev->of_node, np) {
>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>> + const struct of_device_id *match;
>> +
>> + match = of_match_node(exynos_wkup_irq_ids, np);
>> + if (match) {
>> + memcpy(&exynos_wkup_irq_chip, match->data,
>> + sizeof(struct exynos_irq_chip));
>
> Hmm, this doesn't look correct to me. You are modifying a static struct
> here. Why couldn't you simply use the exynos irq chip pointed by
> match->data in further registration code?
That will not be available later once I use __initdata.
>
>> wkup_np = np;
>> break;
>> }
>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>> index e060722..0db1e52 100644
>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>> @@ -25,6 +25,9 @@
>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>
> Interestingly enough, the offsets look just like the normal GPIO
> interrupt controller of previous Exynos SoCs. Are you sure those are
> correct? Also if somehow the controller now resembles the normal one,
> doesn't it have the SVC register making it possible to reuse the non
> wake-up code instead?
The wakeup interrupt register offsets are the same as the GPIO
interrupt offsets in earlier Exynos SoCs. There is no SVC register for
the wakeup interrupt block.
Regards,
Abhilash
>
> Best regards,
> Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-22 6:17 ` Abhilash Kesavan
@ 2014-09-22 7:55 ` Tomasz Figa
-1 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-22 7:55 UTC (permalink / raw)
To: Abhilash Kesavan
Cc: linux-arm-kernel, linux-samsung-soc, Catalin Marinas, robh,
devicetree, linus.walleij, Thomas P Abraham
On 22.09.2014 08:17, Abhilash Kesavan wrote:
> Hi Tomasz,
>
> On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> Hi Abhilash,
>>
>> Please see my comments inline.
>>
>> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>>> selection is now based on the wakeup interrupt controller compatible string.
>>
>> [snip]
>>
>>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>>> /*
>>> * irq_chip for wakeup interrupts
>>> */
>>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>>> +
>>
>> Why do you still need this, if you have both variants below?
>
> After adding __initdata to the two variants, I will require to have a
> copy of one of them.
>
>>
>>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>>> .chip = {
>>> - .name = "exynos_wkup_irq_chip",
>>> + .name = "exynos4210_wkup_irq_chip",
>>> .irq_unmask = exynos_irq_unmask,
>>> .irq_mask = exynos_irq_mask,
>>> .irq_ack = exynos_irq_ack,
>>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>>> };
>>>
>>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>>> + .chip = {
>>> + .name = "exynos7_wkup_irq_chip",
>>> + .irq_unmask = exynos_irq_unmask,
>>> + .irq_mask = exynos_irq_mask,
>>> + .irq_ack = exynos_irq_ack,
>>> + .irq_set_type = exynos_irq_set_type,
>>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>>> + },
>>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>>> +};
>>> +
>>> +/* list of external wakeup controllers supported */
>>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>>> + .data = &exynos4210_wkup_irq_chip },
>>> + { .compatible = "samsung,exynos7-wakeup-eint",
>>> + .data = &exynos7_wkup_irq_chip },
>>> + { }
>>> +};
>>> +
>>> /* interrupt handler for wakeup interrupts 0..15 */
>>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>>> {
>>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>>> int idx, irq;
>>>
>>> for_each_child_of_node(dev->of_node, np) {
>>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>>> + const struct of_device_id *match;
>>> +
>>> + match = of_match_node(exynos_wkup_irq_ids, np);
>>> + if (match) {
>>> + memcpy(&exynos_wkup_irq_chip, match->data,
>>> + sizeof(struct exynos_irq_chip));
>>
>> Hmm, this doesn't look correct to me. You are modifying a static struct
>> here. Why couldn't you simply use the exynos irq chip pointed by
>> match->data in further registration code?
>
> That will not be available later once I use __initdata.
>
Then either __initdata shouldn't be necessary or kmemdup() should be
used to allocate a copy.
>>
>>> wkup_np = np;
>>> break;
>>> }
>>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> index e060722..0db1e52 100644
>>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> @@ -25,6 +25,9 @@
>>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>>
>> Interestingly enough, the offsets look just like the normal GPIO
>> interrupt controller of previous Exynos SoCs. Are you sure those are
>> correct? Also if somehow the controller now resembles the normal one,
>> doesn't it have the SVC register making it possible to reuse the non
>> wake-up code instead?
>
> The wakeup interrupt register offsets are the same as the GPIO
> interrupt offsets in earlier Exynos SoCs. There is no SVC register for
> the wakeup interrupt block.
OK, your code is fine then.
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-22 7:55 ` Tomasz Figa
0 siblings, 0 replies; 32+ messages in thread
From: Tomasz Figa @ 2014-09-22 7:55 UTC (permalink / raw)
To: linux-arm-kernel
On 22.09.2014 08:17, Abhilash Kesavan wrote:
> Hi Tomasz,
>
> On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> Hi Abhilash,
>>
>> Please see my comments inline.
>>
>> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>>> selection is now based on the wakeup interrupt controller compatible string.
>>
>> [snip]
>>
>>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>>> /*
>>> * irq_chip for wakeup interrupts
>>> */
>>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>>> +
>>
>> Why do you still need this, if you have both variants below?
>
> After adding __initdata to the two variants, I will require to have a
> copy of one of them.
>
>>
>>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>>> .chip = {
>>> - .name = "exynos_wkup_irq_chip",
>>> + .name = "exynos4210_wkup_irq_chip",
>>> .irq_unmask = exynos_irq_unmask,
>>> .irq_mask = exynos_irq_mask,
>>> .irq_ack = exynos_irq_ack,
>>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>>> };
>>>
>>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>>> + .chip = {
>>> + .name = "exynos7_wkup_irq_chip",
>>> + .irq_unmask = exynos_irq_unmask,
>>> + .irq_mask = exynos_irq_mask,
>>> + .irq_ack = exynos_irq_ack,
>>> + .irq_set_type = exynos_irq_set_type,
>>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>>> + },
>>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>>> +};
>>> +
>>> +/* list of external wakeup controllers supported */
>>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>>> + .data = &exynos4210_wkup_irq_chip },
>>> + { .compatible = "samsung,exynos7-wakeup-eint",
>>> + .data = &exynos7_wkup_irq_chip },
>>> + { }
>>> +};
>>> +
>>> /* interrupt handler for wakeup interrupts 0..15 */
>>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>>> {
>>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>>> int idx, irq;
>>>
>>> for_each_child_of_node(dev->of_node, np) {
>>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>>> + const struct of_device_id *match;
>>> +
>>> + match = of_match_node(exynos_wkup_irq_ids, np);
>>> + if (match) {
>>> + memcpy(&exynos_wkup_irq_chip, match->data,
>>> + sizeof(struct exynos_irq_chip));
>>
>> Hmm, this doesn't look correct to me. You are modifying a static struct
>> here. Why couldn't you simply use the exynos irq chip pointed by
>> match->data in further registration code?
>
> That will not be available later once I use __initdata.
>
Then either __initdata shouldn't be necessary or kmemdup() should be
used to allocate a copy.
>>
>>> wkup_np = np;
>>> break;
>>> }
>>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> index e060722..0db1e52 100644
>>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>> @@ -25,6 +25,9 @@
>>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>>
>> Interestingly enough, the offsets look just like the normal GPIO
>> interrupt controller of previous Exynos SoCs. Are you sure those are
>> correct? Also if somehow the controller now resembles the normal one,
>> doesn't it have the SVC register making it possible to reuse the non
>> wake-up code instead?
>
> The wakeup interrupt register offsets are the same as the GPIO
> interrupt offsets in earlier Exynos SoCs. There is no SVC register for
> the wakeup interrupt block.
OK, your code is fine then.
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
2014-09-22 7:55 ` Tomasz Figa
@ 2014-09-23 7:04 ` Abhilash Kesavan
-1 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-23 7:04 UTC (permalink / raw)
To: Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, Catalin Marinas, robh,
devicetree, Linus Walleij, Thomas P Abraham
Hi Tomasz,
On Mon, Sep 22, 2014 at 1:25 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> On 22.09.2014 08:17, Abhilash Kesavan wrote:
>> Hi Tomasz,
>>
>> On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>> Hi Abhilash,
>>>
>>> Please see my comments inline.
>>>
>>> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>>>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>>>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>>>> selection is now based on the wakeup interrupt controller compatible string.
>>>
>>> [snip]
>>>
>>>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>>>> /*
>>>> * irq_chip for wakeup interrupts
>>>> */
>>>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>>>> +
>>>
>>> Why do you still need this, if you have both variants below?
>>
>> After adding __initdata to the two variants, I will require to have a
>> copy of one of them.
>>
>>>
>>>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>>>> .chip = {
>>>> - .name = "exynos_wkup_irq_chip",
>>>> + .name = "exynos4210_wkup_irq_chip",
>>>> .irq_unmask = exynos_irq_unmask,
>>>> .irq_mask = exynos_irq_mask,
>>>> .irq_ack = exynos_irq_ack,
>>>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>>>> };
>>>>
>>>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>>>> + .chip = {
>>>> + .name = "exynos7_wkup_irq_chip",
>>>> + .irq_unmask = exynos_irq_unmask,
>>>> + .irq_mask = exynos_irq_mask,
>>>> + .irq_ack = exynos_irq_ack,
>>>> + .irq_set_type = exynos_irq_set_type,
>>>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>>>> + },
>>>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>>>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>>>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>>>> +};
>>>> +
>>>> +/* list of external wakeup controllers supported */
>>>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>>>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>>>> + .data = &exynos4210_wkup_irq_chip },
>>>> + { .compatible = "samsung,exynos7-wakeup-eint",
>>>> + .data = &exynos7_wkup_irq_chip },
>>>> + { }
>>>> +};
>>>> +
>>>> /* interrupt handler for wakeup interrupts 0..15 */
>>>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>>>> {
>>>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>>>> int idx, irq;
>>>>
>>>> for_each_child_of_node(dev->of_node, np) {
>>>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>>>> + const struct of_device_id *match;
>>>> +
>>>> + match = of_match_node(exynos_wkup_irq_ids, np);
>>>> + if (match) {
>>>> + memcpy(&exynos_wkup_irq_chip, match->data,
>>>> + sizeof(struct exynos_irq_chip));
>>>
>>> Hmm, this doesn't look correct to me. You are modifying a static struct
>>> here. Why couldn't you simply use the exynos irq chip pointed by
>>> match->data in further registration code?
>>
>> That will not be available later once I use __initdata.
>>
>
> Then either __initdata shouldn't be necessary or kmemdup() should be
> used to allocate a copy.
Will fix this and send out a new version soon.
Regards,
Abhilash
>
>>>
>>>> wkup_np = np;
>>>> break;
>>>> }
>>>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> index e060722..0db1e52 100644
>>>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> @@ -25,6 +25,9 @@
>>>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>>>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>>>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>>>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>>>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>>>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>>>
>>> Interestingly enough, the offsets look just like the normal GPIO
>>> interrupt controller of previous Exynos SoCs. Are you sure those are
>>> correct? Also if somehow the controller now resembles the normal one,
>>> doesn't it have the SVC register making it possible to reuse the non
>>> wake-up code instead?
>>
>> The wakeup interrupt register offsets are the same as the GPIO
>> interrupt offsets in earlier Exynos SoCs. There is no SVC register for
>> the wakeup interrupt block.
>
> OK, your code is fine then.
>
> Best regards,
> Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts
@ 2014-09-23 7:04 ` Abhilash Kesavan
0 siblings, 0 replies; 32+ messages in thread
From: Abhilash Kesavan @ 2014-09-23 7:04 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tomasz,
On Mon, Sep 22, 2014 at 1:25 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> On 22.09.2014 08:17, Abhilash Kesavan wrote:
>> Hi Tomasz,
>>
>> On Sat, Sep 13, 2014 at 4:57 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>> Hi Abhilash,
>>>
>>> Please see my comments inline.
>>>
>>> On 13.09.2014 10:50, Abhilash Kesavan wrote:
>>>> Exynos7 uses different offsets for wakeup interrupt configuration registers.
>>>> So a new irq_chip instance for Exynos7 wakeup interrupts is added. The irq_chip
>>>> selection is now based on the wakeup interrupt controller compatible string.
>>>
>>> [snip]
>>>
>>>> @@ -328,9 +322,11 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
>>>> /*
>>>> * irq_chip for wakeup interrupts
>>>> */
>>>> -static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>>> +static struct exynos_irq_chip exynos_wkup_irq_chip;
>>>> +
>>>
>>> Why do you still need this, if you have both variants below?
>>
>> After adding __initdata to the two variants, I will require to have a
>> copy of one of them.
>>
>>>
>>>> +static struct exynos_irq_chip exynos4210_wkup_irq_chip = {
>>>> .chip = {
>>>> - .name = "exynos_wkup_irq_chip",
>>>> + .name = "exynos4210_wkup_irq_chip",
>>>> .irq_unmask = exynos_irq_unmask,
>>>> .irq_mask = exynos_irq_mask,
>>>> .irq_ack = exynos_irq_ack,
>>>> @@ -342,6 +338,29 @@ static struct exynos_irq_chip exynos_wkup_irq_chip = {
>>>> .eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
>>>> };
>>>>
>>>> +static struct exynos_irq_chip exynos7_wkup_irq_chip = {
>>>> + .chip = {
>>>> + .name = "exynos7_wkup_irq_chip",
>>>> + .irq_unmask = exynos_irq_unmask,
>>>> + .irq_mask = exynos_irq_mask,
>>>> + .irq_ack = exynos_irq_ack,
>>>> + .irq_set_type = exynos_irq_set_type,
>>>> + .irq_set_wake = exynos_wkup_irq_set_wake,
>>>> + },
>>>> + .eint_con = EXYNOS7_WKUP_ECON_OFFSET,
>>>> + .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET,
>>>> + .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET,
>>>> +};
>>>> +
>>>> +/* list of external wakeup controllers supported */
>>>> +static const struct of_device_id exynos_wkup_irq_ids[] = {
>>>> + { .compatible = "samsung,exynos4210-wakeup-eint",
>>>> + .data = &exynos4210_wkup_irq_chip },
>>>> + { .compatible = "samsung,exynos7-wakeup-eint",
>>>> + .data = &exynos7_wkup_irq_chip },
>>>> + { }
>>>> +};
>>>> +
>>>> /* interrupt handler for wakeup interrupts 0..15 */
>>>> static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
>>>> {
>>>> @@ -434,7 +453,12 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
>>>> int idx, irq;
>>>>
>>>> for_each_child_of_node(dev->of_node, np) {
>>>> - if (of_match_node(exynos_wkup_irq_ids, np)) {
>>>> + const struct of_device_id *match;
>>>> +
>>>> + match = of_match_node(exynos_wkup_irq_ids, np);
>>>> + if (match) {
>>>> + memcpy(&exynos_wkup_irq_chip, match->data,
>>>> + sizeof(struct exynos_irq_chip));
>>>
>>> Hmm, this doesn't look correct to me. You are modifying a static struct
>>> here. Why couldn't you simply use the exynos irq chip pointed by
>>> match->data in further registration code?
>>
>> That will not be available later once I use __initdata.
>>
>
> Then either __initdata shouldn't be necessary or kmemdup() should be
> used to allocate a copy.
Will fix this and send out a new version soon.
Regards,
Abhilash
>
>>>
>>>> wkup_np = np;
>>>> break;
>>>> }
>>>> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> index e060722..0db1e52 100644
>>>> --- a/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h
>>>> @@ -25,6 +25,9 @@
>>>> #define EXYNOS_WKUP_ECON_OFFSET 0xE00
>>>> #define EXYNOS_WKUP_EMASK_OFFSET 0xF00
>>>> #define EXYNOS_WKUP_EPEND_OFFSET 0xF40
>>>> +#define EXYNOS7_WKUP_ECON_OFFSET 0x700
>>>> +#define EXYNOS7_WKUP_EMASK_OFFSET 0x900
>>>> +#define EXYNOS7_WKUP_EPEND_OFFSET 0xA00
>>>
>>> Interestingly enough, the offsets look just like the normal GPIO
>>> interrupt controller of previous Exynos SoCs. Are you sure those are
>>> correct? Also if somehow the controller now resembles the normal one,
>>> doesn't it have the SVC register making it possible to reuse the non
>>> wake-up code instead?
>>
>> The wakeup interrupt register offsets are the same as the GPIO
>> interrupt offsets in earlier Exynos SoCs. There is no SVC register for
>> the wakeup interrupt block.
>
> OK, your code is fine then.
>
> Best regards,
> Tomasz
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2014-09-23 7:04 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13 8:50 [PATCH 0/4] Add initial support for pinctrl on Exynos7 Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 8:50 ` [PATCH 1/4] pinctrl: exynos: Generalize the eint16_31 demux code Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 8:50 ` [PATCH 2/4] pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 10:03 ` Thomas Abraham
2014-09-13 10:03 ` Thomas Abraham
[not found] ` <1410598252-30931-4-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-09-13 11:27 ` Tomasz Figa
2014-09-13 11:27 ` Tomasz Figa
2014-09-22 6:17 ` Abhilash Kesavan
2014-09-22 6:17 ` Abhilash Kesavan
2014-09-22 7:55 ` Tomasz Figa
2014-09-22 7:55 ` Tomasz Figa
2014-09-23 7:04 ` Abhilash Kesavan
2014-09-23 7:04 ` Abhilash Kesavan
2014-09-13 8:50 ` [PATCH 3/4] pinctrl: exynos: Add initial driver data for Exynos7 Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 8:50 ` [PATCH 4/4] arm64: dts: Add initial pinctrl support to EXYNOS7 Abhilash Kesavan
2014-09-13 8:50 ` Abhilash Kesavan
2014-09-13 10:54 ` Thomas Abraham
2014-09-13 10:54 ` Thomas Abraham
2014-09-20 12:08 ` Alim Akhtar
2014-09-20 12:08 ` Alim Akhtar
2014-09-13 11:08 ` [PATCH 0/4] Add initial support for pinctrl on Exynos7 Thomas Abraham
2014-09-13 11:08 ` Thomas Abraham
2014-09-13 11:34 ` Tomasz Figa
2014-09-13 11:34 ` Tomasz Figa
2014-09-20 12:13 ` Alim Akhtar
2014-09-20 12:13 ` Alim Akhtar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.