aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc
diff options
context:
space:
mode:
authorRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>2016-02-26 07:37:03 -0500
committerGeert Uytterhoeven <geert+renesas@glider.be>2016-02-26 07:59:41 -0500
commita4d9791fca507649d772f5d9890bde14f0eadd32 (patch)
treebbdb9e2f7e0b094099a42a72b304f446c330fbdf /drivers/pinctrl/sh-pfc
parentabf05e1900a355e5d5bf2ec35ede6261affb6328 (diff)
pinctrl: sh-pfc: r8a7795: Add CAN support
This patch adds CAN[0-1] pinmux support to r8a7795 SoC. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7795.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index 4066e98a4a0a..582fcb8e3a6e 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -1599,6 +1599,38 @@ static const unsigned int avb_avtp_capture_b_mux[] = {
1599 AVB_AVTP_CAPTURE_B_MARK, 1599 AVB_AVTP_CAPTURE_B_MARK,
1600}; 1600};
1601 1601
1602/* - CAN ------------------------------------------------------------------ */
1603static const unsigned int can0_data_a_pins[] = {
1604 /* TX, RX */
1605 RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
1606};
1607static const unsigned int can0_data_a_mux[] = {
1608 CAN0_TX_A_MARK, CAN0_RX_A_MARK,
1609};
1610static const unsigned int can0_data_b_pins[] = {
1611 /* TX, RX */
1612 RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1613};
1614static const unsigned int can0_data_b_mux[] = {
1615 CAN0_TX_B_MARK, CAN0_RX_B_MARK,
1616};
1617static const unsigned int can1_data_pins[] = {
1618 /* TX, RX */
1619 RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26),
1620};
1621static const unsigned int can1_data_mux[] = {
1622 CAN1_TX_MARK, CAN1_RX_MARK,
1623};
1624
1625/* - CAN Clock -------------------------------------------------------------- */
1626static const unsigned int can_clk_pins[] = {
1627 /* CLK */
1628 RCAR_GP_PIN(1, 25),
1629};
1630static const unsigned int can_clk_mux[] = {
1631 CAN_CLK_MARK,
1632};
1633
1602/* - HSCIF0 ----------------------------------------------------------------- */ 1634/* - HSCIF0 ----------------------------------------------------------------- */
1603static const unsigned int hscif0_data_pins[] = { 1635static const unsigned int hscif0_data_pins[] = {
1604 /* RX, TX */ 1636 /* RX, TX */
@@ -3284,6 +3316,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
3284 SH_PFC_PIN_GROUP(avb_avtp_capture_a), 3316 SH_PFC_PIN_GROUP(avb_avtp_capture_a),
3285 SH_PFC_PIN_GROUP(avb_avtp_match_b), 3317 SH_PFC_PIN_GROUP(avb_avtp_match_b),
3286 SH_PFC_PIN_GROUP(avb_avtp_capture_b), 3318 SH_PFC_PIN_GROUP(avb_avtp_capture_b),
3319 SH_PFC_PIN_GROUP(can0_data_a),
3320 SH_PFC_PIN_GROUP(can0_data_b),
3321 SH_PFC_PIN_GROUP(can1_data),
3322 SH_PFC_PIN_GROUP(can_clk),
3287 SH_PFC_PIN_GROUP(hscif0_data), 3323 SH_PFC_PIN_GROUP(hscif0_data),
3288 SH_PFC_PIN_GROUP(hscif0_clk), 3324 SH_PFC_PIN_GROUP(hscif0_clk),
3289 SH_PFC_PIN_GROUP(hscif0_ctrl), 3325 SH_PFC_PIN_GROUP(hscif0_ctrl),
@@ -3545,6 +3581,19 @@ static const char * const avb_groups[] = {
3545 "avb_avtp_capture_b", 3581 "avb_avtp_capture_b",
3546}; 3582};
3547 3583
3584static const char * const can0_groups[] = {
3585 "can0_data_a",
3586 "can0_data_b",
3587};
3588
3589static const char * const can1_groups[] = {
3590 "can1_data",
3591};
3592
3593static const char * const can_clk_groups[] = {
3594 "can_clk",
3595};
3596
3548static const char * const hscif0_groups[] = { 3597static const char * const hscif0_groups[] = {
3549 "hscif0_data", 3598 "hscif0_data",
3550 "hscif0_clk", 3599 "hscif0_clk",
@@ -3883,6 +3932,9 @@ static const char * const usb2_groups[] = {
3883static const struct sh_pfc_function pinmux_functions[] = { 3932static const struct sh_pfc_function pinmux_functions[] = {
3884 SH_PFC_FUNCTION(audio_clk), 3933 SH_PFC_FUNCTION(audio_clk),
3885 SH_PFC_FUNCTION(avb), 3934 SH_PFC_FUNCTION(avb),
3935 SH_PFC_FUNCTION(can0),
3936 SH_PFC_FUNCTION(can1),
3937 SH_PFC_FUNCTION(can_clk),
3886 SH_PFC_FUNCTION(hscif0), 3938 SH_PFC_FUNCTION(hscif0),
3887 SH_PFC_FUNCTION(hscif1), 3939 SH_PFC_FUNCTION(hscif1),
3888 SH_PFC_FUNCTION(hscif2), 3940 SH_PFC_FUNCTION(hscif2),