diff options
author | Takeshi Kihara <takeshi.kihara.df@renesas.com> | 2018-04-29 15:48:14 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-05-16 07:32:06 -0400 |
commit | 16688c8b8644ad594be7d38a9e16b05e32e1823a (patch) | |
tree | d5d7dce32ba8c943781ec59596c9f654f58c5440 | |
parent | a73ab128c33c3c6b34a77f490eae54dcc4187320 (diff) |
pinctrl: sh-pfc: r8a77965: Add SDHI pins, groups and functions
This patch adds SDHI{0,1,2,3} pins, groups and functions to the R8A77965
SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 326 |
1 files changed, 326 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c index 43022afe6400..4d944e3c73e9 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c | |||
@@ -2810,6 +2810,264 @@ static const unsigned int scif_clk_b_mux[] = { | |||
2810 | SCIF_CLK_B_MARK, | 2810 | SCIF_CLK_B_MARK, |
2811 | }; | 2811 | }; |
2812 | 2812 | ||
2813 | /* - SDHI0 ------------------------------------------------------------------ */ | ||
2814 | static const unsigned int sdhi0_data1_pins[] = { | ||
2815 | /* D0 */ | ||
2816 | RCAR_GP_PIN(3, 2), | ||
2817 | }; | ||
2818 | |||
2819 | static const unsigned int sdhi0_data1_mux[] = { | ||
2820 | SD0_DAT0_MARK, | ||
2821 | }; | ||
2822 | |||
2823 | static const unsigned int sdhi0_data4_pins[] = { | ||
2824 | /* D[0:3] */ | ||
2825 | RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), | ||
2826 | RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), | ||
2827 | }; | ||
2828 | |||
2829 | static const unsigned int sdhi0_data4_mux[] = { | ||
2830 | SD0_DAT0_MARK, SD0_DAT1_MARK, | ||
2831 | SD0_DAT2_MARK, SD0_DAT3_MARK, | ||
2832 | }; | ||
2833 | |||
2834 | static const unsigned int sdhi0_ctrl_pins[] = { | ||
2835 | /* CLK, CMD */ | ||
2836 | RCAR_GP_PIN(3, 0), RCAR_GP_PIN(3, 1), | ||
2837 | }; | ||
2838 | |||
2839 | static const unsigned int sdhi0_ctrl_mux[] = { | ||
2840 | SD0_CLK_MARK, SD0_CMD_MARK, | ||
2841 | }; | ||
2842 | |||
2843 | static const unsigned int sdhi0_cd_pins[] = { | ||
2844 | /* CD */ | ||
2845 | RCAR_GP_PIN(3, 12), | ||
2846 | }; | ||
2847 | |||
2848 | static const unsigned int sdhi0_cd_mux[] = { | ||
2849 | SD0_CD_MARK, | ||
2850 | }; | ||
2851 | |||
2852 | static const unsigned int sdhi0_wp_pins[] = { | ||
2853 | /* WP */ | ||
2854 | RCAR_GP_PIN(3, 13), | ||
2855 | }; | ||
2856 | |||
2857 | static const unsigned int sdhi0_wp_mux[] = { | ||
2858 | SD0_WP_MARK, | ||
2859 | }; | ||
2860 | |||
2861 | /* - SDHI1 ------------------------------------------------------------------ */ | ||
2862 | static const unsigned int sdhi1_data1_pins[] = { | ||
2863 | /* D0 */ | ||
2864 | RCAR_GP_PIN(3, 8), | ||
2865 | }; | ||
2866 | |||
2867 | static const unsigned int sdhi1_data1_mux[] = { | ||
2868 | SD1_DAT0_MARK, | ||
2869 | }; | ||
2870 | |||
2871 | static const unsigned int sdhi1_data4_pins[] = { | ||
2872 | /* D[0:3] */ | ||
2873 | RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), | ||
2874 | RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), | ||
2875 | }; | ||
2876 | |||
2877 | static const unsigned int sdhi1_data4_mux[] = { | ||
2878 | SD1_DAT0_MARK, SD1_DAT1_MARK, | ||
2879 | SD1_DAT2_MARK, SD1_DAT3_MARK, | ||
2880 | }; | ||
2881 | |||
2882 | static const unsigned int sdhi1_ctrl_pins[] = { | ||
2883 | /* CLK, CMD */ | ||
2884 | RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), | ||
2885 | }; | ||
2886 | |||
2887 | static const unsigned int sdhi1_ctrl_mux[] = { | ||
2888 | SD1_CLK_MARK, SD1_CMD_MARK, | ||
2889 | }; | ||
2890 | |||
2891 | static const unsigned int sdhi1_cd_pins[] = { | ||
2892 | /* CD */ | ||
2893 | RCAR_GP_PIN(3, 14), | ||
2894 | }; | ||
2895 | |||
2896 | static const unsigned int sdhi1_cd_mux[] = { | ||
2897 | SD1_CD_MARK, | ||
2898 | }; | ||
2899 | |||
2900 | static const unsigned int sdhi1_wp_pins[] = { | ||
2901 | /* WP */ | ||
2902 | RCAR_GP_PIN(3, 15), | ||
2903 | }; | ||
2904 | |||
2905 | static const unsigned int sdhi1_wp_mux[] = { | ||
2906 | SD1_WP_MARK, | ||
2907 | }; | ||
2908 | |||
2909 | /* - SDHI2 ------------------------------------------------------------------ */ | ||
2910 | static const unsigned int sdhi2_data1_pins[] = { | ||
2911 | /* D0 */ | ||
2912 | RCAR_GP_PIN(4, 2), | ||
2913 | }; | ||
2914 | |||
2915 | static const unsigned int sdhi2_data1_mux[] = { | ||
2916 | SD2_DAT0_MARK, | ||
2917 | }; | ||
2918 | |||
2919 | static const unsigned int sdhi2_data4_pins[] = { | ||
2920 | /* D[0:3] */ | ||
2921 | RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), | ||
2922 | RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), | ||
2923 | }; | ||
2924 | |||
2925 | static const unsigned int sdhi2_data4_mux[] = { | ||
2926 | SD2_DAT0_MARK, SD2_DAT1_MARK, | ||
2927 | SD2_DAT2_MARK, SD2_DAT3_MARK, | ||
2928 | }; | ||
2929 | |||
2930 | static const unsigned int sdhi2_data8_pins[] = { | ||
2931 | /* D[0:7] */ | ||
2932 | RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), | ||
2933 | RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), | ||
2934 | RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), | ||
2935 | RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), | ||
2936 | }; | ||
2937 | |||
2938 | static const unsigned int sdhi2_data8_mux[] = { | ||
2939 | SD2_DAT0_MARK, SD2_DAT1_MARK, | ||
2940 | SD2_DAT2_MARK, SD2_DAT3_MARK, | ||
2941 | SD2_DAT4_MARK, SD2_DAT5_MARK, | ||
2942 | SD2_DAT6_MARK, SD2_DAT7_MARK, | ||
2943 | }; | ||
2944 | |||
2945 | static const unsigned int sdhi2_ctrl_pins[] = { | ||
2946 | /* CLK, CMD */ | ||
2947 | RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), | ||
2948 | }; | ||
2949 | |||
2950 | static const unsigned int sdhi2_ctrl_mux[] = { | ||
2951 | SD2_CLK_MARK, SD2_CMD_MARK, | ||
2952 | }; | ||
2953 | |||
2954 | static const unsigned int sdhi2_cd_a_pins[] = { | ||
2955 | /* CD */ | ||
2956 | RCAR_GP_PIN(4, 13), | ||
2957 | }; | ||
2958 | |||
2959 | static const unsigned int sdhi2_cd_a_mux[] = { | ||
2960 | SD2_CD_A_MARK, | ||
2961 | }; | ||
2962 | |||
2963 | static const unsigned int sdhi2_cd_b_pins[] = { | ||
2964 | /* CD */ | ||
2965 | RCAR_GP_PIN(5, 10), | ||
2966 | }; | ||
2967 | |||
2968 | static const unsigned int sdhi2_cd_b_mux[] = { | ||
2969 | SD2_CD_B_MARK, | ||
2970 | }; | ||
2971 | |||
2972 | static const unsigned int sdhi2_wp_a_pins[] = { | ||
2973 | /* WP */ | ||
2974 | RCAR_GP_PIN(4, 14), | ||
2975 | }; | ||
2976 | |||
2977 | static const unsigned int sdhi2_wp_a_mux[] = { | ||
2978 | SD2_WP_A_MARK, | ||
2979 | }; | ||
2980 | |||
2981 | static const unsigned int sdhi2_wp_b_pins[] = { | ||
2982 | /* WP */ | ||
2983 | RCAR_GP_PIN(5, 11), | ||
2984 | }; | ||
2985 | |||
2986 | static const unsigned int sdhi2_wp_b_mux[] = { | ||
2987 | SD2_WP_B_MARK, | ||
2988 | }; | ||
2989 | |||
2990 | static const unsigned int sdhi2_ds_pins[] = { | ||
2991 | /* DS */ | ||
2992 | RCAR_GP_PIN(4, 6), | ||
2993 | }; | ||
2994 | |||
2995 | static const unsigned int sdhi2_ds_mux[] = { | ||
2996 | SD2_DS_MARK, | ||
2997 | }; | ||
2998 | |||
2999 | /* - SDHI3 ------------------------------------------------------------------ */ | ||
3000 | static const unsigned int sdhi3_data1_pins[] = { | ||
3001 | /* D0 */ | ||
3002 | RCAR_GP_PIN(4, 9), | ||
3003 | }; | ||
3004 | |||
3005 | static const unsigned int sdhi3_data1_mux[] = { | ||
3006 | SD3_DAT0_MARK, | ||
3007 | }; | ||
3008 | |||
3009 | static const unsigned int sdhi3_data4_pins[] = { | ||
3010 | /* D[0:3] */ | ||
3011 | RCAR_GP_PIN(4, 9), RCAR_GP_PIN(4, 10), | ||
3012 | RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 12), | ||
3013 | }; | ||
3014 | |||
3015 | static const unsigned int sdhi3_data4_mux[] = { | ||
3016 | SD3_DAT0_MARK, SD3_DAT1_MARK, | ||
3017 | SD3_DAT2_MARK, SD3_DAT3_MARK, | ||
3018 | }; | ||
3019 | |||
3020 | static const unsigned int sdhi3_data8_pins[] = { | ||
3021 | /* D[0:7] */ | ||
3022 | RCAR_GP_PIN(4, 9), RCAR_GP_PIN(4, 10), | ||
3023 | RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 12), | ||
3024 | RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 14), | ||
3025 | RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16), | ||
3026 | }; | ||
3027 | |||
3028 | static const unsigned int sdhi3_data8_mux[] = { | ||
3029 | SD3_DAT0_MARK, SD3_DAT1_MARK, | ||
3030 | SD3_DAT2_MARK, SD3_DAT3_MARK, | ||
3031 | SD3_DAT4_MARK, SD3_DAT5_MARK, | ||
3032 | SD3_DAT6_MARK, SD3_DAT7_MARK, | ||
3033 | }; | ||
3034 | |||
3035 | static const unsigned int sdhi3_ctrl_pins[] = { | ||
3036 | /* CLK, CMD */ | ||
3037 | RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 8), | ||
3038 | }; | ||
3039 | |||
3040 | static const unsigned int sdhi3_ctrl_mux[] = { | ||
3041 | SD3_CLK_MARK, SD3_CMD_MARK, | ||
3042 | }; | ||
3043 | |||
3044 | static const unsigned int sdhi3_cd_pins[] = { | ||
3045 | /* CD */ | ||
3046 | RCAR_GP_PIN(4, 15), | ||
3047 | }; | ||
3048 | |||
3049 | static const unsigned int sdhi3_cd_mux[] = { | ||
3050 | SD3_CD_MARK, | ||
3051 | }; | ||
3052 | |||
3053 | static const unsigned int sdhi3_wp_pins[] = { | ||
3054 | /* WP */ | ||
3055 | RCAR_GP_PIN(4, 16), | ||
3056 | }; | ||
3057 | |||
3058 | static const unsigned int sdhi3_wp_mux[] = { | ||
3059 | SD3_WP_MARK, | ||
3060 | }; | ||
3061 | |||
3062 | static const unsigned int sdhi3_ds_pins[] = { | ||
3063 | /* DS */ | ||
3064 | RCAR_GP_PIN(4, 17), | ||
3065 | }; | ||
3066 | |||
3067 | static const unsigned int sdhi3_ds_mux[] = { | ||
3068 | SD3_DS_MARK, | ||
3069 | }; | ||
3070 | |||
2813 | /* - USB0 ------------------------------------------------------------------- */ | 3071 | /* - USB0 ------------------------------------------------------------------- */ |
2814 | static const unsigned int usb0_pins[] = { | 3072 | static const unsigned int usb0_pins[] = { |
2815 | /* PWEN, OVC */ | 3073 | /* PWEN, OVC */ |
@@ -3007,6 +3265,32 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
3007 | SH_PFC_PIN_GROUP(scif5_clk_b), | 3265 | SH_PFC_PIN_GROUP(scif5_clk_b), |
3008 | SH_PFC_PIN_GROUP(scif_clk_a), | 3266 | SH_PFC_PIN_GROUP(scif_clk_a), |
3009 | SH_PFC_PIN_GROUP(scif_clk_b), | 3267 | SH_PFC_PIN_GROUP(scif_clk_b), |
3268 | SH_PFC_PIN_GROUP(sdhi0_data1), | ||
3269 | SH_PFC_PIN_GROUP(sdhi0_data4), | ||
3270 | SH_PFC_PIN_GROUP(sdhi0_ctrl), | ||
3271 | SH_PFC_PIN_GROUP(sdhi0_cd), | ||
3272 | SH_PFC_PIN_GROUP(sdhi0_wp), | ||
3273 | SH_PFC_PIN_GROUP(sdhi1_data1), | ||
3274 | SH_PFC_PIN_GROUP(sdhi1_data4), | ||
3275 | SH_PFC_PIN_GROUP(sdhi1_ctrl), | ||
3276 | SH_PFC_PIN_GROUP(sdhi1_cd), | ||
3277 | SH_PFC_PIN_GROUP(sdhi1_wp), | ||
3278 | SH_PFC_PIN_GROUP(sdhi2_data1), | ||
3279 | SH_PFC_PIN_GROUP(sdhi2_data4), | ||
3280 | SH_PFC_PIN_GROUP(sdhi2_data8), | ||
3281 | SH_PFC_PIN_GROUP(sdhi2_ctrl), | ||
3282 | SH_PFC_PIN_GROUP(sdhi2_cd_a), | ||
3283 | SH_PFC_PIN_GROUP(sdhi2_wp_a), | ||
3284 | SH_PFC_PIN_GROUP(sdhi2_cd_b), | ||
3285 | SH_PFC_PIN_GROUP(sdhi2_wp_b), | ||
3286 | SH_PFC_PIN_GROUP(sdhi2_ds), | ||
3287 | SH_PFC_PIN_GROUP(sdhi3_data1), | ||
3288 | SH_PFC_PIN_GROUP(sdhi3_data4), | ||
3289 | SH_PFC_PIN_GROUP(sdhi3_data8), | ||
3290 | SH_PFC_PIN_GROUP(sdhi3_ctrl), | ||
3291 | SH_PFC_PIN_GROUP(sdhi3_cd), | ||
3292 | SH_PFC_PIN_GROUP(sdhi3_wp), | ||
3293 | SH_PFC_PIN_GROUP(sdhi3_ds), | ||
3010 | SH_PFC_PIN_GROUP(usb0), | 3294 | SH_PFC_PIN_GROUP(usb0), |
3011 | SH_PFC_PIN_GROUP(usb1), | 3295 | SH_PFC_PIN_GROUP(usb1), |
3012 | SH_PFC_PIN_GROUP(usb30), | 3296 | SH_PFC_PIN_GROUP(usb30), |
@@ -3240,6 +3524,44 @@ static const char * const scif_clk_groups[] = { | |||
3240 | "scif_clk_b", | 3524 | "scif_clk_b", |
3241 | }; | 3525 | }; |
3242 | 3526 | ||
3527 | static const char * const sdhi0_groups[] = { | ||
3528 | "sdhi0_data1", | ||
3529 | "sdhi0_data4", | ||
3530 | "sdhi0_ctrl", | ||
3531 | "sdhi0_cd", | ||
3532 | "sdhi0_wp", | ||
3533 | }; | ||
3534 | |||
3535 | static const char * const sdhi1_groups[] = { | ||
3536 | "sdhi1_data1", | ||
3537 | "sdhi1_data4", | ||
3538 | "sdhi1_ctrl", | ||
3539 | "sdhi1_cd", | ||
3540 | "sdhi1_wp", | ||
3541 | }; | ||
3542 | |||
3543 | static const char * const sdhi2_groups[] = { | ||
3544 | "sdhi2_data1", | ||
3545 | "sdhi2_data4", | ||
3546 | "sdhi2_data8", | ||
3547 | "sdhi2_ctrl", | ||
3548 | "sdhi2_cd_a", | ||
3549 | "sdhi2_wp_a", | ||
3550 | "sdhi2_cd_b", | ||
3551 | "sdhi2_wp_b", | ||
3552 | "sdhi2_ds", | ||
3553 | }; | ||
3554 | |||
3555 | static const char * const sdhi3_groups[] = { | ||
3556 | "sdhi3_data1", | ||
3557 | "sdhi3_data4", | ||
3558 | "sdhi3_data8", | ||
3559 | "sdhi3_ctrl", | ||
3560 | "sdhi3_cd", | ||
3561 | "sdhi3_wp", | ||
3562 | "sdhi3_ds", | ||
3563 | }; | ||
3564 | |||
3243 | static const char * const usb0_groups[] = { | 3565 | static const char * const usb0_groups[] = { |
3244 | "usb0", | 3566 | "usb0", |
3245 | }; | 3567 | }; |
@@ -3274,6 +3596,10 @@ static const struct sh_pfc_function pinmux_functions[] = { | |||
3274 | SH_PFC_FUNCTION(scif4), | 3596 | SH_PFC_FUNCTION(scif4), |
3275 | SH_PFC_FUNCTION(scif5), | 3597 | SH_PFC_FUNCTION(scif5), |
3276 | SH_PFC_FUNCTION(scif_clk), | 3598 | SH_PFC_FUNCTION(scif_clk), |
3599 | SH_PFC_FUNCTION(sdhi0), | ||
3600 | SH_PFC_FUNCTION(sdhi1), | ||
3601 | SH_PFC_FUNCTION(sdhi2), | ||
3602 | SH_PFC_FUNCTION(sdhi3), | ||
3277 | SH_PFC_FUNCTION(usb0), | 3603 | SH_PFC_FUNCTION(usb0), |
3278 | SH_PFC_FUNCTION(usb1), | 3604 | SH_PFC_FUNCTION(usb1), |
3279 | SH_PFC_FUNCTION(usb30), | 3605 | SH_PFC_FUNCTION(usb30), |