diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-06 13:04:43 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 08:34:07 -0400 |
commit | 6dbf296a452ff5c1613be989f4e3ce10568cf6df (patch) | |
tree | b850c214e05661835ba6fd5e470b4710b26d94ab /drivers/pinctrl/sh-pfc/pfc-r8a7779.c | |
parent | e8ebafdfea399580b1bee7e83b955c6175b8a6c4 (diff) |
sh-pfc: r8a7779: Add SDHI and MMCIF pin groups and functions
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pfc-r8a7779.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 284 |
1 files changed, 284 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c index 9046a8f71d49..ca16b04edd6d 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c | |||
@@ -1575,6 +1575,210 @@ static const unsigned int du1_cde_pins[] = { | |||
1575 | static const unsigned int du1_cde_mux[] = { | 1575 | static const unsigned int du1_cde_mux[] = { |
1576 | DU1_CDE_MARK | 1576 | DU1_CDE_MARK |
1577 | }; | 1577 | }; |
1578 | /* - MMCIF ------------------------------------------------------------------ */ | ||
1579 | static const unsigned int mmc0_data1_pins[] = { | ||
1580 | /* D[0] */ | ||
1581 | 19, | ||
1582 | }; | ||
1583 | static const unsigned int mmc0_data1_mux[] = { | ||
1584 | MMC0_D0_MARK, | ||
1585 | }; | ||
1586 | static const unsigned int mmc0_data4_pins[] = { | ||
1587 | /* D[0:3] */ | ||
1588 | 19, 20, 21, 2, | ||
1589 | }; | ||
1590 | static const unsigned int mmc0_data4_mux[] = { | ||
1591 | MMC0_D0_MARK, MMC0_D1_MARK, MMC0_D2_MARK, MMC0_D3_MARK, | ||
1592 | }; | ||
1593 | static const unsigned int mmc0_data8_pins[] = { | ||
1594 | /* D[0:7] */ | ||
1595 | 19, 20, 21, 2, 10, 11, 15, 16, | ||
1596 | }; | ||
1597 | static const unsigned int mmc0_data8_mux[] = { | ||
1598 | MMC0_D0_MARK, MMC0_D1_MARK, MMC0_D2_MARK, MMC0_D3_MARK, | ||
1599 | MMC0_D4_MARK, MMC0_D5_MARK, MMC0_D6_MARK, MMC0_D7_MARK, | ||
1600 | }; | ||
1601 | static const unsigned int mmc0_ctrl_pins[] = { | ||
1602 | /* CMD, CLK */ | ||
1603 | 18, 17, | ||
1604 | }; | ||
1605 | static const unsigned int mmc0_ctrl_mux[] = { | ||
1606 | MMC0_CMD_MARK, MMC0_CLK_MARK, | ||
1607 | }; | ||
1608 | |||
1609 | static const unsigned int mmc1_data1_pins[] = { | ||
1610 | /* D[0] */ | ||
1611 | 72, | ||
1612 | }; | ||
1613 | static const unsigned int mmc1_data1_mux[] = { | ||
1614 | MMC1_D0_MARK, | ||
1615 | }; | ||
1616 | static const unsigned int mmc1_data4_pins[] = { | ||
1617 | /* D[0:3] */ | ||
1618 | 72, 73, 74, 75, | ||
1619 | }; | ||
1620 | static const unsigned int mmc1_data4_mux[] = { | ||
1621 | MMC1_D0_MARK, MMC1_D1_MARK, MMC1_D2_MARK, MMC1_D3_MARK, | ||
1622 | }; | ||
1623 | static const unsigned int mmc1_data8_pins[] = { | ||
1624 | /* D[0:7] */ | ||
1625 | 72, 73, 74, 75, 76, 77, 80, 81, | ||
1626 | }; | ||
1627 | static const unsigned int mmc1_data8_mux[] = { | ||
1628 | MMC1_D0_MARK, MMC1_D1_MARK, MMC1_D2_MARK, MMC1_D3_MARK, | ||
1629 | MMC1_D4_MARK, MMC1_D5_MARK, MMC1_D6_MARK, MMC1_D7_MARK, | ||
1630 | }; | ||
1631 | static const unsigned int mmc1_ctrl_pins[] = { | ||
1632 | /* CMD, CLK */ | ||
1633 | 68, 65, | ||
1634 | }; | ||
1635 | static const unsigned int mmc1_ctrl_mux[] = { | ||
1636 | MMC1_CMD_MARK, MMC1_CLK_MARK, | ||
1637 | }; | ||
1638 | /* - SDHI0 ------------------------------------------------------------------ */ | ||
1639 | static const unsigned int sdhi0_data1_pins[] = { | ||
1640 | /* D0 */ | ||
1641 | 117, | ||
1642 | }; | ||
1643 | static const unsigned int sdhi0_data1_mux[] = { | ||
1644 | SD0_DAT0_MARK, | ||
1645 | }; | ||
1646 | static const unsigned int sdhi0_data4_pins[] = { | ||
1647 | /* D[0:3] */ | ||
1648 | 117, 118, 119, 120, | ||
1649 | }; | ||
1650 | static const unsigned int sdhi0_data4_mux[] = { | ||
1651 | SD0_DAT0_MARK, SD0_DAT1_MARK, SD0_DAT2_MARK, SD0_DAT3_MARK, | ||
1652 | }; | ||
1653 | static const unsigned int sdhi0_ctrl_pins[] = { | ||
1654 | /* CMD, CLK */ | ||
1655 | 114, 113, | ||
1656 | }; | ||
1657 | static const unsigned int sdhi0_ctrl_mux[] = { | ||
1658 | SD0_CMD_MARK, SD0_CLK_MARK, | ||
1659 | }; | ||
1660 | static const unsigned int sdhi0_cd_pins[] = { | ||
1661 | /* CD */ | ||
1662 | 115, | ||
1663 | }; | ||
1664 | static const unsigned int sdhi0_cd_mux[] = { | ||
1665 | SD0_CD_MARK, | ||
1666 | }; | ||
1667 | static const unsigned int sdhi0_wp_pins[] = { | ||
1668 | /* WP */ | ||
1669 | 116, | ||
1670 | }; | ||
1671 | static const unsigned int sdhi0_wp_mux[] = { | ||
1672 | SD0_WP_MARK, | ||
1673 | }; | ||
1674 | /* - SDHI1 ------------------------------------------------------------------ */ | ||
1675 | static const unsigned int sdhi1_data1_pins[] = { | ||
1676 | /* D0 */ | ||
1677 | 19, | ||
1678 | }; | ||
1679 | static const unsigned int sdhi1_data1_mux[] = { | ||
1680 | SD1_DAT0_MARK, | ||
1681 | }; | ||
1682 | static const unsigned int sdhi1_data4_pins[] = { | ||
1683 | /* D[0:3] */ | ||
1684 | 19, 20, 21, 2, | ||
1685 | }; | ||
1686 | static const unsigned int sdhi1_data4_mux[] = { | ||
1687 | SD1_DAT0_MARK, SD1_DAT1_MARK, SD1_DAT2_MARK, SD1_DAT3_MARK, | ||
1688 | }; | ||
1689 | static const unsigned int sdhi1_ctrl_pins[] = { | ||
1690 | /* CMD, CLK */ | ||
1691 | 18, 17, | ||
1692 | }; | ||
1693 | static const unsigned int sdhi1_ctrl_mux[] = { | ||
1694 | SD1_CMD_MARK, SD1_CLK_MARK, | ||
1695 | }; | ||
1696 | static const unsigned int sdhi1_cd_pins[] = { | ||
1697 | /* CD */ | ||
1698 | 10, | ||
1699 | }; | ||
1700 | static const unsigned int sdhi1_cd_mux[] = { | ||
1701 | SD1_CD_MARK, | ||
1702 | }; | ||
1703 | static const unsigned int sdhi1_wp_pins[] = { | ||
1704 | /* WP */ | ||
1705 | 11, | ||
1706 | }; | ||
1707 | static const unsigned int sdhi1_wp_mux[] = { | ||
1708 | SD1_WP_MARK, | ||
1709 | }; | ||
1710 | /* - SDHI2 ------------------------------------------------------------------ */ | ||
1711 | static const unsigned int sdhi2_data1_pins[] = { | ||
1712 | /* D0 */ | ||
1713 | 97, | ||
1714 | }; | ||
1715 | static const unsigned int sdhi2_data1_mux[] = { | ||
1716 | SD2_DAT0_MARK, | ||
1717 | }; | ||
1718 | static const unsigned int sdhi2_data4_pins[] = { | ||
1719 | /* D[0:3] */ | ||
1720 | 97, 98, 99, 100, | ||
1721 | }; | ||
1722 | static const unsigned int sdhi2_data4_mux[] = { | ||
1723 | SD2_DAT0_MARK, SD2_DAT1_MARK, SD2_DAT2_MARK, SD2_DAT3_MARK, | ||
1724 | }; | ||
1725 | static const unsigned int sdhi2_ctrl_pins[] = { | ||
1726 | /* CMD, CLK */ | ||
1727 | 102, 101, | ||
1728 | }; | ||
1729 | static const unsigned int sdhi2_ctrl_mux[] = { | ||
1730 | SD2_CMD_MARK, SD2_CLK_MARK, | ||
1731 | }; | ||
1732 | static const unsigned int sdhi2_cd_pins[] = { | ||
1733 | /* CD */ | ||
1734 | 103, | ||
1735 | }; | ||
1736 | static const unsigned int sdhi2_cd_mux[] = { | ||
1737 | SD2_CD_MARK, | ||
1738 | }; | ||
1739 | static const unsigned int sdhi2_wp_pins[] = { | ||
1740 | /* WP */ | ||
1741 | 104, | ||
1742 | }; | ||
1743 | static const unsigned int sdhi2_wp_mux[] = { | ||
1744 | SD2_WP_MARK, | ||
1745 | }; | ||
1746 | /* - SDHI3 ------------------------------------------------------------------ */ | ||
1747 | static const unsigned int sdhi3_data1_pins[] = { | ||
1748 | /* D0 */ | ||
1749 | 50, | ||
1750 | }; | ||
1751 | static const unsigned int sdhi3_data1_mux[] = { | ||
1752 | SD3_DAT0_MARK, | ||
1753 | }; | ||
1754 | static const unsigned int sdhi3_data4_pins[] = { | ||
1755 | /* D[0:3] */ | ||
1756 | 50, 51, 52, 53, | ||
1757 | }; | ||
1758 | static const unsigned int sdhi3_data4_mux[] = { | ||
1759 | SD3_DAT0_MARK, SD3_DAT1_MARK, SD3_DAT2_MARK, SD3_DAT3_MARK, | ||
1760 | }; | ||
1761 | static const unsigned int sdhi3_ctrl_pins[] = { | ||
1762 | /* CMD, CLK */ | ||
1763 | 35, 34, | ||
1764 | }; | ||
1765 | static const unsigned int sdhi3_ctrl_mux[] = { | ||
1766 | SD3_CMD_MARK, SD3_CLK_MARK, | ||
1767 | }; | ||
1768 | static const unsigned int sdhi3_cd_pins[] = { | ||
1769 | /* CD */ | ||
1770 | 62, | ||
1771 | }; | ||
1772 | static const unsigned int sdhi3_cd_mux[] = { | ||
1773 | SD3_CD_MARK, | ||
1774 | }; | ||
1775 | static const unsigned int sdhi3_wp_pins[] = { | ||
1776 | /* WP */ | ||
1777 | 64, | ||
1778 | }; | ||
1779 | static const unsigned int sdhi3_wp_mux[] = { | ||
1780 | SD3_WP_MARK, | ||
1781 | }; | ||
1578 | 1782 | ||
1579 | static const struct sh_pfc_pin_group pinmux_groups[] = { | 1783 | static const struct sh_pfc_pin_group pinmux_groups[] = { |
1580 | SH_PFC_PIN_GROUP(du0_rgb666), | 1784 | SH_PFC_PIN_GROUP(du0_rgb666), |
@@ -1592,6 +1796,34 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
1592 | SH_PFC_PIN_GROUP(du1_sync_1), | 1796 | SH_PFC_PIN_GROUP(du1_sync_1), |
1593 | SH_PFC_PIN_GROUP(du1_oddf), | 1797 | SH_PFC_PIN_GROUP(du1_oddf), |
1594 | SH_PFC_PIN_GROUP(du1_cde), | 1798 | SH_PFC_PIN_GROUP(du1_cde), |
1799 | SH_PFC_PIN_GROUP(mmc0_data1), | ||
1800 | SH_PFC_PIN_GROUP(mmc0_data4), | ||
1801 | SH_PFC_PIN_GROUP(mmc0_data8), | ||
1802 | SH_PFC_PIN_GROUP(mmc0_ctrl), | ||
1803 | SH_PFC_PIN_GROUP(mmc1_data1), | ||
1804 | SH_PFC_PIN_GROUP(mmc1_data4), | ||
1805 | SH_PFC_PIN_GROUP(mmc1_data8), | ||
1806 | SH_PFC_PIN_GROUP(mmc1_ctrl), | ||
1807 | SH_PFC_PIN_GROUP(sdhi0_data1), | ||
1808 | SH_PFC_PIN_GROUP(sdhi0_data4), | ||
1809 | SH_PFC_PIN_GROUP(sdhi0_ctrl), | ||
1810 | SH_PFC_PIN_GROUP(sdhi0_cd), | ||
1811 | SH_PFC_PIN_GROUP(sdhi0_wp), | ||
1812 | SH_PFC_PIN_GROUP(sdhi1_data1), | ||
1813 | SH_PFC_PIN_GROUP(sdhi1_data4), | ||
1814 | SH_PFC_PIN_GROUP(sdhi1_ctrl), | ||
1815 | SH_PFC_PIN_GROUP(sdhi1_cd), | ||
1816 | SH_PFC_PIN_GROUP(sdhi1_wp), | ||
1817 | SH_PFC_PIN_GROUP(sdhi2_data1), | ||
1818 | SH_PFC_PIN_GROUP(sdhi2_data4), | ||
1819 | SH_PFC_PIN_GROUP(sdhi2_ctrl), | ||
1820 | SH_PFC_PIN_GROUP(sdhi2_cd), | ||
1821 | SH_PFC_PIN_GROUP(sdhi2_wp), | ||
1822 | SH_PFC_PIN_GROUP(sdhi3_data1), | ||
1823 | SH_PFC_PIN_GROUP(sdhi3_data4), | ||
1824 | SH_PFC_PIN_GROUP(sdhi3_ctrl), | ||
1825 | SH_PFC_PIN_GROUP(sdhi3_cd), | ||
1826 | SH_PFC_PIN_GROUP(sdhi3_wp), | ||
1595 | }; | 1827 | }; |
1596 | 1828 | ||
1597 | static const char * const du0_groups[] = { | 1829 | static const char * const du0_groups[] = { |
@@ -1615,9 +1847,61 @@ static const char * const du1_groups[] = { | |||
1615 | "du1_cde", | 1847 | "du1_cde", |
1616 | }; | 1848 | }; |
1617 | 1849 | ||
1850 | static const char * const mmc0_groups[] = { | ||
1851 | "mmc0_data1", | ||
1852 | "mmc0_data4", | ||
1853 | "mmc0_data8", | ||
1854 | "mmc0_ctrl", | ||
1855 | }; | ||
1856 | |||
1857 | static const char * const mmc1_groups[] = { | ||
1858 | "mmc1_data1", | ||
1859 | "mmc1_data4", | ||
1860 | "mmc1_data8", | ||
1861 | "mmc1_ctrl", | ||
1862 | }; | ||
1863 | |||
1864 | static const char * const sdhi0_groups[] = { | ||
1865 | "sdhi0_data1", | ||
1866 | "sdhi0_data4", | ||
1867 | "sdhi0_ctrl", | ||
1868 | "sdhi0_cd", | ||
1869 | "sdhi0_wp", | ||
1870 | }; | ||
1871 | |||
1872 | static const char * const sdhi1_groups[] = { | ||
1873 | "sdhi1_data1", | ||
1874 | "sdhi1_data4", | ||
1875 | "sdhi1_ctrl", | ||
1876 | "sdhi1_cd", | ||
1877 | "sdhi1_wp", | ||
1878 | }; | ||
1879 | |||
1880 | static const char * const sdhi2_groups[] = { | ||
1881 | "sdhi2_data1", | ||
1882 | "sdhi2_data4", | ||
1883 | "sdhi2_ctrl", | ||
1884 | "sdhi2_cd", | ||
1885 | "sdhi2_wp", | ||
1886 | }; | ||
1887 | |||
1888 | static const char * const sdhi3_groups[] = { | ||
1889 | "sdhi3_data1", | ||
1890 | "sdhi3_data4", | ||
1891 | "sdhi3_ctrl", | ||
1892 | "sdhi3_cd", | ||
1893 | "sdhi3_wp", | ||
1894 | }; | ||
1895 | |||
1618 | static const struct sh_pfc_function pinmux_functions[] = { | 1896 | static const struct sh_pfc_function pinmux_functions[] = { |
1619 | SH_PFC_FUNCTION(du0), | 1897 | SH_PFC_FUNCTION(du0), |
1620 | SH_PFC_FUNCTION(du1), | 1898 | SH_PFC_FUNCTION(du1), |
1899 | SH_PFC_FUNCTION(mmc0), | ||
1900 | SH_PFC_FUNCTION(mmc1), | ||
1901 | SH_PFC_FUNCTION(sdhi0), | ||
1902 | SH_PFC_FUNCTION(sdhi1), | ||
1903 | SH_PFC_FUNCTION(sdhi2), | ||
1904 | SH_PFC_FUNCTION(sdhi3), | ||
1621 | }; | 1905 | }; |
1622 | 1906 | ||
1623 | #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) | 1907 | #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) |