Skip to content

Commit a678abf

Browse files
rshanmugeertu
authored andcommitted
pinctrl: sh-pfc: r8a7795: Add CAN support
This patch adds CAN[0-1] pinmux support for R-Car H3 ES2.0. The pin config is identical to H3 ES1.*. Signed-off-by: Ramesh Shanmugasundaram <[email protected]> Reviewed-by: Fabrizio Castro <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 3f35221 commit a678abf

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,38 @@ static const unsigned int avb_avtp_capture_b_mux[] = {
17811781
AVB_AVTP_CAPTURE_B_MARK,
17821782
};
17831783

1784+
/* - CAN ------------------------------------------------------------------ */
1785+
static const unsigned int can0_data_a_pins[] = {
1786+
/* TX, RX */
1787+
RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
1788+
};
1789+
static const unsigned int can0_data_a_mux[] = {
1790+
CAN0_TX_A_MARK, CAN0_RX_A_MARK,
1791+
};
1792+
static const unsigned int can0_data_b_pins[] = {
1793+
/* TX, RX */
1794+
RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
1795+
};
1796+
static const unsigned int can0_data_b_mux[] = {
1797+
CAN0_TX_B_MARK, CAN0_RX_B_MARK,
1798+
};
1799+
static const unsigned int can1_data_pins[] = {
1800+
/* TX, RX */
1801+
RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26),
1802+
};
1803+
static const unsigned int can1_data_mux[] = {
1804+
CAN1_TX_MARK, CAN1_RX_MARK,
1805+
};
1806+
1807+
/* - CAN Clock -------------------------------------------------------------- */
1808+
static const unsigned int can_clk_pins[] = {
1809+
/* CLK */
1810+
RCAR_GP_PIN(1, 25),
1811+
};
1812+
static const unsigned int can_clk_mux[] = {
1813+
CAN_CLK_MARK,
1814+
};
1815+
17841816
/* - DRIF0 --------------------------------------------------------------- */
17851817
static const unsigned int drif0_ctrl_a_pins[] = {
17861818
/* CLK, SYNC */
@@ -3843,6 +3875,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
38433875
SH_PFC_PIN_GROUP(avb_avtp_capture_a),
38443876
SH_PFC_PIN_GROUP(avb_avtp_match_b),
38453877
SH_PFC_PIN_GROUP(avb_avtp_capture_b),
3878+
SH_PFC_PIN_GROUP(can0_data_a),
3879+
SH_PFC_PIN_GROUP(can0_data_b),
3880+
SH_PFC_PIN_GROUP(can1_data),
3881+
SH_PFC_PIN_GROUP(can_clk),
38463882
SH_PFC_PIN_GROUP(drif0_ctrl_a),
38473883
SH_PFC_PIN_GROUP(drif0_data0_a),
38483884
SH_PFC_PIN_GROUP(drif0_data1_a),
@@ -4154,6 +4190,19 @@ static const char * const avb_groups[] = {
41544190
"avb_avtp_capture_b",
41554191
};
41564192

4193+
static const char * const can0_groups[] = {
4194+
"can0_data_a",
4195+
"can0_data_b",
4196+
};
4197+
4198+
static const char * const can1_groups[] = {
4199+
"can1_data",
4200+
};
4201+
4202+
static const char * const can_clk_groups[] = {
4203+
"can_clk",
4204+
};
4205+
41574206
static const char * const drif0_groups[] = {
41584207
"drif0_ctrl_a",
41594208
"drif0_data0_a",
@@ -4559,6 +4608,9 @@ static const char * const usb30_groups[] = {
45594608
static const struct sh_pfc_function pinmux_functions[] = {
45604609
SH_PFC_FUNCTION(audio_clk),
45614610
SH_PFC_FUNCTION(avb),
4611+
SH_PFC_FUNCTION(can0),
4612+
SH_PFC_FUNCTION(can1),
4613+
SH_PFC_FUNCTION(can_clk),
45624614
SH_PFC_FUNCTION(drif0),
45634615
SH_PFC_FUNCTION(drif1),
45644616
SH_PFC_FUNCTION(drif2),

0 commit comments

Comments
 (0)