aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Paterson <chris.paterson2@renesas.com>2016-11-22 08:49:02 -0500
committerGeert Uytterhoeven <geert+renesas@glider.be>2016-12-27 04:57:38 -0500
commitcf75341accab1a90895936cff380c38f6d0777f5 (patch)
treefd81ee4a41ffc150f88b9c8ba965de61815aa566
parent4c2fb44d60b92c4e3e744f49767da23f4eaf1b98 (diff)
pinctrl: sh-pfc: r8a7796: Add CAN support
This patch adds CAN[0-1] pinmux support to r8a7796 SoC. Based on a patch for r8a7795 by Ramesh Shanmugasundaram. Signed-off-by: Chris Paterson <chris.paterson2@renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7796.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index e0fe3753963d..cd7157a8543f 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -1647,6 +1647,38 @@ static const unsigned int avb_avtp_capture_b_mux[] = {
1647 AVB_AVTP_CAPTURE_B_MARK, 1647 AVB_AVTP_CAPTURE_B_MARK,
1648}; 1648};
1649 1649
1650/* - CAN ------------------------------------------------------------------ */
1651static const unsigned int can0_data_a_pins[] = {
1652 /* TX, RX */
1653 RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
1654};
1655static const unsigned int can0_data_a_mux[] = {
1656 CAN0_TX_A_MARK, CAN0_RX_A_MARK,
1657};
1658static const unsigned int can0_data_b_pins[] = {
1659 /* TX, RX */
1660 RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1661};
1662static const unsigned int can0_data_b_mux[] = {
1663 CAN0_TX_B_MARK, CAN0_RX_B_MARK,
1664};
1665static const unsigned int can1_data_pins[] = {
1666 /* TX, RX */
1667 RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26),
1668};
1669static const unsigned int can1_data_mux[] = {
1670 CAN1_TX_MARK, CAN1_RX_MARK,
1671};
1672
1673/* - CAN Clock -------------------------------------------------------------- */
1674static const unsigned int can_clk_pins[] = {
1675 /* CLK */
1676 RCAR_GP_PIN(1, 25),
1677};
1678static const unsigned int can_clk_mux[] = {
1679 CAN_CLK_MARK,
1680};
1681
1650/* - DRIF0 --------------------------------------------------------------- */ 1682/* - DRIF0 --------------------------------------------------------------- */
1651static const unsigned int drif0_ctrl_a_pins[] = { 1683static const unsigned int drif0_ctrl_a_pins[] = {
1652 /* CLK, SYNC */ 1684 /* CLK, SYNC */
@@ -2425,6 +2457,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
2425 SH_PFC_PIN_GROUP(avb_avtp_capture_a), 2457 SH_PFC_PIN_GROUP(avb_avtp_capture_a),
2426 SH_PFC_PIN_GROUP(avb_avtp_match_b), 2458 SH_PFC_PIN_GROUP(avb_avtp_match_b),
2427 SH_PFC_PIN_GROUP(avb_avtp_capture_b), 2459 SH_PFC_PIN_GROUP(avb_avtp_capture_b),
2460 SH_PFC_PIN_GROUP(can0_data_a),
2461 SH_PFC_PIN_GROUP(can0_data_b),
2462 SH_PFC_PIN_GROUP(can1_data),
2463 SH_PFC_PIN_GROUP(can_clk),
2428 SH_PFC_PIN_GROUP(drif0_ctrl_a), 2464 SH_PFC_PIN_GROUP(drif0_ctrl_a),
2429 SH_PFC_PIN_GROUP(drif0_data0_a), 2465 SH_PFC_PIN_GROUP(drif0_data0_a),
2430 SH_PFC_PIN_GROUP(drif0_data1_a), 2466 SH_PFC_PIN_GROUP(drif0_data1_a),
@@ -2539,6 +2575,19 @@ static const char * const avb_groups[] = {
2539 "avb_avtp_capture_b", 2575 "avb_avtp_capture_b",
2540}; 2576};
2541 2577
2578static const char * const can0_groups[] = {
2579 "can0_data_a",
2580 "can0_data_b",
2581};
2582
2583static const char * const can1_groups[] = {
2584 "can1_data",
2585};
2586
2587static const char * const can_clk_groups[] = {
2588 "can_clk",
2589};
2590
2542static const char * const drif0_groups[] = { 2591static const char * const drif0_groups[] = {
2543 "drif0_ctrl_a", 2592 "drif0_ctrl_a",
2544 "drif0_data0_a", 2593 "drif0_data0_a",
@@ -2698,6 +2747,9 @@ static const char * const sdhi3_groups[] = {
2698 2747
2699static const struct sh_pfc_function pinmux_functions[] = { 2748static const struct sh_pfc_function pinmux_functions[] = {
2700 SH_PFC_FUNCTION(avb), 2749 SH_PFC_FUNCTION(avb),
2750 SH_PFC_FUNCTION(can0),
2751 SH_PFC_FUNCTION(can1),
2752 SH_PFC_FUNCTION(can_clk),
2701 SH_PFC_FUNCTION(drif0), 2753 SH_PFC_FUNCTION(drif0),
2702 SH_PFC_FUNCTION(drif1), 2754 SH_PFC_FUNCTION(drif1),
2703 SH_PFC_FUNCTION(drif2), 2755 SH_PFC_FUNCTION(drif2),