aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-04-13 20:23:35 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-04-22 09:08:16 -0400
commitb664cd1f020211d8e4480c2937b82fe513a9c757 (patch)
treed198316bcd4d159ff91d52fb1dd5b695e780f029 /drivers/pinctrl/sh-pfc
parentb6369a8f1526705bbbe0bed5ef35206426ad77f5 (diff)
sh-pfc: r8a7791: Add SSI pin support
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7791.c314
1 files changed, 314 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
index 56f62dc6e666..4caddc6b103a 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -3259,6 +3259,260 @@ static const unsigned int sdhi2_wp_pins[] = {
3259static const unsigned int sdhi2_wp_mux[] = { 3259static const unsigned int sdhi2_wp_mux[] = {
3260 SD2_WP_MARK, 3260 SD2_WP_MARK,
3261}; 3261};
3262
3263/* - SSI -------------------------------------------------------------------- */
3264static const unsigned int ssi0_data_pins[] = {
3265 /* SDATA */
3266 RCAR_GP_PIN(2, 2),
3267};
3268
3269static const unsigned int ssi0_data_mux[] = {
3270 SSI_SDATA0_MARK,
3271};
3272
3273static const unsigned int ssi0_data_b_pins[] = {
3274 /* SDATA */
3275 RCAR_GP_PIN(3, 4),
3276};
3277
3278static const unsigned int ssi0_data_b_mux[] = {
3279 SSI_SDATA0_B_MARK,
3280};
3281
3282static const unsigned int ssi0129_ctrl_pins[] = {
3283 /* SCK, WS */
3284 RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
3285};
3286
3287static const unsigned int ssi0129_ctrl_mux[] = {
3288 SSI_SCK0129_MARK, SSI_WS0129_MARK,
3289};
3290
3291static const unsigned int ssi0129_ctrl_b_pins[] = {
3292 /* SCK, WS */
3293 RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
3294};
3295
3296static const unsigned int ssi0129_ctrl_b_mux[] = {
3297 SSI_SCK0129_B_MARK, SSI_WS0129_B_MARK,
3298};
3299
3300static const unsigned int ssi1_data_pins[] = {
3301 /* SDATA */
3302 RCAR_GP_PIN(2, 5),
3303};
3304
3305static const unsigned int ssi1_data_mux[] = {
3306 SSI_SDATA1_MARK,
3307};
3308
3309static const unsigned int ssi1_data_b_pins[] = {
3310 /* SDATA */
3311 RCAR_GP_PIN(3, 7),
3312};
3313
3314static const unsigned int ssi1_data_b_mux[] = {
3315 SSI_SDATA1_B_MARK,
3316};
3317
3318static const unsigned int ssi1_ctrl_pins[] = {
3319 /* SCK, WS */
3320 RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
3321};
3322
3323static const unsigned int ssi1_ctrl_mux[] = {
3324 SSI_SCK1_MARK, SSI_WS1_MARK,
3325};
3326
3327static const unsigned int ssi1_ctrl_b_pins[] = {
3328 /* SCK, WS */
3329 RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 6),
3330};
3331
3332static const unsigned int ssi1_ctrl_b_mux[] = {
3333 SSI_SCK1_B_MARK, SSI_WS1_B_MARK,
3334};
3335
3336static const unsigned int ssi2_data_pins[] = {
3337 /* SDATA */
3338 RCAR_GP_PIN(2, 8),
3339};
3340
3341static const unsigned int ssi2_data_mux[] = {
3342 SSI_SDATA2_MARK,
3343};
3344
3345static const unsigned int ssi2_ctrl_pins[] = {
3346 /* SCK, WS */
3347 RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
3348};
3349
3350static const unsigned int ssi2_ctrl_mux[] = {
3351 SSI_SCK2_MARK, SSI_WS2_MARK,
3352};
3353
3354static const unsigned int ssi3_data_pins[] = {
3355 /* SDATA */
3356 RCAR_GP_PIN(2, 11),
3357};
3358
3359static const unsigned int ssi3_data_mux[] = {
3360 SSI_SDATA3_MARK,
3361};
3362
3363static const unsigned int ssi34_ctrl_pins[] = {
3364 /* SCK, WS */
3365 RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 10),
3366};
3367
3368static const unsigned int ssi34_ctrl_mux[] = {
3369 SSI_SCK34_MARK, SSI_WS34_MARK,
3370};
3371
3372static const unsigned int ssi4_data_pins[] = {
3373 /* SDATA */
3374 RCAR_GP_PIN(2, 14),
3375};
3376
3377static const unsigned int ssi4_data_mux[] = {
3378 SSI_SDATA4_MARK,
3379};
3380
3381static const unsigned int ssi4_ctrl_pins[] = {
3382 /* SCK, WS */
3383 RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
3384};
3385
3386static const unsigned int ssi4_ctrl_mux[] = {
3387 SSI_SCK4_MARK, SSI_WS4_MARK,
3388};
3389
3390static const unsigned int ssi5_data_pins[] = {
3391 /* SDATA */
3392 RCAR_GP_PIN(2, 17),
3393};
3394
3395static const unsigned int ssi5_data_mux[] = {
3396 SSI_SDATA5_MARK,
3397};
3398
3399static const unsigned int ssi5_ctrl_pins[] = {
3400 /* SCK, WS */
3401 RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
3402};
3403
3404static const unsigned int ssi5_ctrl_mux[] = {
3405 SSI_SCK5_MARK, SSI_WS5_MARK,
3406};
3407
3408static const unsigned int ssi6_data_pins[] = {
3409 /* SDATA */
3410 RCAR_GP_PIN(2, 20),
3411};
3412
3413static const unsigned int ssi6_data_mux[] = {
3414 SSI_SDATA6_MARK,
3415};
3416
3417static const unsigned int ssi6_ctrl_pins[] = {
3418 /* SCK, WS */
3419 RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
3420};
3421
3422static const unsigned int ssi6_ctrl_mux[] = {
3423 SSI_SCK6_MARK, SSI_WS6_MARK,
3424};
3425
3426static const unsigned int ssi7_data_pins[] = {
3427 /* SDATA */
3428 RCAR_GP_PIN(2, 23),
3429};
3430
3431static const unsigned int ssi7_data_mux[] = {
3432 SSI_SDATA7_MARK,
3433};
3434
3435static const unsigned int ssi7_data_b_pins[] = {
3436 /* SDATA */
3437 RCAR_GP_PIN(3, 12),
3438};
3439
3440static const unsigned int ssi7_data_b_mux[] = {
3441 SSI_SDATA7_B_MARK,
3442};
3443
3444static const unsigned int ssi78_ctrl_pins[] = {
3445 /* SCK, WS */
3446 RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
3447};
3448
3449static const unsigned int ssi78_ctrl_mux[] = {
3450 SSI_SCK78_MARK, SSI_WS78_MARK,
3451};
3452
3453static const unsigned int ssi78_ctrl_b_pins[] = {
3454 /* SCK, WS */
3455 RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
3456};
3457
3458static const unsigned int ssi78_ctrl_b_mux[] = {
3459 SSI_SCK78_B_MARK, SSI_WS78_B_MARK,
3460};
3461
3462static const unsigned int ssi8_data_pins[] = {
3463 /* SDATA */
3464 RCAR_GP_PIN(2, 24),
3465};
3466
3467static const unsigned int ssi8_data_mux[] = {
3468 SSI_SDATA8_MARK,
3469};
3470
3471static const unsigned int ssi8_data_b_pins[] = {
3472 /* SDATA */
3473 RCAR_GP_PIN(3, 13),
3474};
3475
3476static const unsigned int ssi8_data_b_mux[] = {
3477 SSI_SDATA8_B_MARK,
3478};
3479
3480static const unsigned int ssi9_data_pins[] = {
3481 /* SDATA */
3482 RCAR_GP_PIN(2, 27),
3483};
3484
3485static const unsigned int ssi9_data_mux[] = {
3486 SSI_SDATA9_MARK,
3487};
3488
3489static const unsigned int ssi9_data_b_pins[] = {
3490 /* SDATA */
3491 RCAR_GP_PIN(3, 18),
3492};
3493
3494static const unsigned int ssi9_data_b_mux[] = {
3495 SSI_SDATA9_B_MARK,
3496};
3497
3498static const unsigned int ssi9_ctrl_pins[] = {
3499 /* SCK, WS */
3500 RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
3501};
3502
3503static const unsigned int ssi9_ctrl_mux[] = {
3504 SSI_SCK9_MARK, SSI_WS9_MARK,
3505};
3506
3507static const unsigned int ssi9_ctrl_b_pins[] = {
3508 /* SCK, WS */
3509 RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
3510};
3511
3512static const unsigned int ssi9_ctrl_b_mux[] = {
3513 SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
3514};
3515
3262/* - USB0 ------------------------------------------------------------------- */ 3516/* - USB0 ------------------------------------------------------------------- */
3263static const unsigned int usb0_pins[] = { 3517static const unsigned int usb0_pins[] = {
3264 RCAR_GP_PIN(7, 23), /* PWEN */ 3518 RCAR_GP_PIN(7, 23), /* PWEN */
@@ -3777,6 +4031,34 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
3777 SH_PFC_PIN_GROUP(sdhi2_ctrl), 4031 SH_PFC_PIN_GROUP(sdhi2_ctrl),
3778 SH_PFC_PIN_GROUP(sdhi2_cd), 4032 SH_PFC_PIN_GROUP(sdhi2_cd),
3779 SH_PFC_PIN_GROUP(sdhi2_wp), 4033 SH_PFC_PIN_GROUP(sdhi2_wp),
4034 SH_PFC_PIN_GROUP(ssi0_data),
4035 SH_PFC_PIN_GROUP(ssi0_data_b),
4036 SH_PFC_PIN_GROUP(ssi0129_ctrl),
4037 SH_PFC_PIN_GROUP(ssi0129_ctrl_b),
4038 SH_PFC_PIN_GROUP(ssi1_data),
4039 SH_PFC_PIN_GROUP(ssi1_data_b),
4040 SH_PFC_PIN_GROUP(ssi1_ctrl),
4041 SH_PFC_PIN_GROUP(ssi1_ctrl_b),
4042 SH_PFC_PIN_GROUP(ssi2_data),
4043 SH_PFC_PIN_GROUP(ssi2_ctrl),
4044 SH_PFC_PIN_GROUP(ssi3_data),
4045 SH_PFC_PIN_GROUP(ssi34_ctrl),
4046 SH_PFC_PIN_GROUP(ssi4_data),
4047 SH_PFC_PIN_GROUP(ssi4_ctrl),
4048 SH_PFC_PIN_GROUP(ssi5_data),
4049 SH_PFC_PIN_GROUP(ssi5_ctrl),
4050 SH_PFC_PIN_GROUP(ssi6_data),
4051 SH_PFC_PIN_GROUP(ssi6_ctrl),
4052 SH_PFC_PIN_GROUP(ssi7_data),
4053 SH_PFC_PIN_GROUP(ssi7_data_b),
4054 SH_PFC_PIN_GROUP(ssi78_ctrl),
4055 SH_PFC_PIN_GROUP(ssi78_ctrl_b),
4056 SH_PFC_PIN_GROUP(ssi8_data),
4057 SH_PFC_PIN_GROUP(ssi8_data_b),
4058 SH_PFC_PIN_GROUP(ssi9_data),
4059 SH_PFC_PIN_GROUP(ssi9_data_b),
4060 SH_PFC_PIN_GROUP(ssi9_ctrl),
4061 SH_PFC_PIN_GROUP(ssi9_ctrl_b),
3780 SH_PFC_PIN_GROUP(usb0), 4062 SH_PFC_PIN_GROUP(usb0),
3781 SH_PFC_PIN_GROUP(usb1), 4063 SH_PFC_PIN_GROUP(usb1),
3782 VIN_DATA_PIN_GROUP(vin0_data, 24), 4064 VIN_DATA_PIN_GROUP(vin0_data, 24),
@@ -4120,6 +4402,37 @@ static const char * const sdhi2_groups[] = {
4120 "sdhi2_wp", 4402 "sdhi2_wp",
4121}; 4403};
4122 4404
4405static const char * const ssi_groups[] = {
4406 "ssi0_data",
4407 "ssi0_data_b",
4408 "ssi0129_ctrl",
4409 "ssi0129_ctrl_b",
4410 "ssi1_data",
4411 "ssi1_data_b",
4412 "ssi1_ctrl",
4413 "ssi1_ctrl_b",
4414 "ssi2_data",
4415 "ssi2_ctrl",
4416 "ssi3_data",
4417 "ssi34_ctrl",
4418 "ssi4_data",
4419 "ssi4_ctrl",
4420 "ssi5_data",
4421 "ssi5_ctrl",
4422 "ssi6_data",
4423 "ssi6_ctrl",
4424 "ssi7_data",
4425 "ssi7_data_b",
4426 "ssi78_ctrl",
4427 "ssi78_ctrl_b",
4428 "ssi8_data",
4429 "ssi8_data_b",
4430 "ssi9_data",
4431 "ssi9_data_b",
4432 "ssi9_ctrl",
4433 "ssi9_ctrl_b",
4434};
4435
4123static const char * const usb0_groups[] = { 4436static const char * const usb0_groups[] = {
4124 "usb0", 4437 "usb0",
4125}; 4438};
@@ -4204,6 +4517,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
4204 SH_PFC_FUNCTION(sdhi0), 4517 SH_PFC_FUNCTION(sdhi0),
4205 SH_PFC_FUNCTION(sdhi1), 4518 SH_PFC_FUNCTION(sdhi1),
4206 SH_PFC_FUNCTION(sdhi2), 4519 SH_PFC_FUNCTION(sdhi2),
4520 SH_PFC_FUNCTION(ssi),
4207 SH_PFC_FUNCTION(usb0), 4521 SH_PFC_FUNCTION(usb0),
4208 SH_PFC_FUNCTION(usb1), 4522 SH_PFC_FUNCTION(usb1),
4209 SH_PFC_FUNCTION(vin0), 4523 SH_PFC_FUNCTION(vin0),