diff options
author | Valentine Barshak <valentine.barshak@cogentembedded.com> | 2013-12-10 13:20:26 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-12-10 14:42:39 -0500 |
commit | 054d4259091a52be0d8ed3e3febf07cf263d294d (patch) | |
tree | e000aef2c8edddfecc75b1dc56b406eedcdaf398 /drivers/pinctrl/sh-pfc/pfc-r8a7790.c | |
parent | 317a03a9cb925a5566b852dff85f6aaa4aff7e3e (diff) |
pinctrl: sh-pfc: pfc-r8a7790: Add VIN2 and VIN3 pins
There are VIN2 and VIN3 channels available on the R8A7790 SoC.
VIN2 supports 4/8/16/18/24-bit data, while VIN3 supports 8-bit.
Add both here, covering all possible data pin configurations.
Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pfc-r8a7790.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c index 2194ea6374ca..293a51a7434e 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c | |||
@@ -3452,6 +3452,138 @@ static const unsigned int vin1_clk_pins[] = { | |||
3452 | static const unsigned int vin1_clk_mux[] = { | 3452 | static const unsigned int vin1_clk_mux[] = { |
3453 | VI1_CLK_MARK, | 3453 | VI1_CLK_MARK, |
3454 | }; | 3454 | }; |
3455 | /* - VIN2 ----------------------------------------------------------------- */ | ||
3456 | static const union vin_data vin2_data_pins = { | ||
3457 | .data24 = { | ||
3458 | /* B */ | ||
3459 | RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9), | ||
3460 | RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 11), | ||
3461 | RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), | ||
3462 | RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15), | ||
3463 | /* G */ | ||
3464 | RCAR_GP_PIN(0, 27), RCAR_GP_PIN(0, 28), | ||
3465 | RCAR_GP_PIN(0, 29), RCAR_GP_PIN(1, 10), | ||
3466 | RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), | ||
3467 | RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), | ||
3468 | /* R */ | ||
3469 | RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13), | ||
3470 | RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15), | ||
3471 | RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 20), | ||
3472 | RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 24), | ||
3473 | }, | ||
3474 | }; | ||
3475 | static const union vin_data vin2_data_mux = { | ||
3476 | .data24 = { | ||
3477 | /* B */ | ||
3478 | VI2_DATA0_VI2_B0_MARK, VI2_DATA1_VI2_B1_MARK, | ||
3479 | VI2_DATA2_VI2_B2_MARK, VI2_DATA3_VI2_B3_MARK, | ||
3480 | VI2_DATA4_VI2_B4_MARK, VI2_DATA5_VI2_B5_MARK, | ||
3481 | VI2_DATA6_VI2_B6_MARK, VI2_DATA7_VI2_B7_MARK, | ||
3482 | /* G */ | ||
3483 | VI2_G0_MARK, VI2_G1_MARK, | ||
3484 | VI2_G2_MARK, VI2_G3_MARK, | ||
3485 | VI2_G4_MARK, VI2_G5_MARK, | ||
3486 | VI2_G6_MARK, VI2_G7_MARK, | ||
3487 | /* R */ | ||
3488 | VI2_R0_MARK, VI2_R1_MARK, | ||
3489 | VI2_R2_MARK, VI2_R3_MARK, | ||
3490 | VI2_R4_MARK, VI2_R5_MARK, | ||
3491 | VI2_R6_MARK, VI2_R7_MARK, | ||
3492 | }, | ||
3493 | }; | ||
3494 | static const unsigned int vin2_data18_pins[] = { | ||
3495 | /* B */ | ||
3496 | RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 11), | ||
3497 | RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), | ||
3498 | RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15), | ||
3499 | /* G */ | ||
3500 | RCAR_GP_PIN(0, 29), RCAR_GP_PIN(1, 10), | ||
3501 | RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), | ||
3502 | RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), | ||
3503 | /* R */ | ||
3504 | RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15), | ||
3505 | RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 20), | ||
3506 | RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 24), | ||
3507 | }; | ||
3508 | static const unsigned int vin2_data18_mux[] = { | ||
3509 | /* B */ | ||
3510 | VI2_DATA2_VI2_B2_MARK, VI2_DATA3_VI2_B3_MARK, | ||
3511 | VI2_DATA4_VI2_B4_MARK, VI2_DATA5_VI2_B5_MARK, | ||
3512 | VI2_DATA6_VI2_B6_MARK, VI2_DATA7_VI2_B7_MARK, | ||
3513 | /* G */ | ||
3514 | VI2_G2_MARK, VI2_G3_MARK, | ||
3515 | VI2_G4_MARK, VI2_G5_MARK, | ||
3516 | VI2_G6_MARK, VI2_G7_MARK, | ||
3517 | /* R */ | ||
3518 | VI2_R2_MARK, VI2_R3_MARK, | ||
3519 | VI2_R4_MARK, VI2_R5_MARK, | ||
3520 | VI2_R6_MARK, VI2_R7_MARK, | ||
3521 | }; | ||
3522 | static const unsigned int vin2_sync_pins[] = { | ||
3523 | RCAR_GP_PIN(1, 16), /* HSYNC */ | ||
3524 | RCAR_GP_PIN(1, 21), /* VSYNC */ | ||
3525 | }; | ||
3526 | static const unsigned int vin2_sync_mux[] = { | ||
3527 | VI2_HSYNC_N_MARK, | ||
3528 | VI2_VSYNC_N_MARK, | ||
3529 | }; | ||
3530 | static const unsigned int vin2_field_pins[] = { | ||
3531 | RCAR_GP_PIN(1, 9), | ||
3532 | }; | ||
3533 | static const unsigned int vin2_field_mux[] = { | ||
3534 | VI2_FIELD_MARK, | ||
3535 | }; | ||
3536 | static const unsigned int vin2_clkenb_pins[] = { | ||
3537 | RCAR_GP_PIN(1, 8), | ||
3538 | }; | ||
3539 | static const unsigned int vin2_clkenb_mux[] = { | ||
3540 | VI2_CLKENB_MARK, | ||
3541 | }; | ||
3542 | static const unsigned int vin2_clk_pins[] = { | ||
3543 | RCAR_GP_PIN(1, 11), | ||
3544 | }; | ||
3545 | static const unsigned int vin2_clk_mux[] = { | ||
3546 | VI2_CLK_MARK, | ||
3547 | }; | ||
3548 | /* - VIN3 ----------------------------------------------------------------- */ | ||
3549 | static const unsigned int vin3_data8_pins[] = { | ||
3550 | RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1), | ||
3551 | RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), | ||
3552 | RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), | ||
3553 | RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), | ||
3554 | }; | ||
3555 | static const unsigned int vin3_data8_mux[] = { | ||
3556 | VI3_DATA0_MARK, VI3_DATA1_MARK, | ||
3557 | VI3_DATA2_MARK, VI3_DATA3_MARK, | ||
3558 | VI3_DATA4_MARK, VI3_DATA5_MARK, | ||
3559 | VI3_DATA6_MARK, VI3_DATA7_MARK, | ||
3560 | }; | ||
3561 | static const unsigned int vin3_sync_pins[] = { | ||
3562 | RCAR_GP_PIN(1, 16), /* HSYNC */ | ||
3563 | RCAR_GP_PIN(1, 17), /* VSYNC */ | ||
3564 | }; | ||
3565 | static const unsigned int vin3_sync_mux[] = { | ||
3566 | VI3_HSYNC_N_MARK, | ||
3567 | VI2_VSYNC_N_MARK, | ||
3568 | }; | ||
3569 | static const unsigned int vin3_field_pins[] = { | ||
3570 | RCAR_GP_PIN(1, 15), | ||
3571 | }; | ||
3572 | static const unsigned int vin3_field_mux[] = { | ||
3573 | VI3_FIELD_MARK, | ||
3574 | }; | ||
3575 | static const unsigned int vin3_clkenb_pins[] = { | ||
3576 | RCAR_GP_PIN(1, 14), | ||
3577 | }; | ||
3578 | static const unsigned int vin3_clkenb_mux[] = { | ||
3579 | VI3_CLKENB_MARK, | ||
3580 | }; | ||
3581 | static const unsigned int vin3_clk_pins[] = { | ||
3582 | RCAR_GP_PIN(1, 23), | ||
3583 | }; | ||
3584 | static const unsigned int vin3_clk_mux[] = { | ||
3585 | VI3_CLK_MARK, | ||
3586 | }; | ||
3455 | 3587 | ||
3456 | static const struct sh_pfc_pin_group pinmux_groups[] = { | 3588 | static const struct sh_pfc_pin_group pinmux_groups[] = { |
3457 | SH_PFC_PIN_GROUP(audio_clk_a), | 3589 | SH_PFC_PIN_GROUP(audio_clk_a), |
@@ -3683,6 +3815,20 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
3683 | SH_PFC_PIN_GROUP(vin1_field), | 3815 | SH_PFC_PIN_GROUP(vin1_field), |
3684 | SH_PFC_PIN_GROUP(vin1_clkenb), | 3816 | SH_PFC_PIN_GROUP(vin1_clkenb), |
3685 | SH_PFC_PIN_GROUP(vin1_clk), | 3817 | SH_PFC_PIN_GROUP(vin1_clk), |
3818 | VIN_DATA_PIN_GROUP(vin2_data, 24), | ||
3819 | SH_PFC_PIN_GROUP(vin2_data18), | ||
3820 | VIN_DATA_PIN_GROUP(vin2_data, 16), | ||
3821 | VIN_DATA_PIN_GROUP(vin2_data, 8), | ||
3822 | VIN_DATA_PIN_GROUP(vin2_data, 4), | ||
3823 | SH_PFC_PIN_GROUP(vin2_sync), | ||
3824 | SH_PFC_PIN_GROUP(vin2_field), | ||
3825 | SH_PFC_PIN_GROUP(vin2_clkenb), | ||
3826 | SH_PFC_PIN_GROUP(vin2_clk), | ||
3827 | SH_PFC_PIN_GROUP(vin3_data8), | ||
3828 | SH_PFC_PIN_GROUP(vin3_sync), | ||
3829 | SH_PFC_PIN_GROUP(vin3_field), | ||
3830 | SH_PFC_PIN_GROUP(vin3_clkenb), | ||
3831 | SH_PFC_PIN_GROUP(vin3_clk), | ||
3686 | }; | 3832 | }; |
3687 | 3833 | ||
3688 | static const char * const audio_clk_groups[] = { | 3834 | static const char * const audio_clk_groups[] = { |
@@ -4028,6 +4174,26 @@ static const char * const vin1_groups[] = { | |||
4028 | "vin1_clk", | 4174 | "vin1_clk", |
4029 | }; | 4175 | }; |
4030 | 4176 | ||
4177 | static const char * const vin2_groups[] = { | ||
4178 | "vin2_data24", | ||
4179 | "vin2_data18", | ||
4180 | "vin2_data16", | ||
4181 | "vin2_data8", | ||
4182 | "vin2_data4", | ||
4183 | "vin2_sync", | ||
4184 | "vin2_field", | ||
4185 | "vin2_clkenb", | ||
4186 | "vin2_clk", | ||
4187 | }; | ||
4188 | |||
4189 | static const char * const vin3_groups[] = { | ||
4190 | "vin3_data8", | ||
4191 | "vin3_sync", | ||
4192 | "vin3_field", | ||
4193 | "vin3_clkenb", | ||
4194 | "vin3_clk", | ||
4195 | }; | ||
4196 | |||
4031 | static const struct sh_pfc_function pinmux_functions[] = { | 4197 | static const struct sh_pfc_function pinmux_functions[] = { |
4032 | SH_PFC_FUNCTION(audio_clk), | 4198 | SH_PFC_FUNCTION(audio_clk), |
4033 | SH_PFC_FUNCTION(du), | 4199 | SH_PFC_FUNCTION(du), |
@@ -4067,6 +4233,8 @@ static const struct sh_pfc_function pinmux_functions[] = { | |||
4067 | SH_PFC_FUNCTION(usb2), | 4233 | SH_PFC_FUNCTION(usb2), |
4068 | SH_PFC_FUNCTION(vin0), | 4234 | SH_PFC_FUNCTION(vin0), |
4069 | SH_PFC_FUNCTION(vin1), | 4235 | SH_PFC_FUNCTION(vin1), |
4236 | SH_PFC_FUNCTION(vin2), | ||
4237 | SH_PFC_FUNCTION(vin3), | ||
4070 | }; | 4238 | }; |
4071 | 4239 | ||
4072 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 4240 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |