diff options
author | Ulrich Hecht <ulrich.hecht+renesas@gmail.com> | 2017-11-17 05:41:23 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-12-05 08:14:55 -0500 |
commit | c45985d359c40899ef05e44bb24a63241afaec10 (patch) | |
tree | e31337ca556beaf5868cba0db84d3269e906f6df | |
parent | 0f4713d71f22d3b0ec3de6ae4a126cceecdea82b (diff) |
pinctrl: sh-pfc: r8a77995: Add CAN support
This patch adds CAN[0-1] pinmux support to the r8a77995 SoC.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c index 2c9a71a59fc3..c4ea718e172e 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c | |||
@@ -1059,6 +1059,45 @@ static const unsigned int avb0_avtp_capture_b_mux[] = { | |||
1059 | AVB0_AVTP_CAPTURE_B_MARK, | 1059 | AVB0_AVTP_CAPTURE_B_MARK, |
1060 | }; | 1060 | }; |
1061 | 1061 | ||
1062 | /* - CAN ------------------------------------------------------------------ */ | ||
1063 | static const unsigned int can0_data_a_pins[] = { | ||
1064 | /* TX, RX */ | ||
1065 | RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 31), | ||
1066 | }; | ||
1067 | static const unsigned int can0_data_a_mux[] = { | ||
1068 | CAN0_TX_A_MARK, CAN0_RX_A_MARK, | ||
1069 | }; | ||
1070 | static const unsigned int can0_data_b_pins[] = { | ||
1071 | /* TX, RX */ | ||
1072 | RCAR_GP_PIN(4, 22), RCAR_GP_PIN(4, 5), | ||
1073 | }; | ||
1074 | static const unsigned int can0_data_b_mux[] = { | ||
1075 | CAN0_TX_B_MARK, CAN0_RX_B_MARK, | ||
1076 | }; | ||
1077 | static const unsigned int can1_data_a_pins[] = { | ||
1078 | /* TX, RX */ | ||
1079 | RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 29), | ||
1080 | }; | ||
1081 | static const unsigned int can1_data_a_mux[] = { | ||
1082 | CAN1_TX_A_MARK, CAN1_RX_A_MARK, | ||
1083 | }; | ||
1084 | static const unsigned int can1_data_b_pins[] = { | ||
1085 | /* TX, RX */ | ||
1086 | RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 6), | ||
1087 | }; | ||
1088 | static const unsigned int can1_data_b_mux[] = { | ||
1089 | CAN1_TX_B_MARK, CAN1_RX_B_MARK, | ||
1090 | }; | ||
1091 | |||
1092 | /* - CAN Clock -------------------------------------------------------------- */ | ||
1093 | static const unsigned int can_clk_pins[] = { | ||
1094 | /* CLK */ | ||
1095 | RCAR_GP_PIN(5, 2), | ||
1096 | }; | ||
1097 | static const unsigned int can_clk_mux[] = { | ||
1098 | CAN_CLK_MARK, | ||
1099 | }; | ||
1100 | |||
1062 | /* - I2C -------------------------------------------------------------------- */ | 1101 | /* - I2C -------------------------------------------------------------------- */ |
1063 | static const unsigned int i2c0_pins[] = { | 1102 | static const unsigned int i2c0_pins[] = { |
1064 | /* SCL, SDA */ | 1103 | /* SCL, SDA */ |
@@ -1506,6 +1545,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { | |||
1506 | SH_PFC_PIN_GROUP(avb0_avtp_pps_b), | 1545 | SH_PFC_PIN_GROUP(avb0_avtp_pps_b), |
1507 | SH_PFC_PIN_GROUP(avb0_avtp_match_b), | 1546 | SH_PFC_PIN_GROUP(avb0_avtp_match_b), |
1508 | SH_PFC_PIN_GROUP(avb0_avtp_capture_b), | 1547 | SH_PFC_PIN_GROUP(avb0_avtp_capture_b), |
1548 | SH_PFC_PIN_GROUP(can0_data_a), | ||
1549 | SH_PFC_PIN_GROUP(can0_data_b), | ||
1550 | SH_PFC_PIN_GROUP(can1_data_a), | ||
1551 | SH_PFC_PIN_GROUP(can1_data_b), | ||
1552 | SH_PFC_PIN_GROUP(can_clk), | ||
1509 | SH_PFC_PIN_GROUP(i2c0), | 1553 | SH_PFC_PIN_GROUP(i2c0), |
1510 | SH_PFC_PIN_GROUP(i2c1), | 1554 | SH_PFC_PIN_GROUP(i2c1), |
1511 | SH_PFC_PIN_GROUP(i2c2_a), | 1555 | SH_PFC_PIN_GROUP(i2c2_a), |
@@ -1583,6 +1627,18 @@ static const char * const avb0_groups[] = { | |||
1583 | "avb0_avtp_capture_b", | 1627 | "avb0_avtp_capture_b", |
1584 | }; | 1628 | }; |
1585 | 1629 | ||
1630 | static const char * const can0_groups[] = { | ||
1631 | "can0_data_a", | ||
1632 | "can0_data_b", | ||
1633 | }; | ||
1634 | static const char * const can1_groups[] = { | ||
1635 | "can1_data_a", | ||
1636 | "can1_data_b", | ||
1637 | }; | ||
1638 | static const char * const can_clk_groups[] = { | ||
1639 | "can_clk", | ||
1640 | }; | ||
1641 | |||
1586 | static const char * const i2c0_groups[] = { | 1642 | static const char * const i2c0_groups[] = { |
1587 | "i2c0", | 1643 | "i2c0", |
1588 | }; | 1644 | }; |
@@ -1693,6 +1749,9 @@ static const char * const usb0_groups[] = { | |||
1693 | static const struct sh_pfc_function pinmux_functions[] = { | 1749 | static const struct sh_pfc_function pinmux_functions[] = { |
1694 | SH_PFC_FUNCTION(audio_clk), | 1750 | SH_PFC_FUNCTION(audio_clk), |
1695 | SH_PFC_FUNCTION(avb0), | 1751 | SH_PFC_FUNCTION(avb0), |
1752 | SH_PFC_FUNCTION(can0), | ||
1753 | SH_PFC_FUNCTION(can1), | ||
1754 | SH_PFC_FUNCTION(can_clk), | ||
1696 | SH_PFC_FUNCTION(i2c0), | 1755 | SH_PFC_FUNCTION(i2c0), |
1697 | SH_PFC_FUNCTION(i2c1), | 1756 | SH_PFC_FUNCTION(i2c1), |
1698 | SH_PFC_FUNCTION(i2c2), | 1757 | SH_PFC_FUNCTION(i2c2), |