aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-02-12 10:50:03 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:34:06 -0400
commit82f6b6da703e784b923763cc7161116829b2ca66 (patch)
tree0bb6f750f4055911ec0325aeaa0c6c38b3b6e869 /drivers/pinctrl/sh-pfc/pfc-sh73a0.c
parent2ecd4154c906b7d60e7d06a515e6384cc58e93ab (diff)
sh-pfc: sh73a0: Add SDHI and MMCIF pin groups and functions
Add pin group definitions for SDHI0, SDHI1, SDHI2 and MMCIF interfaces on sh73a0. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pfc-sh73a0.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh73a0.c194
1 files changed, 194 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index 0d35f7b3e5b4..ed5cbaf66ac2 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -2263,6 +2263,66 @@ static const unsigned int lcd2_sys_1_mux[] = {
2263 PORT221_LCD2CS__MARK, PORT219_LCD2WR__MARK, 2263 PORT221_LCD2CS__MARK, PORT219_LCD2WR__MARK,
2264 LCD2RD__MARK, PORT217_LCD2RS_MARK, 2264 LCD2RD__MARK, PORT217_LCD2RS_MARK,
2265}; 2265};
2266/* - MMCIF ------------------------------------------------------------------ */
2267static const unsigned int mmc0_data1_0_pins[] = {
2268 /* D[0] */
2269 271,
2270};
2271static const unsigned int mmc0_data1_0_mux[] = {
2272 MMCD0_0_MARK,
2273};
2274static const unsigned int mmc0_data4_0_pins[] = {
2275 /* D[0:3] */
2276 271, 272, 273, 274,
2277};
2278static const unsigned int mmc0_data4_0_mux[] = {
2279 MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
2280};
2281static const unsigned int mmc0_data8_0_pins[] = {
2282 /* D[0:7] */
2283 271, 272, 273, 274, 275, 276, 277, 278,
2284};
2285static const unsigned int mmc0_data8_0_mux[] = {
2286 MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
2287 MMCD0_4_MARK, MMCD0_5_MARK, MMCD0_6_MARK, MMCD0_7_MARK,
2288};
2289static const unsigned int mmc0_ctrl_0_pins[] = {
2290 /* CMD, CLK */
2291 279, 270,
2292};
2293static const unsigned int mmc0_ctrl_0_mux[] = {
2294 MMCCMD0_MARK, MMCCLK0_MARK,
2295};
2296
2297static const unsigned int mmc0_data1_1_pins[] = {
2298 /* D[0] */
2299 305,
2300};
2301static const unsigned int mmc0_data1_1_mux[] = {
2302 MMCD1_0_MARK,
2303};
2304static const unsigned int mmc0_data4_1_pins[] = {
2305 /* D[0:3] */
2306 305, 304, 303, 302,
2307};
2308static const unsigned int mmc0_data4_1_mux[] = {
2309 MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
2310};
2311static const unsigned int mmc0_data8_1_pins[] = {
2312 /* D[0:7] */
2313 305, 304, 303, 302, 301, 300, 299, 298,
2314};
2315static const unsigned int mmc0_data8_1_mux[] = {
2316 MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
2317 MMCD1_4_MARK, MMCD1_5_MARK, MMCD1_6_MARK, MMCD1_7_MARK,
2318};
2319static const unsigned int mmc0_ctrl_1_pins[] = {
2320 /* CMD, CLK */
2321 297, 289,
2322};
2323static const unsigned int mmc0_ctrl_1_mux[] = {
2324 MMCCMD1_MARK, MMCCLK1_MARK,
2325};
2266/* - SCIFA0 ----------------------------------------------------------------- */ 2326/* - SCIFA0 ----------------------------------------------------------------- */
2267static const unsigned int scifa0_data_pins[] = { 2327static const unsigned int scifa0_data_pins[] = {
2268 /* RXD, TXD */ 2328 /* RXD, TXD */
@@ -2510,6 +2570,86 @@ static const unsigned int scifb_ctrl_1_pins[] = {
2510static const unsigned int scifb_ctrl_1_mux[] = { 2570static const unsigned int scifb_ctrl_1_mux[] = {
2511 PORT245_SCIFB_RTS__MARK, PORT244_SCIFB_CTS__MARK, 2571 PORT245_SCIFB_RTS__MARK, PORT244_SCIFB_CTS__MARK,
2512}; 2572};
2573/* - SDHI0 ------------------------------------------------------------------ */
2574static const unsigned int sdhi0_data1_pins[] = {
2575 /* D0 */
2576 252,
2577};
2578static const unsigned int sdhi0_data1_mux[] = {
2579 SDHID0_0_MARK,
2580};
2581static const unsigned int sdhi0_data4_pins[] = {
2582 /* D[0:3] */
2583 252, 253, 254, 255,
2584};
2585static const unsigned int sdhi0_data4_mux[] = {
2586 SDHID0_0_MARK, SDHID0_1_MARK, SDHID0_2_MARK, SDHID0_3_MARK,
2587};
2588static const unsigned int sdhi0_ctrl_pins[] = {
2589 /* CMD, CLK */
2590 256, 250,
2591};
2592static const unsigned int sdhi0_ctrl_mux[] = {
2593 SDHICMD0_MARK, SDHICLK0_MARK,
2594};
2595static const unsigned int sdhi0_cd_pins[] = {
2596 /* CD */
2597 251,
2598};
2599static const unsigned int sdhi0_cd_mux[] = {
2600 SDHICD0_MARK,
2601};
2602static const unsigned int sdhi0_wp_pins[] = {
2603 /* WP */
2604 257,
2605};
2606static const unsigned int sdhi0_wp_mux[] = {
2607 SDHIWP0_MARK,
2608};
2609/* - SDHI1 ------------------------------------------------------------------ */
2610static const unsigned int sdhi1_data1_pins[] = {
2611 /* D0 */
2612 259,
2613};
2614static const unsigned int sdhi1_data1_mux[] = {
2615 SDHID1_0_MARK,
2616};
2617static const unsigned int sdhi1_data4_pins[] = {
2618 /* D[0:3] */
2619 259, 260, 261, 262,
2620};
2621static const unsigned int sdhi1_data4_mux[] = {
2622 SDHID1_0_MARK, SDHID1_1_MARK, SDHID1_2_MARK, SDHID1_3_MARK,
2623};
2624static const unsigned int sdhi1_ctrl_pins[] = {
2625 /* CMD, CLK */
2626 263, 258,
2627};
2628static const unsigned int sdhi1_ctrl_mux[] = {
2629 SDHICMD1_MARK, SDHICLK1_MARK,
2630};
2631/* - SDHI2 ------------------------------------------------------------------ */
2632static const unsigned int sdhi2_data1_pins[] = {
2633 /* D0 */
2634 265,
2635};
2636static const unsigned int sdhi2_data1_mux[] = {
2637 SDHID2_0_MARK,
2638};
2639static const unsigned int sdhi2_data4_pins[] = {
2640 /* D[0:3] */
2641 265, 266, 267, 268,
2642};
2643static const unsigned int sdhi2_data4_mux[] = {
2644 SDHID2_0_MARK, SDHID2_1_MARK, SDHID2_2_MARK, SDHID2_3_MARK,
2645};
2646static const unsigned int sdhi2_ctrl_pins[] = {
2647 /* CMD, CLK */
2648 269, 264,
2649};
2650static const unsigned int sdhi2_ctrl_mux[] = {
2651 SDHICMD2_MARK, SDHICLK2_MARK,
2652};
2513 2653
2514static const struct sh_pfc_pin_group pinmux_groups[] = { 2654static const struct sh_pfc_pin_group pinmux_groups[] = {
2515 SH_PFC_PIN_GROUP(fsia_mclk_in), 2655 SH_PFC_PIN_GROUP(fsia_mclk_in),
@@ -2563,6 +2703,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
2563 SH_PFC_PIN_GROUP(lcd2_sync_1), 2703 SH_PFC_PIN_GROUP(lcd2_sync_1),
2564 SH_PFC_PIN_GROUP(lcd2_sys_0), 2704 SH_PFC_PIN_GROUP(lcd2_sys_0),
2565 SH_PFC_PIN_GROUP(lcd2_sys_1), 2705 SH_PFC_PIN_GROUP(lcd2_sys_1),
2706 SH_PFC_PIN_GROUP(mmc0_data1_0),
2707 SH_PFC_PIN_GROUP(mmc0_data4_0),
2708 SH_PFC_PIN_GROUP(mmc0_data8_0),
2709 SH_PFC_PIN_GROUP(mmc0_ctrl_0),
2710 SH_PFC_PIN_GROUP(mmc0_data1_1),
2711 SH_PFC_PIN_GROUP(mmc0_data4_1),
2712 SH_PFC_PIN_GROUP(mmc0_data8_1),
2713 SH_PFC_PIN_GROUP(mmc0_ctrl_1),
2566 SH_PFC_PIN_GROUP(scifa0_data), 2714 SH_PFC_PIN_GROUP(scifa0_data),
2567 SH_PFC_PIN_GROUP(scifa0_clk), 2715 SH_PFC_PIN_GROUP(scifa0_clk),
2568 SH_PFC_PIN_GROUP(scifa0_ctrl), 2716 SH_PFC_PIN_GROUP(scifa0_ctrl),
@@ -2597,6 +2745,17 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
2597 SH_PFC_PIN_GROUP(scifb_data_1), 2745 SH_PFC_PIN_GROUP(scifb_data_1),
2598 SH_PFC_PIN_GROUP(scifb_clk_1), 2746 SH_PFC_PIN_GROUP(scifb_clk_1),
2599 SH_PFC_PIN_GROUP(scifb_ctrl_1), 2747 SH_PFC_PIN_GROUP(scifb_ctrl_1),
2748 SH_PFC_PIN_GROUP(sdhi0_data1),
2749 SH_PFC_PIN_GROUP(sdhi0_data4),
2750 SH_PFC_PIN_GROUP(sdhi0_ctrl),
2751 SH_PFC_PIN_GROUP(sdhi0_cd),
2752 SH_PFC_PIN_GROUP(sdhi0_wp),
2753 SH_PFC_PIN_GROUP(sdhi1_data1),
2754 SH_PFC_PIN_GROUP(sdhi1_data4),
2755 SH_PFC_PIN_GROUP(sdhi1_ctrl),
2756 SH_PFC_PIN_GROUP(sdhi2_data1),
2757 SH_PFC_PIN_GROUP(sdhi2_data4),
2758 SH_PFC_PIN_GROUP(sdhi2_ctrl),
2600}; 2759};
2601 2760
2602static const char * const fsia_groups[] = { 2761static const char * const fsia_groups[] = {
@@ -2673,6 +2832,17 @@ static const char * const lcd2_groups[] = {
2673 "lcd2_sys_1", 2832 "lcd2_sys_1",
2674}; 2833};
2675 2834
2835static const char * const mmc0_groups[] = {
2836 "mmc0_data1_0",
2837 "mmc0_data4_0",
2838 "mmc0_data8_0",
2839 "mmc0_ctrl_0",
2840 "mmc0_data1_1",
2841 "mmc0_data4_1",
2842 "mmc0_data8_1",
2843 "mmc0_ctrl_1",
2844};
2845
2676static const char * const scifa0_groups[] = { 2846static const char * const scifa0_groups[] = {
2677 "scifa0_data", 2847 "scifa0_data",
2678 "scifa0_clk", 2848 "scifa0_clk",
@@ -2734,6 +2904,26 @@ static const char * const scifb_groups[] = {
2734 "scifb_ctrl_1", 2904 "scifb_ctrl_1",
2735}; 2905};
2736 2906
2907static const char * const sdhi0_groups[] = {
2908 "sdhi0_data1",
2909 "sdhi0_data4",
2910 "sdhi0_ctrl",
2911 "sdhi0_cd",
2912 "sdhi0_wp",
2913};
2914
2915static const char * const sdhi1_groups[] = {
2916 "sdhi1_data1",
2917 "sdhi1_data4",
2918 "sdhi1_ctrl",
2919};
2920
2921static const char * const sdhi2_groups[] = {
2922 "sdhi2_data1",
2923 "sdhi2_data4",
2924 "sdhi2_ctrl",
2925};
2926
2737static const struct sh_pfc_function pinmux_functions[] = { 2927static const struct sh_pfc_function pinmux_functions[] = {
2738 SH_PFC_FUNCTION(fsia), 2928 SH_PFC_FUNCTION(fsia),
2739 SH_PFC_FUNCTION(fsib), 2929 SH_PFC_FUNCTION(fsib),
@@ -2743,6 +2933,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
2743 SH_PFC_FUNCTION(i2c3), 2933 SH_PFC_FUNCTION(i2c3),
2744 SH_PFC_FUNCTION(lcd), 2934 SH_PFC_FUNCTION(lcd),
2745 SH_PFC_FUNCTION(lcd2), 2935 SH_PFC_FUNCTION(lcd2),
2936 SH_PFC_FUNCTION(mmc0),
2746 SH_PFC_FUNCTION(scifa0), 2937 SH_PFC_FUNCTION(scifa0),
2747 SH_PFC_FUNCTION(scifa1), 2938 SH_PFC_FUNCTION(scifa1),
2748 SH_PFC_FUNCTION(scifa2), 2939 SH_PFC_FUNCTION(scifa2),
@@ -2752,6 +2943,9 @@ static const struct sh_pfc_function pinmux_functions[] = {
2752 SH_PFC_FUNCTION(scifa6), 2943 SH_PFC_FUNCTION(scifa6),
2753 SH_PFC_FUNCTION(scifa7), 2944 SH_PFC_FUNCTION(scifa7),
2754 SH_PFC_FUNCTION(scifb), 2945 SH_PFC_FUNCTION(scifb),
2946 SH_PFC_FUNCTION(sdhi0),
2947 SH_PFC_FUNCTION(sdhi1),
2948 SH_PFC_FUNCTION(sdhi2),
2755}; 2949};
2756 2950
2757#define PINMUX_FN_BASE GPIO_FN_VBUS_0 2951#define PINMUX_FN_BASE GPIO_FN_VBUS_0