aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2015-03-30 17:30:02 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-04-07 09:21:26 -0400
commit19ef697d1eb7be06dcd0d0eb170ee5cc206e8f84 (patch)
tree1ba422d172132db7d97a63d6304adb45bffac3eb /drivers/pinctrl
parentcec656501fc20a5d1b20a43cfa4679705fa7e1ef (diff)
sh-pfc: r8a7790: add EtherAVB pin groups
Add EtherAVB pin groups to R8A7790 PFC driver. Based on original patch by Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>. 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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7790.c91
1 files changed, 91 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
index 80c1843bb6ad..22a5470889f5 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
@@ -1799,6 +1799,81 @@ static const unsigned int audio_clkout_d_pins[] = {
1799static const unsigned int audio_clkout_d_mux[] = { 1799static const unsigned int audio_clkout_d_mux[] = {
1800 AUDIO_CLKOUT_D_MARK, 1800 AUDIO_CLKOUT_D_MARK,
1801}; 1801};
1802/* - AVB -------------------------------------------------------------------- */
1803static const unsigned int avb_link_pins[] = {
1804 RCAR_GP_PIN(3, 11),
1805};
1806static const unsigned int avb_link_mux[] = {
1807 AVB_LINK_MARK,
1808};
1809static const unsigned int avb_magic_pins[] = {
1810 RCAR_GP_PIN(2, 14),
1811};
1812static const unsigned int avb_magic_mux[] = {
1813 AVB_MAGIC_MARK,
1814};
1815static const unsigned int avb_phy_int_pins[] = {
1816 RCAR_GP_PIN(2, 15),
1817};
1818static const unsigned int avb_phy_int_mux[] = {
1819 AVB_PHY_INT_MARK,
1820};
1821static const unsigned int avb_mdio_pins[] = {
1822 RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12),
1823};
1824static const unsigned int avb_mdio_mux[] = {
1825 AVB_MDC_MARK, AVB_MDIO_MARK,
1826};
1827static const unsigned int avb_mii_pins[] = {
1828 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
1829 RCAR_GP_PIN(0, 11),
1830
1831 RCAR_GP_PIN(3, 13), RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1832 RCAR_GP_PIN(2, 2),
1833
1834 RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
1835 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 10),
1836 RCAR_GP_PIN(3, 12),
1837};
1838static const unsigned int avb_mii_mux[] = {
1839 AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK,
1840 AVB_TXD3_MARK,
1841
1842 AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK,
1843 AVB_RXD3_MARK,
1844
1845 AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK,
1846 AVB_CRS_MARK, AVB_TX_EN_MARK, AVB_TX_CLK_MARK,
1847 AVB_COL_MARK,
1848};
1849static const unsigned int avb_gmii_pins[] = {
1850 RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
1851 RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
1852 RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15),
1853
1854 RCAR_GP_PIN(3, 13), RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1855 RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
1856 RCAR_GP_PIN(2, 5), RCAR_GP_PIN(2, 6),
1857
1858 RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
1859 RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 13), RCAR_GP_PIN(2, 16),
1860 RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), RCAR_GP_PIN(3, 10),
1861 RCAR_GP_PIN(3, 12),
1862};
1863static const unsigned int avb_gmii_mux[] = {
1864 AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK,
1865 AVB_TXD3_MARK, AVB_TXD4_MARK, AVB_TXD5_MARK,
1866 AVB_TXD6_MARK, AVB_TXD7_MARK,
1867
1868 AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK,
1869 AVB_RXD3_MARK, AVB_RXD4_MARK, AVB_RXD5_MARK,
1870 AVB_RXD6_MARK, AVB_RXD7_MARK,
1871
1872 AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK,
1873 AVB_CRS_MARK, AVB_GTX_CLK_MARK, AVB_GTXREFCLK_MARK,
1874 AVB_TX_EN_MARK, AVB_TX_ER_MARK, AVB_TX_CLK_MARK,
1875 AVB_COL_MARK,
1876};
1802/* - DU RGB ----------------------------------------------------------------- */ 1877/* - DU RGB ----------------------------------------------------------------- */
1803static const unsigned int du_rgb666_pins[] = { 1878static const unsigned int du_rgb666_pins[] = {
1804 /* R[7:2], G[7:2], B[7:2] */ 1879 /* R[7:2], G[7:2], B[7:2] */
@@ -3823,6 +3898,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
3823 SH_PFC_PIN_GROUP(audio_clkout_b), 3898 SH_PFC_PIN_GROUP(audio_clkout_b),
3824 SH_PFC_PIN_GROUP(audio_clkout_c), 3899 SH_PFC_PIN_GROUP(audio_clkout_c),
3825 SH_PFC_PIN_GROUP(audio_clkout_d), 3900 SH_PFC_PIN_GROUP(audio_clkout_d),
3901 SH_PFC_PIN_GROUP(avb_link),
3902 SH_PFC_PIN_GROUP(avb_magic),
3903 SH_PFC_PIN_GROUP(avb_phy_int),
3904 SH_PFC_PIN_GROUP(avb_mdio),
3905 SH_PFC_PIN_GROUP(avb_mii),
3906 SH_PFC_PIN_GROUP(avb_gmii),
3826 SH_PFC_PIN_GROUP(du_rgb666), 3907 SH_PFC_PIN_GROUP(du_rgb666),
3827 SH_PFC_PIN_GROUP(du_rgb888), 3908 SH_PFC_PIN_GROUP(du_rgb888),
3828 SH_PFC_PIN_GROUP(du_clk_out_0), 3909 SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4101,6 +4182,15 @@ static const char * const audio_clk_groups[] = {
4101 "audio_clkout_d", 4182 "audio_clkout_d",
4102}; 4183};
4103 4184
4185static const char * const avb_groups[] = {
4186 "avb_link",
4187 "avb_magic",
4188 "avb_phy_int",
4189 "avb_mdio",
4190 "avb_mii",
4191 "avb_gmii",
4192};
4193
4104static const char * const du_groups[] = { 4194static const char * const du_groups[] = {
4105 "du_rgb666", 4195 "du_rgb666",
4106 "du_rgb888", 4196 "du_rgb888",
@@ -4507,6 +4597,7 @@ static const char * const vin3_groups[] = {
4507 4597
4508static const struct sh_pfc_function pinmux_functions[] = { 4598static const struct sh_pfc_function pinmux_functions[] = {
4509 SH_PFC_FUNCTION(audio_clk), 4599 SH_PFC_FUNCTION(audio_clk),
4600 SH_PFC_FUNCTION(avb),
4510 SH_PFC_FUNCTION(du), 4601 SH_PFC_FUNCTION(du),
4511 SH_PFC_FUNCTION(du0), 4602 SH_PFC_FUNCTION(du0),
4512 SH_PFC_FUNCTION(du1), 4603 SH_PFC_FUNCTION(du1),