summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorTakeshi Kihara <takeshi.kihara.df@renesas.com>2016-10-24 07:40:09 -0400
committerGeert Uytterhoeven <geert+renesas@glider.be>2017-10-11 05:34:00 -0400
commitb014912f6c462223229bb9865ceb1a363984c521 (patch)
treeb47e07440b1f528beea5c73c0e6a665d3e272b0c /drivers/pinctrl
parent8480e6ca800046d14bfc610a24f2317341250b04 (diff)
pinctrl: sh-pfc: r8a7796: Add support for INTC-EX IRQ pins
Most pins on the r8a7796 SoC can be configured in GPIO mode for interrupt and GPIO functionality, while a couple of them can also be routed to the INTC-EX hardware block (formerly known as IRQC). On r8a7795 the INTC-EX hardware handles pins IRQ0 -> IRQ5 and this patch adds support for them to the PFC driver as "intc_ex_irqN". [takeshi.kihara.df: Ported from commit bb46f6f3f3bf ("pinctrl: sh-pfc: r8a7795: Add support for INTC-EX IRQ pins") to drivers/pinctrl/sh-pfc/pfc-r8a7796.c] Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7796.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index 200e1f4f6db9..442b55751081 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -2392,6 +2392,50 @@ static const unsigned int i2c6_c_mux[] = {
2392 SDA6_C_MARK, SCL6_C_MARK, 2392 SDA6_C_MARK, SCL6_C_MARK,
2393}; 2393};
2394 2394
2395/* - INTC-EX ---------------------------------------------------------------- */
2396static const unsigned int intc_ex_irq0_pins[] = {
2397 /* IRQ0 */
2398 RCAR_GP_PIN(2, 0),
2399};
2400static const unsigned int intc_ex_irq0_mux[] = {
2401 IRQ0_MARK,
2402};
2403static const unsigned int intc_ex_irq1_pins[] = {
2404 /* IRQ1 */
2405 RCAR_GP_PIN(2, 1),
2406};
2407static const unsigned int intc_ex_irq1_mux[] = {
2408 IRQ1_MARK,
2409};
2410static const unsigned int intc_ex_irq2_pins[] = {
2411 /* IRQ2 */
2412 RCAR_GP_PIN(2, 2),
2413};
2414static const unsigned int intc_ex_irq2_mux[] = {
2415 IRQ2_MARK,
2416};
2417static const unsigned int intc_ex_irq3_pins[] = {
2418 /* IRQ3 */
2419 RCAR_GP_PIN(2, 3),
2420};
2421static const unsigned int intc_ex_irq3_mux[] = {
2422 IRQ3_MARK,
2423};
2424static const unsigned int intc_ex_irq4_pins[] = {
2425 /* IRQ4 */
2426 RCAR_GP_PIN(2, 4),
2427};
2428static const unsigned int intc_ex_irq4_mux[] = {
2429 IRQ4_MARK,
2430};
2431static const unsigned int intc_ex_irq5_pins[] = {
2432 /* IRQ5 */
2433 RCAR_GP_PIN(2, 5),
2434};
2435static const unsigned int intc_ex_irq5_mux[] = {
2436 IRQ5_MARK,
2437};
2438
2395/* - MSIOF0 ----------------------------------------------------------------- */ 2439/* - MSIOF0 ----------------------------------------------------------------- */
2396static const unsigned int msiof0_clk_pins[] = { 2440static const unsigned int msiof0_clk_pins[] = {
2397 /* SCK */ 2441 /* SCK */
@@ -3922,6 +3966,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
3922 SH_PFC_PIN_GROUP(i2c6_a), 3966 SH_PFC_PIN_GROUP(i2c6_a),
3923 SH_PFC_PIN_GROUP(i2c6_b), 3967 SH_PFC_PIN_GROUP(i2c6_b),
3924 SH_PFC_PIN_GROUP(i2c6_c), 3968 SH_PFC_PIN_GROUP(i2c6_c),
3969 SH_PFC_PIN_GROUP(intc_ex_irq0),
3970 SH_PFC_PIN_GROUP(intc_ex_irq1),
3971 SH_PFC_PIN_GROUP(intc_ex_irq2),
3972 SH_PFC_PIN_GROUP(intc_ex_irq3),
3973 SH_PFC_PIN_GROUP(intc_ex_irq4),
3974 SH_PFC_PIN_GROUP(intc_ex_irq5),
3925 SH_PFC_PIN_GROUP(msiof0_clk), 3975 SH_PFC_PIN_GROUP(msiof0_clk),
3926 SH_PFC_PIN_GROUP(msiof0_sync), 3976 SH_PFC_PIN_GROUP(msiof0_sync),
3927 SH_PFC_PIN_GROUP(msiof0_ss1), 3977 SH_PFC_PIN_GROUP(msiof0_ss1),
@@ -4286,6 +4336,15 @@ static const char * const i2c6_groups[] = {
4286 "i2c6_c", 4336 "i2c6_c",
4287}; 4337};
4288 4338
4339static const char * const intc_ex_groups[] = {
4340 "intc_ex_irq0",
4341 "intc_ex_irq1",
4342 "intc_ex_irq2",
4343 "intc_ex_irq3",
4344 "intc_ex_irq4",
4345 "intc_ex_irq5",
4346};
4347
4289static const char * const msiof0_groups[] = { 4348static const char * const msiof0_groups[] = {
4290 "msiof0_clk", 4349 "msiof0_clk",
4291 "msiof0_sync", 4350 "msiof0_sync",
@@ -4580,6 +4639,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
4580 SH_PFC_FUNCTION(i2c1), 4639 SH_PFC_FUNCTION(i2c1),
4581 SH_PFC_FUNCTION(i2c2), 4640 SH_PFC_FUNCTION(i2c2),
4582 SH_PFC_FUNCTION(i2c6), 4641 SH_PFC_FUNCTION(i2c6),
4642 SH_PFC_FUNCTION(intc_ex),
4583 SH_PFC_FUNCTION(msiof0), 4643 SH_PFC_FUNCTION(msiof0),
4584 SH_PFC_FUNCTION(msiof1), 4644 SH_PFC_FUNCTION(msiof1),
4585 SH_PFC_FUNCTION(msiof2), 4645 SH_PFC_FUNCTION(msiof2),