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:05 -0400
commitdf68a28d1765d9409262136b1fb098f44aa32642 (patch)
tree5ac6f3ef2fcd51f709c07335be8b19e86a58bbdd
parentb8238993ed2ba222a456bcdf53370ff7fe1fe501 (diff)
sh-pfc: sh73a0: Add LCD and LCD2 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-sh73a0.c254
1 files changed, 254 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index f31adfc687fa..c8b2604eb8f6 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -1846,6 +1846,255 @@ static const struct pinmux_range pinmux_ranges[] = {
1846 {.begin = 288, .end = 309,}, 1846 {.begin = 288, .end = 309,},
1847}; 1847};
1848 1848
1849/* - LCD -------------------------------------------------------------------- */
1850static const unsigned int lcd_data8_pins[] = {
1851 /* D[0:7] */
1852 192, 193, 194, 195, 196, 197, 198, 199,
1853};
1854static const unsigned int lcd_data8_mux[] = {
1855 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1856 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1857};
1858static const unsigned int lcd_data9_pins[] = {
1859 /* D[0:8] */
1860 192, 193, 194, 195, 196, 197, 198, 199,
1861 200,
1862};
1863static const unsigned int lcd_data9_mux[] = {
1864 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1865 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1866 LCDD8_MARK,
1867};
1868static const unsigned int lcd_data12_pins[] = {
1869 /* D[0:11] */
1870 192, 193, 194, 195, 196, 197, 198, 199,
1871 200, 201, 202, 203,
1872};
1873static const unsigned int lcd_data12_mux[] = {
1874 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1875 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1876 LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
1877};
1878static const unsigned int lcd_data16_pins[] = {
1879 /* D[0:15] */
1880 192, 193, 194, 195, 196, 197, 198, 199,
1881 200, 201, 202, 203, 204, 205, 206, 207,
1882};
1883static const unsigned int lcd_data16_mux[] = {
1884 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1885 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1886 LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
1887 LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
1888};
1889static const unsigned int lcd_data18_pins[] = {
1890 /* D[0:17] */
1891 192, 193, 194, 195, 196, 197, 198, 199,
1892 200, 201, 202, 203, 204, 205, 206, 207,
1893 208, 209,
1894};
1895static const unsigned int lcd_data18_mux[] = {
1896 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1897 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1898 LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
1899 LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
1900 LCDD16_MARK, LCDD17_MARK,
1901};
1902static const unsigned int lcd_data24_pins[] = {
1903 /* D[0:23] */
1904 192, 193, 194, 195, 196, 197, 198, 199,
1905 200, 201, 202, 203, 204, 205, 206, 207,
1906 208, 209, 210, 211, 212, 213, 214, 215
1907};
1908static const unsigned int lcd_data24_mux[] = {
1909 LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
1910 LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
1911 LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
1912 LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
1913 LCDD16_MARK, LCDD17_MARK, LCDD18_MARK, LCDD19_MARK,
1914 LCDD20_MARK, LCDD21_MARK, LCDD22_MARK, LCDD23_MARK,
1915};
1916static const unsigned int lcd_display_pins[] = {
1917 /* DON */
1918 222,
1919};
1920static const unsigned int lcd_display_mux[] = {
1921 LCDDON_MARK,
1922};
1923static const unsigned int lcd_lclk_pins[] = {
1924 /* LCLK */
1925 221,
1926};
1927static const unsigned int lcd_lclk_mux[] = {
1928 LCDLCLK_MARK,
1929};
1930static const unsigned int lcd_sync_pins[] = {
1931 /* VSYN, HSYN, DCK, DISP */
1932 220, 218, 216, 219,
1933};
1934static const unsigned int lcd_sync_mux[] = {
1935 LCDVSYN_MARK, LCDHSYN_MARK, LCDDCK_MARK, LCDDISP_MARK,
1936};
1937static const unsigned int lcd_sys_pins[] = {
1938 /* CS, WR, RD, RS */
1939 218, 216, 217, 219,
1940};
1941static const unsigned int lcd_sys_mux[] = {
1942 LCDCS__MARK, LCDWR__MARK, LCDRD__MARK, LCDRS_MARK,
1943};
1944/* - LCD2 ------------------------------------------------------------------- */
1945static const unsigned int lcd2_data8_pins[] = {
1946 /* D[0:7] */
1947 128, 129, 142, 143, 144, 145, 138, 139,
1948};
1949static const unsigned int lcd2_data8_mux[] = {
1950 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
1951 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
1952};
1953static const unsigned int lcd2_data9_pins[] = {
1954 /* D[0:8] */
1955 128, 129, 142, 143, 144, 145, 138, 139,
1956 140,
1957};
1958static const unsigned int lcd2_data9_mux[] = {
1959 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
1960 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
1961 LCD2D8_MARK,
1962};
1963static const unsigned int lcd2_data12_pins[] = {
1964 /* D[0:12] */
1965 128, 129, 142, 143, 144, 145, 138, 139,
1966 140, 141, 130, 131,
1967};
1968static const unsigned int lcd2_data12_mux[] = {
1969 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
1970 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
1971 LCD2D8_MARK, LCD2D9_MARK, LCD2D10_MARK, LCD2D11_MARK,
1972};
1973static const unsigned int lcd2_data16_pins[] = {
1974 /* D[0:15] */
1975 128, 129, 142, 143, 144, 145, 138, 139,
1976 140, 141, 130, 131, 132, 133, 134, 135,
1977};
1978static const unsigned int lcd2_data16_mux[] = {
1979 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
1980 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
1981 LCD2D8_MARK, LCD2D9_MARK, LCD2D10_MARK, LCD2D11_MARK,
1982 LCD2D12_MARK, LCD2D13_MARK, LCD2D14_MARK, LCD2D15_MARK,
1983};
1984static const unsigned int lcd2_data18_pins[] = {
1985 /* D[0:17] */
1986 128, 129, 142, 143, 144, 145, 138, 139,
1987 140, 141, 130, 131, 132, 133, 134, 135,
1988 136, 137,
1989};
1990static const unsigned int lcd2_data18_mux[] = {
1991 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
1992 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
1993 LCD2D8_MARK, LCD2D9_MARK, LCD2D10_MARK, LCD2D11_MARK,
1994 LCD2D12_MARK, LCD2D13_MARK, LCD2D14_MARK, LCD2D15_MARK,
1995 LCD2D16_MARK, LCD2D17_MARK,
1996};
1997static const unsigned int lcd2_data24_pins[] = {
1998 /* D[0:23] */
1999 128, 129, 142, 143, 144, 145, 138, 139,
2000 140, 141, 130, 131, 132, 133, 134, 135,
2001 136, 137, 146, 147, 234, 235, 238, 239
2002};
2003static const unsigned int lcd2_data24_mux[] = {
2004 LCD2D0_MARK, LCD2D1_MARK, LCD2D2_MARK, LCD2D3_MARK,
2005 LCD2D4_MARK, LCD2D5_MARK, LCD2D6_MARK, LCD2D7_MARK,
2006 LCD2D8_MARK, LCD2D9_MARK, LCD2D10_MARK, LCD2D11_MARK,
2007 LCD2D12_MARK, LCD2D13_MARK, LCD2D14_MARK, LCD2D15_MARK,
2008 LCD2D16_MARK, LCD2D17_MARK, LCD2D18_MARK, LCD2D19_MARK,
2009 LCD2D20_MARK, LCD2D21_MARK, LCD2D22_MARK, LCD2D23_MARK,
2010};
2011static const unsigned int lcd2_sync_0_pins[] = {
2012 /* VSYN, HSYN, DCK, DISP */
2013 128, 129, 146, 145,
2014};
2015static const unsigned int lcd2_sync_0_mux[] = {
2016 PORT128_LCD2VSYN_MARK, PORT129_LCD2HSYN_MARK,
2017 LCD2DCK_MARK, PORT145_LCD2DISP_MARK,
2018};
2019static const unsigned int lcd2_sync_1_pins[] = {
2020 /* VSYN, HSYN, DCK, DISP */
2021 222, 221, 219, 217,
2022};
2023static const unsigned int lcd2_sync_1_mux[] = {
2024 PORT222_LCD2VSYN_MARK, PORT221_LCD2HSYN_MARK,
2025 LCD2DCK_2_MARK, PORT217_LCD2DISP_MARK,
2026};
2027static const unsigned int lcd2_sys_0_pins[] = {
2028 /* CS, WR, RD, RS */
2029 129, 146, 147, 145,
2030};
2031static const unsigned int lcd2_sys_0_mux[] = {
2032 PORT129_LCD2CS__MARK, PORT146_LCD2WR__MARK,
2033 LCD2RD__MARK, PORT145_LCD2RS_MARK,
2034};
2035static const unsigned int lcd2_sys_1_pins[] = {
2036 /* CS, WR, RD, RS */
2037 221, 219, 147, 217,
2038};
2039static const unsigned int lcd2_sys_1_mux[] = {
2040 PORT221_LCD2CS__MARK, PORT219_LCD2WR__MARK,
2041 LCD2RD__MARK, PORT217_LCD2RS_MARK,
2042};
2043
2044static const struct sh_pfc_pin_group pinmux_groups[] = {
2045 SH_PFC_PIN_GROUP(lcd_data8),
2046 SH_PFC_PIN_GROUP(lcd_data9),
2047 SH_PFC_PIN_GROUP(lcd_data12),
2048 SH_PFC_PIN_GROUP(lcd_data16),
2049 SH_PFC_PIN_GROUP(lcd_data18),
2050 SH_PFC_PIN_GROUP(lcd_data24),
2051 SH_PFC_PIN_GROUP(lcd_display),
2052 SH_PFC_PIN_GROUP(lcd_lclk),
2053 SH_PFC_PIN_GROUP(lcd_sync),
2054 SH_PFC_PIN_GROUP(lcd_sys),
2055 SH_PFC_PIN_GROUP(lcd2_data8),
2056 SH_PFC_PIN_GROUP(lcd2_data9),
2057 SH_PFC_PIN_GROUP(lcd2_data12),
2058 SH_PFC_PIN_GROUP(lcd2_data16),
2059 SH_PFC_PIN_GROUP(lcd2_data18),
2060 SH_PFC_PIN_GROUP(lcd2_data24),
2061 SH_PFC_PIN_GROUP(lcd2_sync_0),
2062 SH_PFC_PIN_GROUP(lcd2_sync_1),
2063 SH_PFC_PIN_GROUP(lcd2_sys_0),
2064 SH_PFC_PIN_GROUP(lcd2_sys_1),
2065};
2066
2067static const char * const lcd_groups[] = {
2068 "lcd_data8",
2069 "lcd_data9",
2070 "lcd_data12",
2071 "lcd_data16",
2072 "lcd_data18",
2073 "lcd_data24",
2074 "lcd_display",
2075 "lcd_lclk",
2076 "lcd_sync",
2077 "lcd_sys",
2078};
2079
2080static const char * const lcd2_groups[] = {
2081 "lcd2_data8",
2082 "lcd2_data9",
2083 "lcd2_data12",
2084 "lcd2_data16",
2085 "lcd2_data18",
2086 "lcd2_data24",
2087 "lcd2_sync_0",
2088 "lcd2_sync_1",
2089 "lcd2_sys_0",
2090 "lcd2_sys_1",
2091};
2092
2093static const struct sh_pfc_function pinmux_functions[] = {
2094 SH_PFC_FUNCTION(lcd),
2095 SH_PFC_FUNCTION(lcd2),
2096};
2097
1849#define PINMUX_FN_BASE GPIO_FN_VBUS_0 2098#define PINMUX_FN_BASE GPIO_FN_VBUS_0
1850 2099
1851static const struct pinmux_func pinmux_func_gpios[] = { 2100static const struct pinmux_func pinmux_func_gpios[] = {
@@ -3140,6 +3389,11 @@ const struct sh_pfc_soc_info sh73a0_pinmux_info = {
3140 .nr_pins = ARRAY_SIZE(pinmux_pins), 3389 .nr_pins = ARRAY_SIZE(pinmux_pins),
3141 .ranges = pinmux_ranges, 3390 .ranges = pinmux_ranges,
3142 .nr_ranges = ARRAY_SIZE(pinmux_ranges), 3391 .nr_ranges = ARRAY_SIZE(pinmux_ranges),
3392 .groups = pinmux_groups,
3393 .nr_groups = ARRAY_SIZE(pinmux_groups),
3394 .functions = pinmux_functions,
3395 .nr_functions = ARRAY_SIZE(pinmux_functions),
3396
3143 .func_gpios = pinmux_func_gpios, 3397 .func_gpios = pinmux_func_gpios,
3144 .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios), 3398 .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
3145 3399