aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-tegra114.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-03-07 14:22:16 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-03-12 10:23:41 -0400
commitce4362546612c00a059c255f5c55373d6ee1022a (patch)
tree88d22d243ae5e6b467caaeb7ab07af6f20f57632 /drivers/pinctrl/pinctrl-tegra114.c
parentedfab368c8087ae574d6fa49fdc85068a116b79b (diff)
pinctrl: tegra: dynamically calculate function list of groups
The per-SoC data structures for Tegra pinctrl stored some information in a redundant way. Specifically, the list of groups that each function could be muxed onto was stored once explicitly, and also as part of the definition of each group. Eliminate this redundancy, and calculate each function's list of valid groups at pinctrl probe time. This removes thousands of lines of code from the pinctrl driver and ~16K from the vmlinux binary size, and adds only about 500uS to the boot process (on Tegra30; newer SoCs will likely be faster still). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra114.c')
-rw-r--r--drivers/pinctrl/pinctrl-tegra114.c931
1 files changed, 1 insertions, 930 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra114.c b/drivers/pinctrl/pinctrl-tegra114.c
index 46da27ff2d64..1c9346f28b84 100644
--- a/drivers/pinctrl/pinctrl-tegra114.c
+++ b/drivers/pinctrl/pinctrl-tegra114.c
@@ -1420,941 +1420,12 @@ enum tegra_mux {
1420 TEGRA_MUX_VI_ALT3, 1420 TEGRA_MUX_VI_ALT3,
1421}; 1421};
1422 1422
1423static const char * const blink_groups[] = {
1424 "clk_32k_out_pa0",
1425};
1426
1427static const char * const cec_groups[] = {
1428 "hdmi_cec_pee3",
1429};
1430
1431static const char * const cldvfs_groups[] = {
1432 "gmi_ad9_ph1",
1433 "gmi_ad10_ph2",
1434 "kb_row7_pr7",
1435 "kb_row8_ps0",
1436 "dvfs_pwm_px0",
1437 "dvfs_clk_px2",
1438};
1439
1440static const char * const clk12_groups[] = {
1441 "sdmmc1_wp_n_pv3",
1442 "sdmmc1_clk_pz0",
1443};
1444
1445static const char * const cpu_groups[] = {
1446 "cpu_pwr_req",
1447};
1448
1449static const char * const dap_groups[] = {
1450 "clk1_req_pee2",
1451 "clk2_req_pcc5",
1452};
1453
1454static const char * const dap1_groups[] = {
1455 "clk1_req_pee2",
1456};
1457
1458static const char * const dap2_groups[] = {
1459 "clk1_out_pw4",
1460 "gpio_x4_aud_px4",
1461};
1462
1463static const char * const dev3_groups[] = {
1464 "clk3_req_pee1",
1465};
1466
1467static const char * const displaya_groups[] = {
1468 "dap3_fs_pp0",
1469 "dap3_din_pp1",
1470 "dap3_dout_pp2",
1471 "dap3_sclk_pp3",
1472 "uart3_rts_n_pc0",
1473 "pu3",
1474 "pu4",
1475 "pu5",
1476 "pbb3",
1477 "pbb4",
1478 "pbb5",
1479 "pbb6",
1480 "kb_row3_pr3",
1481 "kb_row4_pr4",
1482 "kb_row5_pr5",
1483 "kb_row6_pr6",
1484 "kb_col3_pq3",
1485 "sdmmc3_dat2_pb5",
1486};
1487
1488static const char * const displaya_alt_groups[] = {
1489 "kb_row6_pr6",
1490};
1491
1492static const char * const displayb_groups[] = {
1493 "dap3_fs_pp0",
1494 "dap3_din_pp1",
1495 "dap3_dout_pp2",
1496 "dap3_sclk_pp3",
1497 "pu3",
1498 "pu4",
1499 "pu5",
1500 "pu6",
1501 "pbb3",
1502 "pbb4",
1503 "pbb5",
1504 "pbb6",
1505 "kb_row3_pr3",
1506 "kb_row4_pr4",
1507 "kb_row5_pr5",
1508 "kb_row6_pr6",
1509 "sdmmc3_dat3_pb4",
1510};
1511
1512static const char * const dtv_groups[] = {
1513 "uart3_cts_n_pa1",
1514 "uart3_rts_n_pc0",
1515 "dap4_fs_pp4",
1516 "dap4_dout_pp6",
1517 "gmi_wait_pi7",
1518 "gmi_ad8_ph0",
1519 "gmi_ad14_ph6",
1520 "gmi_ad15_ph7",
1521};
1522
1523static const char * const emc_dll_groups[] = {
1524 "kb_col0_pq0",
1525 "kb_col1_pq1",
1526};
1527
1528static const char * const extperiph1_groups[] = {
1529 "clk1_out_pw4",
1530};
1531
1532static const char * const extperiph2_groups[] = {
1533 "clk2_out_pw5",
1534};
1535
1536static const char * const extperiph3_groups[] = {
1537 "clk3_out_pee0",
1538};
1539
1540static const char * const gmi_groups[] = {
1541 "gmi_wp_n_pc7",
1542
1543 "gmi_ad0_pg0",
1544 "gmi_ad1_pg1",
1545 "gmi_ad2_pg2",
1546 "gmi_ad3_pg3",
1547 "gmi_ad4_pg4",
1548 "gmi_ad5_pg5",
1549 "gmi_ad6_pg6",
1550 "gmi_ad7_pg7",
1551 "gmi_ad8_ph0",
1552 "gmi_ad9_ph1",
1553 "gmi_ad10_ph2",
1554 "gmi_ad11_ph3",
1555 "gmi_ad12_ph4",
1556 "gmi_ad13_ph5",
1557 "gmi_ad14_ph6",
1558 "gmi_ad15_ph7",
1559 "gmi_wr_n_pi0",
1560 "gmi_oe_n_pi1",
1561 "gmi_cs6_n_pi3",
1562 "gmi_rst_n_pi4",
1563 "gmi_iordy_pi5",
1564 "gmi_cs7_n_pi6",
1565 "gmi_wait_pi7",
1566 "gmi_cs0_n_pj0",
1567 "gmi_cs1_n_pj2",
1568 "gmi_dqs_p_pj3",
1569 "gmi_adv_n_pk0",
1570 "gmi_clk_pk1",
1571 "gmi_cs4_n_pk2",
1572 "gmi_cs2_n_pk3",
1573 "gmi_cs3_n_pk4",
1574 "gmi_a16_pj7",
1575 "gmi_a17_pb0",
1576 "gmi_a18_pb1",
1577 "gmi_a19_pk7",
1578 "gen2_i2c_scl_pt5",
1579 "gen2_i2c_sda_pt6",
1580 "sdmmc4_dat0_paa0",
1581 "sdmmc4_dat1_paa1",
1582 "sdmmc4_dat2_paa2",
1583 "sdmmc4_dat3_paa3",
1584 "sdmmc4_dat4_paa4",
1585 "sdmmc4_dat5_paa5",
1586 "sdmmc4_dat6_paa6",
1587 "sdmmc4_dat7_paa7",
1588 "sdmmc4_clk_pcc4",
1589 "sdmmc4_cmd_pt7",
1590 "dap1_fs_pn0",
1591 "dap1_din_pn1",
1592 "dap1_dout_pn2",
1593 "dap1_sclk_pn3",
1594};
1595
1596static const char * const gmi_alt_groups[] = {
1597 "gmi_wp_n_pc7",
1598 "gmi_cs3_n_pk4",
1599 "gmi_a16_pj7",
1600};
1601
1602static const char * const hda_groups[] = {
1603 "dap1_fs_pn0",
1604 "dap1_din_pn1",
1605 "dap1_dout_pn2",
1606 "dap1_sclk_pn3",
1607 "dap2_fs_pa2",
1608 "dap2_sclk_pa3",
1609 "dap2_din_pa4",
1610 "dap2_dout_pa5",
1611};
1612
1613static const char * const hsi_groups[] = {
1614 "ulpi_data0_po1",
1615 "ulpi_data1_po2",
1616 "ulpi_data2_po3",
1617 "ulpi_data3_po4",
1618 "ulpi_data4_po5",
1619 "ulpi_data5_po6",
1620 "ulpi_data6_po7",
1621 "ulpi_data7_po0",
1622};
1623
1624static const char * const i2c1_groups[] = {
1625 "gen1_i2c_scl_pc4",
1626 "gen1_i2c_sda_pc5",
1627 "gpio_w2_aud_pw2",
1628 "gpio_w3_aud_pw3",
1629};
1630
1631static const char * const i2c2_groups[] = {
1632 "gen2_i2c_scl_pt5",
1633 "gen2_i2c_sda_pt6",
1634};
1635
1636static const char * const i2c3_groups[] = {
1637 "cam_i2c_scl_pbb1",
1638 "cam_i2c_sda_pbb2",
1639};
1640
1641static const char * const i2c4_groups[] = {
1642 "ddc_scl_pv4",
1643 "ddc_sda_pv5",
1644};
1645
1646static const char * const i2cpwr_groups[] = {
1647 "pwr_i2c_scl_pz6",
1648 "pwr_i2c_sda_pz7",
1649};
1650
1651static const char * const i2s0_groups[] = {
1652 "dap1_fs_pn0",
1653 "dap1_din_pn1",
1654 "dap1_dout_pn2",
1655 "dap1_sclk_pn3",
1656};
1657
1658static const char * const i2s1_groups[] = {
1659 "dap2_fs_pa2",
1660 "dap2_sclk_pa3",
1661 "dap2_din_pa4",
1662 "dap2_dout_pa5",
1663};
1664
1665static const char * const i2s2_groups[] = {
1666 "dap3_fs_pp0",
1667 "dap3_din_pp1",
1668 "dap3_dout_pp2",
1669 "dap3_sclk_pp3",
1670};
1671
1672static const char * const i2s3_groups[] = {
1673 "dap4_fs_pp4",
1674 "dap4_din_pp5",
1675 "dap4_dout_pp6",
1676 "dap4_sclk_pp7",
1677};
1678
1679static const char * const i2s4_groups[] = {
1680 "pcc1",
1681 "pbb0",
1682 "pbb7",
1683 "pcc2",
1684};
1685
1686static const char * const irda_groups[] = {
1687 "uart2_rxd_pc3",
1688 "uart2_txd_pc2",
1689};
1690
1691static const char * const kbc_groups[] = {
1692 "kb_row0_pr0",
1693 "kb_row1_pr1",
1694 "kb_row2_pr2",
1695 "kb_row3_pr3",
1696 "kb_row4_pr4",
1697 "kb_row5_pr5",
1698 "kb_row6_pr6",
1699 "kb_row7_pr7",
1700 "kb_row8_ps0",
1701 "kb_row9_ps1",
1702 "kb_row10_ps2",
1703 "kb_col0_pq0",
1704 "kb_col1_pq1",
1705 "kb_col2_pq2",
1706 "kb_col3_pq3",
1707 "kb_col4_pq4",
1708 "kb_col5_pq5",
1709 "kb_col6_pq6",
1710 "kb_col7_pq7",
1711};
1712
1713static const char * const nand_groups[] = {
1714 "gmi_wp_n_pc7",
1715 "gmi_wait_pi7",
1716 "gmi_adv_n_pk0",
1717 "gmi_clk_pk1",
1718 "gmi_cs0_n_pj0",
1719 "gmi_cs1_n_pj2",
1720 "gmi_cs2_n_pk3",
1721 "gmi_cs3_n_pk4",
1722 "gmi_cs4_n_pk2",
1723 "gmi_cs6_n_pi3",
1724 "gmi_cs7_n_pi6",
1725 "gmi_ad0_pg0",
1726 "gmi_ad1_pg1",
1727 "gmi_ad2_pg2",
1728 "gmi_ad3_pg3",
1729 "gmi_ad4_pg4",
1730 "gmi_ad5_pg5",
1731 "gmi_ad6_pg6",
1732 "gmi_ad7_pg7",
1733 "gmi_ad8_ph0",
1734 "gmi_ad9_ph1",
1735 "gmi_ad10_ph2",
1736 "gmi_ad11_ph3",
1737 "gmi_ad12_ph4",
1738 "gmi_ad13_ph5",
1739 "gmi_ad14_ph6",
1740 "gmi_ad15_ph7",
1741 "gmi_wr_n_pi0",
1742 "gmi_oe_n_pi1",
1743 "gmi_dqs_p_pj3",
1744 "gmi_rst_n_pi4",
1745};
1746
1747static const char * const nand_alt_groups[] = {
1748 "gmi_cs6_n_pi3",
1749 "gmi_cs7_n_pi6",
1750 "gmi_rst_n_pi4",
1751};
1752
1753static const char * const owr_groups[] = {
1754 "pu0",
1755 "kb_col4_pq4",
1756 "owr",
1757 "sdmmc3_cd_n_pv2",
1758};
1759
1760static const char * const pmi_groups[] = {
1761 "pwr_int_n",
1762};
1763
1764static const char * const pwm0_groups[] = {
1765 "sdmmc1_dat2_py5",
1766 "uart3_rts_n_pc0",
1767 "pu3",
1768 "gmi_ad8_ph0",
1769 "sdmmc3_dat3_pb4",
1770};
1771
1772static const char * const pwm1_groups[] = {
1773 "sdmmc1_dat1_py6",
1774 "pu4",
1775 "gmi_ad9_ph1",
1776 "sdmmc3_dat2_pb5",
1777};
1778
1779static const char * const pwm2_groups[] = {
1780 "pu5",
1781 "gmi_ad10_ph2",
1782 "kb_col3_pq3",
1783 "sdmmc3_dat1_pb6",
1784};
1785
1786static const char * const pwm3_groups[] = {
1787 "pu6",
1788 "gmi_ad11_ph3",
1789 "sdmmc3_cmd_pa7",
1790};
1791
1792static const char * const pwron_groups[] = {
1793 "core_pwr_req",
1794};
1795
1796static const char * const reset_out_n_groups[] = {
1797 "reset_out_n",
1798};
1799
1800static const char * const rsvd1_groups[] = {
1801 "pv1",
1802 "hdmi_int_pn7",
1803 "pu1",
1804 "pu2",
1805 "gmi_wp_n_pc7",
1806 "gmi_adv_n_pk0",
1807 "gmi_cs0_n_pj0",
1808 "gmi_cs1_n_pj2",
1809 "gmi_ad0_pg0",
1810 "gmi_ad1_pg1",
1811 "gmi_ad2_pg2",
1812 "gmi_ad3_pg3",
1813 "gmi_ad4_pg4",
1814 "gmi_ad5_pg5",
1815 "gmi_ad6_pg6",
1816 "gmi_ad7_pg7",
1817 "gmi_wr_n_pi0",
1818 "gmi_oe_n_pi1",
1819 "gpio_x4_aud_px4",
1820 "gpio_x5_aud_px5",
1821 "gpio_x7_aud_px7",
1822
1823 "reset_out_n",
1824};
1825
1826static const char * const rsvd2_groups[] = {
1827 "pv0",
1828 "pv1",
1829 "sdmmc1_dat0_py7",
1830 "clk2_out_pw5",
1831 "clk2_req_pcc5",
1832 "hdmi_int_pn7",
1833 "ddc_scl_pv4",
1834 "ddc_sda_pv5",
1835 "uart3_txd_pw6",
1836 "uart3_rxd_pw7",
1837 "gen1_i2c_scl_pc4",
1838 "gen1_i2c_sda_pc5",
1839 "dap4_fs_pp4",
1840 "dap4_din_pp5",
1841 "dap4_dout_pp6",
1842 "dap4_sclk_pp7",
1843 "clk3_out_pee0",
1844 "clk3_req_pee1",
1845 "gmi_iordy_pi5",
1846 "gmi_a17_pb0",
1847 "gmi_a18_pb1",
1848 "gen2_i2c_scl_pt5",
1849 "gen2_i2c_sda_pt6",
1850 "sdmmc4_clk_pcc4",
1851 "sdmmc4_cmd_pt7",
1852 "sdmmc4_dat7_paa7",
1853 "pcc1",
1854 "pbb7",
1855 "pcc2",
1856 "pwr_i2c_scl_pz6",
1857 "pwr_i2c_sda_pz7",
1858 "kb_row0_pr0",
1859 "kb_row1_pr1",
1860 "kb_row2_pr2",
1861 "kb_row7_pr7",
1862 "kb_row8_ps0",
1863 "kb_row9_ps1",
1864 "kb_row10_ps2",
1865 "kb_col1_pq1",
1866 "kb_col2_pq2",
1867 "kb_col5_pq5",
1868 "kb_col6_pq6",
1869 "kb_col7_pq7",
1870 "sys_clk_req_pz5",
1871 "core_pwr_req",
1872 "cpu_pwr_req",
1873 "pwr_int_n",
1874 "owr",
1875 "spdif_out_pk5",
1876 "gpio_x1_aud_px1",
1877 "sdmmc3_clk_pa6",
1878 "sdmmc3_dat0_pb7",
1879 "gpio_w2_aud_pw2",
1880 "usb_vbus_en0_pn4",
1881 "usb_vbus_en1_pn5",
1882 "sdmmc3_clk_lb_out_pee4",
1883 "sdmmc3_clk_lb_in_pee5",
1884 "reset_out_n",
1885};
1886
1887static const char * const rsvd3_groups[] = {
1888 "pv0",
1889 "pv1",
1890 "sdmmc1_clk_pz0",
1891 "clk2_out_pw5",
1892 "clk2_req_pcc5",
1893 "hdmi_int_pn7",
1894 "ddc_scl_pv4",
1895 "ddc_sda_pv5",
1896 "uart2_rts_n_pj6",
1897 "uart2_cts_n_pj5",
1898 "uart3_txd_pw6",
1899 "uart3_rxd_pw7",
1900 "pu0",
1901 "pu1",
1902 "pu2",
1903 "gen1_i2c_scl_pc4",
1904 "gen1_i2c_sda_pc5",
1905 "dap4_din_pp5",
1906 "dap4_sclk_pp7",
1907 "clk3_out_pee0",
1908 "clk3_req_pee1",
1909 "pcc1",
1910 "cam_i2c_scl_pbb1",
1911 "cam_i2c_sda_pbb2",
1912 "pbb7",
1913 "pcc2",
1914 "pwr_i2c_scl_pz6",
1915 "pwr_i2c_sda_pz7",
1916 "kb_row0_pr0",
1917 "kb_row1_pr1",
1918 "kb_row2_pr2",
1919 "kb_row3_pr3",
1920 "kb_row9_ps1",
1921 "kb_row10_ps2",
1922 "clk_32k_out_pa0",
1923 "sys_clk_req_pz5",
1924 "core_pwr_req",
1925 "cpu_pwr_req",
1926 "pwr_int_n",
1927 "owr",
1928 "clk1_req_pee2",
1929 "clk1_out_pw4",
1930 "spdif_out_pk5",
1931 "spdif_in_pk6",
1932 "dap2_fs_pa2",
1933 "dap2_sclk_pa3",
1934 "dap2_din_pa4",
1935 "dap2_dout_pa5",
1936 "dvfs_pwm_px0",
1937 "gpio_x1_aud_px1",
1938 "gpio_x3_aud_px3",
1939 "dvfs_clk_px2",
1940 "sdmmc3_clk_pa6",
1941 "sdmmc3_dat0_pb7",
1942 "hdmi_cec_pee3",
1943 "sdmmc3_cd_n_pv2",
1944 "usb_vbus_en0_pn4",
1945 "usb_vbus_en1_pn5",
1946 "sdmmc3_clk_lb_out_pee4",
1947 "sdmmc3_clk_lb_in_pee5",
1948 "reset_out_n",
1949};
1950
1951static const char * const rsvd4_groups[] = {
1952 "pv0",
1953 "pv1",
1954 "sdmmc1_clk_pz0",
1955 "clk2_out_pw5",
1956 "clk2_req_pcc5",
1957 "hdmi_int_pn7",
1958 "ddc_scl_pv4",
1959 "ddc_sda_pv5",
1960 "pu0",
1961 "pu1",
1962 "pu2",
1963 "gen1_i2c_scl_pc4",
1964 "gen1_i2c_sda_pc5",
1965 "dap4_fs_pp4",
1966 "dap4_din_pp5",
1967 "dap4_dout_pp6",
1968 "dap4_sclk_pp7",
1969 "clk3_out_pee0",
1970 "clk3_req_pee1",
1971 "gmi_ad0_pg0",
1972 "gmi_ad1_pg1",
1973 "gmi_ad2_pg2",
1974 "gmi_ad3_pg3",
1975 "gmi_ad4_pg4",
1976 "gmi_ad12_ph4",
1977 "gmi_ad13_ph5",
1978 "gmi_rst_n_pi4",
1979 "gen2_i2c_scl_pt5",
1980 "gen2_i2c_sda_pt6",
1981 "sdmmc4_clk_pcc4",
1982 "sdmmc4_cmd_pt7",
1983 "sdmmc4_dat0_paa0",
1984 "sdmmc4_dat1_paa1",
1985 "sdmmc4_dat2_paa2",
1986 "sdmmc4_dat3_paa3",
1987 "sdmmc4_dat4_paa4",
1988 "sdmmc4_dat5_paa5",
1989 "sdmmc4_dat6_paa6",
1990 "sdmmc4_dat7_paa7",
1991 "cam_mclk_pcc0",
1992 "pcc1",
1993 "cam_i2c_scl_pbb1",
1994 "cam_i2c_sda_pbb2",
1995 "pbb3",
1996 "pbb4",
1997 "pbb5",
1998 "pbb6",
1999 "pbb7",
2000 "pcc2",
2001 "pwr_i2c_scl_pz6",
2002 "pwr_i2c_sda_pz7",
2003 "kb_row0_pr0",
2004 "kb_row1_pr1",
2005 "kb_row2_pr2",
2006 "kb_col2_pq2",
2007 "kb_col5_pq5",
2008 "kb_col6_pq6",
2009 "kb_col7_pq7",
2010 "clk_32k_out_pa0",
2011 "sys_clk_req_pz5",
2012 "core_pwr_req",
2013 "cpu_pwr_req",
2014 "pwr_int_n",
2015 "owr",
2016 "dap1_fs_pn0",
2017 "dap1_din_pn1",
2018 "dap1_dout_pn2",
2019 "dap1_sclk_pn3",
2020 "clk1_req_pee2",
2021 "clk1_out_pw4",
2022 "spdif_in_pk6",
2023 "spdif_out_pk5",
2024 "dap2_fs_pa2",
2025 "dap2_sclk_pa3",
2026 "dap2_din_pa4",
2027 "dap2_dout_pa5",
2028 "dvfs_pwm_px0",
2029 "gpio_x1_aud_px1",
2030 "gpio_x3_aud_px3",
2031 "dvfs_clk_px2",
2032 "gpio_x5_aud_px5",
2033 "gpio_x6_aud_px6",
2034 "gpio_x7_aud_px7",
2035 "sdmmc3_cd_n_pv2",
2036 "usb_vbus_en0_pn4",
2037 "usb_vbus_en1_pn5",
2038 "sdmmc3_clk_lb_in_pee5",
2039 "sdmmc3_clk_lb_out_pee4",
2040};
2041
2042static const char * const sdmmc1_groups[] = {
2043
2044 "sdmmc1_clk_pz0",
2045 "sdmmc1_cmd_pz1",
2046 "sdmmc1_dat3_py4",
2047 "sdmmc1_dat2_py5",
2048 "sdmmc1_dat1_py6",
2049 "sdmmc1_dat0_py7",
2050 "uart3_cts_n_pa1",
2051 "kb_col5_pq5",
2052 "sdmmc1_wp_n_pv3",
2053};
2054
2055static const char * const sdmmc2_groups[] = {
2056 "gmi_iordy_pi5",
2057 "gmi_clk_pk1",
2058 "gmi_cs2_n_pk3",
2059 "gmi_cs3_n_pk4",
2060 "gmi_cs7_n_pi6",
2061 "gmi_ad12_ph4",
2062 "gmi_ad13_ph5",
2063 "gmi_ad14_ph6",
2064 "gmi_ad15_ph7",
2065 "gmi_dqs_p_pj3",
2066};
2067
2068static const char * const sdmmc3_groups[] = {
2069 "kb_col4_pq4",
2070 "sdmmc3_clk_pa6",
2071 "sdmmc3_cmd_pa7",
2072 "sdmmc3_dat0_pb7",
2073 "sdmmc3_dat1_pb6",
2074 "sdmmc3_dat2_pb5",
2075 "sdmmc3_dat3_pb4",
2076 "hdmi_cec_pee3",
2077 "sdmmc3_cd_n_pv2",
2078 "sdmmc3_clk_lb_in_pee5",
2079 "sdmmc3_clk_lb_out_pee4",
2080};
2081
2082static const char * const sdmmc4_groups[] = {
2083 "sdmmc4_clk_pcc4",
2084 "sdmmc4_cmd_pt7",
2085 "sdmmc4_dat0_paa0",
2086 "sdmmc4_dat1_paa1",
2087 "sdmmc4_dat2_paa2",
2088 "sdmmc4_dat3_paa3",
2089 "sdmmc4_dat4_paa4",
2090 "sdmmc4_dat5_paa5",
2091 "sdmmc4_dat6_paa6",
2092 "sdmmc4_dat7_paa7",
2093};
2094
2095static const char * const soc_groups[] = {
2096 "gmi_cs1_n_pj2",
2097 "gmi_oe_n_pi1",
2098 "clk_32k_out_pa0",
2099 "hdmi_cec_pee3",
2100};
2101
2102static const char * const spdif_groups[] = {
2103 "sdmmc1_cmd_pz1",
2104 "sdmmc1_dat3_py4",
2105 "uart2_rxd_pc3",
2106 "uart2_txd_pc2",
2107 "spdif_in_pk6",
2108 "spdif_out_pk5",
2109};
2110
2111static const char * const spi1_groups[] = {
2112 "ulpi_clk_py0",
2113 "ulpi_dir_py1",
2114 "ulpi_nxt_py2",
2115 "ulpi_stp_py3",
2116 "gpio_x3_aud_px3",
2117 "gpio_x4_aud_px4",
2118 "gpio_x5_aud_px5",
2119 "gpio_x6_aud_px6",
2120 "gpio_x7_aud_px7",
2121 "gpio_w3_aud_pw3",
2122};
2123
2124static const char * const spi2_groups[] = {
2125 "ulpi_data4_po5",
2126 "ulpi_data5_po6",
2127 "ulpi_data6_po7",
2128 "ulpi_data7_po0",
2129 "kb_row4_pr4",
2130 "kb_row5_pr5",
2131 "kb_col0_pq0",
2132 "kb_col1_pq1",
2133 "kb_col2_pq2",
2134 "kb_col6_pq6",
2135 "kb_col7_pq7",
2136 "gpio_x4_aud_px4",
2137 "gpio_x5_aud_px5",
2138 "gpio_x6_aud_px6",
2139 "gpio_x7_aud_px7",
2140 "gpio_w2_aud_pw2",
2141 "gpio_w3_aud_pw3",
2142};
2143
2144static const char * const spi3_groups[] = {
2145 "ulpi_data0_po1",
2146 "ulpi_data1_po2",
2147 "ulpi_data2_po3",
2148 "ulpi_data3_po4",
2149 "sdmmc4_dat0_paa0",
2150 "sdmmc4_dat1_paa1",
2151 "sdmmc4_dat2_paa2",
2152 "sdmmc4_dat3_paa3",
2153 "sdmmc4_dat4_paa4",
2154 "sdmmc4_dat5_paa5",
2155 "sdmmc4_dat6_paa6",
2156 "sdmmc3_clk_pa6",
2157 "sdmmc3_cmd_pa7",
2158 "sdmmc3_dat0_pb7",
2159 "sdmmc3_dat1_pb6",
2160 "sdmmc3_dat2_pb5",
2161 "sdmmc3_dat3_pb4",
2162};
2163
2164static const char * const spi4_groups[] = {
2165 "sdmmc1_cmd_pz1",
2166 "sdmmc1_dat3_py4",
2167 "sdmmc1_dat2_py5",
2168 "sdmmc1_dat1_py6",
2169 "sdmmc1_dat0_py7",
2170 "uart2_rxd_pc3",
2171 "uart2_txd_pc2",
2172 "uart2_rts_n_pj6",
2173 "uart2_cts_n_pj5",
2174 "uart3_txd_pw6",
2175 "uart3_rxd_pw7",
2176 "uart3_cts_n_pa1",
2177 "gmi_wait_pi7",
2178 "gmi_cs6_n_pi3",
2179 "gmi_ad5_pg5",
2180 "gmi_ad6_pg6",
2181 "gmi_ad7_pg7",
2182 "gmi_a19_pk7",
2183 "gmi_wr_n_pi0",
2184 "sdmmc1_wp_n_pv3",
2185};
2186
2187static const char * const spi5_groups[] = {
2188 "ulpi_clk_py0",
2189 "ulpi_dir_py1",
2190 "ulpi_nxt_py2",
2191 "ulpi_stp_py3",
2192 "dap3_fs_pp0",
2193 "dap3_din_pp1",
2194 "dap3_dout_pp2",
2195 "dap3_sclk_pp3",
2196};
2197
2198static const char * const spi6_groups[] = {
2199 "dvfs_pwm_px0",
2200 "gpio_x1_aud_px1",
2201 "gpio_x3_aud_px3",
2202 "dvfs_clk_px2",
2203 "gpio_x6_aud_px6",
2204 "gpio_w2_aud_pw2",
2205 "gpio_w3_aud_pw3",
2206};
2207
2208static const char * const sysclk_groups[] = {
2209 "sys_clk_req_pz5",
2210};
2211
2212static const char * const trace_groups[] = {
2213 "gmi_iordy_pi5",
2214 "gmi_adv_n_pk0",
2215 "gmi_clk_pk1",
2216 "gmi_cs2_n_pk3",
2217 "gmi_cs4_n_pk2",
2218 "gmi_a16_pj7",
2219 "gmi_a17_pb0",
2220 "gmi_a18_pb1",
2221 "gmi_a19_pk7",
2222 "gmi_dqs_p_pj3",
2223};
2224
2225static const char * const uarta_groups[] = {
2226 "ulpi_data0_po1",
2227 "ulpi_data1_po2",
2228 "ulpi_data2_po3",
2229 "ulpi_data3_po4",
2230 "ulpi_data4_po5",
2231 "ulpi_data5_po6",
2232 "ulpi_data6_po7",
2233 "ulpi_data7_po0",
2234 "sdmmc1_cmd_pz1",
2235 "sdmmc1_dat3_py4",
2236 "sdmmc1_dat2_py5",
2237 "sdmmc1_dat1_py6",
2238 "sdmmc1_dat0_py7",
2239 "uart2_rxd_pc3",
2240 "uart2_txd_pc2",
2241 "uart2_rts_n_pj6",
2242 "uart2_cts_n_pj5",
2243 "pu0",
2244 "pu1",
2245 "pu2",
2246 "pu3",
2247 "pu4",
2248 "pu5",
2249 "pu6",
2250 "kb_row7_pr7",
2251 "kb_row8_ps0",
2252 "kb_row9_ps1",
2253 "kb_row10_ps2",
2254 "kb_col3_pq3",
2255 "kb_col4_pq4",
2256 "sdmmc3_cmd_pa7",
2257 "sdmmc3_dat1_pb6",
2258 "sdmmc1_wp_n_pv3",
2259};
2260
2261static const char * const uartb_groups[] = {
2262 "uart2_rts_n_pj6",
2263 "uart2_cts_n_pj5",
2264};
2265
2266static const char * const uartc_groups[] = {
2267 "uart3_txd_pw6",
2268 "uart3_rxd_pw7",
2269 "uart3_cts_n_pa1",
2270 "uart3_rts_n_pc0",
2271};
2272
2273static const char * const uartd_groups[] = {
2274 "ulpi_clk_py0",
2275 "ulpi_dir_py1",
2276 "ulpi_nxt_py2",
2277 "ulpi_stp_py3",
2278 "gmi_a16_pj7",
2279 "gmi_a17_pb0",
2280 "gmi_a18_pb1",
2281 "gmi_a19_pk7",
2282};
2283
2284static const char * const ulpi_groups[] = {
2285 "ulpi_data0_po1",
2286 "ulpi_data1_po2",
2287 "ulpi_data2_po3",
2288 "ulpi_data3_po4",
2289 "ulpi_data4_po5",
2290 "ulpi_data5_po6",
2291 "ulpi_data6_po7",
2292 "ulpi_data7_po0",
2293 "ulpi_clk_py0",
2294 "ulpi_dir_py1",
2295 "ulpi_nxt_py2",
2296 "ulpi_stp_py3",
2297};
2298
2299static const char * const usb_groups[] = {
2300 "pv0",
2301 "pu6",
2302 "gmi_cs0_n_pj0",
2303 "gmi_cs4_n_pk2",
2304 "gmi_ad11_ph3",
2305 "kb_col0_pq0",
2306 "spdif_in_pk6",
2307 "usb_vbus_en0_pn4",
2308 "usb_vbus_en1_pn5",
2309};
2310
2311static const char * const vgp1_groups[] = {
2312 "cam_i2c_scl_pbb1",
2313};
2314
2315static const char * const vgp2_groups[] = {
2316 "cam_i2c_sda_pbb2",
2317};
2318
2319static const char * const vgp3_groups[] = {
2320 "pbb3",
2321};
2322
2323static const char * const vgp4_groups[] = {
2324 "pbb4",
2325};
2326
2327static const char * const vgp5_groups[] = {
2328 "pbb5",
2329};
2330
2331static const char * const vgp6_groups[] = {
2332 "pbb6",
2333};
2334
2335static const char * const vi_groups[] = {
2336 "cam_mclk_pcc0",
2337 "pbb0",
2338};
2339
2340static const char * const vi_alt1_groups[] = {
2341 "cam_mclk_pcc0",
2342 "pbb0",
2343};
2344
2345static const char * const vi_alt3_groups[] = {
2346 "cam_mclk_pcc0",
2347 "pbb0",
2348};
2349
2350#define FUNCTION(fname) \ 1423#define FUNCTION(fname) \
2351 { \ 1424 { \
2352 .name = #fname, \ 1425 .name = #fname, \
2353 .groups = fname##_groups, \
2354 .ngroups = ARRAY_SIZE(fname##_groups), \
2355 } 1426 }
2356 1427
2357static const struct tegra_function tegra114_functions[] = { 1428static struct tegra_function tegra114_functions[] = {
2358 FUNCTION(blink), 1429 FUNCTION(blink),
2359 FUNCTION(cec), 1430 FUNCTION(cec),
2360 FUNCTION(cldvfs), 1431 FUNCTION(cldvfs),