diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-08-26 04:51:22 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-09-24 06:23:42 -0400 |
commit | 3ad8219a50eab201abf89b25d7797d6695b73e4e (patch) | |
tree | 41edb613c893bc347a82438033b1c20d8e73c4d0 /drivers/pinctrl/sh-pfc | |
parent | cfa8b3f54e00b2300a2562c00d4d0cac48379ddb (diff) |
sh-pfc: r8a7778: Add SRU/SSI pin support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c index 428d2a6857ef..20b1d0d671a3 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c | |||
@@ -1288,6 +1288,22 @@ static struct sh_pfc_pin pinmux_pins[] = { | |||
1288 | arg5##_MARK, arg6##_MARK, \ | 1288 | arg5##_MARK, arg6##_MARK, \ |
1289 | arg7##_MARK, arg8##_MARK, } | 1289 | arg7##_MARK, arg8##_MARK, } |
1290 | 1290 | ||
1291 | /* - AUDIO macro -------------------------------------------------------------*/ | ||
1292 | #define AUDIO_PFC_PIN(name, pin) SH_PFC_PINS(name, pin) | ||
1293 | #define AUDIO_PFC_DAT(name, pin) SH_PFC_MUX1(name, pin) | ||
1294 | |||
1295 | /* - AUDIO clock -------------------------------------------------------------*/ | ||
1296 | AUDIO_PFC_PIN(audio_clk_a, RCAR_GP_PIN(2, 22)); | ||
1297 | AUDIO_PFC_DAT(audio_clk_a, AUDIO_CLKA); | ||
1298 | AUDIO_PFC_PIN(audio_clk_b, RCAR_GP_PIN(2, 23)); | ||
1299 | AUDIO_PFC_DAT(audio_clk_b, AUDIO_CLKB); | ||
1300 | AUDIO_PFC_PIN(audio_clk_c, RCAR_GP_PIN(2, 7)); | ||
1301 | AUDIO_PFC_DAT(audio_clk_c, AUDIO_CLKC); | ||
1302 | AUDIO_PFC_PIN(audio_clkout_a, RCAR_GP_PIN(2, 16)); | ||
1303 | AUDIO_PFC_DAT(audio_clkout_a, AUDIO_CLKOUT_A); | ||
1304 | AUDIO_PFC_PIN(audio_clkout_b, RCAR_GP_PIN(1, 16)); | ||
1305 | AUDIO_PFC_DAT(audio_clkout_b, AUDIO_CLKOUT_B); | ||
1306 | |||
1291 | /* - Ether ------------------------------------------------------------------ */ | 1307 | /* - Ether ------------------------------------------------------------------ */ |
1292 | SH_PFC_PINS(ether_rmii, RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11), | 1308 | SH_PFC_PINS(ether_rmii, RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11), |
1293 | RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 9), | 1309 | RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 9), |
@@ -1577,6 +1593,59 @@ SDHI_PFC_WPPN(sdhi2_wp_a, SD2_WP_A); | |||
1577 | SDHI_PFC_PINS(sdhi2_wp_b, RCAR_GP_PIN(3, 28)); | 1593 | SDHI_PFC_PINS(sdhi2_wp_b, RCAR_GP_PIN(3, 28)); |
1578 | SDHI_PFC_WPPN(sdhi2_wp_b, SD2_WP_B); | 1594 | SDHI_PFC_WPPN(sdhi2_wp_b, SD2_WP_B); |
1579 | 1595 | ||
1596 | /* - SSI macro -------------------------------------------------------------- */ | ||
1597 | #define SSI_PFC_PINS(name, args...) SH_PFC_PINS(name, args) | ||
1598 | #define SSI_PFC_CTRL(name, sck, ws) SH_PFC_MUX2(name, sck, ws) | ||
1599 | #define SSI_PFC_DATA(name, d) SH_PFC_MUX1(name, d) | ||
1600 | |||
1601 | /* - SSI 0/1/2 -------------------------------------------------------------- */ | ||
1602 | SSI_PFC_PINS(ssi012_ctrl, RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7)); | ||
1603 | SSI_PFC_CTRL(ssi012_ctrl, SSI_SCK012, SSI_WS012); | ||
1604 | SSI_PFC_PINS(ssi0_data, RCAR_GP_PIN(3, 10)); | ||
1605 | SSI_PFC_DATA(ssi0_data, SSI_SDATA0); | ||
1606 | SSI_PFC_PINS(ssi1_a_ctrl, RCAR_GP_PIN(2, 20), RCAR_GP_PIN(2, 21)); | ||
1607 | SSI_PFC_CTRL(ssi1_a_ctrl, SSI_SCK1_A, SSI_WS1_A); | ||
1608 | SSI_PFC_PINS(ssi1_b_ctrl, PIN_NUMBER(3, 20), RCAR_GP_PIN(1, 3)); | ||
1609 | SSI_PFC_CTRL(ssi1_b_ctrl, SSI_SCK1_B, SSI_WS1_B); | ||
1610 | SSI_PFC_PINS(ssi1_data, RCAR_GP_PIN(3, 9)); | ||
1611 | SSI_PFC_DATA(ssi1_data, SSI_SDATA1); | ||
1612 | SSI_PFC_PINS(ssi2_a_ctrl, RCAR_GP_PIN(2, 26), RCAR_GP_PIN(3, 4)); | ||
1613 | SSI_PFC_CTRL(ssi2_a_ctrl, SSI_SCK2_A, SSI_WS2_A); | ||
1614 | SSI_PFC_PINS(ssi2_b_ctrl, RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 17)); | ||
1615 | SSI_PFC_CTRL(ssi2_b_ctrl, SSI_SCK2_B, SSI_WS2_B); | ||
1616 | SSI_PFC_PINS(ssi2_data, RCAR_GP_PIN(3, 8)); | ||
1617 | SSI_PFC_DATA(ssi2_data, SSI_SDATA2); | ||
1618 | |||
1619 | /* - SSI 3/4 ---------------------------------------------------------------- */ | ||
1620 | SSI_PFC_PINS(ssi34_ctrl, RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3)); | ||
1621 | SSI_PFC_CTRL(ssi34_ctrl, SSI_SCK34, SSI_WS34); | ||
1622 | SSI_PFC_PINS(ssi3_data, RCAR_GP_PIN(3, 5)); | ||
1623 | SSI_PFC_DATA(ssi3_data, SSI_SDATA3); | ||
1624 | SSI_PFC_PINS(ssi4_ctrl, RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 23)); | ||
1625 | SSI_PFC_CTRL(ssi4_ctrl, SSI_SCK4, SSI_WS4); | ||
1626 | SSI_PFC_PINS(ssi4_data, RCAR_GP_PIN(3, 4)); | ||
1627 | SSI_PFC_DATA(ssi4_data, SSI_SDATA4); | ||
1628 | |||
1629 | /* - SSI 5 ------------------------------------------------------------------ */ | ||
1630 | SSI_PFC_PINS(ssi5_ctrl, RCAR_GP_PIN(2, 31), RCAR_GP_PIN(3, 0)); | ||
1631 | SSI_PFC_CTRL(ssi5_ctrl, SSI_SCK5, SSI_WS5); | ||
1632 | SSI_PFC_PINS(ssi5_data, RCAR_GP_PIN(3, 1)); | ||
1633 | SSI_PFC_DATA(ssi5_data, SSI_SDATA5); | ||
1634 | |||
1635 | /* - SSI 6 ------------------------------------------------------------------ */ | ||
1636 | SSI_PFC_PINS(ssi6_ctrl, RCAR_GP_PIN(2, 28), RCAR_GP_PIN(2, 29)); | ||
1637 | SSI_PFC_CTRL(ssi6_ctrl, SSI_SCK6, SSI_WS6); | ||
1638 | SSI_PFC_PINS(ssi6_data, RCAR_GP_PIN(2, 30)); | ||
1639 | SSI_PFC_DATA(ssi6_data, SSI_SDATA6); | ||
1640 | |||
1641 | /* - SSI 7/8 --------------------------------------------------------------- */ | ||
1642 | SSI_PFC_PINS(ssi78_ctrl, RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 25)); | ||
1643 | SSI_PFC_CTRL(ssi78_ctrl, SSI_SCK78, SSI_WS78); | ||
1644 | SSI_PFC_PINS(ssi7_data, RCAR_GP_PIN(2, 27)); | ||
1645 | SSI_PFC_DATA(ssi7_data, SSI_SDATA7); | ||
1646 | SSI_PFC_PINS(ssi8_data, RCAR_GP_PIN(2, 26)); | ||
1647 | SSI_PFC_DATA(ssi8_data, SSI_SDATA8); | ||
1648 | |||
1580 | /* - USB0 ------------------------------------------------------------------- */ | 1649 | /* - USB0 ------------------------------------------------------------------- */ |
1581 | SH_PFC_PINS(usb0, RCAR_GP_PIN(0, 1)); | 1650 | SH_PFC_PINS(usb0, RCAR_GP_PIN(0, 1)); |
1582 | SH_PFC_MUX1(usb0, PENC0); | 1651 | SH_PFC_MUX1(usb0, PENC0); |
@@ -1624,6 +1693,11 @@ VIN_PFC_PINS(vin1_sync, RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 22)); | |||
1624 | VIN_PFC_SYNC(vin1_sync, VI1_HSYNC, VI1_VSYNC); | 1693 | VIN_PFC_SYNC(vin1_sync, VI1_HSYNC, VI1_VSYNC); |
1625 | 1694 | ||
1626 | static const struct sh_pfc_pin_group pinmux_groups[] = { | 1695 | static const struct sh_pfc_pin_group pinmux_groups[] = { |
1696 | SH_PFC_PIN_GROUP(audio_clk_a), | ||
1697 | SH_PFC_PIN_GROUP(audio_clk_b), | ||
1698 | SH_PFC_PIN_GROUP(audio_clk_c), | ||
1699 | SH_PFC_PIN_GROUP(audio_clkout_a), | ||
1700 | SH_PFC_PIN_GROUP(audio_clkout_b), | ||
1627 | SH_PFC_PIN_GROUP(ether_rmii), | 1701 | SH_PFC_PIN_GROUP(ether_rmii), |
1628 | SH_PFC_PIN_GROUP(ether_link), | 1702 | SH_PFC_PIN_GROUP(ether_link), |
1629 | SH_PFC_PIN_GROUP(ether_magic), | 1703 | SH_PFC_PIN_GROUP(ether_magic), |
@@ -1713,6 +1787,25 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
1713 | SH_PFC_PIN_GROUP(sdhi2_data4_b), | 1787 | SH_PFC_PIN_GROUP(sdhi2_data4_b), |
1714 | SH_PFC_PIN_GROUP(sdhi2_wp_a), | 1788 | SH_PFC_PIN_GROUP(sdhi2_wp_a), |
1715 | SH_PFC_PIN_GROUP(sdhi2_wp_b), | 1789 | SH_PFC_PIN_GROUP(sdhi2_wp_b), |
1790 | SH_PFC_PIN_GROUP(ssi012_ctrl), | ||
1791 | SH_PFC_PIN_GROUP(ssi0_data), | ||
1792 | SH_PFC_PIN_GROUP(ssi1_a_ctrl), | ||
1793 | SH_PFC_PIN_GROUP(ssi1_b_ctrl), | ||
1794 | SH_PFC_PIN_GROUP(ssi1_data), | ||
1795 | SH_PFC_PIN_GROUP(ssi2_a_ctrl), | ||
1796 | SH_PFC_PIN_GROUP(ssi2_b_ctrl), | ||
1797 | SH_PFC_PIN_GROUP(ssi2_data), | ||
1798 | SH_PFC_PIN_GROUP(ssi34_ctrl), | ||
1799 | SH_PFC_PIN_GROUP(ssi3_data), | ||
1800 | SH_PFC_PIN_GROUP(ssi4_ctrl), | ||
1801 | SH_PFC_PIN_GROUP(ssi4_data), | ||
1802 | SH_PFC_PIN_GROUP(ssi5_ctrl), | ||
1803 | SH_PFC_PIN_GROUP(ssi5_data), | ||
1804 | SH_PFC_PIN_GROUP(ssi6_ctrl), | ||
1805 | SH_PFC_PIN_GROUP(ssi6_data), | ||
1806 | SH_PFC_PIN_GROUP(ssi78_ctrl), | ||
1807 | SH_PFC_PIN_GROUP(ssi7_data), | ||
1808 | SH_PFC_PIN_GROUP(ssi8_data), | ||
1716 | SH_PFC_PIN_GROUP(usb0), | 1809 | SH_PFC_PIN_GROUP(usb0), |
1717 | SH_PFC_PIN_GROUP(usb0_ovc), | 1810 | SH_PFC_PIN_GROUP(usb0_ovc), |
1718 | SH_PFC_PIN_GROUP(usb1), | 1811 | SH_PFC_PIN_GROUP(usb1), |
@@ -1725,6 +1818,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
1725 | SH_PFC_PIN_GROUP(vin1_sync), | 1818 | SH_PFC_PIN_GROUP(vin1_sync), |
1726 | }; | 1819 | }; |
1727 | 1820 | ||
1821 | static const char * const audio_clk_groups[] = { | ||
1822 | "audio_clk_a", | ||
1823 | "audio_clk_b", | ||
1824 | "audio_clk_c", | ||
1825 | "audio_clkout_a", | ||
1826 | "audio_clkout_b", | ||
1827 | }; | ||
1828 | |||
1728 | static const char * const ether_groups[] = { | 1829 | static const char * const ether_groups[] = { |
1729 | "ether_rmii", | 1830 | "ether_rmii", |
1730 | "ether_link", | 1831 | "ether_link", |
@@ -1875,6 +1976,28 @@ static const char * const sdhi2_groups[] = { | |||
1875 | "sdhi2_wp_b", | 1976 | "sdhi2_wp_b", |
1876 | }; | 1977 | }; |
1877 | 1978 | ||
1979 | static const char * const ssi_groups[] = { | ||
1980 | "ssi012_ctrl", | ||
1981 | "ssi0_data", | ||
1982 | "ssi1_a_ctrl", | ||
1983 | "ssi1_b_ctrl", | ||
1984 | "ssi1_data", | ||
1985 | "ssi2_a_ctrl", | ||
1986 | "ssi2_b_ctrl", | ||
1987 | "ssi2_data", | ||
1988 | "ssi34_ctrl", | ||
1989 | "ssi3_data", | ||
1990 | "ssi4_ctrl", | ||
1991 | "ssi4_data", | ||
1992 | "ssi5_ctrl", | ||
1993 | "ssi5_data", | ||
1994 | "ssi6_ctrl", | ||
1995 | "ssi6_data", | ||
1996 | "ssi78_ctrl", | ||
1997 | "ssi7_data", | ||
1998 | "ssi8_data", | ||
1999 | }; | ||
2000 | |||
1878 | static const char * const usb0_groups[] = { | 2001 | static const char * const usb0_groups[] = { |
1879 | "usb0", | 2002 | "usb0", |
1880 | "usb0_ovc", | 2003 | "usb0_ovc", |
@@ -1898,6 +2021,7 @@ static const char * const vin1_groups[] = { | |||
1898 | }; | 2021 | }; |
1899 | 2022 | ||
1900 | static const struct sh_pfc_function pinmux_functions[] = { | 2023 | static const struct sh_pfc_function pinmux_functions[] = { |
2024 | SH_PFC_FUNCTION(audio_clk), | ||
1901 | SH_PFC_FUNCTION(ether), | 2025 | SH_PFC_FUNCTION(ether), |
1902 | SH_PFC_FUNCTION(hscif0), | 2026 | SH_PFC_FUNCTION(hscif0), |
1903 | SH_PFC_FUNCTION(hscif1), | 2027 | SH_PFC_FUNCTION(hscif1), |
@@ -1918,6 +2042,7 @@ static const struct sh_pfc_function pinmux_functions[] = { | |||
1918 | SH_PFC_FUNCTION(sdhi0), | 2042 | SH_PFC_FUNCTION(sdhi0), |
1919 | SH_PFC_FUNCTION(sdhi1), | 2043 | SH_PFC_FUNCTION(sdhi1), |
1920 | SH_PFC_FUNCTION(sdhi2), | 2044 | SH_PFC_FUNCTION(sdhi2), |
2045 | SH_PFC_FUNCTION(ssi), | ||
1921 | SH_PFC_FUNCTION(usb0), | 2046 | SH_PFC_FUNCTION(usb0), |
1922 | SH_PFC_FUNCTION(usb1), | 2047 | SH_PFC_FUNCTION(usb1), |
1923 | SH_PFC_FUNCTION(vin0), | 2048 | SH_PFC_FUNCTION(vin0), |