summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2022-02-21 16:43:47 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2022-02-25 13:45:49 +0100
commitbabe298e9caaa3d723f9721647eeac22309941d8 (patch)
tree04fd979a19e9d9e4c503e3b21a093947137851ea
parent2e1b4362398673607d6a86b65ddab66e6dabf721 (diff)
downloadlinux-stable-babe298e9caaa3d723f9721647eeac22309941d8.tar.gz
linux-stable-babe298e9caaa3d723f9721647eeac22309941d8.tar.bz2
linux-stable-babe298e9caaa3d723f9721647eeac22309941d8.zip
pinctrl: renesas: r8a779f0: Add Ethernet pins, groups, and functions
Add pins, groups, and functions for the Ethernet Time-Sensitive Networking (TSN) interfaces on the Renesas R-Car S4-8 (R8A779F0) SoC. Based on a larger patch in the BSP by LUU HOAI. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/e0a1dc7d2435d28811e3acb361dae050eb3aabc9.1645457792.git.geert+renesas@glider.be
-rw-r--r--drivers/pinctrl/renesas/pfc-r8a779f0.c288
1 files changed, 288 insertions, 0 deletions
diff --git a/drivers/pinctrl/renesas/pfc-r8a779f0.c b/drivers/pinctrl/renesas/pfc-r8a779f0.c
index 39cb5d82cf53..91860608242c 100644
--- a/drivers/pinctrl/renesas/pfc-r8a779f0.c
+++ b/drivers/pinctrl/renesas/pfc-r8a779f0.c
@@ -1054,6 +1054,222 @@ static const unsigned int scif_clk_mux[] = {
SCIF_CLK_MARK,
};
+/* - TSN0 ------------------------------------------------ */
+static const unsigned int tsn0_link_a_pins[] = {
+ /* TSN0_LINK_A */
+ RCAR_GP_PIN(0, 11),
+};
+static const unsigned int tsn0_link_a_mux[] = {
+ TSN0_LINK_A_MARK,
+};
+static const unsigned int tsn0_magic_a_pins[] = {
+ /* TSN0_MAGIC_A */
+ RCAR_GP_PIN(0, 17),
+};
+static const unsigned int tsn0_magic_a_mux[] = {
+ TSN0_MAGIC_A_MARK,
+};
+static const unsigned int tsn0_phy_int_a_pins[] = {
+ /* TSN0_PHY_INT_A */
+ RCAR_GP_PIN(0, 18),
+};
+static const unsigned int tsn0_phy_int_a_mux[] = {
+ TSN0_PHY_INT_A_MARK,
+};
+static const unsigned int tsn0_mdio_a_pins[] = {
+ /* TSN0_MDC_A, TSN0_MDIO_A */
+ RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
+};
+static const unsigned int tsn0_mdio_a_mux[] = {
+ TSN0_MDC_A_MARK, TSN0_MDIO_A_MARK,
+};
+static const unsigned int tsn0_link_b_pins[] = {
+ /* TSN0_LINK_B */
+ RCAR_GP_PIN(3, 8),
+};
+static const unsigned int tsn0_link_b_mux[] = {
+ TSN0_LINK_B_MARK,
+};
+static const unsigned int tsn0_magic_b_pins[] = {
+ /* TSN0_MAGIC_B */
+ RCAR_GP_PIN(3, 12),
+};
+static const unsigned int tsn0_magic_b_mux[] = {
+ TSN0_MAGIC_B_MARK,
+};
+static const unsigned int tsn0_phy_int_b_pins[] = {
+ /* TSN0_PHY_INT_B */
+ RCAR_GP_PIN(3, 10),
+};
+static const unsigned int tsn0_phy_int_b_mux[] = {
+ TSN0_PHY_INT_B_MARK,
+};
+static const unsigned int tsn0_mdio_b_pins[] = {
+ /* TSN0_MDC_B, TSN0_MDIO_B */
+ RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 2),
+};
+static const unsigned int tsn0_mdio_b_mux[] = {
+ TSN0_MDC_B_MARK, TSN0_MDIO_B_MARK,
+};
+static const unsigned int tsn0_avtp_pps_pins[] = {
+ /* TSN0_AVTP_PPS */
+ RCAR_GP_PIN(3, 16),
+};
+static const unsigned int tsn0_avtp_pps_mux[] = {
+ TSN0_AVTP_PPS_MARK,
+};
+static const unsigned int tsn0_avtp_capture_a_pins[] = {
+ /* TSN0_AVTP_CAPTURE_A */
+ RCAR_GP_PIN(0, 1),
+};
+static const unsigned int tsn0_avtp_capture_a_mux[] = {
+ TSN0_AVTP_CAPTURE_A_MARK,
+};
+static const unsigned int tsn0_avtp_match_a_pins[] = {
+ /* TSN0_AVTP_MATCH_A */
+ RCAR_GP_PIN(0, 2),
+};
+static const unsigned int tsn0_avtp_match_a_mux[] = {
+ TSN0_AVTP_MATCH_A_MARK,
+};
+static const unsigned int tsn0_avtp_capture_b_pins[] = {
+ /* TSN0_AVTP_CAPTURE_B */
+ RCAR_GP_PIN(3, 18),
+};
+static const unsigned int tsn0_avtp_capture_b_mux[] = {
+ TSN0_AVTP_CAPTURE_B_MARK,
+};
+static const unsigned int tsn0_avtp_match_b_pins[] = {
+ /* TSN0_AVTP_MATCH_B */
+ RCAR_GP_PIN(3, 17),
+};
+static const unsigned int tsn0_avtp_match_b_mux[] = {
+ TSN0_AVTP_MATCH_B_MARK,
+};
+
+/* - TSN1 ------------------------------------------------ */
+static const unsigned int tsn1_link_a_pins[] = {
+ /* TSN1_LINK_A */
+ RCAR_GP_PIN(0, 15),
+};
+static const unsigned int tsn1_link_a_mux[] = {
+ TSN1_LINK_A_MARK,
+};
+static const unsigned int tsn1_phy_int_a_pins[] = {
+ /* TSN1_PHY_INT_A */
+ RCAR_GP_PIN(0, 19),
+};
+static const unsigned int tsn1_phy_int_a_mux[] = {
+ TSN1_PHY_INT_A_MARK,
+};
+static const unsigned int tsn1_mdio_a_pins[] = {
+ /* TSN1_MDC_A, TSN1_MDIO_A */
+ RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
+};
+static const unsigned int tsn1_mdio_a_mux[] = {
+ TSN1_MDC_A_MARK, TSN1_MDIO_A_MARK,
+};
+static const unsigned int tsn1_link_b_pins[] = {
+ /* TSN1_LINK_B */
+ RCAR_GP_PIN(3, 6),
+};
+static const unsigned int tsn1_link_b_mux[] = {
+ TSN1_LINK_B_MARK,
+};
+static const unsigned int tsn1_phy_int_b_pins[] = {
+ /* TSN1_PHY_INT_B */
+ RCAR_GP_PIN(3, 11),
+};
+static const unsigned int tsn1_phy_int_b_mux[] = {
+ TSN1_PHY_INT_B_MARK,
+};
+static const unsigned int tsn1_mdio_b_pins[] = {
+ /* TSN1_MDC_B, TSN1_MDIO_B */
+ RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 0),
+};
+static const unsigned int tsn1_mdio_b_mux[] = {
+ TSN1_MDC_B_MARK, TSN1_MDIO_B_MARK,
+};
+static const unsigned int tsn1_avtp_pps_pins[] = {
+ /* TSN1_AVTP_PPS */
+ RCAR_GP_PIN(3, 13),
+};
+static const unsigned int tsn1_avtp_pps_mux[] = {
+ TSN0_AVTP_PPS_MARK,
+};
+static const unsigned int tsn1_avtp_capture_a_pins[] = {
+ /* TSN1_AVTP_CAPTURE_A */
+ RCAR_GP_PIN(0, 7),
+};
+static const unsigned int tsn1_avtp_capture_a_mux[] = {
+ TSN1_AVTP_CAPTURE_A_MARK,
+};
+static const unsigned int tsn1_avtp_match_a_pins[] = {
+ /* TSN1_AVTP_MATCH_A */
+ RCAR_GP_PIN(0, 6),
+};
+static const unsigned int tsn1_avtp_match_a_mux[] = {
+ TSN1_AVTP_MATCH_A_MARK,
+};
+static const unsigned int tsn1_avtp_capture_b_pins[] = {
+ /* TSN1_AVTP_CAPTURE_B */
+ RCAR_GP_PIN(3, 15),
+};
+static const unsigned int tsn1_avtp_capture_b_mux[] = {
+ TSN1_AVTP_CAPTURE_B_MARK,
+};
+static const unsigned int tsn1_avtp_match_b_pins[] = {
+ /* TSN1_AVTP_MATCH_B */
+ RCAR_GP_PIN(3, 14),
+};
+static const unsigned int tsn1_avtp_match_b_mux[] = {
+ TSN1_AVTP_MATCH_B_MARK,
+};
+
+/* - TSN2 ------------------------------------------------ */
+static const unsigned int tsn2_link_a_pins[] = {
+ /* TSN2_LINK_A */
+ RCAR_GP_PIN(0, 16),
+};
+static const unsigned int tsn2_link_a_mux[] = {
+ TSN2_LINK_A_MARK,
+};
+static const unsigned int tsn2_phy_int_a_pins[] = {
+ /* TSN2_PHY_INT_A */
+ RCAR_GP_PIN(0, 20),
+};
+static const unsigned int tsn2_phy_int_a_mux[] = {
+ TSN2_PHY_INT_A_MARK,
+};
+static const unsigned int tsn2_mdio_a_pins[] = {
+ /* TSN2_MDC_A, TSN2_MDIO_A */
+ RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3),
+};
+static const unsigned int tsn2_mdio_a_mux[] = {
+ TSN2_MDC_A_MARK, TSN2_MDIO_A_MARK,
+};
+static const unsigned int tsn2_link_b_pins[] = {
+ /* TSN2_LINK_B */
+ RCAR_GP_PIN(3, 7),
+};
+static const unsigned int tsn2_link_b_mux[] = {
+ TSN2_LINK_B_MARK,
+};
+static const unsigned int tsn2_phy_int_b_pins[] = {
+ /* TSN2_PHY_INT_B */
+ RCAR_GP_PIN(3, 9),
+};
+static const unsigned int tsn2_phy_int_b_mux[] = {
+ TSN2_PHY_INT_B_MARK,
+};
+static const unsigned int tsn2_mdio_b_pins[] = {
+ /* TSN2_MDC_B, TSN2_MDIO_B */
+ RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 1),
+};
+static const unsigned int tsn2_mdio_b_mux[] = {
+ TSN2_MDC_B_MARK, TSN2_MDIO_B_MARK,
+};
+
static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(hscif0_data),
SH_PFC_PIN_GROUP(hscif0_clk),
@@ -1131,6 +1347,36 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(scif4_clk),
SH_PFC_PIN_GROUP(scif4_ctrl),
SH_PFC_PIN_GROUP(scif_clk),
+ SH_PFC_PIN_GROUP(tsn0_link_a),
+ SH_PFC_PIN_GROUP(tsn0_magic_a),
+ SH_PFC_PIN_GROUP(tsn0_phy_int_a),
+ SH_PFC_PIN_GROUP(tsn0_mdio_a),
+ SH_PFC_PIN_GROUP(tsn0_link_b),
+ SH_PFC_PIN_GROUP(tsn0_magic_b),
+ SH_PFC_PIN_GROUP(tsn0_phy_int_b),
+ SH_PFC_PIN_GROUP(tsn0_mdio_b),
+ SH_PFC_PIN_GROUP(tsn0_avtp_pps),
+ SH_PFC_PIN_GROUP(tsn0_avtp_capture_a),
+ SH_PFC_PIN_GROUP(tsn0_avtp_match_a),
+ SH_PFC_PIN_GROUP(tsn0_avtp_capture_b),
+ SH_PFC_PIN_GROUP(tsn0_avtp_match_b),
+ SH_PFC_PIN_GROUP(tsn1_link_a),
+ SH_PFC_PIN_GROUP(tsn1_phy_int_a),
+ SH_PFC_PIN_GROUP(tsn1_mdio_a),
+ SH_PFC_PIN_GROUP(tsn1_link_b),
+ SH_PFC_PIN_GROUP(tsn1_phy_int_b),
+ SH_PFC_PIN_GROUP(tsn1_mdio_b),
+ SH_PFC_PIN_GROUP(tsn1_avtp_pps),
+ SH_PFC_PIN_GROUP(tsn1_avtp_capture_a),
+ SH_PFC_PIN_GROUP(tsn1_avtp_match_a),
+ SH_PFC_PIN_GROUP(tsn1_avtp_capture_b),
+ SH_PFC_PIN_GROUP(tsn1_avtp_match_b),
+ SH_PFC_PIN_GROUP(tsn2_link_a),
+ SH_PFC_PIN_GROUP(tsn2_phy_int_a),
+ SH_PFC_PIN_GROUP(tsn2_mdio_a),
+ SH_PFC_PIN_GROUP(tsn2_link_b),
+ SH_PFC_PIN_GROUP(tsn2_phy_int_b),
+ SH_PFC_PIN_GROUP(tsn2_mdio_b),
};
static const char * const hscif0_groups[] = {
@@ -1281,6 +1527,45 @@ static const char * const scif_clk_groups[] = {
"scif_clk",
};
+static const char * const tsn0_groups[] = {
+ "tsn0_link_a",
+ "tsn0_magic_a",
+ "tsn0_phy_int_a",
+ "tsn0_mdio_a",
+ "tsn0_link_b",
+ "tsn0_magic_b",
+ "tsn0_phy_int_b",
+ "tsn0_mdio_b",
+ "tsn0_avtp_pps",
+ "tsn0_avtp_capture_a",
+ "tsn0_avtp_match_a",
+ "tsn0_avtp_capture_b",
+ "tsn0_avtp_match_b",
+};
+
+static const char * const tsn1_groups[] = {
+ "tsn1_link_a",
+ "tsn1_phy_int_a",
+ "tsn1_mdio_a",
+ "tsn1_link_b",
+ "tsn1_phy_int_b",
+ "tsn1_mdio_b",
+ "tsn1_avtp_pps",
+ "tsn1_avtp_capture_a",
+ "tsn1_avtp_match_a",
+ "tsn1_avtp_capture_b",
+ "tsn1_avtp_match_b",
+};
+
+static const char * const tsn2_groups[] = {
+ "tsn2_link_a",
+ "tsn2_phy_int_a",
+ "tsn2_mdio_a",
+ "tsn2_link_b",
+ "tsn2_phy_int_b",
+ "tsn2_mdio_b",
+};
+
static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(hscif0),
SH_PFC_FUNCTION(hscif1),
@@ -1306,6 +1591,9 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(scif3),
SH_PFC_FUNCTION(scif4),
SH_PFC_FUNCTION(scif_clk),
+ SH_PFC_FUNCTION(tsn0),
+ SH_PFC_FUNCTION(tsn1),
+ SH_PFC_FUNCTION(tsn2),
};
static const struct pinmux_cfg_reg pinmux_config_regs[] = {