aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-01-03 07:07:05 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:34:06 -0400
commit06c7dd866da70f6c324ae3990b2c0d77fb2d07f5 (patch)
treea6d59aeea02e728656e4e3daea838c43481cff0d
parent512b156cefb2931a483ff3dd25852d122230894a (diff)
sh-pfc: r8a7740: Add LCDC0 and LCDC1 pin groups and functions
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7740.c276
1 files changed, 276 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index de13348be5c0..e16ec10b7dc1 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -1658,6 +1658,277 @@ static struct sh_pfc_pin pinmux_pins[] = {
1658 GPIO_PORT_ALL(), 1658 GPIO_PORT_ALL(),
1659}; 1659};
1660 1660
1661/* - LCD0 ------------------------------------------------------------------- */
1662static const unsigned int lcd0_data8_pins[] = {
1663 /* D[0:7] */
1664 58, 57, 56, 55, 54, 53, 52, 51,
1665};
1666static const unsigned int lcd0_data8_mux[] = {
1667 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1668 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1669};
1670static const unsigned int lcd0_data9_pins[] = {
1671 /* D[0:8] */
1672 58, 57, 56, 55, 54, 53, 52, 51,
1673 50,
1674};
1675static const unsigned int lcd0_data9_mux[] = {
1676 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1677 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1678 LCD0_D8_MARK,
1679};
1680static const unsigned int lcd0_data12_pins[] = {
1681 /* D[0:11] */
1682 58, 57, 56, 55, 54, 53, 52, 51,
1683 50, 49, 48, 47,
1684};
1685static const unsigned int lcd0_data12_mux[] = {
1686 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1687 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1688 LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
1689};
1690static const unsigned int lcd0_data16_pins[] = {
1691 /* D[0:15] */
1692 58, 57, 56, 55, 54, 53, 52, 51,
1693 50, 49, 48, 47, 46, 45, 44, 43,
1694};
1695static const unsigned int lcd0_data16_mux[] = {
1696 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1697 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1698 LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
1699 LCD0_D12_MARK, LCD0_D13_MARK, LCD0_D14_MARK, LCD0_D15_MARK,
1700};
1701static const unsigned int lcd0_data18_pins[] = {
1702 /* D[0:17] */
1703 58, 57, 56, 55, 54, 53, 52, 51,
1704 50, 49, 48, 47, 46, 45, 44, 43,
1705 42, 41,
1706};
1707static const unsigned int lcd0_data18_mux[] = {
1708 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1709 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1710 LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
1711 LCD0_D12_MARK, LCD0_D13_MARK, LCD0_D14_MARK, LCD0_D15_MARK,
1712 LCD0_D16_MARK, LCD0_D17_MARK,
1713};
1714static const unsigned int lcd0_data24_0_pins[] = {
1715 /* D[0:23] */
1716 58, 57, 56, 55, 54, 53, 52, 51,
1717 50, 49, 48, 47, 46, 45, 44, 43,
1718 42, 41, 40, 4, 3, 2, 0, 1,
1719};
1720static const unsigned int lcd0_data24_0_mux[] = {
1721 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1722 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1723 LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
1724 LCD0_D12_MARK, LCD0_D13_MARK, LCD0_D14_MARK, LCD0_D15_MARK,
1725 LCD0_D16_MARK, LCD0_D17_MARK, LCD0_D18_PORT40_MARK, LCD0_D19_PORT4_MARK,
1726 LCD0_D20_PORT3_MARK, LCD0_D21_PORT2_MARK, LCD0_D22_PORT0_MARK,
1727 LCD0_D23_PORT1_MARK,
1728};
1729static const unsigned int lcd0_data24_1_pins[] = {
1730 /* D[0:23] */
1731 58, 57, 56, 55, 54, 53, 52, 51,
1732 50, 49, 48, 47, 46, 45, 44, 43,
1733 42, 41, 163, 162, 161, 158, 160, 159,
1734};
1735static const unsigned int lcd0_data24_1_mux[] = {
1736 LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
1737 LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
1738 LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
1739 LCD0_D16_MARK, LCD0_D17_MARK, LCD0_D18_PORT163_MARK,
1740 LCD0_D19_PORT162_MARK, LCD0_D20_PORT161_MARK, LCD0_D21_PORT158_MARK,
1741 LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
1742};
1743static const unsigned int lcd0_display_pins[] = {
1744 /* DON, VCPWC, VEPWC */
1745 61, 59, 60,
1746};
1747static const unsigned int lcd0_display_mux[] = {
1748 LCD0_DON_MARK, LCD0_VCPWC_MARK, LCD0_VEPWC_MARK,
1749};
1750static const unsigned int lcd0_lclk_0_pins[] = {
1751 /* LCLK */
1752 102,
1753};
1754static const unsigned int lcd0_lclk_0_mux[] = {
1755 LCD0_LCLK_PORT102_MARK,
1756};
1757static const unsigned int lcd0_lclk_1_pins[] = {
1758 /* LCLK */
1759 165,
1760};
1761static const unsigned int lcd0_lclk_1_mux[] = {
1762 LCD0_LCLK_PORT165_MARK,
1763};
1764static const unsigned int lcd0_sync_pins[] = {
1765 /* VSYN, HSYN, DCK, DISP */
1766 63, 64, 62, 65,
1767};
1768static const unsigned int lcd0_sync_mux[] = {
1769 LCD0_VSYN_MARK, LCD0_HSYN_MARK, LCD0_DCK_MARK, LCD0_DISP_MARK,
1770};
1771static const unsigned int lcd0_sys_pins[] = {
1772 /* CS, WR, RD, RS */
1773 64, 62, 164, 65,
1774};
1775static const unsigned int lcd0_sys_mux[] = {
1776 LCD0_CS_MARK, LCD0_WR_MARK, LCD0_RD_MARK, LCD0_RS_MARK,
1777};
1778/* - LCD1 ------------------------------------------------------------------- */
1779static const unsigned int lcd1_data8_pins[] = {
1780 /* D[0:7] */
1781 4, 3, 2, 1, 0, 91, 92, 23,
1782};
1783static const unsigned int lcd1_data8_mux[] = {
1784 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1785 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1786};
1787static const unsigned int lcd1_data9_pins[] = {
1788 /* D[0:8] */
1789 4, 3, 2, 1, 0, 91, 92, 23,
1790 93,
1791};
1792static const unsigned int lcd1_data9_mux[] = {
1793 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1794 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1795 LCD1_D8_MARK,
1796};
1797static const unsigned int lcd1_data12_pins[] = {
1798 /* D[0:12] */
1799 4, 3, 2, 1, 0, 91, 92, 23,
1800 93, 94, 21, 201,
1801};
1802static const unsigned int lcd1_data12_mux[] = {
1803 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1804 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1805 LCD1_D8_MARK, LCD1_D9_MARK, LCD1_D10_MARK, LCD1_D11_MARK,
1806};
1807static const unsigned int lcd1_data16_pins[] = {
1808 /* D[0:15] */
1809 4, 3, 2, 1, 0, 91, 92, 23,
1810 93, 94, 21, 201, 200, 199, 196, 195,
1811};
1812static const unsigned int lcd1_data16_mux[] = {
1813 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1814 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1815 LCD1_D8_MARK, LCD1_D9_MARK, LCD1_D10_MARK, LCD1_D11_MARK,
1816 LCD1_D12_MARK, LCD1_D13_MARK, LCD1_D14_MARK, LCD1_D15_MARK,
1817};
1818static const unsigned int lcd1_data18_pins[] = {
1819 /* D[0:17] */
1820 4, 3, 2, 1, 0, 91, 92, 23,
1821 93, 94, 21, 201, 200, 199, 196, 195,
1822 194, 193,
1823};
1824static const unsigned int lcd1_data18_mux[] = {
1825 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1826 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1827 LCD1_D8_MARK, LCD1_D9_MARK, LCD1_D10_MARK, LCD1_D11_MARK,
1828 LCD1_D12_MARK, LCD1_D13_MARK, LCD1_D14_MARK, LCD1_D15_MARK,
1829 LCD1_D16_MARK, LCD1_D17_MARK,
1830};
1831static const unsigned int lcd1_data24_pins[] = {
1832 /* D[0:23] */
1833 4, 3, 2, 1, 0, 91, 92, 23,
1834 93, 94, 21, 201, 200, 199, 196, 195,
1835 194, 193, 198, 197, 75, 74, 15, 14,
1836};
1837static const unsigned int lcd1_data24_mux[] = {
1838 LCD1_D0_MARK, LCD1_D1_MARK, LCD1_D2_MARK, LCD1_D3_MARK,
1839 LCD1_D4_MARK, LCD1_D5_MARK, LCD1_D6_MARK, LCD1_D7_MARK,
1840 LCD1_D8_MARK, LCD1_D9_MARK, LCD1_D10_MARK, LCD1_D11_MARK,
1841 LCD1_D12_MARK, LCD1_D13_MARK, LCD1_D14_MARK, LCD1_D15_MARK,
1842 LCD1_D16_MARK, LCD1_D17_MARK, LCD1_D18_MARK, LCD1_D19_MARK,
1843 LCD1_D20_MARK, LCD1_D21_MARK, LCD1_D22_MARK, LCD1_D23_MARK,
1844};
1845static const unsigned int lcd1_display_pins[] = {
1846 /* DON, VCPWC, VEPWC */
1847 100, 5, 6,
1848};
1849static const unsigned int lcd1_display_mux[] = {
1850 LCD1_DON_MARK, LCD1_VCPWC_MARK, LCD1_VEPWC_MARK,
1851};
1852static const unsigned int lcd1_lclk_pins[] = {
1853 /* LCLK */
1854 40,
1855};
1856static const unsigned int lcd1_lclk_mux[] = {
1857 LCD1_LCLK_MARK,
1858};
1859static const unsigned int lcd1_sync_pins[] = {
1860 /* VSYN, HSYN, DCK, DISP */
1861 98, 97, 99, 12,
1862};
1863static const unsigned int lcd1_sync_mux[] = {
1864 LCD1_VSYN_MARK, LCD1_HSYN_MARK, LCD1_DCK_MARK, LCD1_DISP_MARK,
1865};
1866static const unsigned int lcd1_sys_pins[] = {
1867 /* CS, WR, RD, RS */
1868 97, 99, 13, 12,
1869};
1870static const unsigned int lcd1_sys_mux[] = {
1871 LCD1_CS_MARK, LCD1_WR_MARK, LCD1_RD_MARK, LCD1_RS_MARK,
1872};
1873
1874static const struct sh_pfc_pin_group pinmux_groups[] = {
1875 SH_PFC_PIN_GROUP(lcd0_data8),
1876 SH_PFC_PIN_GROUP(lcd0_data9),
1877 SH_PFC_PIN_GROUP(lcd0_data12),
1878 SH_PFC_PIN_GROUP(lcd0_data16),
1879 SH_PFC_PIN_GROUP(lcd0_data18),
1880 SH_PFC_PIN_GROUP(lcd0_data24_0),
1881 SH_PFC_PIN_GROUP(lcd0_data24_1),
1882 SH_PFC_PIN_GROUP(lcd0_display),
1883 SH_PFC_PIN_GROUP(lcd0_lclk_0),
1884 SH_PFC_PIN_GROUP(lcd0_lclk_1),
1885 SH_PFC_PIN_GROUP(lcd0_sync),
1886 SH_PFC_PIN_GROUP(lcd0_sys),
1887 SH_PFC_PIN_GROUP(lcd1_data8),
1888 SH_PFC_PIN_GROUP(lcd1_data9),
1889 SH_PFC_PIN_GROUP(lcd1_data12),
1890 SH_PFC_PIN_GROUP(lcd1_data16),
1891 SH_PFC_PIN_GROUP(lcd1_data18),
1892 SH_PFC_PIN_GROUP(lcd1_data24),
1893 SH_PFC_PIN_GROUP(lcd1_display),
1894 SH_PFC_PIN_GROUP(lcd1_lclk),
1895 SH_PFC_PIN_GROUP(lcd1_sync),
1896 SH_PFC_PIN_GROUP(lcd1_sys),
1897};
1898
1899static const char * const lcd0_groups[] = {
1900 "lcd0_data8",
1901 "lcd0_data9",
1902 "lcd0_data12",
1903 "lcd0_data16",
1904 "lcd0_data18",
1905 "lcd0_data24_0",
1906 "lcd0_data24_1",
1907 "lcd0_display",
1908 "lcd0_lclk_0",
1909 "lcd0_lclk_1",
1910 "lcd0_sync",
1911 "lcd0_sys",
1912};
1913
1914static const char * const lcd1_groups[] = {
1915 "lcd1_data8",
1916 "lcd1_data9",
1917 "lcd1_data12",
1918 "lcd1_data16",
1919 "lcd1_data18",
1920 "lcd1_data24",
1921 "lcd1_display",
1922 "lcd1_lclk",
1923 "lcd1_sync",
1924 "lcd1_sys",
1925};
1926
1927static const struct sh_pfc_function pinmux_functions[] = {
1928 SH_PFC_FUNCTION(lcd0),
1929 SH_PFC_FUNCTION(lcd1),
1930};
1931
1661#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1932#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1662 1933
1663static const struct pinmux_func pinmux_func_gpios[] = { 1934static const struct pinmux_func pinmux_func_gpios[] = {
@@ -2596,6 +2867,11 @@ const struct sh_pfc_soc_info r8a7740_pinmux_info = {
2596 2867
2597 .pins = pinmux_pins, 2868 .pins = pinmux_pins,
2598 .nr_pins = ARRAY_SIZE(pinmux_pins), 2869 .nr_pins = ARRAY_SIZE(pinmux_pins),
2870 .groups = pinmux_groups,
2871 .nr_groups = ARRAY_SIZE(pinmux_groups),
2872 .functions = pinmux_functions,
2873 .nr_functions = ARRAY_SIZE(pinmux_functions),
2874
2599 .func_gpios = pinmux_func_gpios, 2875 .func_gpios = pinmux_func_gpios,
2600 .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios), 2876 .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
2601 2877