diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-04-18 23:08:23 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-04 08:04:05 -0400 |
commit | 564617d2f92473031d035deb273da5374e62d0f0 (patch) | |
tree | e36a7ab939c719f0aef5c757ec777e7df5d170f0 /drivers/pinctrl/sh-pfc | |
parent | a10cd30ed6c786fc4756cb1393fea63331e3e315 (diff) |
sh-pfc: r8a7778: add SDHI support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c index 139f9ddef699..b1925cc1e39b 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c | |||
@@ -1427,6 +1427,84 @@ SCIF_PFC_DAT(scif5_data_a, TX5_A, RX5_A); | |||
1427 | SCIF_PFC_PIN(scif5_data_b, RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14)); | 1427 | SCIF_PFC_PIN(scif5_data_b, RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14)); |
1428 | SCIF_PFC_DAT(scif5_data_b, TX5_B, RX5_B); | 1428 | SCIF_PFC_DAT(scif5_data_b, TX5_B, RX5_B); |
1429 | 1429 | ||
1430 | /* - SDHI macro ------------------------------------------------------------- */ | ||
1431 | #define SDHI_PFC_PINS(name, args...) SH_PFC_PINS(name, args) | ||
1432 | #define SDHI_PFC_DAT1(name, d0) SH_PFC_MUX1(name, d0) | ||
1433 | #define SDHI_PFC_DAT4(name, d0, d1, d2, d3) SH_PFC_MUX4(name, d0, d1, d2, d3) | ||
1434 | #define SDHI_PFC_CTRL(name, clk, cmd) SH_PFC_MUX2(name, clk, cmd) | ||
1435 | #define SDHI_PFC_CDPN(name, cd) SH_PFC_MUX1(name, cd) | ||
1436 | #define SDHI_PFC_WPPN(name, wp) SH_PFC_MUX1(name, wp) | ||
1437 | |||
1438 | /* - SDHI0 ------------------------------------------------------------------ */ | ||
1439 | SDHI_PFC_PINS(sdhi0_cd, RCAR_GP_PIN(3, 17)); | ||
1440 | SDHI_PFC_CDPN(sdhi0_cd, SD0_CD); | ||
1441 | SDHI_PFC_PINS(sdhi0_ctrl, RCAR_GP_PIN(3, 11), RCAR_GP_PIN(3, 12)); | ||
1442 | SDHI_PFC_CTRL(sdhi0_ctrl, SD0_CLK, SD0_CMD); | ||
1443 | SDHI_PFC_PINS(sdhi0_data1, RCAR_GP_PIN(3, 13)); | ||
1444 | SDHI_PFC_DAT1(sdhi0_data1, SD0_DAT0); | ||
1445 | SDHI_PFC_PINS(sdhi0_data4, RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14), | ||
1446 | RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16)); | ||
1447 | SDHI_PFC_DAT4(sdhi0_data4, SD0_DAT0, SD0_DAT1, | ||
1448 | SD0_DAT2, SD0_DAT3); | ||
1449 | SDHI_PFC_PINS(sdhi0_wp, RCAR_GP_PIN(3, 18)); | ||
1450 | SDHI_PFC_WPPN(sdhi0_wp, SD0_WP); | ||
1451 | |||
1452 | /* - SDHI1 ------------------------------------------------------------------ */ | ||
1453 | SDHI_PFC_PINS(sdhi1_a_cd, RCAR_GP_PIN(0, 30)); | ||
1454 | SDHI_PFC_CDPN(sdhi1_a_cd, SD1_CD_A); | ||
1455 | SDHI_PFC_PINS(sdhi1_a_ctrl, RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6)); | ||
1456 | SDHI_PFC_CTRL(sdhi1_a_ctrl, SD1_CLK_A, SD1_CMD_A); | ||
1457 | SDHI_PFC_PINS(sdhi1_a_data1, RCAR_GP_PIN(1, 7)); | ||
1458 | SDHI_PFC_DAT1(sdhi1_a_data1, SD1_DAT0_A); | ||
1459 | SDHI_PFC_PINS(sdhi1_a_data4, RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8), | ||
1460 | RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 6)); | ||
1461 | SDHI_PFC_DAT4(sdhi1_a_data4, SD1_DAT0_A, SD1_DAT1_A, | ||
1462 | SD1_DAT2_A, SD1_DAT3_A); | ||
1463 | SDHI_PFC_PINS(sdhi1_a_wp, RCAR_GP_PIN(0, 31)); | ||
1464 | SDHI_PFC_WPPN(sdhi1_a_wp, SD1_WP_A); | ||
1465 | |||
1466 | SDHI_PFC_PINS(sdhi1_b_cd, RCAR_GP_PIN(2, 24)); | ||
1467 | SDHI_PFC_CDPN(sdhi1_b_cd, SD1_CD_B); | ||
1468 | SDHI_PFC_PINS(sdhi1_b_ctrl, RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16)); | ||
1469 | SDHI_PFC_CTRL(sdhi1_b_ctrl, SD1_CLK_B, SD1_CMD_B); | ||
1470 | SDHI_PFC_PINS(sdhi1_b_data1, RCAR_GP_PIN(1, 18)); | ||
1471 | SDHI_PFC_DAT1(sdhi1_b_data1, SD1_DAT0_B); | ||
1472 | SDHI_PFC_PINS(sdhi1_b_data4, RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 19), | ||
1473 | RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 21)); | ||
1474 | SDHI_PFC_DAT4(sdhi1_b_data4, SD1_DAT0_B, SD1_DAT1_B, | ||
1475 | SD1_DAT2_B, SD1_DAT3_B); | ||
1476 | SDHI_PFC_PINS(sdhi1_b_wp, RCAR_GP_PIN(2, 25)); | ||
1477 | SDHI_PFC_WPPN(sdhi1_b_wp, SD1_WP_B); | ||
1478 | |||
1479 | |||
1480 | /* - SDH2 ------------------------------------------------------------------- */ | ||
1481 | SDHI_PFC_PINS(sdhi2_a_cd, RCAR_GP_PIN(4, 23)); | ||
1482 | SDHI_PFC_CDPN(sdhi2_a_cd, SD2_CD_A); | ||
1483 | SDHI_PFC_PINS(sdhi2_a_ctrl, RCAR_GP_PIN(4, 17), RCAR_GP_PIN(4, 18)); | ||
1484 | SDHI_PFC_CTRL(sdhi2_a_ctrl, SD2_CLK_A, SD2_CMD_A); | ||
1485 | SDHI_PFC_PINS(sdhi2_a_data1, RCAR_GP_PIN(4, 19)); | ||
1486 | SDHI_PFC_DAT1(sdhi2_a_data1, SD2_DAT0_A); | ||
1487 | SDHI_PFC_PINS(sdhi2_a_data4, RCAR_GP_PIN(4, 19), RCAR_GP_PIN(4, 20), | ||
1488 | RCAR_GP_PIN(4, 21), RCAR_GP_PIN(4, 22)); | ||
1489 | SDHI_PFC_DAT4(sdhi2_a_data4, SD2_DAT0_A, SD2_DAT1_A, | ||
1490 | SD2_DAT2_A, SD2_DAT3_A); | ||
1491 | SDHI_PFC_PINS(sdhi2_a_wp, RCAR_GP_PIN(4, 24)); | ||
1492 | SDHI_PFC_WPPN(sdhi2_a_wp, SD2_WP_A); | ||
1493 | |||
1494 | SDHI_PFC_PINS(sdhi2_b_cd, RCAR_GP_PIN(3, 27)); | ||
1495 | SDHI_PFC_CDPN(sdhi2_b_cd, SD2_CD_B); | ||
1496 | SDHI_PFC_PINS(sdhi2_b_ctrl, RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 6)); | ||
1497 | SDHI_PFC_CTRL(sdhi2_b_ctrl, SD2_CLK_B, SD2_CMD_B); | ||
1498 | SDHI_PFC_PINS(sdhi2_b_data1, RCAR_GP_PIN(4, 7)); | ||
1499 | SDHI_PFC_DAT1(sdhi2_b_data1, SD2_DAT0_B); | ||
1500 | SDHI_PFC_PINS(sdhi2_b_data4, RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 8), | ||
1501 | RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26)); | ||
1502 | SDHI_PFC_DAT4(sdhi2_b_data4, SD2_DAT0_B, SD2_DAT1_B, | ||
1503 | SD2_DAT2_B, SD2_DAT3_B); | ||
1504 | SDHI_PFC_PINS(sdhi2_b_wp, RCAR_GP_PIN(3, 28)); | ||
1505 | SDHI_PFC_WPPN(sdhi2_b_wp, SD2_WP_B); | ||
1506 | |||
1507 | |||
1430 | static const struct sh_pfc_pin_group pinmux_groups[] = { | 1508 | static const struct sh_pfc_pin_group pinmux_groups[] = { |
1431 | SH_PFC_PIN_GROUP(hscif0_data_a), | 1509 | SH_PFC_PIN_GROUP(hscif0_data_a), |
1432 | SH_PFC_PIN_GROUP(hscif0_data_b), | 1510 | SH_PFC_PIN_GROUP(hscif0_data_b), |
@@ -1471,6 +1549,31 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
1471 | SH_PFC_PIN_GROUP(scif4_data_c), | 1549 | SH_PFC_PIN_GROUP(scif4_data_c), |
1472 | SH_PFC_PIN_GROUP(scif5_data_a), | 1550 | SH_PFC_PIN_GROUP(scif5_data_a), |
1473 | SH_PFC_PIN_GROUP(scif5_data_b), | 1551 | SH_PFC_PIN_GROUP(scif5_data_b), |
1552 | SH_PFC_PIN_GROUP(sdhi0_cd), | ||
1553 | SH_PFC_PIN_GROUP(sdhi0_ctrl), | ||
1554 | SH_PFC_PIN_GROUP(sdhi0_data1), | ||
1555 | SH_PFC_PIN_GROUP(sdhi0_data4), | ||
1556 | SH_PFC_PIN_GROUP(sdhi0_wp), | ||
1557 | SH_PFC_PIN_GROUP(sdhi1_a_cd), | ||
1558 | SH_PFC_PIN_GROUP(sdhi1_a_ctrl), | ||
1559 | SH_PFC_PIN_GROUP(sdhi1_a_data1), | ||
1560 | SH_PFC_PIN_GROUP(sdhi1_a_data4), | ||
1561 | SH_PFC_PIN_GROUP(sdhi1_a_wp), | ||
1562 | SH_PFC_PIN_GROUP(sdhi1_b_cd), | ||
1563 | SH_PFC_PIN_GROUP(sdhi1_b_ctrl), | ||
1564 | SH_PFC_PIN_GROUP(sdhi1_b_data1), | ||
1565 | SH_PFC_PIN_GROUP(sdhi1_b_data4), | ||
1566 | SH_PFC_PIN_GROUP(sdhi1_b_wp), | ||
1567 | SH_PFC_PIN_GROUP(sdhi2_a_cd), | ||
1568 | SH_PFC_PIN_GROUP(sdhi2_a_ctrl), | ||
1569 | SH_PFC_PIN_GROUP(sdhi2_a_data1), | ||
1570 | SH_PFC_PIN_GROUP(sdhi2_a_data4), | ||
1571 | SH_PFC_PIN_GROUP(sdhi2_a_wp), | ||
1572 | SH_PFC_PIN_GROUP(sdhi2_b_cd), | ||
1573 | SH_PFC_PIN_GROUP(sdhi2_b_ctrl), | ||
1574 | SH_PFC_PIN_GROUP(sdhi2_b_data1), | ||
1575 | SH_PFC_PIN_GROUP(sdhi2_b_data4), | ||
1576 | SH_PFC_PIN_GROUP(sdhi2_b_wp), | ||
1474 | }; | 1577 | }; |
1475 | 1578 | ||
1476 | static const char * const hscif0_groups[] = { | 1579 | static const char * const hscif0_groups[] = { |
@@ -1543,6 +1646,41 @@ static const char * const scif5_groups[] = { | |||
1543 | "scif5_data_b", | 1646 | "scif5_data_b", |
1544 | }; | 1647 | }; |
1545 | 1648 | ||
1649 | |||
1650 | static const char * const sdhi0_groups[] = { | ||
1651 | "sdhi0_cd", | ||
1652 | "sdhi0_ctrl", | ||
1653 | "sdhi0_data1", | ||
1654 | "sdhi0_data4", | ||
1655 | "sdhi0_wp", | ||
1656 | }; | ||
1657 | |||
1658 | static const char * const sdhi1_groups[] = { | ||
1659 | "sdhi1_a_cd", | ||
1660 | "sdhi1_a_ctrl", | ||
1661 | "sdhi1_a_data1", | ||
1662 | "sdhi1_a_data4", | ||
1663 | "sdhi1_a_wp", | ||
1664 | "sdhi1_b_cd", | ||
1665 | "sdhi1_b_ctrl", | ||
1666 | "sdhi1_b_data1", | ||
1667 | "sdhi1_b_data4", | ||
1668 | "sdhi1_b_wp", | ||
1669 | }; | ||
1670 | |||
1671 | static const char * const sdhi2_groups[] = { | ||
1672 | "sdhi2_a_cd", | ||
1673 | "sdhi2_a_ctrl", | ||
1674 | "sdhi2_a_data1", | ||
1675 | "sdhi2_a_data4", | ||
1676 | "sdhi2_a_wp", | ||
1677 | "sdhi2_b_cd", | ||
1678 | "sdhi2_b_ctrl", | ||
1679 | "sdhi2_b_data1", | ||
1680 | "sdhi2_b_data4", | ||
1681 | "sdhi2_b_wp", | ||
1682 | }; | ||
1683 | |||
1546 | static const struct sh_pfc_function pinmux_functions[] = { | 1684 | static const struct sh_pfc_function pinmux_functions[] = { |
1547 | SH_PFC_FUNCTION(hscif0), | 1685 | SH_PFC_FUNCTION(hscif0), |
1548 | SH_PFC_FUNCTION(hscif1), | 1686 | SH_PFC_FUNCTION(hscif1), |
@@ -1553,6 +1691,9 @@ static const struct sh_pfc_function pinmux_functions[] = { | |||
1553 | SH_PFC_FUNCTION(scif3), | 1691 | SH_PFC_FUNCTION(scif3), |
1554 | SH_PFC_FUNCTION(scif4), | 1692 | SH_PFC_FUNCTION(scif4), |
1555 | SH_PFC_FUNCTION(scif5), | 1693 | SH_PFC_FUNCTION(scif5), |
1694 | SH_PFC_FUNCTION(sdhi0), | ||
1695 | SH_PFC_FUNCTION(sdhi1), | ||
1696 | SH_PFC_FUNCTION(sdhi2), | ||
1556 | }; | 1697 | }; |
1557 | 1698 | ||
1558 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1699 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |