pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions
authorTakeshi Kihara <takeshi.kihara.df@renesas.com>
Sun, 18 Nov 2018 17:29:01 +0000 (18:29 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 19 Nov 2018 10:56:35 +0000 (11:56 +0100)
This patch adds CAN FD{0,1} pins, groups and functions to the R8A77965
SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/sh-pfc/pfc-r8a77965.c

index 001eb3dd668ed4d253e2efa58b33766182698ad7..a7c4882de09e3bd69bba7da47d4b173415765592 100644 (file)
@@ -1822,6 +1822,34 @@ static const unsigned int can_clk_mux[] = {
        CAN_CLK_MARK,
 };
 
+/* - CAN FD --------------------------------------------------------------- */
+static const unsigned int canfd0_data_a_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(1, 23),     RCAR_GP_PIN(1, 24),
+};
+
+static const unsigned int canfd0_data_a_mux[] = {
+       CANFD0_TX_A_MARK,       CANFD0_RX_A_MARK,
+};
+
+static const unsigned int canfd0_data_b_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(2, 0),      RCAR_GP_PIN(2, 1),
+};
+
+static const unsigned int canfd0_data_b_mux[] = {
+       CANFD0_TX_B_MARK,       CANFD0_RX_B_MARK,
+};
+
+static const unsigned int canfd1_data_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(1, 22),     RCAR_GP_PIN(1, 26),
+};
+
+static const unsigned int canfd1_data_mux[] = {
+       CANFD1_TX_MARK,         CANFD1_RX_MARK,
+};
+
 /* - DU --------------------------------------------------------------------- */
 static const unsigned int du_rgb666_pins[] = {
        /* R[7:2], G[7:2], B[7:2] */
@@ -4006,6 +4034,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(can0_data_b),
        SH_PFC_PIN_GROUP(can1_data),
        SH_PFC_PIN_GROUP(can_clk),
+       SH_PFC_PIN_GROUP(canfd0_data_a),
+       SH_PFC_PIN_GROUP(canfd0_data_b),
+       SH_PFC_PIN_GROUP(canfd1_data),
        SH_PFC_PIN_GROUP(du_rgb666),
        SH_PFC_PIN_GROUP(du_rgb888),
        SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4327,6 +4358,15 @@ static const char * const can_clk_groups[] = {
        "can_clk",
 };
 
+static const char * const canfd0_groups[] = {
+       "canfd0_data_a",
+       "canfd0_data_b",
+};
+
+static const char * const canfd1_groups[] = {
+       "canfd1_data",
+};
+
 static const char * const du_groups[] = {
        "du_rgb666",
        "du_rgb888",
@@ -4721,6 +4761,8 @@ static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(can0),
        SH_PFC_FUNCTION(can1),
        SH_PFC_FUNCTION(can_clk),
+       SH_PFC_FUNCTION(canfd0),
+       SH_PFC_FUNCTION(canfd1),
        SH_PFC_FUNCTION(du),
        SH_PFC_FUNCTION(hscif0),
        SH_PFC_FUNCTION(hscif1),