Skip to content

Commit c45985d

Browse files
Ulrich Hechtgeertu
authored andcommitted
pinctrl: sh-pfc: r8a77995: Add CAN support
This patch adds CAN[0-1] pinmux support to the r8a77995 SoC. Signed-off-by: Ulrich Hecht <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 0f4713d commit c45985d

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

drivers/pinctrl/sh-pfc/pfc-r8a77995.c

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,45 @@ static const unsigned int avb0_avtp_capture_b_mux[] = {
10591059
AVB0_AVTP_CAPTURE_B_MARK,
10601060
};
10611061

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+
10621101
/* - I2C -------------------------------------------------------------------- */
10631102
static const unsigned int i2c0_pins[] = {
10641103
/* SCL, SDA */
@@ -1506,6 +1545,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
15061545
SH_PFC_PIN_GROUP(avb0_avtp_pps_b),
15071546
SH_PFC_PIN_GROUP(avb0_avtp_match_b),
15081547
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),
15091553
SH_PFC_PIN_GROUP(i2c0),
15101554
SH_PFC_PIN_GROUP(i2c1),
15111555
SH_PFC_PIN_GROUP(i2c2_a),
@@ -1583,6 +1627,18 @@ static const char * const avb0_groups[] = {
15831627
"avb0_avtp_capture_b",
15841628
};
15851629

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+
15861642
static const char * const i2c0_groups[] = {
15871643
"i2c0",
15881644
};
@@ -1693,6 +1749,9 @@ static const char * const usb0_groups[] = {
16931749
static const struct sh_pfc_function pinmux_functions[] = {
16941750
SH_PFC_FUNCTION(audio_clk),
16951751
SH_PFC_FUNCTION(avb0),
1752+
SH_PFC_FUNCTION(can0),
1753+
SH_PFC_FUNCTION(can1),
1754+
SH_PFC_FUNCTION(can_clk),
16961755
SH_PFC_FUNCTION(i2c0),
16971756
SH_PFC_FUNCTION(i2c1),
16981757
SH_PFC_FUNCTION(i2c2),

0 commit comments

Comments
 (0)