]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pinctrl/sh-pfc/pfc-r8a7795.c
pinctrl: sh-pfc: r8a7795: Add group for QSPI0 and QSPI1 pins
[karo-tx-linux.git] / drivers / pinctrl / sh-pfc / pfc-r8a7795.c
index a69c5dce89a4b6bd913d1c75cc112e42f3b30d11..135ed5cbeb44c5e6aaf76ca30a96e5c52751f7b3 100644 (file)
@@ -1648,11 +1648,33 @@ static const unsigned int avb_phy_int_mux[] = {
        AVB_PHY_INT_MARK,
 };
 static const unsigned int avb_mdc_pins[] = {
-       /* AVB_MDC */
-       RCAR_GP_PIN(2, 9),
+       /* AVB_MDC, AVB_MDIO */
+       RCAR_GP_PIN(2, 9), PIN_NUMBER('A', 9),
 };
 static const unsigned int avb_mdc_mux[] = {
-       AVB_MDC_MARK,
+       AVB_MDC_MARK, AVB_MDIO_MARK,
+};
+static const unsigned int avb_mii_pins[] = {
+       /*
+        * AVB_TX_CTL, AVB_TXC, AVB_TD0,
+        * AVB_TD1, AVB_TD2, AVB_TD3,
+        * AVB_RX_CTL, AVB_RXC, AVB_RD0,
+        * AVB_RD1, AVB_RD2, AVB_RD3,
+        * AVB_TXCREFCLK
+        */
+       PIN_NUMBER('A', 8), PIN_NUMBER('A', 19), PIN_NUMBER('A', 18),
+       PIN_NUMBER('B', 18), PIN_NUMBER('A', 17), PIN_NUMBER('B', 17),
+       PIN_NUMBER('A', 16), PIN_NUMBER('B', 19), PIN_NUMBER('A', 13),
+       PIN_NUMBER('B', 13), PIN_NUMBER('A', 14), PIN_NUMBER('B', 14),
+       PIN_NUMBER('A', 12),
+
+};
+static const unsigned int avb_mii_mux[] = {
+       AVB_TX_CTL_MARK, AVB_TXC_MARK, AVB_TD0_MARK,
+       AVB_TD1_MARK, AVB_TD2_MARK, AVB_TD3_MARK,
+       AVB_RX_CTL_MARK, AVB_RXC_MARK, AVB_RD0_MARK,
+       AVB_RD1_MARK, AVB_RD2_MARK, AVB_RD3_MARK,
+       AVB_TXCREFCLK_MARK,
 };
 static const unsigned int avb_avtp_pps_pins[] = {
        /* AVB_AVTP_PPS */
@@ -3698,6 +3720,55 @@ static const unsigned int usb2_mux[] = {
        USB2_PWEN_MARK, USB2_OVC_MARK,
 };
 
+/* - QSPI0 ------------------------------------------------------------------ */
+static const unsigned int qspi0_ctrl_pins[] = {
+       /* QSPI0_SPCLK, QSPI0_SSL */
+       PIN_NUMBER('W', 3), PIN_NUMBER('Y', 3),
+};
+static const unsigned int qspi0_ctrl_mux[] = {
+       QSPI0_SPCLK_MARK, QSPI0_SSL_MARK,
+};
+static const unsigned int qspi0_data2_pins[] = {
+       /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */
+       PIN_A_NUMBER('C', 5), PIN_A_NUMBER('B', 4),
+};
+static const unsigned int qspi0_data2_mux[] = {
+       QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
+};
+static const unsigned int qspi0_data4_pins[] = {
+       /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1, QSPI0_IO2, QSPI0_IO3 */
+       PIN_A_NUMBER('C', 5), PIN_A_NUMBER('B', 4),
+       PIN_NUMBER('Y', 6), PIN_A_NUMBER('B', 6),
+};
+static const unsigned int qspi0_data4_mux[] = {
+       QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
+       QSPI0_IO2_MARK, QSPI0_IO3_MARK,
+};
+/* - QSPI1 ------------------------------------------------------------------ */
+static const unsigned int qspi1_ctrl_pins[] = {
+       /* QSPI1_SPCLK, QSPI1_SSL */
+       PIN_NUMBER('V', 3), PIN_NUMBER('V', 5),
+};
+static const unsigned int qspi1_ctrl_mux[] = {
+       QSPI1_SPCLK_MARK, QSPI1_SSL_MARK,
+};
+static const unsigned int qspi1_data2_pins[] = {
+       /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */
+       PIN_A_NUMBER('C', 7), PIN_A_NUMBER('E', 5),
+};
+static const unsigned int qspi1_data2_mux[] = {
+       QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
+};
+static const unsigned int qspi1_data4_pins[] = {
+       /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1, QSPI1_IO2, QSPI1_IO3 */
+       PIN_A_NUMBER('C', 7), PIN_A_NUMBER('E', 5),
+       PIN_A_NUMBER('E', 4), PIN_A_NUMBER('C', 3),
+};
+static const unsigned int qspi1_data4_mux[] = {
+       QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
+       QSPI1_IO2_MARK, QSPI1_IO3_MARK,
+};
+
 static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(audio_clk_a_a),
        SH_PFC_PIN_GROUP(audio_clk_a_b),
@@ -3720,6 +3791,7 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(avb_magic),
        SH_PFC_PIN_GROUP(avb_phy_int),
        SH_PFC_PIN_GROUP(avb_mdc),
+       SH_PFC_PIN_GROUP(avb_mii),
        SH_PFC_PIN_GROUP(avb_avtp_pps),
        SH_PFC_PIN_GROUP(avb_avtp_match_a),
        SH_PFC_PIN_GROUP(avb_avtp_capture_a),
@@ -3997,6 +4069,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
        SH_PFC_PIN_GROUP(usb0),
        SH_PFC_PIN_GROUP(usb1),
        SH_PFC_PIN_GROUP(usb2),
+       SH_PFC_PIN_GROUP(qspi0_ctrl),
+       SH_PFC_PIN_GROUP(qspi0_data2),
+       SH_PFC_PIN_GROUP(qspi0_data4),
+       SH_PFC_PIN_GROUP(qspi1_ctrl),
+       SH_PFC_PIN_GROUP(qspi1_data2),
+       SH_PFC_PIN_GROUP(qspi1_data4),
 };
 
 static const char * const audio_clk_groups[] = {
@@ -4024,6 +4102,7 @@ static const char * const avb_groups[] = {
        "avb_magic",
        "avb_phy_int",
        "avb_mdc",
+       "avb_mii",
        "avb_avtp_pps",
        "avb_avtp_match_a",
        "avb_avtp_capture_a",
@@ -4441,6 +4520,18 @@ static const char * const usb2_groups[] = {
        "usb2",
 };
 
+static const char * const qspi0_groups[] = {
+       "qspi0_ctrl",
+       "qspi0_data2",
+       "qspi0_data4",
+};
+
+static const char * const qspi1_groups[] = {
+       "qspi1_ctrl",
+       "qspi1_data2",
+       "qspi1_data4",
+};
+
 static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(audio_clk),
        SH_PFC_FUNCTION(avb),
@@ -4490,6 +4581,8 @@ static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(usb0),
        SH_PFC_FUNCTION(usb1),
        SH_PFC_FUNCTION(usb2),
+       SH_PFC_FUNCTION(qspi0),
+       SH_PFC_FUNCTION(qspi1),
 };
 
 static const struct pinmux_cfg_reg pinmux_config_regs[] = {