Skip to content

Commit 890c3a6

Browse files
committed
pinctrl: renesas: r8a7779: Add PWM pins, groups, and functions
Add pins, groups, and functions for the PWM Timers on the Renesas R-Car H1 (R8A7779) SoC. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/cea9723e9c3df4b1408750caa38886aac1fab5f7.1679329090.git.geert+renesas@glider.be
1 parent 63a66eb commit 890c3a6

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

drivers/pinctrl/renesas/pfc-r8a7779.c

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,67 @@ static const unsigned int mmc1_ctrl_pins[] = {
20342034
static const unsigned int mmc1_ctrl_mux[] = {
20352035
MMC1_CMD_MARK, MMC1_CLK_MARK,
20362036
};
2037+
/* - PWM -------------------------------------------------------------------- */
2038+
static const unsigned int pwm0_pins[] = {
2039+
RCAR_GP_PIN(1, 3),
2040+
};
2041+
static const unsigned int pwm0_mux[] = {
2042+
PWM0_MARK,
2043+
};
2044+
static const unsigned int pwm0_b_pins[] = {
2045+
RCAR_GP_PIN(0, 12),
2046+
};
2047+
static const unsigned int pwm0_b_mux[] = {
2048+
PWM0_B_MARK,
2049+
};
2050+
static const unsigned int pwm0_c_pins[] = {
2051+
RCAR_GP_PIN(4, 5),
2052+
};
2053+
static const unsigned int pwm0_c_mux[] = {
2054+
PWM0_C_MARK,
2055+
};
2056+
static const unsigned int pwm0_d_pins[] = {
2057+
RCAR_GP_PIN(4, 18),
2058+
};
2059+
static const unsigned int pwm0_d_mux[] = {
2060+
PWM0_D_MARK,
2061+
};
2062+
static const unsigned int pwm1_pins[] = {
2063+
RCAR_GP_PIN(4, 28),
2064+
};
2065+
static const unsigned int pwm1_mux[] = {
2066+
PWM1_MARK,
2067+
};
2068+
static const unsigned int pwm2_pins[] = {
2069+
RCAR_GP_PIN(3, 25),
2070+
};
2071+
static const unsigned int pwm2_mux[] = {
2072+
PWM2_MARK,
2073+
};
2074+
static const unsigned int pwm3_pins[] = {
2075+
RCAR_GP_PIN(3, 26),
2076+
};
2077+
static const unsigned int pwm3_mux[] = {
2078+
PWM3_MARK,
2079+
};
2080+
static const unsigned int pwm4_pins[] = {
2081+
RCAR_GP_PIN(3, 27),
2082+
};
2083+
static const unsigned int pwm4_mux[] = {
2084+
PWM4_MARK,
2085+
};
2086+
static const unsigned int pwm5_pins[] = {
2087+
RCAR_GP_PIN(4, 17),
2088+
};
2089+
static const unsigned int pwm5_mux[] = {
2090+
PWM5_MARK,
2091+
};
2092+
static const unsigned int pwm6_pins[] = {
2093+
RCAR_GP_PIN(1, 2),
2094+
};
2095+
static const unsigned int pwm6_mux[] = {
2096+
PWM6_MARK,
2097+
};
20372098
/* - SCIF0 ------------------------------------------------------------------ */
20382099
static const unsigned int scif0_data_pins[] = {
20392100
/* RXD, TXD */
@@ -2771,6 +2832,16 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
27712832
BUS_DATA_PIN_GROUP(mmc1_data, 4),
27722833
BUS_DATA_PIN_GROUP(mmc1_data, 8),
27732834
SH_PFC_PIN_GROUP(mmc1_ctrl),
2835+
SH_PFC_PIN_GROUP(pwm0),
2836+
SH_PFC_PIN_GROUP(pwm0_b),
2837+
SH_PFC_PIN_GROUP(pwm0_c),
2838+
SH_PFC_PIN_GROUP(pwm0_d),
2839+
SH_PFC_PIN_GROUP(pwm1),
2840+
SH_PFC_PIN_GROUP(pwm2),
2841+
SH_PFC_PIN_GROUP(pwm3),
2842+
SH_PFC_PIN_GROUP(pwm4),
2843+
SH_PFC_PIN_GROUP(pwm5),
2844+
SH_PFC_PIN_GROUP(pwm6),
27742845
SH_PFC_PIN_GROUP(scif0_data),
27752846
SH_PFC_PIN_GROUP(scif0_clk),
27762847
SH_PFC_PIN_GROUP(scif0_ctrl),
@@ -2984,6 +3055,37 @@ static const char * const mmc1_groups[] = {
29843055
"mmc1_ctrl",
29853056
};
29863057

3058+
static const char * const pwm0_groups[] = {
3059+
"pwm0",
3060+
"pwm0_b",
3061+
"pwm0_c",
3062+
"pwm0_d",
3063+
};
3064+
3065+
static const char * const pwm1_groups[] = {
3066+
"pwm1",
3067+
};
3068+
3069+
static const char * const pwm2_groups[] = {
3070+
"pwm2",
3071+
};
3072+
3073+
static const char * const pwm3_groups[] = {
3074+
"pwm3",
3075+
};
3076+
3077+
static const char * const pwm4_groups[] = {
3078+
"pwm4",
3079+
};
3080+
3081+
static const char * const pwm5_groups[] = {
3082+
"pwm5",
3083+
};
3084+
3085+
static const char * const pwm6_groups[] = {
3086+
"pwm6",
3087+
};
3088+
29873089
static const char * const scif0_groups[] = {
29883090
"scif0_data",
29893091
"scif0_clk",
@@ -3147,6 +3249,13 @@ static const struct sh_pfc_function pinmux_functions[] = {
31473249
SH_PFC_FUNCTION(lbsc),
31483250
SH_PFC_FUNCTION(mmc0),
31493251
SH_PFC_FUNCTION(mmc1),
3252+
SH_PFC_FUNCTION(pwm0),
3253+
SH_PFC_FUNCTION(pwm1),
3254+
SH_PFC_FUNCTION(pwm2),
3255+
SH_PFC_FUNCTION(pwm3),
3256+
SH_PFC_FUNCTION(pwm4),
3257+
SH_PFC_FUNCTION(pwm5),
3258+
SH_PFC_FUNCTION(pwm6),
31503259
SH_PFC_FUNCTION(scif0),
31513260
SH_PFC_FUNCTION(scif1),
31523261
SH_PFC_FUNCTION(scif2),

0 commit comments

Comments
 (0)