Commit 44df22e7 authored by Linus Walleij's avatar Linus Walleij

Merge tag 'sh-pfc-for-v5.1-tag2' of...

Merge tag 'sh-pfc-for-v5.1-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v5.1 (take two)

  - Add DRIF (digital radio) pin groups on R-Car E3 and M3-N,
  - Add TMU (timer) pin groups on R-Car M3-N,
  - Miscellaneous fixes,
  - Build-time validation for fixed-size field width mismatches.
parents 402bfb3c 79dbbdbe
...@@ -1260,6 +1260,14 @@ static const char * const dtv_groups[] = { ...@@ -1260,6 +1260,14 @@ static const char * const dtv_groups[] = {
"dtv_b", "dtv_b",
}; };
static const char * const err_rst_reqb_groups[] = {
"err_rst_reqb",
};
static const char * const ext_clki_groups[] = {
"ext_clki",
};
static const char * const iic0_groups[] = { static const char * const iic0_groups[] = {
"iic0", "iic0",
}; };
...@@ -1282,6 +1290,10 @@ static const char * const lcd_groups[] = { ...@@ -1282,6 +1290,10 @@ static const char * const lcd_groups[] = {
"yuv3", "yuv3",
}; };
static const char * const lowpwr_groups[] = {
"lowpwr",
};
static const char * const ntsc_groups[] = { static const char * const ntsc_groups[] = {
"ntsc_clk", "ntsc_clk",
"ntsc_data", "ntsc_data",
...@@ -1295,6 +1307,10 @@ static const char * const pwm1_groups[] = { ...@@ -1295,6 +1307,10 @@ static const char * const pwm1_groups[] = {
"pwm1", "pwm1",
}; };
static const char * const ref_clko_groups[] = {
"ref_clko",
};
static const char * const sd_groups[] = { static const char * const sd_groups[] = {
"sd_cki", "sd_cki",
}; };
...@@ -1388,13 +1404,17 @@ static const struct sh_pfc_function pinmux_functions[] = { ...@@ -1388,13 +1404,17 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(cam), SH_PFC_FUNCTION(cam),
SH_PFC_FUNCTION(cf), SH_PFC_FUNCTION(cf),
SH_PFC_FUNCTION(dtv), SH_PFC_FUNCTION(dtv),
SH_PFC_FUNCTION(err_rst_reqb),
SH_PFC_FUNCTION(ext_clki),
SH_PFC_FUNCTION(iic0), SH_PFC_FUNCTION(iic0),
SH_PFC_FUNCTION(iic1), SH_PFC_FUNCTION(iic1),
SH_PFC_FUNCTION(jtag), SH_PFC_FUNCTION(jtag),
SH_PFC_FUNCTION(lcd), SH_PFC_FUNCTION(lcd),
SH_PFC_FUNCTION(lowpwr),
SH_PFC_FUNCTION(ntsc), SH_PFC_FUNCTION(ntsc),
SH_PFC_FUNCTION(pwm0), SH_PFC_FUNCTION(pwm0),
SH_PFC_FUNCTION(pwm1), SH_PFC_FUNCTION(pwm1),
SH_PFC_FUNCTION(ref_clko),
SH_PFC_FUNCTION(sd), SH_PFC_FUNCTION(sd),
SH_PFC_FUNCTION(sdi0), SH_PFC_FUNCTION(sdi0),
SH_PFC_FUNCTION(sdi1), SH_PFC_FUNCTION(sdi1),
......
...@@ -5236,7 +5236,7 @@ static const char * const scifb2_groups[] = { ...@@ -5236,7 +5236,7 @@ static const char * const scifb2_groups[] = {
"scifb2_data_b", "scifb2_data_b",
"scifb2_clk_b", "scifb2_clk_b",
"scifb2_ctrl_b", "scifb2_ctrl_b",
"scifb0_data_c", "scifb2_data_c",
"scifb2_clk_c", "scifb2_clk_c",
"scifb2_data_d", "scifb2_data_d",
}; };
......
...@@ -1913,6 +1913,7 @@ static const char * const vin1_groups[] = { ...@@ -1913,6 +1913,7 @@ static const char * const vin1_groups[] = {
"vin1_data8", "vin1_data8",
"vin1_data24_b", "vin1_data24_b",
"vin1_data20_b", "vin1_data20_b",
"vin1_data18_b",
"vin1_data16_b", "vin1_data16_b",
"vin1_sync", "vin1_sync",
"vin1_field", "vin1_field",
......
This diff is collapsed.
...@@ -1599,6 +1599,199 @@ static const unsigned int canfd1_data_mux[] = { ...@@ -1599,6 +1599,199 @@ static const unsigned int canfd1_data_mux[] = {
CANFD1_TX_MARK, CANFD1_RX_MARK, CANFD1_TX_MARK, CANFD1_RX_MARK,
}; };
/* - DRIF0 --------------------------------------------------------------- */
static const unsigned int drif0_ctrl_a_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 19),
};
static const unsigned int drif0_ctrl_a_mux[] = {
RIF0_CLK_A_MARK, RIF0_SYNC_A_MARK,
};
static const unsigned int drif0_data0_a_pins[] = {
/* D0 */
RCAR_GP_PIN(5, 17),
};
static const unsigned int drif0_data0_a_mux[] = {
RIF0_D0_A_MARK,
};
static const unsigned int drif0_data1_a_pins[] = {
/* D1 */
RCAR_GP_PIN(5, 18),
};
static const unsigned int drif0_data1_a_mux[] = {
RIF0_D1_A_MARK,
};
static const unsigned int drif0_ctrl_b_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 15),
};
static const unsigned int drif0_ctrl_b_mux[] = {
RIF0_CLK_B_MARK, RIF0_SYNC_B_MARK,
};
static const unsigned int drif0_data0_b_pins[] = {
/* D0 */
RCAR_GP_PIN(3, 13),
};
static const unsigned int drif0_data0_b_mux[] = {
RIF0_D0_B_MARK,
};
static const unsigned int drif0_data1_b_pins[] = {
/* D1 */
RCAR_GP_PIN(3, 14),
};
static const unsigned int drif0_data1_b_mux[] = {
RIF0_D1_B_MARK,
};
/* - DRIF1 --------------------------------------------------------------- */
static const unsigned int drif1_ctrl_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 1),
};
static const unsigned int drif1_ctrl_mux[] = {
RIF1_CLK_MARK, RIF1_SYNC_MARK,
};
static const unsigned int drif1_data0_pins[] = {
/* D0 */
RCAR_GP_PIN(5, 2),
};
static const unsigned int drif1_data0_mux[] = {
RIF1_D0_MARK,
};
static const unsigned int drif1_data1_pins[] = {
/* D1 */
RCAR_GP_PIN(5, 3),
};
static const unsigned int drif1_data1_mux[] = {
RIF1_D1_MARK,
};
/* - DRIF2 --------------------------------------------------------------- */
static const unsigned int drif2_ctrl_a_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
};
static const unsigned int drif2_ctrl_a_mux[] = {
RIF2_CLK_A_MARK, RIF2_SYNC_A_MARK,
};
static const unsigned int drif2_data0_a_pins[] = {
/* D0 */
RCAR_GP_PIN(2, 8),
};
static const unsigned int drif2_data0_a_mux[] = {
RIF2_D0_A_MARK,
};
static const unsigned int drif2_data1_a_pins[] = {
/* D1 */
RCAR_GP_PIN(2, 9),
};
static const unsigned int drif2_data1_a_mux[] = {
RIF2_D1_A_MARK,
};
static const unsigned int drif2_ctrl_b_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
};
static const unsigned int drif2_ctrl_b_mux[] = {
RIF2_CLK_B_MARK, RIF2_SYNC_B_MARK,
};
static const unsigned int drif2_data0_b_pins[] = {
/* D0 */
RCAR_GP_PIN(1, 6),
};
static const unsigned int drif2_data0_b_mux[] = {
RIF2_D0_B_MARK,
};
static const unsigned int drif2_data1_b_pins[] = {
/* D1 */
RCAR_GP_PIN(1, 7),
};
static const unsigned int drif2_data1_b_mux[] = {
RIF2_D1_B_MARK,
};
/* - DRIF3 --------------------------------------------------------------- */
static const unsigned int drif3_ctrl_a_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
};
static const unsigned int drif3_ctrl_a_mux[] = {
RIF3_CLK_A_MARK, RIF3_SYNC_A_MARK,
};
static const unsigned int drif3_data0_a_pins[] = {
/* D0 */
RCAR_GP_PIN(2, 12),
};
static const unsigned int drif3_data0_a_mux[] = {
RIF3_D0_A_MARK,
};
static const unsigned int drif3_data1_a_pins[] = {
/* D1 */
RCAR_GP_PIN(2, 13),
};
static const unsigned int drif3_data1_a_mux[] = {
RIF3_D1_A_MARK,
};
static const unsigned int drif3_ctrl_b_pins[] = {
/* CLK, SYNC */
RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9),
};
static const unsigned int drif3_ctrl_b_mux[] = {
RIF3_CLK_B_MARK, RIF3_SYNC_B_MARK,
};
static const unsigned int drif3_data0_b_pins[] = {
/* D0 */
RCAR_GP_PIN(0, 10),
};
static const unsigned int drif3_data0_b_mux[] = {
RIF3_D0_B_MARK,
};
static const unsigned int drif3_data1_b_pins[] = {
/* D1 */
RCAR_GP_PIN(0, 11),
};
static const unsigned int drif3_data1_b_mux[] = {
RIF3_D1_B_MARK,
};
/* - DU --------------------------------------------------------------------- */ /* - DU --------------------------------------------------------------------- */
static const unsigned int du_rgb666_pins[] = { static const unsigned int du_rgb666_pins[] = {
/* R[7:2], G[7:2], B[7:2] */ /* R[7:2], G[7:2], B[7:2] */
...@@ -3574,7 +3767,7 @@ static const unsigned int vin5_clk_b_mux[] = { ...@@ -3574,7 +3767,7 @@ static const unsigned int vin5_clk_b_mux[] = {
static const struct { static const struct {
struct sh_pfc_pin_group common[245]; struct sh_pfc_pin_group common[245];
struct sh_pfc_pin_group automotive[2]; struct sh_pfc_pin_group automotive[23];
} pinmux_groups = { } pinmux_groups = {
.common = { .common = {
SH_PFC_PIN_GROUP(audio_clk_a), SH_PFC_PIN_GROUP(audio_clk_a),
...@@ -3826,6 +4019,27 @@ static const struct { ...@@ -3826,6 +4019,27 @@ static const struct {
.automotive = { .automotive = {
SH_PFC_PIN_GROUP(canfd0_data), SH_PFC_PIN_GROUP(canfd0_data),
SH_PFC_PIN_GROUP(canfd1_data), SH_PFC_PIN_GROUP(canfd1_data),
SH_PFC_PIN_GROUP(drif0_ctrl_a),
SH_PFC_PIN_GROUP(drif0_data0_a),
SH_PFC_PIN_GROUP(drif0_data1_a),
SH_PFC_PIN_GROUP(drif0_ctrl_b),
SH_PFC_PIN_GROUP(drif0_data0_b),
SH_PFC_PIN_GROUP(drif0_data1_b),
SH_PFC_PIN_GROUP(drif1_ctrl),
SH_PFC_PIN_GROUP(drif1_data0),
SH_PFC_PIN_GROUP(drif1_data1),
SH_PFC_PIN_GROUP(drif2_ctrl_a),
SH_PFC_PIN_GROUP(drif2_data0_a),
SH_PFC_PIN_GROUP(drif2_data1_a),
SH_PFC_PIN_GROUP(drif2_ctrl_b),
SH_PFC_PIN_GROUP(drif2_data0_b),
SH_PFC_PIN_GROUP(drif2_data1_b),
SH_PFC_PIN_GROUP(drif3_ctrl_a),
SH_PFC_PIN_GROUP(drif3_data0_a),
SH_PFC_PIN_GROUP(drif3_data1_a),
SH_PFC_PIN_GROUP(drif3_ctrl_b),
SH_PFC_PIN_GROUP(drif3_data0_b),
SH_PFC_PIN_GROUP(drif3_data1_b),
} }
}; };
...@@ -3880,6 +4094,39 @@ static const char * const canfd1_groups[] = { ...@@ -3880,6 +4094,39 @@ static const char * const canfd1_groups[] = {
"canfd1_data", "canfd1_data",
}; };
static const char * const drif0_groups[] = {
"drif0_ctrl_a",
"drif0_data0_a",
"drif0_data1_a",
"drif0_ctrl_b",
"drif0_data0_b",
"drif0_data1_b",
};
static const char * const drif1_groups[] = {
"drif1_ctrl",
"drif1_data0",
"drif1_data1",
};
static const char * const drif2_groups[] = {
"drif2_ctrl_a",
"drif2_data0_a",
"drif2_data1_a",
"drif2_ctrl_b",
"drif2_data0_b",
"drif2_data1_b",
};
static const char * const drif3_groups[] = {
"drif3_ctrl_a",
"drif3_data0_a",
"drif3_data1_a",
"drif3_ctrl_b",
"drif3_data0_b",
"drif3_data1_b",
};
static const char * const du_groups[] = { static const char * const du_groups[] = {
"du_rgb666", "du_rgb666",
"du_rgb888", "du_rgb888",
...@@ -4219,7 +4466,7 @@ static const char * const vin5_groups[] = { ...@@ -4219,7 +4466,7 @@ static const char * const vin5_groups[] = {
static const struct { static const struct {
struct sh_pfc_function common[45]; struct sh_pfc_function common[45];
struct sh_pfc_function automotive[2]; struct sh_pfc_function automotive[6];
} pinmux_functions = { } pinmux_functions = {
.common = { .common = {
SH_PFC_FUNCTION(audio_clk), SH_PFC_FUNCTION(audio_clk),
...@@ -4271,6 +4518,10 @@ static const struct { ...@@ -4271,6 +4518,10 @@ static const struct {
.automotive = { .automotive = {
SH_PFC_FUNCTION(canfd0), SH_PFC_FUNCTION(canfd0),
SH_PFC_FUNCTION(canfd1), SH_PFC_FUNCTION(canfd1),
SH_PFC_FUNCTION(drif0),
SH_PFC_FUNCTION(drif1),
SH_PFC_FUNCTION(drif2),
SH_PFC_FUNCTION(drif3),
} }
}; };
......
...@@ -3354,7 +3354,8 @@ static const char * const fsic_groups[] = { ...@@ -3354,7 +3354,8 @@ static const char * const fsic_groups[] = {
"fsic_sclk_out", "fsic_sclk_out",
"fsic_data_in", "fsic_data_in",
"fsic_data_out", "fsic_data_out",
"fsic_spdif", "fsic_spdif_0",
"fsic_spdif_1",
}; };
static const char * const fsid_groups[] = { static const char * const fsid_groups[] = {
......
...@@ -126,7 +126,8 @@ struct pinmux_cfg_reg { ...@@ -126,7 +126,8 @@ struct pinmux_cfg_reg {
* one for each possible combination of the register field bit values. * one for each possible combination of the register field bit values.
*/ */
#define PINMUX_CFG_REG(name, r, r_width, f_width) \ #define PINMUX_CFG_REG(name, r, r_width, f_width) \
.reg = r, .reg_width = r_width, .field_width = f_width, \ .reg = r, .reg_width = r_width, \
.field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width), \
.enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)]) .enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)])
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment