Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: sh-pfc: r8a7791: Add I2C pins

This adds I2C[0-4] pinmux support to R8A7791 SoC.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Valentine Barshak and committed by
Linus Walleij
a5ffaf64 8e32c967

+196
+196
drivers/pinctrl/sh-pfc/pfc-r8a7791.c
··· 1805 1805 ETH_RXD0_MARK, ETH_RXD1_MARK, ETH_RX_ER_MARK, ETH_CRS_DV_MARK, 1806 1806 ETH_TXD0_MARK, ETH_TXD1_MARK, ETH_TX_EN_MARK, ETH_REFCLK_MARK, 1807 1807 }; 1808 + /* - I2C0 ------------------------------------------------------------------- */ 1809 + static const unsigned int i2c0_pins[] = { 1810 + /* SCL, SDA */ 1811 + RCAR_GP_PIN(0, 24), RCAR_GP_PIN(0, 25), 1812 + }; 1813 + static const unsigned int i2c0_mux[] = { 1814 + SCL0_MARK, SDA0_MARK, 1815 + }; 1816 + static const unsigned int i2c0_b_pins[] = { 1817 + /* SCL, SDA */ 1818 + RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3), 1819 + }; 1820 + static const unsigned int i2c0_b_mux[] = { 1821 + SCL0_B_MARK, SDA0_B_MARK, 1822 + }; 1823 + static const unsigned int i2c0_c_pins[] = { 1824 + /* SCL, SDA */ 1825 + RCAR_GP_PIN(0, 16), RCAR_GP_PIN(1, 1), 1826 + }; 1827 + static const unsigned int i2c0_c_mux[] = { 1828 + SCL0_C_MARK, SDA0_C_MARK, 1829 + }; 1830 + /* - I2C1 ------------------------------------------------------------------- */ 1831 + static const unsigned int i2c1_pins[] = { 1832 + /* SCL, SDA */ 1833 + RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 11), 1834 + }; 1835 + static const unsigned int i2c1_mux[] = { 1836 + SCL1_MARK, SDA1_MARK, 1837 + }; 1838 + static const unsigned int i2c1_b_pins[] = { 1839 + /* SCL, SDA */ 1840 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), 1841 + }; 1842 + static const unsigned int i2c1_b_mux[] = { 1843 + SCL1_B_MARK, SDA1_B_MARK, 1844 + }; 1845 + static const unsigned int i2c1_c_pins[] = { 1846 + /* SCL, SDA */ 1847 + RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15), 1848 + }; 1849 + static const unsigned int i2c1_c_mux[] = { 1850 + SCL1_C_MARK, SDA1_C_MARK, 1851 + }; 1852 + static const unsigned int i2c1_d_pins[] = { 1853 + /* SCL, SDA */ 1854 + RCAR_GP_PIN(4, 25), RCAR_GP_PIN(4, 26), 1855 + }; 1856 + static const unsigned int i2c1_d_mux[] = { 1857 + SCL1_D_MARK, SDA1_D_MARK, 1858 + }; 1859 + static const unsigned int i2c1_e_pins[] = { 1860 + /* SCL, SDA */ 1861 + RCAR_GP_PIN(7, 15), RCAR_GP_PIN(7, 16), 1862 + }; 1863 + static const unsigned int i2c1_e_mux[] = { 1864 + SCL1_E_MARK, SDA1_E_MARK, 1865 + }; 1866 + /* - I2C2 ------------------------------------------------------------------- */ 1867 + static const unsigned int i2c2_pins[] = { 1868 + /* SCL, SDA */ 1869 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), 1870 + }; 1871 + static const unsigned int i2c2_mux[] = { 1872 + SCL2_MARK, SDA2_MARK, 1873 + }; 1874 + static const unsigned int i2c2_b_pins[] = { 1875 + /* SCL, SDA */ 1876 + RCAR_GP_PIN(3, 26), RCAR_GP_PIN(3, 29), 1877 + }; 1878 + static const unsigned int i2c2_b_mux[] = { 1879 + SCL2_B_MARK, SDA2_B_MARK, 1880 + }; 1881 + static const unsigned int i2c2_c_pins[] = { 1882 + /* SCL, SDA */ 1883 + RCAR_GP_PIN(5, 13), RCAR_GP_PIN(5, 14), 1884 + }; 1885 + static const unsigned int i2c2_c_mux[] = { 1886 + SCL2_C_MARK, SDA2_C_MARK, 1887 + }; 1888 + static const unsigned int i2c2_d_pins[] = { 1889 + /* SCL, SDA */ 1890 + RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 18), 1891 + }; 1892 + static const unsigned int i2c2_d_mux[] = { 1893 + SCL2_D_MARK, SDA2_D_MARK, 1894 + }; 1895 + /* - I2C3 ------------------------------------------------------------------- */ 1896 + static const unsigned int i2c3_pins[] = { 1897 + /* SCL, SDA */ 1898 + RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 16), 1899 + }; 1900 + static const unsigned int i2c3_mux[] = { 1901 + SCL3_MARK, SDA3_MARK, 1902 + }; 1903 + static const unsigned int i2c3_b_pins[] = { 1904 + /* SCL, SDA */ 1905 + RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16), 1906 + }; 1907 + static const unsigned int i2c3_b_mux[] = { 1908 + SCL3_B_MARK, SDA3_B_MARK, 1909 + }; 1910 + static const unsigned int i2c3_c_pins[] = { 1911 + /* SCL, SDA */ 1912 + RCAR_GP_PIN(3, 22), RCAR_GP_PIN(3, 23), 1913 + }; 1914 + static const unsigned int i2c3_c_mux[] = { 1915 + SCL3_C_MARK, SDA3_C_MARK, 1916 + }; 1917 + static const unsigned int i2c3_d_pins[] = { 1918 + /* SCL, SDA */ 1919 + RCAR_GP_PIN(0, 27), RCAR_GP_PIN(0, 28), 1920 + }; 1921 + static const unsigned int i2c3_d_mux[] = { 1922 + SCL3_D_MARK, SDA3_D_MARK, 1923 + }; 1924 + /* - I2C4 ------------------------------------------------------------------- */ 1925 + static const unsigned int i2c4_pins[] = { 1926 + /* SCL, SDA */ 1927 + RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 14), 1928 + }; 1929 + static const unsigned int i2c4_mux[] = { 1930 + SCL4_MARK, SDA4_MARK, 1931 + }; 1932 + static const unsigned int i2c4_b_pins[] = { 1933 + /* SCL, SDA */ 1934 + RCAR_GP_PIN(4, 27), RCAR_GP_PIN(4, 28), 1935 + }; 1936 + static const unsigned int i2c4_b_mux[] = { 1937 + SCL4_B_MARK, SDA4_B_MARK, 1938 + }; 1939 + static const unsigned int i2c4_c_pins[] = { 1940 + /* SCL, SDA */ 1941 + RCAR_GP_PIN(7, 13), RCAR_GP_PIN(7, 14), 1942 + }; 1943 + static const unsigned int i2c4_c_mux[] = { 1944 + SCL4_C_MARK, SDA4_C_MARK, 1945 + }; 1808 1946 /* - INTC ------------------------------------------------------------------- */ 1809 1947 static const unsigned int intc_irq0_pins[] = { 1810 1948 /* IRQ */ ··· 3104 2966 SH_PFC_PIN_GROUP(eth_magic), 3105 2967 SH_PFC_PIN_GROUP(eth_mdio), 3106 2968 SH_PFC_PIN_GROUP(eth_rmii), 2969 + SH_PFC_PIN_GROUP(i2c0), 2970 + SH_PFC_PIN_GROUP(i2c0_b), 2971 + SH_PFC_PIN_GROUP(i2c0_c), 2972 + SH_PFC_PIN_GROUP(i2c1), 2973 + SH_PFC_PIN_GROUP(i2c1_b), 2974 + SH_PFC_PIN_GROUP(i2c1_c), 2975 + SH_PFC_PIN_GROUP(i2c1_d), 2976 + SH_PFC_PIN_GROUP(i2c1_e), 2977 + SH_PFC_PIN_GROUP(i2c2), 2978 + SH_PFC_PIN_GROUP(i2c2_b), 2979 + SH_PFC_PIN_GROUP(i2c2_c), 2980 + SH_PFC_PIN_GROUP(i2c2_d), 2981 + SH_PFC_PIN_GROUP(i2c3), 2982 + SH_PFC_PIN_GROUP(i2c3_b), 2983 + SH_PFC_PIN_GROUP(i2c3_c), 2984 + SH_PFC_PIN_GROUP(i2c3_d), 2985 + SH_PFC_PIN_GROUP(i2c4), 2986 + SH_PFC_PIN_GROUP(i2c4_b), 2987 + SH_PFC_PIN_GROUP(i2c4_c), 3107 2988 SH_PFC_PIN_GROUP(intc_irq0), 3108 2989 SH_PFC_PIN_GROUP(intc_irq1), 3109 2990 SH_PFC_PIN_GROUP(intc_irq2), ··· 3299 3142 "eth_magic", 3300 3143 "eth_mdio", 3301 3144 "eth_rmii", 3145 + }; 3146 + 3147 + static const char * const i2c0_groups[] = { 3148 + "i2c0", 3149 + "i2c0_b", 3150 + "i2c0_c", 3151 + }; 3152 + 3153 + static const char * const i2c1_groups[] = { 3154 + "i2c1", 3155 + "i2c1_b", 3156 + "i2c1_c", 3157 + "i2c1_d", 3158 + "i2c1_e", 3159 + }; 3160 + 3161 + static const char * const i2c2_groups[] = { 3162 + "i2c2", 3163 + "i2c2_b", 3164 + "i2c2_c", 3165 + "i2c2_d", 3166 + }; 3167 + 3168 + static const char * const i2c3_groups[] = { 3169 + "i2c3", 3170 + "i2c3_b", 3171 + "i2c3_c", 3172 + "i2c3_d", 3173 + }; 3174 + 3175 + static const char * const i2c4_groups[] = { 3176 + "i2c4", 3177 + "i2c4_b", 3178 + "i2c4_c", 3302 3179 }; 3303 3180 3304 3181 static const char * const intc_groups[] = { ··· 3561 3370 SH_PFC_FUNCTION(du0), 3562 3371 SH_PFC_FUNCTION(du1), 3563 3372 SH_PFC_FUNCTION(eth), 3373 + SH_PFC_FUNCTION(i2c0), 3374 + SH_PFC_FUNCTION(i2c1), 3375 + SH_PFC_FUNCTION(i2c2), 3376 + SH_PFC_FUNCTION(i2c3), 3377 + SH_PFC_FUNCTION(i2c4), 3564 3378 SH_PFC_FUNCTION(intc), 3565 3379 SH_PFC_FUNCTION(mmc), 3566 3380 SH_PFC_FUNCTION(msiof0),