diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-07-01 16:58:16 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-11 08:08:36 -0400 |
commit | 0e9386752758b74fd42fda7cbdd6ccb5cb31033c (patch) | |
tree | c0373d3855562c18db65783265ec115ccbe5fc60 | |
parent | ff998356b644ebe723127bd9eec6040b59a4a4f6 (diff) |
sh-pfc: r8a7791: add CAN pin groups
Add CAN0/1 data/clock pin groups to R8A7791 PFC driver.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c index 394b234488cc..576d41b459e9 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c | |||
@@ -1726,6 +1726,133 @@ static const unsigned int audio_clkout_mux[] = { | |||
1726 | AUDIO_CLKOUT_MARK, | 1726 | AUDIO_CLKOUT_MARK, |
1727 | }; | 1727 | }; |
1728 | 1728 | ||
1729 | /* - CAN -------------------------------------------------------------------- */ | ||
1730 | |||
1731 | static const unsigned int can0_data_pins[] = { | ||
1732 | /* TX, RX */ | ||
1733 | RCAR_GP_PIN(3, 26), RCAR_GP_PIN(3, 29), | ||
1734 | }; | ||
1735 | |||
1736 | static const unsigned int can0_data_mux[] = { | ||
1737 | CAN0_TX_MARK, CAN0_RX_MARK, | ||
1738 | }; | ||
1739 | |||
1740 | static const unsigned int can0_data_b_pins[] = { | ||
1741 | /* TX, RX */ | ||
1742 | RCAR_GP_PIN(7, 4), RCAR_GP_PIN(7, 3), | ||
1743 | }; | ||
1744 | |||
1745 | static const unsigned int can0_data_b_mux[] = { | ||
1746 | CAN0_TX_B_MARK, CAN0_RX_B_MARK, | ||
1747 | }; | ||
1748 | |||
1749 | static const unsigned int can0_data_c_pins[] = { | ||
1750 | /* TX, RX */ | ||
1751 | RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 18), | ||
1752 | }; | ||
1753 | |||
1754 | static const unsigned int can0_data_c_mux[] = { | ||
1755 | CAN0_TX_C_MARK, CAN0_RX_C_MARK, | ||
1756 | }; | ||
1757 | |||
1758 | static const unsigned int can0_data_d_pins[] = { | ||
1759 | /* TX, RX */ | ||
1760 | RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 27), | ||
1761 | }; | ||
1762 | |||
1763 | static const unsigned int can0_data_d_mux[] = { | ||
1764 | CAN0_TX_D_MARK, CAN0_RX_D_MARK, | ||
1765 | }; | ||
1766 | |||
1767 | static const unsigned int can0_data_e_pins[] = { | ||
1768 | /* TX, RX */ | ||
1769 | RCAR_GP_PIN(4, 18), RCAR_GP_PIN(4, 28), | ||
1770 | }; | ||
1771 | |||
1772 | static const unsigned int can0_data_e_mux[] = { | ||
1773 | CAN0_TX_E_MARK, CAN0_RX_E_MARK, | ||
1774 | }; | ||
1775 | |||
1776 | static const unsigned int can0_data_f_pins[] = { | ||
1777 | /* TX, RX */ | ||
1778 | RCAR_GP_PIN(6, 7), RCAR_GP_PIN(6, 6), | ||
1779 | }; | ||
1780 | |||
1781 | static const unsigned int can0_data_f_mux[] = { | ||
1782 | CAN0_TX_F_MARK, CAN0_RX_F_MARK, | ||
1783 | }; | ||
1784 | |||
1785 | static const unsigned int can1_data_pins[] = { | ||
1786 | /* TX, RX */ | ||
1787 | RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 20), | ||
1788 | }; | ||
1789 | |||
1790 | static const unsigned int can1_data_mux[] = { | ||
1791 | CAN1_TX_MARK, CAN1_RX_MARK, | ||
1792 | }; | ||
1793 | |||
1794 | static const unsigned int can1_data_b_pins[] = { | ||
1795 | /* TX, RX */ | ||
1796 | RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9), | ||
1797 | }; | ||
1798 | |||
1799 | static const unsigned int can1_data_b_mux[] = { | ||
1800 | CAN1_TX_B_MARK, CAN1_RX_B_MARK, | ||
1801 | }; | ||
1802 | |||
1803 | static const unsigned int can1_data_c_pins[] = { | ||
1804 | /* TX, RX */ | ||
1805 | RCAR_GP_PIN(5, 20), RCAR_GP_PIN(5, 19), | ||
1806 | }; | ||
1807 | |||
1808 | static const unsigned int can1_data_c_mux[] = { | ||
1809 | CAN1_TX_C_MARK, CAN1_RX_C_MARK, | ||
1810 | }; | ||
1811 | |||
1812 | static const unsigned int can1_data_d_pins[] = { | ||
1813 | /* TX, RX */ | ||
1814 | RCAR_GP_PIN(4, 29), RCAR_GP_PIN(4, 31), | ||
1815 | }; | ||
1816 | |||
1817 | static const unsigned int can1_data_d_mux[] = { | ||
1818 | CAN1_TX_D_MARK, CAN1_RX_D_MARK, | ||
1819 | }; | ||
1820 | |||
1821 | static const unsigned int can_clk_pins[] = { | ||
1822 | /* CLK */ | ||
1823 | RCAR_GP_PIN(7, 2), | ||
1824 | }; | ||
1825 | |||
1826 | static const unsigned int can_clk_mux[] = { | ||
1827 | CAN_CLK_MARK, | ||
1828 | }; | ||
1829 | |||
1830 | static const unsigned int can_clk_b_pins[] = { | ||
1831 | /* CLK */ | ||
1832 | RCAR_GP_PIN(5, 21), | ||
1833 | }; | ||
1834 | |||
1835 | static const unsigned int can_clk_b_mux[] = { | ||
1836 | CAN_CLK_B_MARK, | ||
1837 | }; | ||
1838 | |||
1839 | static const unsigned int can_clk_c_pins[] = { | ||
1840 | /* CLK */ | ||
1841 | RCAR_GP_PIN(4, 30), | ||
1842 | }; | ||
1843 | |||
1844 | static const unsigned int can_clk_c_mux[] = { | ||
1845 | CAN_CLK_C_MARK, | ||
1846 | }; | ||
1847 | |||
1848 | static const unsigned int can_clk_d_pins[] = { | ||
1849 | /* CLK */ | ||
1850 | RCAR_GP_PIN(7, 19), | ||
1851 | }; | ||
1852 | |||
1853 | static const unsigned int can_clk_d_mux[] = { | ||
1854 | CAN_CLK_D_MARK, | ||
1855 | }; | ||
1729 | 1856 | ||
1730 | /* - DU --------------------------------------------------------------------- */ | 1857 | /* - DU --------------------------------------------------------------------- */ |
1731 | static const unsigned int du_rgb666_pins[] = { | 1858 | static const unsigned int du_rgb666_pins[] = { |
@@ -4055,6 +4182,20 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
4055 | SH_PFC_PIN_GROUP(audio_clk_b_b), | 4182 | SH_PFC_PIN_GROUP(audio_clk_b_b), |
4056 | SH_PFC_PIN_GROUP(audio_clk_c), | 4183 | SH_PFC_PIN_GROUP(audio_clk_c), |
4057 | SH_PFC_PIN_GROUP(audio_clkout), | 4184 | SH_PFC_PIN_GROUP(audio_clkout), |
4185 | SH_PFC_PIN_GROUP(can0_data), | ||
4186 | SH_PFC_PIN_GROUP(can0_data_b), | ||
4187 | SH_PFC_PIN_GROUP(can0_data_c), | ||
4188 | SH_PFC_PIN_GROUP(can0_data_d), | ||
4189 | SH_PFC_PIN_GROUP(can0_data_e), | ||
4190 | SH_PFC_PIN_GROUP(can0_data_f), | ||
4191 | SH_PFC_PIN_GROUP(can1_data), | ||
4192 | SH_PFC_PIN_GROUP(can1_data_b), | ||
4193 | SH_PFC_PIN_GROUP(can1_data_c), | ||
4194 | SH_PFC_PIN_GROUP(can1_data_d), | ||
4195 | SH_PFC_PIN_GROUP(can_clk), | ||
4196 | SH_PFC_PIN_GROUP(can_clk_b), | ||
4197 | SH_PFC_PIN_GROUP(can_clk_c), | ||
4198 | SH_PFC_PIN_GROUP(can_clk_d), | ||
4058 | SH_PFC_PIN_GROUP(du_rgb666), | 4199 | SH_PFC_PIN_GROUP(du_rgb666), |
4059 | SH_PFC_PIN_GROUP(du_rgb888), | 4200 | SH_PFC_PIN_GROUP(du_rgb888), |
4060 | SH_PFC_PIN_GROUP(du_clk_out_0), | 4201 | SH_PFC_PIN_GROUP(du_clk_out_0), |
@@ -4367,6 +4508,30 @@ static const char * const audio_clk_groups[] = { | |||
4367 | "audio_clkout", | 4508 | "audio_clkout", |
4368 | }; | 4509 | }; |
4369 | 4510 | ||
4511 | static const char * const can0_groups[] = { | ||
4512 | "can0_data_a", | ||
4513 | "can0_data_b", | ||
4514 | "can0_data_c", | ||
4515 | "can0_data_d", | ||
4516 | "can0_data_e", | ||
4517 | "can0_data_f", | ||
4518 | "can_clk_a", | ||
4519 | "can_clk_b", | ||
4520 | "can_clk_c", | ||
4521 | "can_clk_d", | ||
4522 | }; | ||
4523 | |||
4524 | static const char * const can1_groups[] = { | ||
4525 | "can1_data_a", | ||
4526 | "can1_data_b", | ||
4527 | "can1_data_c", | ||
4528 | "can1_data_d", | ||
4529 | "can_clk_a", | ||
4530 | "can_clk_b", | ||
4531 | "can_clk_c", | ||
4532 | "can_clk_d", | ||
4533 | }; | ||
4534 | |||
4370 | static const char * const du_groups[] = { | 4535 | static const char * const du_groups[] = { |
4371 | "du_rgb666", | 4536 | "du_rgb666", |
4372 | "du_rgb888", | 4537 | "du_rgb888", |
@@ -4790,6 +4955,8 @@ static const char * const vin2_groups[] = { | |||
4790 | 4955 | ||
4791 | static const struct sh_pfc_function pinmux_functions[] = { | 4956 | static const struct sh_pfc_function pinmux_functions[] = { |
4792 | SH_PFC_FUNCTION(audio_clk), | 4957 | SH_PFC_FUNCTION(audio_clk), |
4958 | SH_PFC_FUNCTION(can0), | ||
4959 | SH_PFC_FUNCTION(can1), | ||
4793 | SH_PFC_FUNCTION(du), | 4960 | SH_PFC_FUNCTION(du), |
4794 | SH_PFC_FUNCTION(du0), | 4961 | SH_PFC_FUNCTION(du0), |
4795 | SH_PFC_FUNCTION(du1), | 4962 | SH_PFC_FUNCTION(du1), |